...below are from Holly. This is the feature that tests Holly's print stylesheet: @javascript Scenario: When printing a tree, the page appears black on white with all controls hidden...

hacks.mozilla.org

...Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting GitHub with Flash disabled shows an ugly grey box where the...

...and slated to move to release in mid-September, it is becoming available to JavaScript within user-action initiated callbacks...

makandra dev
github.com

...following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces...

...you get the bulk of the speed benefits from pjax (no recompiling of the JavaScript or CSS) without having to tailor the server-side response. It just works...

...happening when something else is focused). Instead you should explicitly trigger those events via Javascript. Examples for Capybara: page.execute_script("$('#foo').focus()") page.execute_script("$('#foo').blur()") If this doesn't...

...your test suite accumulates a larger number of Selenium tests (required for today's increasingly Javascript-heavy interfaces), tests will start to flicker more. Appendix Things I hope you never...

Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current .users container in the DOM: window.reloadUsers = -> $.get('/users').then (html...

makandra dev
draggabilly.desandro.com

Javascript library for drag'n'drop that seems to have more options than native HTML5 drag'n'drop. They also claim to support "multi-touch", which would be awesome if...

...on touch devices. Another library with similar aims is interact.js (Github). They're pitching JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers...

= form.file_field :add_images, class: 'hidden', multiple: true Add Images = gallery_form.submit Javascript Now to the dynamic part. I built it with an Unpoly compiler, but the code...

...times till it succeeds or a timeout is reached, when we're inside a @javascript feature. You're encouraged to use this for all of your own steps that check...

...will then always fail since we never re-fetch a fresh body. Prevent stray javascript requests between steps and scenarios We're using the gem capybara lockstep for that...

...any CSS that contains directives like background-image: url(/internal-path/wallpaper.png) will be break Referenced javascripts or stylesheets will probably attempt to load from the wrong URL The solution to this...

...a great enhancement when you want users to supply some kind of code (HTML, JavaScript, Ruby, etc). It offers syntax highlighting and some neat features like auto-indenting.

...probably don't want to. [2] If you don't speak CoffeeScript, take this JavaScript: this.app.decorator('$httpBackend', ['$delegate', function($delegate) { return function() { var headers = arguments[4]; var contentType = (headers != null...

...making a vanilla form submission to a hidden and try to wrap a nice Javascript API around this. I found it really hard to make this work reliably.

...will find that this is hard to test with Cucumber and Capybara: A non-Javascript Rack::Test scenario will just ignore the host and try to open /some/path in your...

makandra dev

...some utility functions for DOM manipulation and traversal in the up.element module. Further reading JavaScript without jQuery (presentation from...

blog.patricktriest.com

Sometimes modern Javascript projects get out of hand. A major culprit in this can be the messy handling of asynchronous tasks, leading to long, complex, and deeply nested blocks of...

...code. Javascript now provides a new syntax for handling these operations, and it can turn even the most convoluted asynchronous operations into concise and highly readable code...

...real ones. An attacker with control over a victim's browser can simply use JavaScript or web developer tools to retrieve values from those inputs...

makandra dev

position: fixed; top: 0; width: auto; display: none; border: none; margin: 0; } Javascript ;(function($) { $.fn.fixHeader = function() { return this.each(function() { var $table = $(this), $t_fixed; function init() { $t_fixed...

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

...you can switch between drivers using tags: Feature: The app works with low resolutions @javascript @chrome320x480 Scenario: Visit my profile in low res Given "bart" is a user with the...

blog.arkency.com

Amazing guide how to divide a ball of Javascript spaghetti distinct separate layers (model, view, controller, backend adapter). It does not use a Javascript framework...

kushagragour.in

A tooltip library that does not use Javascript. Works in IE9+. This library (or the technique used by it) could be a great choice for projects with a lot of...

...tooltips, which are hard to do fast with Javascript...

teddevito.com

This is a demo of the "Tabby" Javascript jQuery plugin to use tabs in regular textareas to make them suitable for in-browser coding of languages like HTML, CSS, Javascript...

makandra dev
github.com

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

github.com

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