When you use native smooth scrolling there is no built-in method to detect the end of the scrolling animation...
Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...
HTTP header values must only contain low-ASCII (7-bit) characters for safe transport. From RFC 7230: Historically, HTTP has...
To read the current breakpoint tier in JavaScript, employ this CSS: :root { --current-breakpoint-tier: xs; @media (min-width: $screen...
In a Jasmine spec you want to spy on a function that is imported by the code under test. This...
The cards editor has a feature "Cite other card" to create links to other cards in the same deck as...
In esbuild, you usually import other files using relative paths: import './some-related-module' import `../../utils/some-utility-module` import `../../../css/some-css.sass` This is totally fine...
Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common...
TLDR: sass >= 1.35.0 has the option quietDeps to silence deprecation warnings from dependencies. quietDeps: If true, the compiler must not...
tl;dr In Chrome DevTools in the Elements tab or in Firefox in the Inspector tab you can right click...
You can use the code below to check whether the browser can make connections to the current site: await isOnline...
If you have a JS fiddle, you can open it in fullscreen by appending /show to the URL. Example: https://...
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...
tl;dr: Use the URLSearchParams API to make your live easier if you want to get or manipulate query parameters...
Due to the way we setup Jasmine tests in our projects, you may run into various errors when Jasmine boots...
While we are used to run our JavaScript tests on a test page within our Browser, it's also possible...
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...
Building application assets with esbuild is the new way to do it, and it's great, especially in combination with...
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...
The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...
Similar to the Webpack Bundle Analyzer, Chrome's new Lighthouse feature … … shows a visualisation of your JavaScript bundles. It's...