Currently not possible as the linked .htc file contains JavaScript which is not explicitly called. The developers are working on a pure JavaScript solution which will have some downsides but...
...Often you’ll want to run only some scenarios with a driver that supports JavaScript, Capybara makes this easy: simply tag the scenario (or feature) with @javascript...
...openTasks = $.find('.task.open', container); Note that Sizzle returns vanilla DOM nodes in a vanilla Javascript array. It does not return jQuery collections...
...will break after modifying the collection like above. The following solution works. It uses JavaScript methods which modify the object in place, thus keeping any extra attributes: var index = element.indexOf...
Service just like Factory, but: instead of a funciton, it receives a Javascript class / a constructor function as argument simplest service type, but also least flexible Value
...this, you simply cannot clone instances of Coffeescript instances as you would clone other Javascript hashes. If you need cloning, you would probably need to implement a clone() method in...
When you need to check a value for presence, don't rely on JavaScript since it considers 0 or "0" false. Also don't rely on LoDash's _.isEmpty:
Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment with an Unpoly. Haml lets you use square brackets ([]) to...
...mind that the above examples use jQuery. Tweak accordingly if you are using another JavaScript framework...
...someone reloads a form by pressing enter/return in the URL field, or by opening JavaScript links incorrectly. The attached initializer provides a default way to deal with this.
...Another concise way to write the statement is this: console.log({ foo, bar }); This uses Javascript's new destructuring syntax and is actually shorthand for: console.log({ foo: foo, bar: bar });
behavior: url(/PIE.htc); background: white; } li.active .content { background: red; } If you now use JavaScript to add the class .active to another li, the contained .content (whose background should have...
...a nice data attribute to the form fields, and look for that in your JavaScript code: document.on('change', '[data-requires-update]', updateThings); If you are interested in the element that...
...re already using lazysizes, you can use its object-fit polyfill! Usage In your Javascript manifest, require them like this: #= require plugins/object-fit/ls.object-fit #= require lazysizes Now use the mixin below to...
...a correct window. [1] as in: a real browser window, maybe via window.open in JavaScript
...flaky end-to-end tests: This Ruby gem synchronizes Capybara commands with client-side JavaScript and AJAX requests. This greatly improves the stability of a full-stack integration test suite...
...this useful when creating responsive designs that work well on small screens. The attached Javascript gives a container different CSS classes (single_line or multiple_lines) depending on whether its...
...not necessarily a link or button, but could be any HTML element with a Javascript event binding. The easiest way to get this step is to use Spreewald. If you...
...aka least harmful) submit element before others. NB: If you submit a form via JavaScript none of the buttons' attributes will be submitted...
...so you can both use up the entire quota. Note that the Google Maps Javascript API (the one that draws maps on the screen) has a different quota policy. Here...
...for the given label, then checks if that field is hidden via CSS (or Javascript). It is not currently tested if the label is visible or hidden. For this see...
You can include files from app/assets or from the public folder with javascript_include_tag. The subtle difference that tells rails how to build the path correctly is a single...
...slash at the beginning of the path: <%= javascript_include_tag('ckeditor/config') %> # for assets/ckeditor/config.js <%= javascript_include_tag('/ckeditor/ckeditor') %> # for public/ckeditor/ckeditor.js This also applies to stylesheet_link_tag. Note that when you...
...order to navigate through the browser history. you can manipulate the window.history object via javascript like follows: When /^I go back in the browser history$/ do page.evaluate_script('window.history.back()')
...menu for copying and pasting will appear. This can confuse unexperienced users. Use the Javascript hack below to disable text selection on mobile devices: // Deactivating distracting Text Selection: