- How the browser renders the document
- Receives the data (bytes) from the server.
- Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
- Turns tokens into nodes.
- Turns nodes into the
DOM
tree.
- Builds
CSSOM
tree from thecss rules
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TMDB_IMAGE_BASE_URL = 'https://image.tmdb.org/t/p/'; | |
addEventListener("fetch", e => { | |
const url = new URL(e.request.url); | |
if (url.pathname === "/image") { | |
e.respondWith((async () => { | |
const width = url.searchParams.get("width"); | |
const path = url.searchParams.get("path"); | |
try { | |
return await fetch(`${TMDB_IMAGE_BASE_URL}/w${width}${path}`, {mode: "no-cors"}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<content-section | |
[csTitle]="title" | |
[collapsible]="collapsible" | |
[state]="state" | |
[locked]="locked" | |
[noButtons]="noButtons" | |
[buttons]="_buttons" | |
> | |
<!-- Custom controls --> | |
<ng-content></ng-content> |
Sample run on Ubuntu 22.04 LTS [i7-4900MQ CPU @ 2.80GHz/32GB] Chromium 105.0.5195.102
Solid (solid.html
)
Created 205760 nodes.
1 ms; sum: 4.55651722365801e+305
278 ms; sum: 9.11303444731602e+305
@preact/signals (preactive.html
)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf8" /> | |
<title>Canvascolor</title> | |
<style> | |
body { | |
background-image:url(http://github.com/favicon.ico); /*Just for fun*/ | |
} | |
main { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET _search | |
{ | |
"query": { | |
"match_all": {} | |
} | |
} | |
GET _cat/indices | |
GET dev-content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/perjerz/node-icu-tokenizer | |
{ | |
'targets': [ | |
{ | |
'target_name': 'node-icu-tokenizer', | |
'sources': [ 'node-icu-tokenizer.cpp' ], | |
'cflags_cc': [ | |
'-std=c++17', | |
'-fexceptions', | |
'-Wall', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'targets': [ | |
{ | |
'target_name': 'node-icu-tokenizer', | |
'sources': [ 'node-icu-tokenizer.cpp' ], | |
'cflags_cc': [ | |
'-std=c++17', | |
'-fexceptions', | |
'-Wall', | |
'-O3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {number[]} nums | |
* @return {number} | |
*/ | |
var removeDuplicates = function(nums) { | |
const length = nums.length; | |
let i = 1; | |
let startIndex = 0; | |
let count = 0; | |
while(i < nums.length && nums[i] != undefined) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://leetcode.com/problems/merge-two-sorted-lists/submissions/ | |
/** | |
* Definition for singly-linked list. | |
* function ListNode(val, next) { | |
* this.val = (val===undefined ? 0 : val) | |
* this.next = (next===undefined ? null : next) | |
* } | |
*/ | |
/** | |
* @param {ListNode} list1 |
NewerOlder