// Chrome 156 vs 157: paste into the DevTools console on any https:// page and press Enter.
// Each line prints "<change> <check> = <value>". Expected values: clearcotelabs.com/chrome-releases/157
(async () => {
const checks = [
["grease-brand", () => navigator.userAgentData.brands.map((b) => `${b.brand};v=${b.version}`).join(', ')],
["protected-audience-removed", () => typeof navigator.joinAdInterestGroup],
["protected-audience-removed", () => 'runAdAuction' in navigator],
["html-in-canvas", () => typeof CanvasRenderingContext2D.prototype.drawElementImage],
["html-in-canvas", () => typeof ElementImage],
["html-in-canvas", () => 'onpaint' in HTMLCanvasElement.prototype],
["html-insertion-methods", () => typeof Element.prototype.appendHTML],
["html-insertion-methods", () => typeof Element.prototype.streamHTML],
["html-insertion-methods", () => typeof TrustedTypePolicy.prototype.createParserOptions],
["window-property-order", () => Object.getOwnPropertyNames(window).indexOf('ProgressEvent') > Object.getOwnPropertyNames(window).indexOf('Lock')],
["window-property-order", () => Object.getOwnPropertyNames(PerformancePaintTiming.prototype)[0]],
["input-client-rect", () => (() => { const i = document.body.appendChild(document.createElement('input')); i.style.cssText = 'appearance: none; box-sizing: content-box; width: 100px; border: 5px solid; padding: 0 20px'; const v = `${i.clientWidth},${i.clientLeft}`; i.remove(); return v; })()],
["text-decoration-inset", () => CSS.supports('text-decoration-inset', '1px')],
["text-decoration-inset", () => getComputedStyle(document.documentElement).length],
["text-overflow-string", () => CSS.supports('text-overflow', '"x"')],
["position-visibility-values", () => CSS.supports('position-visibility', 'anchor-visible')],
["position-visibility-values", () => CSS.supports('position-visibility', 'anchor-valid')],
["position-visibility-values", () => (() => { const d = document.createElement('div'); d.style.positionVisibility = 'anchors-visible'; return d.style.positionVisibility; })()],
["appearance-display", () => (() => { const s = document.body.appendChild(document.createElement('span')); s.style.appearance = 'auto'; const v = getComputedStyle(s).display; s.remove(); return v; })()],
["linear-color-spaces", () => (() => { try { return new ImageData(1, 1, { colorSpace: 'srgb-linear' }).colorSpace; } catch (e) { return e.name; } })()],
["webtransport-headers-reliability", () => 'responseHeaders' in (globalThis.WebTransport?.prototype ?? {})],
["webtransport-headers-reliability", () => typeof globalThis.WebTransport?.supportsReliableOnly],
["sanitizer-boolean-setters", () => typeof new Sanitizer().removeUnsafe()],
["noscript-head-parser", () => new DOMParser().parseFromString('<head><noscript><head><style></style>', 'text/html').querySelector('noscript').childElementCount],
["setfromhex-prefix", () => (() => { const u = new Uint8Array(16); try { u.setFromHex('aa'.repeat(4) + 'zz' + 'aa'.repeat(11)); } catch (e) {} return u[0]; })()],
["temporal-era-defaults", () => Temporal.PlainDate.from('2026-11-03').toLocaleString('en-US', { era: 'short' }).includes('2026')],
["regexp-class-string-casefold", () => new RegExp('[\\q{a}]', 'vi').test('A')],
["parser-grammar-fixes", () => (() => { try { return (0, eval)('(function () { var await = 7; return class { static x = await; }; })().x'); } catch (e) { return e.name; } })()],
["parser-grammar-fixes", () => (() => { try { (0, eval)('0 ? 0 : () => {} ? 1 : 2'); return 'parsed'; } catch (e) { return e.name; } })()],
];
const out = [];
for (const [id, f] of checks) {
let v;
try { v = await f(); } catch (e) { v = "throws " + e.name; }
const expr = f.toString().replace(/^\(\)\s*=>\s*/, "");
out.push(id.padEnd(28) + expr + " = " + (typeof v === "string" ? JSON.stringify(v) : String(v)));
}
console.log(out.join("\n"));
})();