xbintsc 0.6.10 → 0.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/ast/expressions.d.ts +6 -0
- package/dist/src/checker/globals.js +2 -1
- package/dist/src/checker/globals.js.map +1 -1
- package/dist/src/checker/type-infer.js +1 -1
- package/dist/src/checker/type-infer.js.map +1 -1
- package/dist/src/cli/help.d.ts +1 -1
- package/dist/src/codegen/generator/calls/literals.js +4 -1
- package/dist/src/codegen/generator/calls/literals.js.map +1 -1
- package/dist/src/codegen/generator/expressions/assignment.js +3 -1
- package/dist/src/codegen/generator/expressions/assignment.js.map +1 -1
- package/dist/src/codegen/generator/expressions/operators.js +2 -6
- package/dist/src/codegen/generator/expressions/operators.js.map +1 -1
- package/dist/src/codegen/generator/expressions/primary.d.ts +9 -0
- package/dist/src/codegen/generator/expressions/primary.js +44 -7
- package/dist/src/codegen/generator/expressions/primary.js.map +1 -1
- package/dist/src/codegen/generator/state.js +3 -0
- package/dist/src/codegen/generator/state.js.map +1 -1
- package/dist/src/codegen/generator/tables.js +3 -0
- package/dist/src/codegen/generator/tables.js.map +1 -1
- package/dist/src/driver/bundler/commonjs.js +1 -1
- package/dist/src/driver/bundler/commonjs.js.map +1 -1
- package/dist/src/driver/bundler/symbols.js +6 -0
- package/dist/src/driver/bundler/symbols.js.map +1 -1
- package/dist/src/driver/compiler.js +1 -1
- package/dist/src/driver/compiler.js.map +1 -1
- package/dist/src/driver/runtime-objects.d.ts +1 -1
- package/dist/src/driver/runtime-objects.js +2 -0
- package/dist/src/driver/runtime-objects.js.map +1 -1
- package/dist/src/driver/version.d.ts +1 -1
- package/dist/src/driver/version.js +1 -1
- package/dist/src/extensions/node/crypto/index.js +12 -1
- package/dist/src/extensions/node/crypto/index.js.map +1 -1
- package/dist/src/extensions/node/index.js +2 -0
- package/dist/src/extensions/node/index.js.map +1 -1
- package/dist/src/extensions/node/readline/index.d.ts +12 -0
- package/dist/src/extensions/node/readline/index.js +27 -0
- package/dist/src/extensions/node/readline/index.js.map +1 -0
- package/dist/src/parser/declarations/functions.js +6 -0
- package/dist/src/parser/declarations/functions.js.map +1 -1
- package/dist/src/parser/literals.js +1 -1
- package/dist/src/parser/literals.js.map +1 -1
- package/dist/tests/e2e/compile-builtins.test.js +26 -0
- package/dist/tests/e2e/compile-builtins.test.js.map +1 -1
- package/dist/tests/e2e/compile-modules.test.js +22 -0
- package/dist/tests/e2e/compile-modules.test.js.map +1 -1
- package/dist/tests/e2e/compile-node.test.js +37 -1
- package/dist/tests/e2e/compile-node.test.js.map +1 -1
- package/dist/tests/e2e/crypto-random.test.d.ts +9 -0
- package/dist/tests/e2e/crypto-random.test.js +63 -0
- package/dist/tests/e2e/crypto-random.test.js.map +1 -0
- package/dist/tests/e2e/date-parse.test.js +44 -1
- package/dist/tests/e2e/date-parse.test.js.map +1 -1
- package/dist/tests/e2e/gui-browser.test.js +61 -0
- package/dist/tests/e2e/gui-browser.test.js.map +1 -1
- package/dist/tests/e2e/gui-css-coverage.test.js +40 -1
- package/dist/tests/e2e/gui-css-coverage.test.js.map +1 -1
- package/dist/tests/e2e/gui-css-features.test.js +100 -0
- package/dist/tests/e2e/gui-css-features.test.js.map +1 -1
- package/dist/tests/e2e/gui-dom.test.js +63 -0
- package/dist/tests/e2e/gui-dom.test.js.map +1 -1
- package/dist/tests/e2e/gui-errors.test.d.ts +11 -0
- package/dist/tests/e2e/gui-errors.test.js +68 -0
- package/dist/tests/e2e/gui-errors.test.js.map +1 -0
- package/dist/tests/e2e/gui-form.test.d.ts +9 -0
- package/dist/tests/e2e/gui-form.test.js +359 -0
- package/dist/tests/e2e/gui-form.test.js.map +1 -0
- package/dist/tests/e2e/gui-script-import-order.test.js +6 -1
- package/dist/tests/e2e/gui-script-import-order.test.js.map +1 -1
- package/dist/tests/e2e/gui-style.test.js +82 -0
- package/dist/tests/e2e/gui-style.test.js.map +1 -1
- package/dist/tests/e2e/gui-unsupported.test.js +4 -3
- package/dist/tests/e2e/gui-unsupported.test.js.map +1 -1
- package/dist/tests/e2e/gui-webgl2-shadow-sampler.test.js +7 -1
- package/dist/tests/e2e/gui-webgl2-shadow-sampler.test.js.map +1 -1
- package/dist/tests/e2e/harness.d.ts +4 -0
- package/dist/tests/e2e/harness.js +2 -0
- package/dist/tests/e2e/harness.js.map +1 -1
- package/dist/tests/e2e/json-parse-errors.test.d.ts +9 -0
- package/dist/tests/e2e/json-parse-errors.test.js +48 -0
- package/dist/tests/e2e/json-parse-errors.test.js.map +1 -0
- package/dist/tests/e2e/readline.test.d.ts +7 -0
- package/dist/tests/e2e/readline.test.js +73 -0
- package/dist/tests/e2e/readline.test.js.map +1 -0
- package/doc/ai/language-support.md +2 -1
- package/doc/ai/zh-CN/language-support.md +2 -1
- package/doc/gui/api.md +24 -3
- package/doc/gui/dom.md +28 -14
- package/doc/gui/input.md +74 -3
- package/doc/gui/known-issues.md +2 -1
- package/doc/gui/layout.md +5 -1
- package/doc/implemented/node/crypto.md +8 -0
- package/doc/implemented/node/fs.md +1 -1
- package/doc/implemented/node/readline.md +34 -0
- package/doc/implemented/node.md +1 -0
- package/doc/implemented/stdlib.md +10 -2
- package/doc/unimplemented/node/modules.md +2 -3
- package/doc/unimplemented/node.md +2 -2
- package/doc/zh-CN/gui/api.md +20 -3
- package/doc/zh-CN/gui/dom.md +23 -13
- package/doc/zh-CN/gui/input.md +65 -4
- package/doc/zh-CN/gui/known-issues.md +2 -1
- package/doc/zh-CN/gui/layout.md +4 -1
- package/doc/zh-CN/implemented/node/crypto.md +6 -0
- package/doc/zh-CN/implemented/node/fs.md +1 -1
- package/doc/zh-CN/implemented/node/readline.md +33 -0
- package/doc/zh-CN/implemented/node.md +1 -0
- package/doc/zh-CN/implemented/stdlib.md +10 -2
- package/doc/zh-CN/unimplemented/node/modules.md +1 -2
- package/doc/zh-CN/unimplemented/node.md +2 -2
- package/package.json +7 -7
- package/runtime/ext_gui/browser_abort.cpp +2 -2
- package/runtime/ext_gui/browser_loop.cpp +1 -0
- package/runtime/ext_gui/browser_media.cpp +1 -1
- package/runtime/ext_gui/css_match.cpp +21 -1
- package/runtime/ext_gui/css_selector.cpp +2 -2
- package/runtime/ext_gui/document.cpp +12 -0
- package/runtime/ext_gui/dom.h +41 -2
- package/runtime/ext_gui/dom_api_canvas_image.cpp +2 -1
- package/runtime/ext_gui/dom_api_document.cpp +28 -0
- package/runtime/ext_gui/dom_api_events.cpp +18 -15
- package/runtime/ext_gui/dom_api_form.cpp +567 -0
- package/runtime/ext_gui/dom_api_internal.h +48 -214
- package/runtime/ext_gui/dom_api_mutation.cpp +1 -1
- package/runtime/ext_gui/dom_api_node.cpp +28 -15
- package/runtime/ext_gui/dom_api_node_read.cpp +28 -1
- package/runtime/ext_gui/dom_api_proto.cpp +47 -0
- package/runtime/ext_gui/dom_api_webgl_methods.h +217 -0
- package/runtime/ext_gui/dom_parse.cpp +114 -1
- package/runtime/ext_gui/error_report.cpp +166 -0
- package/runtime/ext_gui/form_focus.cpp +293 -0
- package/runtime/ext_gui/form_input.cpp +448 -0
- package/runtime/ext_gui/form_internal.h +30 -0
- package/runtime/ext_gui/form_shared.cpp +126 -0
- package/runtime/ext_gui/form_state.cpp +536 -0
- package/runtime/ext_gui/form_state.h +97 -0
- package/runtime/ext_gui/gui.cpp +16 -0
- package/runtime/ext_gui/gui_engine.h +53 -4
- package/runtime/ext_gui/gui_events.cpp +67 -49
- package/runtime/ext_gui/layout.cpp +6 -0
- package/runtime/ext_gui/layout.h +4 -0
- package/runtime/ext_gui/layout_flow.cpp +23 -1
- package/runtime/ext_gui/layout_inline.cpp +46 -14
- package/runtime/ext_gui/paint.cpp +26 -1
- package/runtime/ext_gui/paint_form.cpp +389 -0
- package/runtime/ext_gui/paint_internal.h +6 -0
- package/runtime/ext_gui/script.cpp +1 -1
- package/runtime/ext_gui/style.cpp +1 -0
- package/runtime/ext_gui/style.h +13 -0
- package/runtime/ext_gui/style_print.cpp +129 -0
- package/runtime/ext_gui/style_text.cpp +79 -0
- package/runtime/ext_gui/style_ua.cpp +42 -0
- package/runtime/ext_gui/warnings.cpp +5 -7
- package/runtime/ext_gui/webgl_texture.cpp +0 -8
- package/runtime/ext_gui/window.cpp +52 -62
- package/runtime/ext_gui/window_diagnostics.cpp +58 -0
- package/runtime/ext_gui/window_emit.cpp +51 -0
- package/runtime/ext_node/crypto/crypto.c +3 -2
- package/runtime/ext_node/crypto/crypto_hash.h +13 -0
- package/runtime/ext_node/crypto/crypto_random.c +339 -0
- package/runtime/ext_node/fs/async_worker.c +1 -1
- package/runtime/ext_node/fs/fs_ops.c +1 -1
- package/runtime/ext_node/fs/parts/platform.inc +67 -0
- package/runtime/ext_node/readline/readline.c +572 -0
- package/runtime/rt.h +42 -0
- package/runtime/rt_internal.h +3 -2
- package/runtime/xt_crypto.c +132 -0
- package/runtime/xt_io/exception.inc +29 -6
- package/runtime/xt_loop.c +36 -1
- package/runtime/xt_promise.c +26 -2
- package/runtime/xt_random.c +143 -0
- package/runtime/xt_regex/matcher.inc +9 -28
- package/runtime/xt_regex/parser.inc +65 -2
- package/runtime/xt_regex/types.inc +11 -1
- package/runtime/xt_regex.h +6 -2
- package/runtime/xt_stdlib/dispatch.inc +2 -0
- package/runtime/xt_stdlib/math.inc +1 -1
- package/runtime/xt_stdlib2/date.inc +206 -6
- package/runtime/xt_stdlib2/json.inc +4 -546
- package/runtime/xt_stdlib2/json_parse.inc +347 -0
- package/runtime/xt_stdlib2/json_stringify.inc +368 -0
- package/runtime/xt_stdlib2/regexp-match.inc +6 -11
- package/runtime/xt_stdlib2.c +0 -4
- package/runtime/xt_typed_array/elements.inc +2 -6
- package/runtime/xt_url.c +0 -6
- package/runtime/xt_url_object.c +1 -1
- package/src/ast/expressions.ts +6 -0
- package/src/checker/globals.ts +2 -0
- package/src/checker/type-infer.ts +1 -1
- package/src/codegen/generator/calls/literals.ts +4 -1
- package/src/codegen/generator/expressions/assignment.ts +3 -1
- package/src/codegen/generator/expressions/operators.ts +2 -6
- package/src/codegen/generator/expressions/primary.ts +58 -6
- package/src/codegen/generator/state.ts +3 -0
- package/src/codegen/generator/tables.ts +3 -0
- package/src/driver/bundler/commonjs.ts +1 -1
- package/src/driver/bundler/symbols.ts +6 -0
- package/src/driver/compiler.ts +1 -1
- package/src/driver/runtime-objects.ts +2 -0
- package/src/driver/version.ts +1 -1
- package/src/extensions/node/crypto/index.ts +12 -1
- package/src/extensions/node/index.ts +2 -0
- package/src/extensions/node/readline/index.ts +31 -0
- package/src/parser/declarations/functions.ts +6 -0
- package/src/parser/literals.ts +1 -1
|
@@ -226,5 +226,87 @@ describe.skipIf(!guiAvailable)("gui extension — style", () => {
|
|
|
226
226
|
expect(value("end-bg")).toBe("rgb(255, 255, 255)"); // finished
|
|
227
227
|
expect(value("end-radius")).toBe("10px");
|
|
228
228
|
});
|
|
229
|
+
it("serializes border side colors, widths and styles in computed style", () => {
|
|
230
|
+
const { value } = harness.compileAndRun("border-computed", `
|
|
231
|
+
import { createWindow, run } from "gui";
|
|
232
|
+
|
|
233
|
+
const HTML = \`
|
|
234
|
+
<html><head><style>
|
|
235
|
+
body { margin: 0; }
|
|
236
|
+
#f1 { border: 2px solid #00f; width: 60px; height: 20px; }
|
|
237
|
+
#f2 { border-top-color: #f00; border-top-width: 3px; border-top-style: dashed; }
|
|
238
|
+
#f3 { border-width: 1px 2px 3px 4px; border-style: dotted; color: #0f0; }
|
|
239
|
+
#f4 { }
|
|
240
|
+
</style></head><body>
|
|
241
|
+
<div id="f1"></div><div id="f2"></div><div id="f3"></div><div id="f4"></div>
|
|
242
|
+
</body></html>\`;
|
|
243
|
+
|
|
244
|
+
const win = createWindow({ title: "border", width: 320, height: 200 });
|
|
245
|
+
win.on("ready", () => {
|
|
246
|
+
win.loadHTML(HTML);
|
|
247
|
+
console.log("f1=" + win.computedStyle("#f1", "border-top-color") + ":" +
|
|
248
|
+
win.computedStyle("#f1", "border-top-width") + ":" +
|
|
249
|
+
win.computedStyle("#f1", "border-top-style"));
|
|
250
|
+
console.log("f2=" + win.computedStyle("#f2", "border-top-color") + ":" +
|
|
251
|
+
win.computedStyle("#f2", "border-top-width") + ":" +
|
|
252
|
+
win.computedStyle("#f2", "border-top-style"));
|
|
253
|
+
console.log("f3=" + win.computedStyle("#f3", "border-left-width") + ":" +
|
|
254
|
+
win.computedStyle("#f3", "border-bottom-width") + ":" +
|
|
255
|
+
win.computedStyle("#f3", "border-top-color"));
|
|
256
|
+
console.log("f4=" + win.computedStyle("#f4", "border-top-color") + ":" +
|
|
257
|
+
win.computedStyle("#f4", "border-top-width") + ":" +
|
|
258
|
+
win.computedStyle("#f4", "border-top-style"));
|
|
259
|
+
win.close();
|
|
260
|
+
});
|
|
261
|
+
win.loadHTML(HTML);
|
|
262
|
+
run();
|
|
263
|
+
`);
|
|
264
|
+
expect(value("f1")).toBe("rgb(0, 0, 255):2px:solid");
|
|
265
|
+
expect(value("f2")).toBe("rgb(255, 0, 0):3px:dashed");
|
|
266
|
+
// A single color declaration resolves to currentColor and applies to every
|
|
267
|
+
// side; per-side widths stay distinct.
|
|
268
|
+
expect(value("f3")).toBe("4px:3px:rgb(0, 255, 0)");
|
|
269
|
+
// No border: a used width of 0, style `none`, currentColor.
|
|
270
|
+
expect(value("f4")).toBe("rgb(0, 0, 0):0px:none");
|
|
271
|
+
});
|
|
272
|
+
it("matches :focus-within on the focused element and its ancestors", () => {
|
|
273
|
+
const { value } = harness.compileAndRun("focus-within", `
|
|
274
|
+
import { createWindow, run } from "gui";
|
|
275
|
+
|
|
276
|
+
const HTML = \`
|
|
277
|
+
<html><head><style>
|
|
278
|
+
body { margin: 0; }
|
|
279
|
+
#card { background-color: #111111; width: 120px; height: 48px; }
|
|
280
|
+
#card:focus-within { background-color: #00ff00; }
|
|
281
|
+
#deep:focus-within { background-color: #0000ff; }
|
|
282
|
+
</style></head><body>
|
|
283
|
+
<div id="card">
|
|
284
|
+
<input id="inner" value="x">
|
|
285
|
+
<div id="deep"><input id="deep-input"></div>
|
|
286
|
+
</div>
|
|
287
|
+
</body></html>\`;
|
|
288
|
+
|
|
289
|
+
const win = createWindow({ title: "focus-within", width: 300, height: 200 });
|
|
290
|
+
win.on("ready", () => {
|
|
291
|
+
const doc: any = win.document;
|
|
292
|
+
win.loadHTML(HTML);
|
|
293
|
+
console.log("before=" + win.computedStyle("#card", "background-color"));
|
|
294
|
+
doc.getElementById("inner").focus();
|
|
295
|
+
console.log("inner=" + win.computedStyle("#card", "background-color"));
|
|
296
|
+
doc.getElementById("deep-input").focus();
|
|
297
|
+
console.log("deep=" + win.computedStyle("#card", "background-color") + ":" +
|
|
298
|
+
win.computedStyle("#deep", "background-color"));
|
|
299
|
+
doc.getElementById("deep-input").blur();
|
|
300
|
+
console.log("blur=" + win.computedStyle("#card", "background-color"));
|
|
301
|
+
win.close();
|
|
302
|
+
});
|
|
303
|
+
win.loadHTML(HTML);
|
|
304
|
+
run();
|
|
305
|
+
`);
|
|
306
|
+
expect(value("before")).toBe("rgb(17, 17, 17)");
|
|
307
|
+
expect(value("inner")).toBe("rgb(0, 255, 0)");
|
|
308
|
+
expect(value("deep")).toBe("rgb(0, 255, 0):rgb(0, 0, 255)");
|
|
309
|
+
expect(value("blur")).toBe("rgb(17, 17, 17)");
|
|
310
|
+
});
|
|
229
311
|
});
|
|
230
312
|
//# sourceMappingURL=gui-style.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gui-style.test.js","sourceRoot":"","sources":["../../../tests/e2e/gui-style.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;AAEnC,QAAQ,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,uBAAuB,E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C,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,aAAa,CACrC,cAAc,EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCC,CACF,CAAC;QAEF,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAChD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC5D,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -54,7 +54,7 @@ const HTML = ${JSON.stringify(PAGE)};
|
|
|
54
54
|
const win = createWindow({ title: "unsupported", width: 320, height: 240 });
|
|
55
55
|
win.on("ready", () => {
|
|
56
56
|
/* A run-time created element is reported too, not just markup from the page. */
|
|
57
|
-
win.document.createElement("
|
|
57
|
+
win.document.createElement("meter");
|
|
58
58
|
win.document.querySelector(".one").style.setProperty("unsupported-two", "3px");
|
|
59
59
|
win.computedStyle(".one", "color");
|
|
60
60
|
console.log("done=1");
|
|
@@ -74,10 +74,11 @@ describe.skipIf(!guiAvailable)("gui extension — unsupported features", () => {
|
|
|
74
74
|
});
|
|
75
75
|
expect(value("done")).toBe("1");
|
|
76
76
|
expect(stderr).toContain("unsupported element <table>");
|
|
77
|
-
|
|
77
|
+
/* `input`/`select`/`textarea` are implemented form controls now. */
|
|
78
|
+
expect(stderr).not.toContain("unsupported element <input>");
|
|
78
79
|
expect(stderr).toContain("unsupported element <iframe>");
|
|
79
80
|
/* Created through `document.createElement`, after the page was parsed. */
|
|
80
|
-
expect(stderr).toContain("unsupported element <
|
|
81
|
+
expect(stderr).toContain("unsupported element <meter>");
|
|
81
82
|
/* Declared by two rules, but reported as one property name. */
|
|
82
83
|
expect(stderr).toContain("unsupported CSS property 'unsupported-one'");
|
|
83
84
|
/* Set through the CSSOM after the page was parsed. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gui-unsupported.test.js","sourceRoot":"","sources":["../../../tests/e2e/gui-unsupported.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;AAEnC,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCZ,CAAC;AAEF,MAAM,OAAO,GAAG;;;eAGD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;;;;;;;;;;;;CAYlC,CAAC;AAEF,SAAS,WAAW,CAAC,IAAY,EAAE,MAAc;IAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,QAAQ,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,sCAAsC,EAAE,GAAG,EAAE;IAC1E,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAElC,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,OAAO,EAAE;YACtE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,oCAAoC,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,mBAAmB,EAAE,OAAO,EAAE;YAC5E,OAAO,EAAE,IAAI;YACb,GAAG,EAAE,EAAE,kBAAkB,EAAE,GAAG,EAAE;SACjC,CAAC,CAAC;QACH,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -118,7 +118,13 @@ describe.skipIf(!guiAvailable)("gui extension — shadow samplers and gl_FragDep
|
|
|
118
118
|
win.close();
|
|
119
119
|
});
|
|
120
120
|
win.loadHTML(page);
|
|
121
|
-
`, {
|
|
121
|
+
`, {
|
|
122
|
+
files: { "page.html": PAGE },
|
|
123
|
+
/* Intel Macs miscompile the generated `sample_compare` (the draw writes
|
|
124
|
+
* nothing, so both probes read black); Metal shader validation makes the
|
|
125
|
+
* driver compile it correctly. See doc/gui/known-issues.md. */
|
|
126
|
+
env: process.platform === "darwin" ? { MTL_SHADER_VALIDATION: "1" } : undefined,
|
|
127
|
+
});
|
|
122
128
|
expect(value("fs")).toBe("true");
|
|
123
129
|
expect(value("link")).toBe("true");
|
|
124
130
|
expect(value("compare-mode")).toBe("34894"); // COMPARE_REF_TO_TEXTURE, 0x884e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gui-webgl2-shadow-sampler.test.js","sourceRoot":"","sources":["../../../tests/e2e/gui-webgl2-shadow-sampler.test.ts"],"names":[],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WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,6DAA6D;QAC7D,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAC3C,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -16,6 +16,8 @@ export interface RunOptions {
|
|
|
16
16
|
files?: Record<string, string>;
|
|
17
17
|
/** Extra environment variables for the compiled binary (e.g. XT_GC_THRESHOLD). */
|
|
18
18
|
env?: Record<string, string>;
|
|
19
|
+
/** Text fed to the child's standard input (for `readline` and stdin tests). */
|
|
20
|
+
input?: string;
|
|
19
21
|
/**
|
|
20
22
|
* Return stdout/stderr exactly as captured. By default CRLF is normalised to
|
|
21
23
|
* LF: the runtime opens stdout in binary mode on Windows, so a CRLF a test
|
|
@@ -36,6 +38,8 @@ export interface NodeRunOptions {
|
|
|
36
38
|
timeout?: number;
|
|
37
39
|
/** Extra modules written next to the entry file, keyed by relative path. */
|
|
38
40
|
files?: Record<string, string>;
|
|
41
|
+
/** Text fed to the child's standard input. */
|
|
42
|
+
input?: string;
|
|
39
43
|
/** See {@link RunOptions.raw}. */
|
|
40
44
|
raw?: boolean;
|
|
41
45
|
}
|
|
@@ -59,6 +59,7 @@ export function describeE2E(name, define, options = {}) {
|
|
|
59
59
|
const executed = spawnSync(result.outputPath, [], {
|
|
60
60
|
encoding: "utf8",
|
|
61
61
|
...(runOptions.env ? { env: { ...process.env, ...runOptions.env } } : {}),
|
|
62
|
+
...(runOptions.input !== undefined ? { input: runOptions.input } : {}),
|
|
62
63
|
...(runOptions.timeout ? { timeout: runOptions.timeout } : {}),
|
|
63
64
|
});
|
|
64
65
|
return {
|
|
@@ -73,6 +74,7 @@ export function describeE2E(name, define, options = {}) {
|
|
|
73
74
|
writeFileSync(entry, source);
|
|
74
75
|
const executed = spawnSync(process.execPath, ["--import", "tsx", entry], {
|
|
75
76
|
encoding: "utf8",
|
|
77
|
+
...(runOptions.input !== undefined ? { input: runOptions.input } : {}),
|
|
76
78
|
...(runOptions.timeout ? { timeout: runOptions.timeout } : {}),
|
|
77
79
|
});
|
|
78
80
|
expect(executed.status).toBe(0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness.js","sourceRoot":"","sources":["../../../tests/e2e/harness.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAA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AAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `JSON.parse` error handling.
|
|
3
|
+
*
|
|
4
|
+
* The parser used to return `0`/`undefined` for malformed input instead of
|
|
5
|
+
* throwing, so `try { JSON.parse(input) } catch` never ran. It now validates
|
|
6
|
+
* the grammar (numbers, strings, literals, separators, trailing text) and
|
|
7
|
+
* throws a catchable `SyntaxError`.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `JSON.parse` error handling.
|
|
3
|
+
*
|
|
4
|
+
* The parser used to return `0`/`undefined` for malformed input instead of
|
|
5
|
+
* throwing, so `try { JSON.parse(input) } catch` never ran. It now validates
|
|
6
|
+
* the grammar (numbers, strings, literals, separators, trailing text) and
|
|
7
|
+
* throws a catchable `SyntaxError`.
|
|
8
|
+
*/
|
|
9
|
+
import { expect, it } from "vitest";
|
|
10
|
+
import { describeE2E } from "./harness.js";
|
|
11
|
+
describeE2E("JSON.parse errors", (harness) => {
|
|
12
|
+
it("throws a catchable SyntaxError for malformed input", () => {
|
|
13
|
+
const stdout = harness.runProgram(`
|
|
14
|
+
const bad = [
|
|
15
|
+
"", "{bad", "{\\"a\\":}", "[1,]", "1 2", "undefined", "NaN", "'x'",
|
|
16
|
+
"{", "[1", "\\"abc", "01", "1.", "1e", "tru", "{\\"a\\" 1}", "{\\"a\\":1,}",
|
|
17
|
+
];
|
|
18
|
+
for (const text of bad) {
|
|
19
|
+
let caught = false;
|
|
20
|
+
try {
|
|
21
|
+
JSON.parse(text);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
caught = true;
|
|
24
|
+
console.log("throw=" + (e instanceof SyntaxError) + ":" + (e as any).name +
|
|
25
|
+
":" + ((e as any).message.length > 0));
|
|
26
|
+
}
|
|
27
|
+
if (!caught) console.log("no-throw=" + text);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// A valid document still parses, including escapes and nested containers.
|
|
31
|
+
console.log("valid=" + JSON.stringify(
|
|
32
|
+
JSON.parse(" {\\"a\\": [1, true, null, \\"\\u4e2d\\"]} ")));
|
|
33
|
+
// The reviver keeps working on the successful path.
|
|
34
|
+
console.log("reviver=" + JSON.stringify(
|
|
35
|
+
JSON.parse("{\\"n\\":1}", (key: string, value: any) =>
|
|
36
|
+
key === "n" ? (value as number) + 1 : value)));
|
|
37
|
+
`);
|
|
38
|
+
const lines = stdout.trim().split("\n");
|
|
39
|
+
expect(lines).toHaveLength(19);
|
|
40
|
+
for (const line of lines.slice(0, 17)) {
|
|
41
|
+
expect(line).toBe("throw=true:SyntaxError:true");
|
|
42
|
+
}
|
|
43
|
+
expect(lines[17]).toBe('valid={"a":[1,true,null,"中"]}');
|
|
44
|
+
expect(lines[18]).toBe('reviver={"n":2}');
|
|
45
|
+
expect(stdout).not.toContain("no-throw=");
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=json-parse-errors.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-parse-errors.test.js","sourceRoot":"","sources":["../../../tests/e2e/json-parse-errors.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,WAAW,CAAC,mBAAmB,EAAE,CAAC,OAAO,EAAE,EAAE;IAC3C,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;KAwBjC,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QACnD,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QACxD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* End-to-end tests for the `readline` Node module.
|
|
3
|
+
*
|
|
4
|
+
* The blocking stdin read runs on the async I/O pool, so these tests feed text
|
|
5
|
+
* through the harness's `input` option and let the event loop deliver it.
|
|
6
|
+
*/
|
|
7
|
+
import { expect, it } from "vitest";
|
|
8
|
+
import { describeE2E } from "./harness.js";
|
|
9
|
+
describeE2E("node extension — readline", (harness) => {
|
|
10
|
+
it("emits one line event per input line and closes at end of input", () => {
|
|
11
|
+
const stdout = harness.runProgram(`
|
|
12
|
+
import { createInterface } from "readline";
|
|
13
|
+
|
|
14
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout, terminal: false });
|
|
15
|
+
const lines: string[] = [];
|
|
16
|
+
rl.on("line", (line: string) => {
|
|
17
|
+
lines.push(line);
|
|
18
|
+
if (line === "quit") {
|
|
19
|
+
console.log("lines=" + lines.join("|"));
|
|
20
|
+
rl.close();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
rl.on("close", () => console.log("closed"));
|
|
24
|
+
`, { extensions: true, input: "alpha\nbeta\nquit\n" });
|
|
25
|
+
expect(stdout).toBe("lines=alpha|beta|quit\nclosed");
|
|
26
|
+
});
|
|
27
|
+
it("feeds queued questions in order and writes their prompts", () => {
|
|
28
|
+
const stdout = harness.runProgram(`
|
|
29
|
+
import { createInterface } from "readline";
|
|
30
|
+
|
|
31
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
32
|
+
rl.question("name? ", (name: string) => {
|
|
33
|
+
console.log("name=" + name);
|
|
34
|
+
rl.question("age? ", (age: string) => {
|
|
35
|
+
console.log("age=" + age);
|
|
36
|
+
rl.close();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
rl.on("close", () => console.log("done"));
|
|
40
|
+
`, { extensions: true, input: "ada\n36\n" });
|
|
41
|
+
expect(stdout).toBe("name? name=ada\nage? age=36\ndone");
|
|
42
|
+
});
|
|
43
|
+
it("supports the Interface constructor, once listeners and buffered pause", () => {
|
|
44
|
+
const stdout = harness.runProgram(`
|
|
45
|
+
import { Interface } from "readline";
|
|
46
|
+
|
|
47
|
+
const rl = new Interface({ input: process.stdin, output: process.stdout });
|
|
48
|
+
rl.pause();
|
|
49
|
+
let first = "";
|
|
50
|
+
let once = 0;
|
|
51
|
+
rl.once("line", (line: string) => { once += 1; first = line; });
|
|
52
|
+
rl.on("line", (line: string) => {
|
|
53
|
+
console.log("got=" + first + ":" + line + ":" + once);
|
|
54
|
+
rl.close();
|
|
55
|
+
});
|
|
56
|
+
rl.resume();
|
|
57
|
+
`, { extensions: true, input: "one\ntwo\n" });
|
|
58
|
+
expect(stdout).toBe("got=one:one:1");
|
|
59
|
+
});
|
|
60
|
+
it("writes the Node cursor escape sequences", () => {
|
|
61
|
+
const stdout = harness.runProgram(`
|
|
62
|
+
import { clearLine, clearScreenDown, cursorTo, moveCursor } from "readline";
|
|
63
|
+
|
|
64
|
+
cursorTo(process.stdout, 2, 3);
|
|
65
|
+
clearLine(process.stdout, 0);
|
|
66
|
+
moveCursor(process.stdout, 1, -1);
|
|
67
|
+
clearScreenDown(process.stdout);
|
|
68
|
+
console.log("done");
|
|
69
|
+
`, { extensions: true, raw: true });
|
|
70
|
+
expect(stdout).toBe("\x1b[4;3H\x1b[2K\x1b[1A\x1b[1C\x1b[0Jdone");
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=readline.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readline.test.js","sourceRoot":"","sources":["../../../tests/e2e/readline.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,WAAW,CAAC,2BAA2B,EAAE,CAAC,OAAO,EAAE,EAAE;IACnD,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAC/B;;;;;;;;;;;;;OAaC,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,qBAAqB,EAAE,CACnD,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAC/B;;;;;;;;;;;;OAYC,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,CACzC,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;QAC/E,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAC/B;;;;;;;;;;;;;OAaC,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAC1C,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAC/B;;;;;;;;OAQC,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAChC,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -108,7 +108,8 @@ construct can hide a bug but never reject working code.
|
|
|
108
108
|
|
|
109
109
|
Implemented: `Math`, `JSON`, `Date`, `RegExp`, `Map`, `Set`, `WeakMap`/`WeakSet`/`WeakRef`,
|
|
110
110
|
`Symbol`, `Error` family, `BigInt`, `Array`/`String`/`Number`/`Object` methods,
|
|
111
|
-
typed arrays, `String.prototype.match`/`split`/`replace` with capture groups
|
|
111
|
+
typed arrays, `String.prototype.match`/`split`/`replace` with capture groups and
|
|
112
|
+
the `*`/`+`/`?`/`{n,m}` regex quantifiers,
|
|
112
113
|
immutable array helpers (`toReversed`, `toSorted`, `toSpliced`, `with`), global
|
|
113
114
|
URI functions, first-class built-in constructors (`const A = Array; new A(...)`,
|
|
114
115
|
`A.isArray`, `x instanceof A`) and `Object.prototype`
|
|
@@ -104,7 +104,8 @@ xbintsc 编译 TypeScript 的一个**实用子集**。本页用来判断你能
|
|
|
104
104
|
|
|
105
105
|
已实现:`Math`、`JSON`、`Date`、`RegExp`、`Map`、`Set`、`WeakMap`/`WeakSet`/`WeakRef`、
|
|
106
106
|
`Symbol`、`Error` 家族、`BigInt`、`Array`/`String`/`Number`/`Object` 方法、TypedArray、
|
|
107
|
-
带捕获组的 `String.prototype.match`/`split`/`replace
|
|
107
|
+
带捕获组的 `String.prototype.match`/`split`/`replace` 与 `*`/`+`/`?`/`{n,m}`
|
|
108
|
+
正则量词、不可变数组方法
|
|
108
109
|
(`toReversed`、`toSorted`、`toSpliced`、`with`)、全局 URI 函数、
|
|
109
110
|
一等公民内建构造器(`const A = Array; new A(...)`、`A.isArray`、`x instanceof A`)
|
|
110
111
|
与 `Object.prototype`(`Object.getPrototypeOf({}) === Object.prototype`)。
|
package/doc/gui/api.md
CHANGED
|
@@ -45,8 +45,25 @@ and hit testing follow it), and `scrollX` / `scrollY` / `pageXOffset` /
|
|
|
45
45
|
`document.hasFocus()`; `blur()` clears it. Events emitted:
|
|
46
46
|
`ready` (after the first presented frame), `load`, `close`, `resize`, `scroll`,
|
|
47
47
|
`focus`, `blur` and the input events `mousemove`, `mousedown`, `mouseup`,
|
|
48
|
-
`click`, `wheel`, `keydown`, `keyup
|
|
49
|
-
|
|
48
|
+
`click`, `wheel`, `keydown`, `keyup`, `keypress`, `textInput`,
|
|
49
|
+
`compositionstart` / `compositionupdate` / `compositionend`, `beforeinput`,
|
|
50
|
+
`input`, `change`, `submit` and `reset`.
|
|
51
|
+
|
|
52
|
+
Exceptions thrown by code the engine invokes (an element or window listener, a
|
|
53
|
+
timer, an animation frame, a media event) are page errors, not process
|
|
54
|
+
termination: the engine catches them at its callback boundary and mirrors the
|
|
55
|
+
browser surfaces. `window.onerror` receives
|
|
56
|
+
`(message, source, line, column, error)`, `addEventListener("error", …)`
|
|
57
|
+
receives an `ErrorEvent`-like object (`.message`, `.error`, `.filename`,
|
|
58
|
+
`.lineno`, `.colno`) and a rejection nobody observes becomes an
|
|
59
|
+
`unhandledrejection` event (also available as
|
|
60
|
+
`window.onunhandledrejection` with `.reason` / `.promise`). The default log line
|
|
61
|
+
goes to stderr; return `true` from `onerror` or call `event.preventDefault()` to
|
|
62
|
+
suppress it. Handlers that throw are reported and do not close the window.
|
|
63
|
+
|
|
64
|
+
Programmatic `setSize` settles the request and fires `resize` synchronously
|
|
65
|
+
(once) when the size actually changes, so a page that never pumps SDL events
|
|
66
|
+
still sees the event; a later backend event for the same size is ignored.
|
|
50
67
|
`createWindow(options)` honours more than the title and size:
|
|
51
68
|
`{ title, width, height, highDensity, resizable, borderless, alwaysOnTop,
|
|
52
69
|
hidden, fullscreen, x, y, opacity, maximized, minimized }` map to the matching
|
|
@@ -183,6 +200,8 @@ bubbles from the focused element or `<body>`, before the window listeners run.
|
|
|
183
200
|
| `key`, `code` | keyboard | browser `KeyboardEvent` spellings: produced value and physical key |
|
|
184
201
|
| `repeat`, `ctrl`, `shift`, `alt`, `meta` | keyboard | modifiers (the legacy DOM spellings) |
|
|
185
202
|
| `ctrlKey`, `shiftKey`, `altKey`, `metaKey` | keyboard | modifiers (the current DOM spellings) |
|
|
203
|
+
| `data` | composition | pre-edit text (`compositionstart`/`update`/`end`) |
|
|
204
|
+
| `text` | `textInput` | the text an IME/keyboard layout produced |
|
|
186
205
|
| `target` | pointer, wheel | deepest element under the point as a CSS-like descriptor (`div#main.card`), or absent |
|
|
187
206
|
|
|
188
207
|
## Diagnostics
|
|
@@ -202,7 +221,9 @@ win.inlineSvg(selector) // serialized inline <svg>: { markup, wid
|
|
|
202
221
|
win.measureText(text, fontSize?, family?) // shaped advance width in pixels
|
|
203
222
|
win.fontMetrics(fontSize?, family?) // { ascent, descent, lineHeight, ready }
|
|
204
223
|
win.hitTest(x, y) // deepest element descriptor, or ""
|
|
205
|
-
win.sendEvent(type, options?) // synthesise input (testing)
|
|
224
|
+
win.sendEvent(type, options?) // synthesise input (testing); also
|
|
225
|
+
// "textInput" + { text } and the
|
|
226
|
+
// "composition*" events + { data }
|
|
206
227
|
win.advance(ms) // step the CSS transition clock (testing)
|
|
207
228
|
win.stats() // engine/runtime counters (memory debugging)
|
|
208
229
|
```
|
package/doc/gui/dom.md
CHANGED
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
**HTML parser** (`runtime/ext_gui/dom.{h,cpp}`): tags/attributes/text,
|
|
10
10
|
comments and doctype skipped, entity decoding (named + numeric/hex), void
|
|
11
11
|
elements, raw-text elements (`<style>`/`<script>`), and the common implicit
|
|
12
|
-
close rules (`li`, `dt`/`dd`, `option`, `p`, headings, table cells/rows).
|
|
12
|
+
close rules (`li`, `dt`/`dd`, `option`, `p`, headings, table cells/rows). A
|
|
13
|
+
parsed fragment is wrapped in the implicit `<html>`/`<head>`/`<body>` (head-like
|
|
14
|
+
top-level elements such as `<style>`/`<title>` go to `<head>`, everything else
|
|
15
|
+
to `<body>`), so `document.body`, `document.head` and `body { … }` work even
|
|
16
|
+
when the source is only a `<div>`. `innerHTML`/`insertAdjacentHTML` parse their
|
|
17
|
+
input as a fragment and do **not** synthesize another document wrapper.
|
|
13
18
|
|
|
14
19
|
**CSS parser** (`runtime/ext_gui/css.{h,cpp}`): comments are stripped; `@media`
|
|
15
20
|
blocks are parsed recursively (nested queries combine with `and`, and a comma
|
|
@@ -22,7 +27,8 @@ commas, brackets or parentheses without splitting the list. Selectors: type,
|
|
|
22
27
|
combinators (descendant, child, adjacent and general sibling), the pseudo-classes
|
|
23
28
|
`:first-child`, `:last-child`, `:only-child`, `:empty`, `:root`, `:not(...)`,
|
|
24
29
|
`:nth-child(an+b)`, `:disabled`, `:checked`, plus the stateful `:hover`,
|
|
25
|
-
`:focus`, `:focus-visible` (currently an alias of `:focus`)
|
|
30
|
+
`:focus`, `:focus-visible` (currently an alias of `:focus`), `:focus-within`
|
|
31
|
+
(the focused element and its ancestors) and `:active` (see
|
|
26
32
|
[Input](./input.md)), and the pseudo-elements `::before`/`::after`
|
|
27
33
|
(legacy `:before`/`:after` too). Values: lengths (`px`, `%`, `em`, `rem`, `vw`,
|
|
28
34
|
`vh`, `pt`, `pc`, `in`, `cm`, `mm`, `q`), colors (hex, `rgb()`/`rgba()`, a named
|
|
@@ -90,17 +96,16 @@ or a cell repeated on every row appears once. The parser/cascade path reports:
|
|
|
90
96
|
|
|
91
97
|
- **HTML elements** with browser behaviour the engine lacks: `applet`, `area`,
|
|
92
98
|
`basefont`, `bgsound`, `blink`, `caption`, `col`, `colgroup`, `datalist`,
|
|
93
|
-
`details`, `dialog`, `embed`, `frame`, `frameset`, `iframe`, `
|
|
94
|
-
`
|
|
95
|
-
`
|
|
96
|
-
`
|
|
97
|
-
`
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
not reported.
|
|
99
|
+
`details`, `dialog`, `embed`, `frame`, `frameset`, `iframe`, `isindex`,
|
|
100
|
+
`keygen`, `map`, `marquee`, `math`, `meter`, `noembed`, `noframes`, `object`,
|
|
101
|
+
`output`, `param`, `plaintext`, `progress`, `summary`, `table`, `tbody`,
|
|
102
|
+
`td`, `template`, `tfoot`, `th`, `thead`, `tr`, `track` and `xmp`. Every other
|
|
103
|
+
tag — including `button`, `input`, `label`, `select`, `textarea`, custom
|
|
104
|
+
elements and a typo such as `<dvi>` — is rendered as a box, which is the
|
|
105
|
+
intended fallback rather than a dropped feature, so it is not reported.
|
|
101
106
|
- **HTML attributes** that request unsupported behaviour: `href` (links do not
|
|
102
107
|
navigate), `srcset`, `sizes`, `poster`, `controls`, `contenteditable`,
|
|
103
|
-
`draggable`, `autofocus`, `
|
|
108
|
+
`draggable`, `autofocus`, `hidden`, and the SVG
|
|
104
109
|
`filter`/`mask`/`clip-path`/`marker-*` attributes.
|
|
105
110
|
- **CSS properties** outside the subset, and **length units** the parser does
|
|
106
111
|
not implement (`ch`, `ex`, `vmin`, `dvh`, …). A recognised property with an
|
|
@@ -193,14 +198,23 @@ removes it, and `Object.keys(dataset)` / `for...in` list only the data keys.
|
|
|
193
198
|
author rules, inheritance and the inline declarations — rather than echoing the
|
|
194
199
|
inline block, so a stylesheet rule is visible. It exposes `getPropertyValue`,
|
|
195
200
|
`getPropertyPriority` and named properties (`cs.width`, `cs.backgroundColor`,
|
|
196
|
-
`cs["--accent"]`).
|
|
201
|
+
`cs["--accent"]`). Border properties are serialized per side too:
|
|
202
|
+
`border-top-color` / `border-right-color` / … resolve `currentColor` to the
|
|
203
|
+
element's computed colour, `border-*-width` reports the used `0px` for a
|
|
204
|
+
`none` border, and `border-*-style` reports the computed style keyword.
|
|
205
|
+
Pass `"::before"`/`"::after"` to read generated content; any
|
|
197
206
|
other pseudo-element answers empty values. Every read flushes a pending restyle,
|
|
198
|
-
so a handle created early stays live after later mutations.
|
|
207
|
+
so a handle created early stays live after later mutations. Unset properties that
|
|
208
|
+
the engine does not model (for example `word-break`, `object-fit` or
|
|
209
|
+
`list-style-type`) answer with their CSS initial value rather than `""`, so the
|
|
210
|
+
usual "read the current style" pattern works for them too.
|
|
199
211
|
|
|
200
212
|
`getBoundingClientRect()` carries the legacy `top` / `right` / `bottom` / `left`
|
|
201
213
|
members next to `x` / `y` / `width` / `height`, and `document.title = …` writes
|
|
202
214
|
the document's `<title>` (creating the element, and a `<head>`, when the page
|
|
203
|
-
has none).
|
|
215
|
+
has none). A node with no layout box (`display: none`, a detached element or a
|
|
216
|
+
stale handle) returns an all-zero rectangle instead of `undefined`, matching the
|
|
217
|
+
DOM. `label.htmlFor` reflects the `for` attribute (read, assign, and clear).
|
|
204
218
|
|
|
205
219
|
Mutations mark the document dirty; the engine restyles + relayouts lazily (before
|
|
206
220
|
the next read or frame). `inner = …`/`innerHTML = …` do **not** run scripts.
|