Jasmine specs that work with DOM elements often leave elements in the DOM after they're done. This will leak...

tl;dr In Chrome DevTools in the Elements tab or in Firefox in the Inspector tab you can right click...

makandra dev

tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...

You have uncommited changes (you can always check by using git status), which you want to discard.

You can use the code below to check whether the browser can make connections to the current site: await isOnline...

It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...

Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...

tl;dr With ES2021 you now can use str.replaceAll(), Promise.any(), logical assignment operators, numeric separators and WeakRef on all major...

In Chrome DevTools you can use getEventListeners(object) to get a list of registered event listeners on the specified object...

tl;dr: Use the URLSearchParams API to make your live easier if you want to get or manipulate query parameters...

Sometimes you will need an input field which wraps content and grows in height as soon as content gets longer...

Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

While we are used to run our JavaScript tests on a test page within our Browser, it's also possible...

makandra dev

To ensure a consistent code style for JavaScript code, we use ESLint. The workflow is similar to integrating rubocop...

This are the steps I needed to do to add esbuild to an application that used the vanilla rails asset...

github.com

When Capybara locates elements in the DOM, by default it allows only accessing visible elements -- when you are using a...

stackoverflow.com

One really simple way to check whether JavaScript Sentry integration was successful (raven-js or @sentry/browser), is to create an...

Use option:checked to find the currently selected option: select.querySelector('option:checked') Yes, :checked, not :selected. This is the same...

Jasmine has spyOnProperty(), but it only works if the property is implemented using getter and setter functions. This is a...

dev.to

In my case [...] the catalog is an XML that contains all kinds of possible products, categories and vendors and it...

TL;DR When using Cache-Control on a Rails application, make sure the Vary: Accept header is set.

The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...

umaar.com

Similar to the Webpack Bundle Analyzer, Chrome's new Lighthouse feature … … shows a visualisation of your JavaScript bundles. It's...

From Exploring ES6: Module imports are hoisted (internally moved to the beginning of the current scope). Therefore, it doesn’t...