For Rails models where only one of multiple attributes may be filled out at the same time, there is no...

These are the results of the "personal tech stack survey". I've included only the most popular mentions, maybe it...

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

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...

There is a way to use multiple databases in Rails. You may have asked yourself how you're able to...

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

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...

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...

makandra dev

Field error steps Spreewald's The...

...field should have an error and The...

...field should have the error...

...steps now...

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...

Jasmine is a great way to unit test your JavaScript components without writing an expensive end-to-end test for...

A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...

You want to use fields in your applications. However, your desktop users may encounter some weird quirks: Aside from allowing...

Event delegation is a pattern where a container element has a single event listener that handles events for all descendants...

Most browsers have built-in drag and drop support for different page elements like text and images. While this may...

Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...

It is generally discouraged to load your JavaScript by a tag in the : The reason is that a tag will pause the DOM parser until the script has loaded and executed. This will delay the browser's first contentful paint. A much better default is to load your scripts with a tag: A deferred script has many...

The attached compiler() function below applies JavaScript behavior to matching HTML elements as they enter the DOM. This works like...