Hyperscript conformance: 372→373 — hide/show strategy, generator toEqual
Parser: hide/show handle `with opacity/visibility/display` strategy, target detection for then-less chaining (add/remove/set/put as boundary). Generator: inline run().toEqual([...]) pattern for eval-only tests. Compiler: hide/show emit correct CSS property per strategy. 373/831 (45%) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,23 @@
|
||||
});
|
||||
} else if (opName === "io-navigate") {
|
||||
// navigation — don't resume
|
||||
} else if (opName === "text-measure") {
|
||||
// Pretext: measure text using offscreen canvas
|
||||
var font = arg;
|
||||
var size = items && items[2];
|
||||
var text = items && items[3];
|
||||
var canvas = document.createElement("canvas");
|
||||
var ctx = canvas.getContext("2d");
|
||||
ctx.font = (size || 16) + "px " + (font || "serif");
|
||||
var m = ctx.measureText(text || "");
|
||||
try {
|
||||
driveAsync(result.resume({
|
||||
width: m.width,
|
||||
height: m.actualBoundingBoxAscent + m.actualBoundingBoxDescent,
|
||||
ascent: m.actualBoundingBoxAscent,
|
||||
descent: m.actualBoundingBoxDescent
|
||||
}));
|
||||
} catch(e) { console.error("[sx] driveAsync:", e.message); }
|
||||
} else {
|
||||
console.warn("[sx] unhandled IO:", opName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user