@briankardell
JavaScript Core
A Primer for Busy People
Webkit
Web Renderers
(WebViews)
Webkit
OS Implementations
A Primer for Busy People
This Part
Browser
"Chrome" & Internals
OS Implementations
Webkit
A Primer for Busy People
Safari (iOS/Mac)
Epiphany (Linux)
We are maintainers of Epiphany
Browser
OS Impls
Webkit
We are active contributors to Webkit
Browser
OS Impls
Webkit
We make Webkit GTK / WPE
Browser
OS Impls
Webkit
Consideration
Development
Preview
Release
Inclusion?
exploring
in public use
... and JavaScript
const theBiggestInt = 9007199254740991n;
const alsoHuge = BigInt(9007199254740991); // ↪ 9007199254740991n
const hugeButString = BigInt('9007199254740991'); // ↪ 9007199254740991n
class Counter extends HTMLElement {
#x = 0;
max = 10;
clicked() {
this.#x++;
window.requestAnimationFrame(this.render.bind(this));
}
constructor() {
super();
this.onclick = this.clicked.bind(this);
}
connectedCallback() { this.render(); }
render() {
this.textContent = `${
(this.#x < this.max)
?
this.#x.toString()
:
this.y.toString()
}`;
}
}
window.customElements.define('uptoten-counter', Counter);
:root {
--theme-bg: darkgray;
--theme-fg: white;
}
@media (prefers-color-scheme: dark) {
--theme-bg: darkgray;
--theme-fg: white;
}
body {
background-color: var(--theme-bg);
color: var(--theme-fg);
}
navigator.share({
title: document.title,
text: "The WebKit Blog",
url: "https://webkit.org/blog"
});
Under-celebrated Wins for Developers
<img
loading='lazy'
src='lazy-cat.jpg'
onload='console.log("lazy cat");' />
(in development)
Before*
After*
Have
Need
const resizeObserver = new ResizeObserver(entries => {
for (let entry of entries) {
let size = "small"
if (entry.contentRect.width > 400) {
size = "medium"
}
if (entry.contentRect.width > 800) {
size = "large"
}
entry.target.setAttribute("data-block-scale", size)
}
})
let blocks = document.querySelectorAll(".media-block")
blocks.forEach(el => {
resizeObserver.observe(el)
});
In Preview!
function callback(entries) {
entries.forEach((entry) => {
if (entry.isIntersecting) {
// do something!
}
});
}
let observer = new IntersectionObserver(callback, {
root: null,
rootMargin: "100px"
})
let lazyElements = document.querySelectorAll('.lazy')
lazyElements.forEach((el) => {
observer.observe(el);
})
In Preview!
... and JavaScript
What is important to you?
Which things cause you pain?
Where would you like to see advancements in either the Web Platform at large or in Webkit specifically, and how can we help?