Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...

makandra dev
github.com

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

When you repeat a subpattern with a *, + or {...} operator, you may choose between greedy, lazy and possessive modes. Switching modes...

getbootstrap.com

Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...

makandra dev

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...

makandra dev

I just finished migrating a project from the Asset Pipeline to Webpacker, this is what my diff to master looks...

TinyMCE is a WYSIWYG editor which is quite customizable. Add a custom button to the tinyMCE toolbar and tell tinyMCE...

makandra dev

Feature Queries (Edge 12+): Similar to @media queries, @supports blocks can be scoped to browsers that support a given declaration...

When deploying a Rails application that is using Webpacker and Capistrano, there are a few configuration tweaks that optimize the...

github.com

Scroll and touch event listeners tend to be computationally expensive as they are triggered very often. Every time the event...

gomakethings.com

Learn how to create offline applications with service workers. The amazing power of service workers Writing your first service worker...

makandra dev
developers.google.com

Chrome has a built-in utility to check performance and accessibility (and more) of your web app: Lighthouse.

webpack.js.org

You can do this per environment, e.g. in config/webpack/test.js: const environment = require('./environment') const config = environment.toWebpackConfig() config.devtool = 'none' module.exports = config

If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...

CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...

"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...

Here is an ES5 object literal with two string properties and a function property: let user = { firstName: 'Max', lastName: 'Muster...

makandra dev

# Basic HTML example # Javascript API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and...

Let's say you want to merge the properties of two JavaScript objects: let a = { foo: 1, bar: 2 }

makandra dev

RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...

Select2 is a fantastic library for advanced dropdown boxes, but it depends on jQuery. Alternatives Tom Select

makandra dev
select2.org

Select2 comes with AJAX support built in, using jQuery's AJAX methods. ... For remote data sources only, Select2 does not...

makandra dev
github.com

If you render markdown from user input, an attacker might be able to use this to inject javascript code into...