...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.
...gem 'jsbundling-rails' group :development, :test do gem 'foreman' # ... end bundle install run bin/rails javascript:install:esbuild in a console to prepare esbuild. run yarn install to install all packages...
...assets:clobber to remove the precompiled assets again. adapt your stylesheet_link_tag and javascript_link_tag to match the new pack names. start the development server with the command...
...security vulnerabilities. The dependencies of your apps are Ruby, Rails, all other gems and JavaScript libraries. Find out what a CVE advisory is. Understand how we're dealing with security...
...using unicode escape sequences: escapeHighASCII('{"foo":"xäy"}') // => '{"foo":"x\\u00e4y"}' Escaping high ASCII in JavaScript function escapeHighASCII(string) { let unicodeEscape = (char) => "\\u" + char.charCodeAt(0).toString(16).padStart(4, '0')
...are a simple animation framework that is built right into browsers. No need for Javascript here. They're supported by all browsers. Basic usage Transitions are used to animate the...
...concept, like a Ruby class attribute (snake_case) that is also exposed to the JavaScript world (camelCase). # This query matches "foobar", "foo-bar" and "foo_bar" # The query is case...
...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...
...missing an href attribute. This will probably happen to you every now and then on JavaScript-heavy applications. An example would be an AngularJS application where the following HTML actually...
...called a consent management platform (CMP). Your website will load this CMP via a JavaScript tag which will then directly render the form. The form will show the user detailed...
...See https://www.consentstringdecoder.com/ for an example string. The CMP will even inject a standardized JavaScript function called __tcfapi into your website. This can be used by any other third-party...
...to this element. Example DOM Breakpoints can be quite useful to quickly find the JavaScript that is responsible for some (unexpected) behavior. You can use DOM Breakpoints for debugging subtree...
...or node removal. Here you can see a very simple example that shows what JavaScript lines are responsible for a text change (subtree modification): You can use this Code Pen...
All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and browser restores, but is different per new tab/window (in contrast...
Resources RubyGuides: Mastering Ruby Regular Expressions Using regular expressions in JavaScript Testing regular expressions visually Regular Expressions: Quantifier modes Ruby: You can nest regular expressions Matching line feeds with...
...query parameter ordering 1 URI ignoring query parameter ordering 2 Tests with AJAX Using javascript in integration tests might cause issues that AJAX requests are not recorded or bleed in...
...from the toolbar. For that, you should listen to the trix-initialize event in javascript. addEventListener("trix-initialize", event => { const { toolbarElement } = event.target const textTools = toolbarElement.querySelector("[data-trix-button-group=text...
...Recovery Point Objective (RPO) & Recovery Time Objective (RTO) YAML ain't markup language (YAML) JavaScript Object Notation (JSON) Alles unter Cloud Computing 101 AWS Fundamentals Aufgaben Das ist mehr eine...
...starred / movie is unstarred) is rendered by the server or by the client (using JavaScript). Try not to duplicate rendering logic or persistance logic though. Is this a good way...
...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...
...local development where you might still use http://. If you set any cookies from JavaScript, this isn't fixed by the middleware. Add this to lib/middleware/secure_cookies.rb: # On HTTPS requests, we...
testing-library are widely used testing utilities libraries for javascript dependent frontend testing. The main utilities provided are query methods, user interactions, dom expectations and interacting with components of several...
...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...
...be able to click and drag to scroll), or resort to some kind of JavaScript solution...
...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...
...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.
...that inherits from StandardError. A fun read is Ninja code (even though it's Javascript...