...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...
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...
...jQuery cache even exists. After all jQuery could simply attach event handlers to the Javascript object that represents the DOM element. The reason for the existence of the jQuery cache...
...is that old versions of Internet Explorer could not garbage-collect Javascript objects with circular references. For instance, the following object graph could not be reclaimed by old IE's...
...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...
...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...
...this, test for the right environment and place the JS-code afterwards: - if Rails.env.production? :javascript var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); _gaq.push(['_trackPageview...
...not it is hidden via CSS. In a Selenium scenario, visibility is detected via Javascript. This detection is very precise and should correctly determine visibility for the most fucked up...
...browsers that support a given declaration. There is CSS.supports() to do the equivalent in Javascript. backdrop-filter (Edge 17+, but not FF): Applying filters to what is visible through an...
...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...
...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...
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...
In JavaScript we often use Immediately Invoked Function Expessions (or IIFEs) to prevent local variables from bleeding into an outside scope: (function() { var foo = "value"; // foo is scoped to this...
...the value of the last expression, it may return DOM nodes: # coffeescript scope.focus = -> element.focus() # javascript scope.focus = function() { return element.focus(); // wheee } If you e.g. use this function like this, the error...
...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...
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...
...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...
...acts like Stripe’s and also serves a fake version of Stripe.js, Stripe’s JavaScript library that allows you to collect your customers’ payment information without ever having it touch...
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
...in your PT profile or in ~/.config/geordi/global.yml if you have ever used geordi commit javascript: (function() { var pt_project_id = 'XXX'; var pt_token='XXX'; var url = `https://www.pivotaltracker.com/services/v5/projects/$...
...that you can easily use or replace the theme. Does not come with extra JavaScript; some effects like button click ripples are implemented via CSS. Also check out their other...
...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...
...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...
...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...