If you are using this already, consider changes soon due the discussion around current ESX proposal.
Feel free to keep an eye on udomsay as that will be the implementation reference for consumers.
// in the app root | |
export const ROUTES = reatomRoutes({ | |
auth: { | |
login: {}, | |
registration: {}, | |
}, | |
goods: { | |
':id': { | |
edit: {}, | |
}, |
const NetworkStatus = { | |
ONLINE: 'online', | |
OFFLINE: 'offline', | |
PENDING: 'pending', | |
} as const | |
type NetworkStatusTypeOnline = 'online' | |
type NetworkStatusTypeOffline = 'offline' | |
type NetworkStatusTypePending = 'pending' | |
type NetworkStatusType = |
If you are using this already, consider changes soon due the discussion around current ESX proposal.
Feel free to keep an eye on udomsay as that will be the implementation reference for consumers.
With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.
This document is a comparison of various ways the <script>
tags in HTML are processed depending on the attributes set.
If you ever wondered when to use inline <script async type="module">
and when <script nomodule defer src="...">
, you're in the good place!
Note that this article is about <script>
s inserted in the HTML; the behavior of <script>
s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)
Event delegation works by attaching a single event listener to a parent element to catch events bubbling up from the children. Many people believe this is more performant than attaching event listeners to each child. I am not convinced this is always true.
Let's start with a common example of event delegation. Here we have a list of elements:
<ul id="item-list">
<li data-cost="12">Item 1</li>
<li data-cost="18">Item 2</li>
<li data-cost="6">Item 3</li>
...
Pug - это препроцессор HTML и шаблонизатор, который был написан на JavaScript для Node.js.
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
Name | Stars | Last Commit | Description |
---|---|---|---|
three.js | ![GitHub |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
# Change YOUR_TOKEN to your prerender token | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
server { | |
listen 80; | |
server_name example.com; | |
root /path/to/your/root; | |
index index.html; |