end end # app/controllers/jasmine_controller.rb class JasmineController < ApplicationController layout false def index end end -# app/views/jasmine/index.html.haml !!! %html %head = stylesheet_pack_tag 'jasmine', :media => 'all' %link{href: image_pack_tag('jasmine_favicon.png'), rel: 'icon...
...some handy stuff in here. Analysing Frontend Performance Issues Rendering Performace Breakpoints Breakpoints on HTML Elements Event Listener Breakpoints Debugging Browser debugging tricks Remote Debugging on Android Access DevTools via...
...Coverage. This gives a benefit because changes in JavaScript often correlate with changes in HTML. This may partly also be influenced by the fact that features are harder to prioritize...
...performance, looking at efforts Google Chrome takes to increase it. Preconnect With in an HTML head, you give the browser an early hint that it will need to access the...
...level, such that a component is using this class to render and modify some html, it may fastly become boilerplate to define every call of the method. Here callFake comes...
...something like BrandonText-Regular and BrandonText-Bold. (With flawed Meta-information) You have a HTML string to be rendered by PDFKit For demonstration purposes, this string also contains CSS styles...
Rails' fragment caching caches subtrees of an HTML document tree. While constructing that tree though, it can be really hard to keep track of whether some code is run in...
...a browser, your choice is to use either Flash or the new tag in HTML5. Each method has issues, but depending on your requirements you might not care about all...
Cannot reliably seek to a given position when playing VBR-encoded MP3s. HTML5 audio Is the future, but not quite here yet. Allows you to play audio with...
...fertigen Text mit den eigenen Daten aus, zusätzlich erhält man den Text auch noch im HTML-Format, den man sich am besten in einer Zwischenablage speichern sollte. #2. Impressum einfügen...
...sich eine "Static-HTML-App" installieren, mit der man Texte und Bilder (mit Hilfe einfacher HTML-Befehle) als eigene Tabs darstellen kann. Die App "Static HTML: iframe tabs" (https://apps.facebook.com...
...image editing before rendering the favicons, in all needed sizes, formats and with the HTML needed to include them! In Rails applications with Haml: put all the favicon files into...
store the HTML to app/views/layouts/_favicon.html add = render 'layouts/favicon' to in your application layout(s) ... and you're all set...
# Generate paths and URLs > app.project_path(Project.last) => "/projects/34" # Make requests > app.get '/projects/34' => 200 > app.response.body => " ..." # Use helpers helper.truncate("Foobar", length: 5...
...erb template doesn't allow you to indent code like you normally do in HTML mails. ❌ DON'T <%= 'foo' if bar %> "\n" if bar is false "foo\n" if bar...
...There is also -webkit-line-clamp which works only on Chrome. Example Consider this HTML and Sass for a box that is not wide enough for its content: Hello universe...
Einschub: Was ist XSS? XSS = Cross Site Scripting. Passiert wenn ein User ungefiltertes HTML in die Webseite einfügen kann. Danke für den interessanten Beitrag! alert('you have been hacked') Rails löst das Problem weitgehend...
The robots.txt file and HTML tag can be used to control the behavior of search engine crawlers. Both have different effects. robots.txt Marking a URL path as "disallowed" in robots.txt...
...the fourth level of nesting. This is called "timeout clamping" and defined in the HTML spec: If nesting level is greater than 5, and timeout is less than 4, then...
...don't support it (mostly Safari <17.5). Step 1: Put some s into your HTML First, place explicit line breaks that should work for most cases. This depends on your...
...Basic HTML example # Javascript API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and select the best available source video.currentSrc // The selected source video.currentTime...
...will not mute the video! Use video.muted = true instead. Resources Mozilla docs on the HTML video element (recommended) – implemented HTML APIs: HTMLVideoElement, HTMLMediaElement, HTMLElement CanIUse: Supported by all browsers since...
...n} exactly n times Examples <[A-Za-z][A-Za-z0-9]*> matches an HTML tag without any attributes. <[A-Za-z0-9]+> is easier to write but matches invalid...
Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to do this: The preferred way is to use the ExternalInterface...
...when viewed from Capybara's internal browser (e.g. a tag cannot have content in HTML). Inspecting XML If you're inspecting XML that is invalid in HTML, you need to...
...the page source instead of the DOM. You may use Spreewald's "... in the HTML" meta step, or add this proxy step for better semantics: Then /^I should( not)? see...
...and follow methods. steps failing which contain page.body page.body is now wrapped by a html document skeleton. Use page.text instead. (e.g. when you are testing correct JSON which is in...
...fact not wrapped by a html sceleton) An element can't be clicked although it is present in the response html Only visible elements can be clicked. Maybe you need...
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...
...users').html(html) Testing this simple function poses a number of challenges: It only works if there is a ...
... container in the current DOM. Obviously the Jasmine spec runner has...
Imagine you have 2 HTML boxes. The first one has a margin-bottom of let's say 30px and the second one a margin-top of 20px. After rules of...