Often people need links which are not linked directly, but should trigger execution of JavaScript. ❌ Bad workarounds
If you want to expand your Areca Raid by swapping out the disks for larger ones you will need to...
You can scale background images in CSS to the container size using background-size (Demo). Commonly, we use contain or...
You can throttle the network in your headless chrome via Selenium. This might be useful for debugging issues with flaky...
What is netfilter's Connection Tracking system? The connection tracking system often referenced as nf_conntrack is part of the...
When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...
I encountered a unlucky behavior of byebug 11.1.3 (the most recent version at time of writing) when using it with...
Browsers usually cache website content in order to provide the user with faster responses. Examples are returning to a website...
When a Ruby version gem has a letter in its version number, it is considered a pre-release:
Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...
When you need the DOM node of a tag (e.g. to read extra attributes, or to modify the DOM near it), you can usually reference it via document.currentScript. However, document.currentScript is unsupported in ancient browsers, like Internet Explorer 11 or wkhtmltopdf's Webkit engine. If you are not running async scripts, you can easily polyfill it: document.scripts[document.scripts.length - 1] It works because document.scripts grows with each tag that was evaluated. That is also the reason why this solution will not work reliably for async code. Demo: https://codepen.io/foobear/pen/poRLxQm
I use the TypeScript compiler for this, since its output is more minimal than Babel's. The following will transpile...
When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...
Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...
In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...
capybara-lockstep can help you with flaky end-to-end tests: This Ruby gem synchronizes Capybara commands with client-side...
json is part of the standard library of Ruby and deals with JSON, obviously. As you know, JSON is the...
If your project depends on an old version of ImageMagick that you can no longer install in your system, you...
When you repeat a subpattern with a *, + or {...} operator, you may choose between greedy, lazy and possessive modes. Switching modes...
Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...
In my experience, the most common sources of memory leaks are APIs like these: addEventListener. This is the most common...
TinyMCE is a WYSIWYG editor which is quite customizable. Add a custom button to the tinyMCE toolbar and tell tinyMCE...
When testing with Cucumber / Caypbara, iframes are ignored, so you can't interact with them. To interact with your iframe...
Feature Queries (Edge 12+): Similar to @media queries, @supports blocks can be scoped to browsers that support a given declaration...