@markuplint/ml-core 2.3.2 → 2.3.3

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.
Files changed (54) hide show
  1. package/lib/ml-core.d.ts +1 -1
  2. package/lib/ml-dom/helper/selector.d.ts +1 -1
  3. package/package.json +5 -5
  4. package/tsconfig.tsbuildinfo +1 -1
  5. package/lib/ml-dom/manipulations/child-node-methods.d.ts +0 -33
  6. package/lib/ml-dom/manipulations/child-node-methods.js +0 -73
  7. package/lib/ml-dom/manipulations/get-children.d.ts +0 -4
  8. package/lib/ml-dom/manipulations/get-children.js +0 -10
  9. package/lib/ml-dom/node/attr.d.ts +0 -93
  10. package/lib/ml-dom/node/attr.js +0 -144
  11. package/lib/ml-dom/node/block.d.ts +0 -38
  12. package/lib/ml-dom/node/block.js +0 -53
  13. package/lib/ml-dom/node/character-data.d.ts +0 -57
  14. package/lib/ml-dom/node/character-data.js +0 -87
  15. package/lib/ml-dom/node/child-node.d.ts +0 -9
  16. package/lib/ml-dom/node/child-node.js +0 -10
  17. package/lib/ml-dom/node/comment.d.ts +0 -17
  18. package/lib/ml-dom/node/comment.js +0 -24
  19. package/lib/ml-dom/node/document-fragment.d.ts +0 -24
  20. package/lib/ml-dom/node/document-fragment.js +0 -33
  21. package/lib/ml-dom/node/document-type.d.ts +0 -38
  22. package/lib/ml-dom/node/document-type.js +0 -52
  23. package/lib/ml-dom/node/document.d.ts +0 -1554
  24. package/lib/ml-dom/node/document.js +0 -2117
  25. package/lib/ml-dom/node/dom-token-list.d.ts +0 -15
  26. package/lib/ml-dom/node/dom-token-list.js +0 -61
  27. package/lib/ml-dom/node/element.d.ts +0 -1832
  28. package/lib/ml-dom/node/element.js +0 -2483
  29. package/lib/ml-dom/node/named-node-map.d.ts +0 -42
  30. package/lib/ml-dom/node/named-node-map.js +0 -64
  31. package/lib/ml-dom/node/node-list.d.ts +0 -6
  32. package/lib/ml-dom/node/node-list.js +0 -39
  33. package/lib/ml-dom/node/node-store.d.ts +0 -14
  34. package/lib/ml-dom/node/node-store.js +0 -32
  35. package/lib/ml-dom/node/node.d.ts +0 -475
  36. package/lib/ml-dom/node/node.js +0 -672
  37. package/lib/ml-dom/node/parent-node.d.ts +0 -66
  38. package/lib/ml-dom/node/parent-node.js +0 -131
  39. package/lib/ml-dom/node/rule-mapper.d.ts +0 -17
  40. package/lib/ml-dom/node/rule-mapper.js +0 -49
  41. package/lib/ml-dom/node/text.d.ts +0 -51
  42. package/lib/ml-dom/node/text.js +0 -76
  43. package/lib/ml-dom/node/types.d.ts +0 -25
  44. package/lib/ml-dom/node/types.js +0 -2
  45. package/lib/ml-dom/node/unexpected-call-error.d.ts +0 -2
  46. package/lib/ml-dom/node/unexpected-call-error.js +0 -5
  47. package/lib/ml-dom/token/token.d.ts +0 -47
  48. package/lib/ml-dom/token/token.js +0 -89
  49. package/lib/selector/is-pure-html-element.d.ts +0 -1
  50. package/lib/selector/is-pure-html-element.js +0 -7
  51. package/lib/selector/match-selector.d.ts +0 -14
  52. package/lib/selector/match-selector.js +0 -230
  53. package/lib/selector/selector.d.ts +0 -9
  54. package/lib/selector/selector.js +0 -561
@@ -1,2117 +0,0 @@
1
- "use strict";
2
- var _MLDocument_filename, _MLDocument_tokenList;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.MLDocument = void 0;
5
- const tslib_1 = require("tslib");
6
- const ml_config_1 = require("@markuplint/ml-config");
7
- const ml_spec_1 = require("@markuplint/ml-spec");
8
- const selector_1 = require("@markuplint/selector");
9
- const debug_1 = require("../../debug");
10
- const create_node_1 = require("../helper/create-node");
11
- const debug_2 = require("../helper/debug");
12
- const walkers_1 = require("../helper/walkers");
13
- const node_list_1 = require("./node-list");
14
- const parent_node_1 = require("./parent-node");
15
- const rule_mapper_1 = require("./rule-mapper");
16
- const unexpected_call_error_1 = tslib_1.__importDefault(require("./unexpected-call-error"));
17
- const log = debug_1.log.extend('ml-dom');
18
- const docLog = log.extend('document');
19
- const ruleLog = docLog.extend('rule');
20
- class MLDocument extends parent_node_1.MLParentNode {
21
- /**
22
- *
23
- * @param ast node list of markuplint AST
24
- * @param ruleset ruleset object
25
- */
26
- constructor(ast, ruleset, schemas, options) {
27
- var _a;
28
- // @ts-ignore
29
- super(ast, null);
30
- /**
31
- *
32
- */
33
- _MLDocument_filename.set(this, void 0);
34
- _MLDocument_tokenList.set(this, null);
35
- /**
36
- *
37
- */
38
- this.currentRule = null;
39
- this.isFragment = ast.isFragment;
40
- this.specs = (0, ml_spec_1.getSpec)(schemas);
41
- this.endTag = (_a = options === null || options === void 0 ? void 0 : options.endTag) !== null && _a !== void 0 ? _a : 'omittable';
42
- tslib_1.__classPrivateFieldSet(this, _MLDocument_filename, options === null || options === void 0 ? void 0 : options.filename, "f");
43
- // console.log(ast.nodeList.map((n, i) => `${i}: ${n.uuid} "${n.raw.trim()}"(${n.type})`));
44
- this.nodeList = Object.freeze(ast.nodeList
45
- .map(astNode => {
46
- if (astNode.type === 'endtag') {
47
- return;
48
- }
49
- return (0, create_node_1.createNode)(astNode, this);
50
- })
51
- .filter((n) => !!n));
52
- this._ruleMapping(ruleset);
53
- }
54
- /**
55
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
56
- *
57
- * @unsupported
58
- * @implements DOM API: `Document`
59
- */
60
- get activeElement() {
61
- throw new unexpected_call_error_1.default('Not supported "activeElement" property');
62
- }
63
- /**
64
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
65
- *
66
- * @deprecated
67
- * @unsupported
68
- * @implements DOM API: `Document`
69
- */
70
- get alinkColor() {
71
- throw new unexpected_call_error_1.default('Not supported "alinkColor" property');
72
- }
73
- /**
74
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
75
- *
76
- * @deprecated
77
- * @unsupported
78
- * @implements DOM API: `Document`
79
- */
80
- get all() {
81
- throw new unexpected_call_error_1.default('Not supported "all" property');
82
- }
83
- /**
84
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
85
- *
86
- * @deprecated
87
- * @unsupported
88
- * @implements DOM API: `Document`
89
- */
90
- get anchors() {
91
- throw new unexpected_call_error_1.default('Not supported "anchors" property');
92
- }
93
- /**
94
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
95
- *
96
- * @deprecated
97
- * @unsupported
98
- * @implements DOM API: `Document`
99
- */
100
- get applets() {
101
- throw new unexpected_call_error_1.default('Not supported "applets" property');
102
- }
103
- /**
104
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
105
- *
106
- * @deprecated
107
- * @unsupported
108
- * @implements DOM API: `Document`
109
- */
110
- get bgColor() {
111
- throw new unexpected_call_error_1.default('Not supported "bgColor" property');
112
- }
113
- /**
114
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
115
- *
116
- * @unsupported
117
- * @implements DOM API: `Document`
118
- */
119
- get body() {
120
- throw new unexpected_call_error_1.default('Not supported "body" property');
121
- }
122
- /**
123
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
124
- *
125
- * @unsupported
126
- * @implements DOM API: `Document`
127
- */
128
- get characterSet() {
129
- throw new unexpected_call_error_1.default('Not supported "characterSet" property');
130
- }
131
- /**
132
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
133
- *
134
- * @deprecated
135
- * @unsupported
136
- * @implements DOM API: `Document`
137
- */
138
- get charset() {
139
- throw new unexpected_call_error_1.default('Not supported "charset" property');
140
- }
141
- /**
142
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
143
- *
144
- * @unsupported
145
- * @implements DOM API: `Document`
146
- */
147
- get compatMode() {
148
- throw new unexpected_call_error_1.default('Not supported "compatMode" property');
149
- }
150
- /**
151
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
152
- *
153
- * @unsupported
154
- * @implements DOM API: `Document`
155
- */
156
- get contentType() {
157
- throw new unexpected_call_error_1.default('Not supported "contentType" property');
158
- }
159
- /**
160
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
161
- *
162
- * @unsupported
163
- * @implements DOM API: `Document`
164
- */
165
- get cookie() {
166
- throw new unexpected_call_error_1.default('Not supported "cookie" property');
167
- }
168
- /**
169
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
170
- *
171
- * @unsupported
172
- * @implements DOM API: `Document`
173
- */
174
- get currentScript() {
175
- throw new unexpected_call_error_1.default('Not supported "currentScript" property');
176
- }
177
- /**
178
- * Window object for calling the `getComputedStyle` and the `getPropertyValue` that
179
- * are needed by **Accessible Name and Description Computation**.
180
- * But it always returns the empty object.
181
- * (It may improve to possible to compute the name from the `style` attribute in the future.)
182
- *
183
- * @implements DOM API: `Document`
184
- */
185
- get defaultView() {
186
- return {
187
- getComputedStyle(_el) {
188
- return {
189
- getPropertyValue(_propName) {
190
- return {};
191
- },
192
- };
193
- },
194
- };
195
- }
196
- /**
197
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
198
- *
199
- * @unsupported
200
- * @implements DOM API: `Document`
201
- */
202
- get designMode() {
203
- throw new unexpected_call_error_1.default('Not supported "designMode" property');
204
- }
205
- /**
206
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
207
- *
208
- * @unsupported
209
- * @implements DOM API: `Document`
210
- */
211
- get dir() {
212
- throw new unexpected_call_error_1.default('Not supported "dir" property');
213
- }
214
- /**
215
- * @implements DOM API: `Document`
216
- */
217
- get doctype() {
218
- for (const node of this.nodeList) {
219
- if (node.is(node.DOCUMENT_TYPE_NODE)) {
220
- return node;
221
- }
222
- }
223
- return null;
224
- }
225
- /**
226
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
227
- *
228
- * @unsupported
229
- * @implements DOM API: `Document`
230
- */
231
- get documentElement() {
232
- throw new unexpected_call_error_1.default('Not supported "documentElement" property');
233
- }
234
- /**
235
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
236
- *
237
- * @unsupported
238
- * @implements DOM API: `Document`
239
- */
240
- get documentURI() {
241
- throw new unexpected_call_error_1.default('Not supported "documentURI" property');
242
- }
243
- /**
244
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
245
- *
246
- * @unsupported
247
- * @implements DOM API: `Document`
248
- */
249
- get domain() {
250
- throw new unexpected_call_error_1.default('Not supported "domain" property');
251
- }
252
- /**
253
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
254
- *
255
- * @unsupported
256
- * @implements DOM API: `Document`
257
- */
258
- get embeds() {
259
- throw new unexpected_call_error_1.default('Not supported "embeds" property');
260
- }
261
- /**
262
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
263
- *
264
- * @deprecated
265
- * @unsupported
266
- * @implements DOM API: `Document`
267
- */
268
- get fgColor() {
269
- throw new unexpected_call_error_1.default('Not supported "fgColor" property');
270
- }
271
- /**
272
- * It could be used in rule, make sure it is immutable
273
- *
274
- * @implements `@markuplint/ml-core` API: `MLDOMDocument`
275
- */
276
- get filename() {
277
- return tslib_1.__classPrivateFieldGet(this, _MLDocument_filename, "f");
278
- }
279
- /**
280
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
281
- *
282
- * @unsupported
283
- * @implements DOM API: `Document`
284
- */
285
- get fonts() {
286
- throw new unexpected_call_error_1.default('Not supported "fonts" property');
287
- }
288
- /**
289
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
290
- *
291
- * @unsupported
292
- * @implements DOM API: `Document`
293
- */
294
- get forms() {
295
- throw new unexpected_call_error_1.default('Not supported "forms" property');
296
- }
297
- /**
298
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
299
- *
300
- * @deprecated
301
- * @unsupported
302
- * @implements DOM API: `Document`
303
- */
304
- get fullscreen() {
305
- throw new unexpected_call_error_1.default('Not supported "fullscreen" property');
306
- }
307
- /**
308
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
309
- *
310
- * @unsupported
311
- * @implements DOM API: `Document`
312
- */
313
- get fullscreenElement() {
314
- throw new unexpected_call_error_1.default('Not supported "fullscreenElement" property');
315
- }
316
- /**
317
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
318
- *
319
- * @unsupported
320
- * @implements DOM API: `Document`
321
- */
322
- get fullscreenEnabled() {
323
- throw new unexpected_call_error_1.default('Not supported "UfullscreenEnabledRL" property');
324
- }
325
- /**
326
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
327
- *
328
- * @unsupported
329
- * @implements DOM API: `Document`
330
- */
331
- get head() {
332
- throw new unexpected_call_error_1.default('Not supported "head" property');
333
- }
334
- /**
335
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
336
- *
337
- * @unsupported
338
- * @implements DOM API: `Document`
339
- */
340
- get hidden() {
341
- throw new unexpected_call_error_1.default('Not supported "hidden" property');
342
- }
343
- /**
344
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
345
- *
346
- * @unsupported
347
- * @implements DOM API: `Document`
348
- */
349
- get images() {
350
- throw new unexpected_call_error_1.default('Not supported "images" property');
351
- }
352
- /**
353
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
354
- *
355
- * @unsupported
356
- * @implements DOM API: `Document`
357
- */
358
- get implementation() {
359
- throw new unexpected_call_error_1.default('Not supported "implementation" property');
360
- }
361
- /**
362
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
363
- *
364
- * @deprecated
365
- * @unsupported
366
- * @implements DOM API: `Document`
367
- */
368
- get inputEncoding() {
369
- throw new unexpected_call_error_1.default('Not supported "inputEncoding" property');
370
- }
371
- /**
372
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
373
- *
374
- * @unsupported
375
- * @implements DOM API: `Document`
376
- */
377
- get lastModified() {
378
- throw new unexpected_call_error_1.default('Not supported "lastModified" property');
379
- }
380
- /**
381
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
382
- *
383
- * @deprecated
384
- * @unsupported
385
- * @implements DOM API: `Document`
386
- */
387
- get linkColor() {
388
- throw new unexpected_call_error_1.default('Not supported "linkColor" property');
389
- }
390
- /**
391
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
392
- *
393
- * @unsupported
394
- * @implements DOM API: `Document`
395
- */
396
- get links() {
397
- throw new unexpected_call_error_1.default('Not supported "links" property');
398
- }
399
- /**
400
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
401
- *
402
- * @unsupported
403
- * @implements DOM API: `Document`
404
- */
405
- get location() {
406
- throw new unexpected_call_error_1.default('Not supported "location" property');
407
- }
408
- /**
409
- * Returns a string appropriate for the type of node as `Document`
410
- *
411
- * @see https://dom.spec.whatwg.org/#ref-for-document%E2%91%A8
412
- */
413
- get nodeName() {
414
- return '#document';
415
- }
416
- /**
417
- * Returns a number appropriate for the type of `Document`
418
- */
419
- get nodeType() {
420
- return this.DOCUMENT_NODE;
421
- }
422
- /**
423
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
424
- *
425
- * @deprecated
426
- * @unsupported
427
- * @implements DOM API: `Document`
428
- */
429
- get onabort() {
430
- throw new unexpected_call_error_1.default('Not supported "onabort" property');
431
- }
432
- /**
433
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
434
- *
435
- * @deprecated
436
- * @unsupported
437
- * @implements DOM API: `Document`
438
- */
439
- get onanimationcancel() {
440
- throw new unexpected_call_error_1.default('Not supported "onanimationcancel" property');
441
- }
442
- /**
443
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
444
- *
445
- * @deprecated
446
- * @unsupported
447
- * @implements DOM API: `Document`
448
- */
449
- get onanimationend() {
450
- throw new unexpected_call_error_1.default('Not supported "onanimationend" property');
451
- }
452
- /**
453
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
454
- *
455
- * @deprecated
456
- * @unsupported
457
- * @implements DOM API: `Document`
458
- */
459
- get onanimationiteration() {
460
- throw new unexpected_call_error_1.default('Not supported "onanimationiteration" property');
461
- }
462
- /**
463
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
464
- *
465
- * @deprecated
466
- * @unsupported
467
- * @implements DOM API: `Document`
468
- */
469
- get onanimationstart() {
470
- throw new unexpected_call_error_1.default('Not supported "onanimationstart" property');
471
- }
472
- /**
473
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
474
- *
475
- * @deprecated
476
- * @unsupported
477
- * @implements DOM API: `Document`
478
- */
479
- get onauxclick() {
480
- throw new unexpected_call_error_1.default('Not supported "onauxclick" property');
481
- }
482
- /**
483
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
484
- *
485
- * @deprecated
486
- * @unsupported
487
- * @implements DOM API: `Document`
488
- */
489
- get onblur() {
490
- throw new unexpected_call_error_1.default('Not supported "onblur" property');
491
- }
492
- /**
493
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
494
- *
495
- * @deprecated
496
- * @unsupported
497
- * @implements DOM API: `Document`
498
- */
499
- get oncanplay() {
500
- throw new unexpected_call_error_1.default('Not supported "oncanplay" property');
501
- }
502
- /**
503
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
504
- *
505
- * @deprecated
506
- * @unsupported
507
- * @implements DOM API: `Document`
508
- */
509
- get oncanplaythrough() {
510
- throw new unexpected_call_error_1.default('Not supported "oncanplaythrough" property');
511
- }
512
- /**
513
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
514
- *
515
- * @deprecated
516
- * @unsupported
517
- * @implements DOM API: `Document`
518
- */
519
- get onchange() {
520
- throw new unexpected_call_error_1.default('Not supported "onchange" property');
521
- }
522
- /**
523
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
524
- *
525
- * @deprecated
526
- * @unsupported
527
- * @implements DOM API: `Document`
528
- */
529
- get onclick() {
530
- throw new unexpected_call_error_1.default('Not supported "onclick" property');
531
- }
532
- /**
533
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
534
- *
535
- * @deprecated
536
- * @unsupported
537
- * @implements DOM API: `Document`
538
- */
539
- get onclose() {
540
- throw new unexpected_call_error_1.default('Not supported "onclose" property');
541
- }
542
- /**
543
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
544
- *
545
- * @deprecated
546
- * @unsupported
547
- * @implements DOM API: `Document`
548
- */
549
- get oncontextmenu() {
550
- throw new unexpected_call_error_1.default('Not supported "oncontextmenu" property');
551
- }
552
- /**
553
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
554
- *
555
- * @deprecated
556
- * @unsupported
557
- * @implements DOM API: `Document`
558
- */
559
- get oncopy() {
560
- throw new unexpected_call_error_1.default('Not supported "oncopy" property');
561
- }
562
- /**
563
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
564
- *
565
- * @deprecated
566
- * @unsupported
567
- * @implements DOM API: `Document`
568
- */
569
- get oncuechange() {
570
- throw new unexpected_call_error_1.default('Not supported "oncuechange" property');
571
- }
572
- /**
573
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
574
- *
575
- * @deprecated
576
- * @unsupported
577
- * @implements DOM API: `Document`
578
- */
579
- get oncut() {
580
- throw new unexpected_call_error_1.default('Not supported "oncut" property');
581
- }
582
- /**
583
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
584
- *
585
- * @deprecated
586
- * @unsupported
587
- * @implements DOM API: `Document`
588
- */
589
- get ondblclick() {
590
- throw new unexpected_call_error_1.default('Not supported "ondblclick" property');
591
- }
592
- /**
593
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
594
- *
595
- * @deprecated
596
- * @unsupported
597
- * @implements DOM API: `Document`
598
- */
599
- get ondrag() {
600
- throw new unexpected_call_error_1.default('Not supported "ondrag" property');
601
- }
602
- /**
603
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
604
- *
605
- * @deprecated
606
- * @unsupported
607
- * @implements DOM API: `Document`
608
- */
609
- get ondragend() {
610
- throw new unexpected_call_error_1.default('Not supported "ondragend" property');
611
- }
612
- /**
613
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
614
- *
615
- * @deprecated
616
- * @unsupported
617
- * @implements DOM API: `Document`
618
- */
619
- get ondragenter() {
620
- throw new unexpected_call_error_1.default('Not supported "ondragenter" property');
621
- }
622
- /**
623
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
624
- *
625
- * @deprecated
626
- * @unsupported
627
- * @implements DOM API: `Document`
628
- */
629
- get ondragleave() {
630
- throw new unexpected_call_error_1.default('Not supported "ondragleave" property');
631
- }
632
- /**
633
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
634
- *
635
- * @deprecated
636
- * @unsupported
637
- * @implements DOM API: `Document`
638
- */
639
- get ondragover() {
640
- throw new unexpected_call_error_1.default('Not supported "ondragover" property');
641
- }
642
- /**
643
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
644
- *
645
- * @deprecated
646
- * @unsupported
647
- * @implements DOM API: `Document`
648
- */
649
- get ondragstart() {
650
- throw new unexpected_call_error_1.default('Not supported "ondragstart" property');
651
- }
652
- /**
653
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
654
- *
655
- * @deprecated
656
- * @unsupported
657
- * @implements DOM API: `Document`
658
- */
659
- get ondrop() {
660
- throw new unexpected_call_error_1.default('Not supported "ondrop" property');
661
- }
662
- /**
663
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
664
- *
665
- * @deprecated
666
- * @unsupported
667
- * @implements DOM API: `Document`
668
- */
669
- get ondurationchange() {
670
- throw new unexpected_call_error_1.default('Not supported "ondurationchange" property');
671
- }
672
- /**
673
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
674
- *
675
- * @deprecated
676
- * @unsupported
677
- * @implements DOM API: `Document`
678
- */
679
- get onemptied() {
680
- throw new unexpected_call_error_1.default('Not supported "onemptied" property');
681
- }
682
- /**
683
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
684
- *
685
- * @deprecated
686
- * @unsupported
687
- * @implements DOM API: `Document`
688
- */
689
- get onended() {
690
- throw new unexpected_call_error_1.default('Not supported "onended" property');
691
- }
692
- /**
693
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
694
- *
695
- * @deprecated
696
- * @unsupported
697
- * @implements DOM API: `Document`
698
- */
699
- get onerror() {
700
- throw new unexpected_call_error_1.default('Not supported "onerror" property');
701
- }
702
- /**
703
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
704
- *
705
- * @deprecated
706
- * @unsupported
707
- * @implements DOM API: `Document`
708
- */
709
- get onfocus() {
710
- throw new unexpected_call_error_1.default('Not supported "onfocus" property');
711
- }
712
- /**
713
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
714
- *
715
- * @deprecated
716
- * @unsupported
717
- * @implements DOM API: `Document`
718
- */
719
- get onformdata() {
720
- throw new unexpected_call_error_1.default('Not supported "onformdata" property');
721
- }
722
- /**
723
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
724
- *
725
- * @deprecated
726
- * @unsupported
727
- * @implements DOM API: `Document`
728
- */
729
- get onfullscreenchange() {
730
- throw new unexpected_call_error_1.default('Not supported "onfullscreenchange" property');
731
- }
732
- /**
733
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
734
- *
735
- * @deprecated
736
- * @unsupported
737
- * @implements DOM API: `Document`
738
- */
739
- get onfullscreenerror() {
740
- throw new unexpected_call_error_1.default('Not supported "onfullscreenerror" property');
741
- }
742
- /**
743
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
744
- *
745
- * @deprecated
746
- * @unsupported
747
- * @implements DOM API: `Document`
748
- */
749
- get ongotpointercapture() {
750
- throw new unexpected_call_error_1.default('Not supported "ongotpointercapture" property');
751
- }
752
- /**
753
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
754
- *
755
- * @deprecated
756
- * @unsupported
757
- * @implements DOM API: `Document`
758
- */
759
- get oninput() {
760
- throw new unexpected_call_error_1.default('Not supported "oninput" property');
761
- }
762
- /**
763
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
764
- *
765
- * @deprecated
766
- * @unsupported
767
- * @implements DOM API: `Document`
768
- */
769
- get oninvalid() {
770
- throw new unexpected_call_error_1.default('Not supported "oninvalid" property');
771
- }
772
- /**
773
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
774
- *
775
- * @deprecated
776
- * @unsupported
777
- * @implements DOM API: `Document`
778
- */
779
- get onkeydown() {
780
- throw new unexpected_call_error_1.default('Not supported "onkeydown" property');
781
- }
782
- /**
783
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
784
- *
785
- * @deprecated
786
- * @unsupported
787
- * @implements DOM API: `Document`
788
- */
789
- get onkeypress() {
790
- throw new unexpected_call_error_1.default('Not supported "onkeypress" property');
791
- }
792
- /**
793
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
794
- *
795
- * @deprecated
796
- * @unsupported
797
- * @implements DOM API: `Document`
798
- */
799
- get onkeyup() {
800
- throw new unexpected_call_error_1.default('Not supported "onkeyup" property');
801
- }
802
- /**
803
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
804
- *
805
- * @deprecated
806
- * @unsupported
807
- * @implements DOM API: `Document`
808
- */
809
- get onload() {
810
- throw new unexpected_call_error_1.default('Not supported "onload" property');
811
- }
812
- /**
813
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
814
- *
815
- * @deprecated
816
- * @unsupported
817
- * @implements DOM API: `Document`
818
- */
819
- get onloadeddata() {
820
- throw new unexpected_call_error_1.default('Not supported "onloadeddata" property');
821
- }
822
- /**
823
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
824
- *
825
- * @deprecated
826
- * @unsupported
827
- * @implements DOM API: `Document`
828
- */
829
- get onloadedmetadata() {
830
- throw new unexpected_call_error_1.default('Not supported "onloadedmetadata" property');
831
- }
832
- /**
833
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
834
- *
835
- * @deprecated
836
- * @unsupported
837
- * @implements DOM API: `Document`
838
- */
839
- get onloadstart() {
840
- throw new unexpected_call_error_1.default('Not supported "onloadstart" property');
841
- }
842
- /**
843
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
844
- *
845
- * @deprecated
846
- * @unsupported
847
- * @implements DOM API: `Document`
848
- */
849
- get onlostpointercapture() {
850
- throw new unexpected_call_error_1.default('Not supported "onlostpointercapture" property');
851
- }
852
- /**
853
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
854
- *
855
- * @deprecated
856
- * @unsupported
857
- * @implements DOM API: `Document`
858
- */
859
- get onmousedown() {
860
- throw new unexpected_call_error_1.default('Not supported "onmousedown" property');
861
- }
862
- /**
863
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
864
- *
865
- * @deprecated
866
- * @unsupported
867
- * @implements DOM API: `Document`
868
- */
869
- get onmouseenter() {
870
- throw new unexpected_call_error_1.default('Not supported "onmouseenter" property');
871
- }
872
- /**
873
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
874
- *
875
- * @deprecated
876
- * @unsupported
877
- * @implements DOM API: `Document`
878
- */
879
- get onmouseleave() {
880
- throw new unexpected_call_error_1.default('Not supported "onmouseleave" property');
881
- }
882
- /**
883
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
884
- *
885
- * @deprecated
886
- * @unsupported
887
- * @implements DOM API: `Document`
888
- */
889
- get onmousemove() {
890
- throw new unexpected_call_error_1.default('Not supported "onmousemove" property');
891
- }
892
- /**
893
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
894
- *
895
- * @deprecated
896
- * @unsupported
897
- * @implements DOM API: `Document`
898
- */
899
- get onmouseout() {
900
- throw new unexpected_call_error_1.default('Not supported "onmouseout" property');
901
- }
902
- /**
903
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
904
- *
905
- * @deprecated
906
- * @unsupported
907
- * @implements DOM API: `Document`
908
- */
909
- get onmouseover() {
910
- throw new unexpected_call_error_1.default('Not supported "onmouseover" property');
911
- }
912
- /**
913
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
914
- *
915
- * @deprecated
916
- * @unsupported
917
- * @implements DOM API: `Document`
918
- */
919
- get onmouseup() {
920
- throw new unexpected_call_error_1.default('Not supported "onmouseup" property');
921
- }
922
- /**
923
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
924
- *
925
- * @deprecated
926
- * @unsupported
927
- * @implements DOM API: `Document`
928
- */
929
- get onpaste() {
930
- throw new unexpected_call_error_1.default('Not supported "onpaste" property');
931
- }
932
- /**
933
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
934
- *
935
- * @deprecated
936
- * @unsupported
937
- * @implements DOM API: `Document`
938
- */
939
- get onpause() {
940
- throw new unexpected_call_error_1.default('Not supported "onpause" property');
941
- }
942
- /**
943
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
944
- *
945
- * @deprecated
946
- * @unsupported
947
- * @implements DOM API: `Document`
948
- */
949
- get onplay() {
950
- throw new unexpected_call_error_1.default('Not supported "onplay" property');
951
- }
952
- /**
953
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
954
- *
955
- * @deprecated
956
- * @unsupported
957
- * @implements DOM API: `Document`
958
- */
959
- get onplaying() {
960
- throw new unexpected_call_error_1.default('Not supported "onplaying" property');
961
- }
962
- /**
963
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
964
- *
965
- * @deprecated
966
- * @unsupported
967
- * @implements DOM API: `Document`
968
- */
969
- get onpointercancel() {
970
- throw new unexpected_call_error_1.default('Not supported "onpointercancel" property');
971
- }
972
- /**
973
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
974
- *
975
- * @deprecated
976
- * @unsupported
977
- * @implements DOM API: `Document`
978
- */
979
- get onpointerdown() {
980
- throw new unexpected_call_error_1.default('Not supported "onpointerdown" property');
981
- }
982
- /**
983
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
984
- *
985
- * @deprecated
986
- * @unsupported
987
- * @implements DOM API: `Document`
988
- */
989
- get onpointerenter() {
990
- throw new unexpected_call_error_1.default('Not supported "onpointerenter" property');
991
- }
992
- /**
993
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
994
- *
995
- * @deprecated
996
- * @unsupported
997
- * @implements DOM API: `Document`
998
- */
999
- get onpointerleave() {
1000
- throw new unexpected_call_error_1.default('Not supported "onpointerleave" property');
1001
- }
1002
- /**
1003
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1004
- *
1005
- * @deprecated
1006
- * @unsupported
1007
- * @implements DOM API: `Document`
1008
- */
1009
- get onpointerlockchange() {
1010
- throw new unexpected_call_error_1.default('Not supported "onpointerlockchange" property');
1011
- }
1012
- /**
1013
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1014
- *
1015
- * @deprecated
1016
- * @unsupported
1017
- * @implements DOM API: `Document`
1018
- */
1019
- get onpointerlockerror() {
1020
- throw new unexpected_call_error_1.default('Not supported "onpointerlockerror" property');
1021
- }
1022
- /**
1023
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1024
- *
1025
- * @deprecated
1026
- * @unsupported
1027
- * @implements DOM API: `Document`
1028
- */
1029
- get onpointermove() {
1030
- throw new unexpected_call_error_1.default('Not supported "onpointermove" property');
1031
- }
1032
- /**
1033
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1034
- *
1035
- * @deprecated
1036
- * @unsupported
1037
- * @implements DOM API: `Document`
1038
- */
1039
- get onpointerout() {
1040
- throw new unexpected_call_error_1.default('Not supported "onpointerout" property');
1041
- }
1042
- /**
1043
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1044
- *
1045
- * @deprecated
1046
- * @unsupported
1047
- * @implements DOM API: `Document`
1048
- */
1049
- get onpointerover() {
1050
- throw new unexpected_call_error_1.default('Not supported "onpointerover" property');
1051
- }
1052
- /**
1053
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1054
- *
1055
- * @deprecated
1056
- * @unsupported
1057
- * @implements DOM API: `Document`
1058
- */
1059
- get onpointerup() {
1060
- throw new unexpected_call_error_1.default('Not supported "onpointerup" property');
1061
- }
1062
- /**
1063
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1064
- *
1065
- * @deprecated
1066
- * @unsupported
1067
- * @implements DOM API: `Document`
1068
- */
1069
- get onprogress() {
1070
- throw new unexpected_call_error_1.default('Not supported "onprogress" property');
1071
- }
1072
- /**
1073
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1074
- *
1075
- * @deprecated
1076
- * @unsupported
1077
- * @implements DOM API: `Document`
1078
- */
1079
- get onratechange() {
1080
- throw new unexpected_call_error_1.default('Not supported "onratechange" property');
1081
- }
1082
- /**
1083
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1084
- *
1085
- * @deprecated
1086
- * @unsupported
1087
- * @implements DOM API: `Document`
1088
- */
1089
- get onreadystatechange() {
1090
- throw new unexpected_call_error_1.default('Not supported "onreadystatechange" property');
1091
- }
1092
- /**
1093
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1094
- *
1095
- * @deprecated
1096
- * @unsupported
1097
- * @implements DOM API: `Document`
1098
- */
1099
- get onreset() {
1100
- throw new unexpected_call_error_1.default('Not supported "onreset" property');
1101
- }
1102
- /**
1103
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1104
- *
1105
- * @deprecated
1106
- * @unsupported
1107
- * @implements DOM API: `Document`
1108
- */
1109
- get onresize() {
1110
- throw new unexpected_call_error_1.default('Not supported "onresize" property');
1111
- }
1112
- /**
1113
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1114
- *
1115
- * @deprecated
1116
- * @unsupported
1117
- * @implements DOM API: `Document`
1118
- */
1119
- get onscroll() {
1120
- throw new unexpected_call_error_1.default('Not supported "onscroll" property');
1121
- }
1122
- /**
1123
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1124
- *
1125
- * @deprecated
1126
- * @unsupported
1127
- * @implements DOM API: `Document`
1128
- */
1129
- get onsecuritypolicyviolation() {
1130
- throw new unexpected_call_error_1.default('Not supported "onsecuritypolicyviolation" property');
1131
- }
1132
- /**
1133
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1134
- *
1135
- * @deprecated
1136
- * @unsupported
1137
- * @implements DOM API: `Document`
1138
- */
1139
- get onseeked() {
1140
- throw new unexpected_call_error_1.default('Not supported "onseeked" property');
1141
- }
1142
- /**
1143
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1144
- *
1145
- * @deprecated
1146
- * @unsupported
1147
- * @implements DOM API: `Document`
1148
- */
1149
- get onseeking() {
1150
- throw new unexpected_call_error_1.default('Not supported "onseeking" property');
1151
- }
1152
- /**
1153
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1154
- *
1155
- * @deprecated
1156
- * @unsupported
1157
- * @implements DOM API: `Document`
1158
- */
1159
- get onselect() {
1160
- throw new unexpected_call_error_1.default('Not supported "onselect" property');
1161
- }
1162
- /**
1163
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1164
- *
1165
- * @deprecated
1166
- * @unsupported
1167
- * @implements DOM API: `Document`
1168
- */
1169
- get onselectionchange() {
1170
- throw new unexpected_call_error_1.default('Not supported "onselectionchange" property');
1171
- }
1172
- /**
1173
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1174
- *
1175
- * @deprecated
1176
- * @unsupported
1177
- * @implements DOM API: `Document`
1178
- */
1179
- get onselectstart() {
1180
- throw new unexpected_call_error_1.default('Not supported "onselectstart" property');
1181
- }
1182
- /**
1183
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1184
- *
1185
- * @deprecated
1186
- * @unsupported
1187
- * @implements DOM API: `Document`
1188
- */
1189
- get onslotchange() {
1190
- throw new unexpected_call_error_1.default('Not supported "onslotchange" property');
1191
- }
1192
- /**
1193
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1194
- *
1195
- * @deprecated
1196
- * @unsupported
1197
- * @implements DOM API: `Document`
1198
- */
1199
- get onstalled() {
1200
- throw new unexpected_call_error_1.default('Not supported "onstalled" property');
1201
- }
1202
- /**
1203
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1204
- *
1205
- * @deprecated
1206
- * @unsupported
1207
- * @implements DOM API: `Document`
1208
- */
1209
- get onsubmit() {
1210
- throw new unexpected_call_error_1.default('Not supported "onsubmit" property');
1211
- }
1212
- /**
1213
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1214
- *
1215
- * @deprecated
1216
- * @unsupported
1217
- * @implements DOM API: `Document`
1218
- */
1219
- get onsuspend() {
1220
- throw new unexpected_call_error_1.default('Not supported "onsuspend" property');
1221
- }
1222
- /**
1223
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1224
- *
1225
- * @deprecated
1226
- * @unsupported
1227
- * @implements DOM API: `Document`
1228
- */
1229
- get ontimeupdate() {
1230
- throw new unexpected_call_error_1.default('Not supported "ontimeupdate" property');
1231
- }
1232
- /**
1233
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1234
- *
1235
- * @deprecated
1236
- * @unsupported
1237
- * @implements DOM API: `Document`
1238
- */
1239
- get ontoggle() {
1240
- throw new unexpected_call_error_1.default('Not supported "ontoggle" property');
1241
- }
1242
- /**
1243
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1244
- *
1245
- * @deprecated
1246
- * @unsupported
1247
- * @implements DOM API: `Document`
1248
- */
1249
- get ontransitioncancel() {
1250
- throw new unexpected_call_error_1.default('Not supported "ontransitioncancel" property');
1251
- }
1252
- /**
1253
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1254
- *
1255
- * @deprecated
1256
- * @unsupported
1257
- * @implements DOM API: `Document`
1258
- */
1259
- get ontransitionend() {
1260
- throw new unexpected_call_error_1.default('Not supported "ontransitionend" property');
1261
- }
1262
- /**
1263
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1264
- *
1265
- * @deprecated
1266
- * @unsupported
1267
- * @implements DOM API: `Document`
1268
- */
1269
- get ontransitionrun() {
1270
- throw new unexpected_call_error_1.default('Not supported "ontransitionrun" property');
1271
- }
1272
- /**
1273
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1274
- *
1275
- * @deprecated
1276
- * @unsupported
1277
- * @implements DOM API: `Document`
1278
- */
1279
- get ontransitionstart() {
1280
- throw new unexpected_call_error_1.default('Not supported "ontransitionstart" property');
1281
- }
1282
- /**
1283
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1284
- *
1285
- * @deprecated
1286
- * @unsupported
1287
- * @implements DOM API: `Document`
1288
- */
1289
- get onvisibilitychange() {
1290
- throw new unexpected_call_error_1.default('Not supported "onvisibilitychange" property');
1291
- }
1292
- /**
1293
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1294
- *
1295
- * @deprecated
1296
- * @unsupported
1297
- * @implements DOM API: `Document`
1298
- */
1299
- get onvolumechange() {
1300
- throw new unexpected_call_error_1.default('Not supported "onvolumechange" property');
1301
- }
1302
- /**
1303
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1304
- *
1305
- * @deprecated
1306
- * @unsupported
1307
- * @implements DOM API: `Document`
1308
- */
1309
- get onwaiting() {
1310
- throw new unexpected_call_error_1.default('Not supported "onwaiting" property');
1311
- }
1312
- /**
1313
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1314
- *
1315
- * @deprecated
1316
- * @unsupported
1317
- * @implements DOM API: `Document`
1318
- */
1319
- get onwebkitanimationend() {
1320
- throw new unexpected_call_error_1.default('Not supported "onwebkitanimationend" property');
1321
- }
1322
- /**
1323
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1324
- *
1325
- * @deprecated
1326
- * @unsupported
1327
- * @implements DOM API: `Document`
1328
- */
1329
- get onwebkitanimationiteration() {
1330
- throw new unexpected_call_error_1.default('Not supported "onwebkitanimationiteration" property');
1331
- }
1332
- /**
1333
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1334
- *
1335
- * @deprecated
1336
- * @unsupported
1337
- * @implements DOM API: `Document`
1338
- */
1339
- get onwebkitanimationstart() {
1340
- throw new unexpected_call_error_1.default('Not supported "onwebkitanimationstart" property');
1341
- }
1342
- /**
1343
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1344
- *
1345
- * @deprecated
1346
- * @unsupported
1347
- * @implements DOM API: `Document`
1348
- */
1349
- get onwebkittransitionend() {
1350
- throw new unexpected_call_error_1.default('Not supported "onwebkittransitionend" property');
1351
- }
1352
- /**
1353
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1354
- *
1355
- * @deprecated
1356
- * @unsupported
1357
- * @implements DOM API: `Document`
1358
- */
1359
- get onwheel() {
1360
- throw new unexpected_call_error_1.default('Not supported "onwheel" property');
1361
- }
1362
- get ownerDocument() {
1363
- return null;
1364
- }
1365
- get ownerMLDocument() {
1366
- return this;
1367
- }
1368
- /**
1369
- * @implements DOM API: `Document`
1370
- * @see https://dom.spec.whatwg.org/#ref-for-dom-node-parentnode%E2%91%A0
1371
- */
1372
- get parentNode() {
1373
- return null;
1374
- }
1375
- /**
1376
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1377
- *
1378
- * @unsupported
1379
- * @implements DOM API: `Document`
1380
- */
1381
- get pictureInPictureElement() {
1382
- throw new unexpected_call_error_1.default('Not supported "pictureInPictureElement" property');
1383
- }
1384
- /**
1385
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1386
- *
1387
- * @unsupported
1388
- * @implements DOM API: `Document`
1389
- */
1390
- get pictureInPictureEnabled() {
1391
- throw new unexpected_call_error_1.default('Not supported "pictureInPictureEnabled" property');
1392
- }
1393
- /**
1394
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1395
- *
1396
- * @unsupported
1397
- * @implements DOM API: `Document`
1398
- */
1399
- get plugins() {
1400
- throw new unexpected_call_error_1.default('Not supported "plugins" property');
1401
- }
1402
- /**
1403
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1404
- *
1405
- * @unsupported
1406
- * @implements DOM API: `Document`
1407
- */
1408
- get pointerLockElement() {
1409
- throw new unexpected_call_error_1.default('Not supported "pointerLockElement" property');
1410
- }
1411
- /**
1412
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1413
- *
1414
- * @unsupported
1415
- * @implements DOM API: `Document`
1416
- */
1417
- get readyState() {
1418
- throw new unexpected_call_error_1.default('Not supported "readyState" property');
1419
- }
1420
- /**
1421
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1422
- *
1423
- * @unsupported
1424
- * @implements DOM API: `Document`
1425
- */
1426
- get referrer() {
1427
- throw new unexpected_call_error_1.default('Not supported "referrer" property');
1428
- }
1429
- /**
1430
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1431
- *
1432
- * @deprecated
1433
- * @unsupported
1434
- * @implements DOM API: `Document`
1435
- */
1436
- get rootElement() {
1437
- throw new unexpected_call_error_1.default('Not supported "rootElement" property');
1438
- }
1439
- /**
1440
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1441
- *
1442
- * @unsupported
1443
- * @implements DOM API: `Document`
1444
- */
1445
- get scripts() {
1446
- throw new unexpected_call_error_1.default('Not supported "scripts" property');
1447
- }
1448
- /**
1449
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1450
- *
1451
- * @unsupported
1452
- * @implements DOM API: `Document`
1453
- */
1454
- get scrollingElement() {
1455
- throw new unexpected_call_error_1.default('Not supported "scrollingElement" property');
1456
- }
1457
- /**
1458
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1459
- *
1460
- * @unsupported
1461
- * @implements DOM API: `Document`
1462
- */
1463
- get styleSheets() {
1464
- throw new unexpected_call_error_1.default('Not supported "styleSheets" property');
1465
- }
1466
- /**
1467
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1468
- *
1469
- * @unsupported
1470
- * @implements DOM API: `Document`
1471
- */
1472
- get timeline() {
1473
- throw new unexpected_call_error_1.default('Not supported "timeline" property');
1474
- }
1475
- /**
1476
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1477
- *
1478
- * @unsupported
1479
- * @implements DOM API: `Document`
1480
- */
1481
- get title() {
1482
- throw new unexpected_call_error_1.default('Not supported "title" property');
1483
- }
1484
- /**
1485
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1486
- *
1487
- * @unsupported
1488
- * @implements DOM API: `Document`
1489
- */
1490
- get URL() {
1491
- throw new unexpected_call_error_1.default('Not supported "URL" property');
1492
- }
1493
- /**
1494
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1495
- *
1496
- * @unsupported
1497
- * @implements DOM API: `Document`
1498
- */
1499
- get visibilityState() {
1500
- throw new unexpected_call_error_1.default('Not supported "visibilityState" property');
1501
- }
1502
- /**
1503
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1504
- *
1505
- * @deprecated
1506
- * @unsupported
1507
- * @implements DOM API: `Document`
1508
- */
1509
- get vlinkColor() {
1510
- throw new unexpected_call_error_1.default('Not supported "vlinkColor" property');
1511
- }
1512
- /**
1513
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1514
- *
1515
- * @unsupported
1516
- * @implements DOM API: `Document`
1517
- */
1518
- adoptNode(node) {
1519
- throw new unexpected_call_error_1.default('Not supported "adoptNode" method');
1520
- }
1521
- /**
1522
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1523
- *
1524
- * @deprecated
1525
- * @unsupported
1526
- * @implements DOM API: `Document`
1527
- */
1528
- captureEvents() {
1529
- throw new unexpected_call_error_1.default('Not supported "captureEvents" method');
1530
- }
1531
- /**
1532
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1533
- *
1534
- * @unsupported
1535
- * @implements DOM API: `Document`
1536
- */
1537
- caretRangeFromPoint(x, y) {
1538
- throw new unexpected_call_error_1.default('Not supported "caretRangeFromPoint" method');
1539
- }
1540
- /**
1541
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1542
- *
1543
- * @deprecated
1544
- * @unsupported
1545
- * @implements DOM API: `Document`
1546
- */
1547
- clear() {
1548
- throw new unexpected_call_error_1.default('Not supported "clear" method');
1549
- }
1550
- /**
1551
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1552
- *
1553
- * @unsupported
1554
- * @implements DOM API: `Document`
1555
- */
1556
- close() {
1557
- throw new unexpected_call_error_1.default('Not supported "close" method');
1558
- }
1559
- /**
1560
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1561
- *
1562
- * @unsupported
1563
- * @implements DOM API: `Document`
1564
- */
1565
- createAttribute(localName) {
1566
- throw new unexpected_call_error_1.default('Not supported "createAttribute" method');
1567
- }
1568
- /**
1569
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1570
- *
1571
- * @unsupported
1572
- * @implements DOM API: `Document`
1573
- */
1574
- createAttributeNS(namespace, qualifiedName) {
1575
- throw new unexpected_call_error_1.default('Not supported "createAttributeNS" method');
1576
- }
1577
- /**
1578
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1579
- *
1580
- * @unsupported
1581
- * @implements DOM API: `Document`
1582
- */
1583
- createCDATASection(data) {
1584
- throw new unexpected_call_error_1.default('Not supported "createCDATASection" method');
1585
- }
1586
- /**
1587
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1588
- *
1589
- * @unsupported
1590
- * @implements DOM API: `Document`
1591
- */
1592
- createComment(data) {
1593
- throw new unexpected_call_error_1.default('Not supported "createComment" method');
1594
- }
1595
- /**
1596
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1597
- *
1598
- * @unsupported
1599
- * @implements DOM API: `Document`
1600
- */
1601
- createDocumentFragment() {
1602
- throw new unexpected_call_error_1.default('Not supported "createDocumentFragment" method');
1603
- }
1604
- /**
1605
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1606
- *
1607
- * @unsupported
1608
- * @implements DOM API: `Document`
1609
- */
1610
- createElement(tagName, options) {
1611
- throw new unexpected_call_error_1.default('Not supported "createElement" method');
1612
- }
1613
- /**
1614
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1615
- *
1616
- * @unsupported
1617
- * @implements DOM API: `Document`
1618
- */
1619
- createElementNS(namespace, qualifiedName, options) {
1620
- throw new unexpected_call_error_1.default('Not supported "createElementNS" method');
1621
- }
1622
- /**
1623
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1624
- *
1625
- * @unsupported
1626
- * @implements DOM API: `Document`
1627
- */
1628
- createEvent(eventInterface) {
1629
- throw new unexpected_call_error_1.default('Not supported "createEvent" method');
1630
- }
1631
- /**
1632
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1633
- *
1634
- * @unsupported
1635
- * @implements DOM API: `Document`
1636
- */
1637
- createExpression(expression, resolver) {
1638
- throw new unexpected_call_error_1.default('Not supported "createExpression" method');
1639
- }
1640
- /**
1641
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1642
- *
1643
- * @unsupported
1644
- * @implements DOM API: `Document`
1645
- */
1646
- createNodeIterator(root, whatToShow, filter) {
1647
- throw new unexpected_call_error_1.default('Not supported "createNodeIterator" method');
1648
- }
1649
- /**
1650
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1651
- *
1652
- * @unsupported
1653
- * @implements DOM API: `Document`
1654
- */
1655
- createNSResolver(nodeResolver) {
1656
- throw new unexpected_call_error_1.default('Not supported "createNSResolver" method');
1657
- }
1658
- /**
1659
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1660
- *
1661
- * @unsupported
1662
- * @implements DOM API: `Document`
1663
- */
1664
- createProcessingInstruction(target, data) {
1665
- throw new unexpected_call_error_1.default('Not supported "createProcessingInstruction" method');
1666
- }
1667
- /**
1668
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1669
- *
1670
- * @unsupported
1671
- * @implements DOM API: `Document`
1672
- */
1673
- createRange() {
1674
- throw new unexpected_call_error_1.default('Not supported "createRange" method');
1675
- }
1676
- /**
1677
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1678
- *
1679
- * @unsupported
1680
- * @implements DOM API: `Document`
1681
- */
1682
- createTextNode(data) {
1683
- throw new unexpected_call_error_1.default('Not supported "createTextNode" method');
1684
- }
1685
- /**
1686
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1687
- *
1688
- * @unsupported
1689
- * @implements DOM API: `Document`
1690
- */
1691
- createTreeWalker(root, whatToShow, filter) {
1692
- throw new unexpected_call_error_1.default('Not supported "createTreeWalker" method');
1693
- }
1694
- /**
1695
- * @implements `@markuplint/ml-core` API: `MLDocument`
1696
- */
1697
- debugMap() {
1698
- return (0, debug_2.nodeListToDebugMaps)(this.nodeList, true);
1699
- }
1700
- /**
1701
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1702
- *
1703
- * @unsupported
1704
- * @implements DOM API: `Document`
1705
- */
1706
- elementFromPoint(x, y) {
1707
- throw new unexpected_call_error_1.default('Not supported "elementFromPoint" method');
1708
- }
1709
- /**
1710
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1711
- *
1712
- * @unsupported
1713
- * @implements DOM API: `Document`
1714
- */
1715
- elementsFromPoint(x, y) {
1716
- throw new unexpected_call_error_1.default('Not supported "elementsFromPoint" method');
1717
- }
1718
- /**
1719
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1720
- *
1721
- * @unsupported
1722
- * @implements DOM API: `Document`
1723
- */
1724
- evaluate(expression, contextNode, resolver, type, result) {
1725
- throw new unexpected_call_error_1.default('Not supported "evaluate" method');
1726
- }
1727
- /**
1728
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1729
- *
1730
- * @deprecated
1731
- * @unsupported
1732
- * @implements DOM API: `Document`
1733
- */
1734
- execCommand(commandId, showUI, value) {
1735
- throw new unexpected_call_error_1.default('Not supported "execCommand" method');
1736
- }
1737
- /**
1738
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1739
- *
1740
- * @unsupported
1741
- * @implements DOM API: `Document`
1742
- */
1743
- exitFullscreen() {
1744
- throw new unexpected_call_error_1.default('Not supported "exitFullscreen" method');
1745
- }
1746
- /**
1747
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1748
- *
1749
- * @unsupported
1750
- * @implements DOM API: `Document`
1751
- */
1752
- exitPictureInPicture() {
1753
- throw new unexpected_call_error_1.default('Not supported "exitPictureInPicture" method');
1754
- }
1755
- /**
1756
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1757
- *
1758
- * @unsupported
1759
- * @implements DOM API: `Document`
1760
- */
1761
- exitPointerLock() {
1762
- throw new unexpected_call_error_1.default('Not supported "exitPointerLock" method');
1763
- }
1764
- /**
1765
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1766
- *
1767
- * @unsupported
1768
- * @implements DOM API: `Document`
1769
- */
1770
- getAnimations() {
1771
- throw new unexpected_call_error_1.default('Not supported "getAnimations" method');
1772
- }
1773
- /**
1774
- * @implements DOM API: `Document`
1775
- */
1776
- getElementById(elementId) {
1777
- // TODO:
1778
- return this.querySelector(`#${elementId}`);
1779
- }
1780
- /**
1781
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1782
- *
1783
- * @unsupported
1784
- * @implements DOM API: `Document`
1785
- */
1786
- getElementsByClassName(classNames) {
1787
- return (0, node_list_1.nodeListToHTMLCollection)(this.querySelectorAll(classNames));
1788
- }
1789
- /**
1790
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1791
- *
1792
- * @unsupported
1793
- * @implements DOM API: `Document`
1794
- */
1795
- getElementsByName(elementName) {
1796
- throw new unexpected_call_error_1.default('Not supported "getElementsByName" method');
1797
- }
1798
- /**
1799
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1800
- *
1801
- * @unsupported
1802
- * @implements DOM API: `Document`
1803
- */
1804
- getElementsByTagName(qualifiedName) {
1805
- return (0, node_list_1.nodeListToHTMLCollection)(this.querySelectorAll(qualifiedName));
1806
- }
1807
- /**
1808
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1809
- *
1810
- * @unsupported
1811
- * @implements DOM API: `Document`
1812
- */
1813
- getElementsByTagNameNS(namespace, localName) {
1814
- throw new unexpected_call_error_1.default('Not supported "getElementsByTagNameNS" method');
1815
- }
1816
- /**
1817
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1818
- *
1819
- * @unsupported
1820
- * @implements DOM API: `Document`
1821
- */
1822
- getSelection() {
1823
- throw new unexpected_call_error_1.default('Not supported "getSelection" method');
1824
- }
1825
- /**
1826
- * @implements `@markuplint/ml-core` API: `MLDocument`
1827
- */
1828
- getTokenList() {
1829
- if (tslib_1.__classPrivateFieldGet(this, _MLDocument_tokenList, "f")) {
1830
- return tslib_1.__classPrivateFieldGet(this, _MLDocument_tokenList, "f");
1831
- }
1832
- const tokens = [];
1833
- for (const node of this.nodeList) {
1834
- tokens.push(node);
1835
- if (node.is(node.ELEMENT_NODE) && node.closeTag) {
1836
- tokens.push(node.closeTag);
1837
- }
1838
- }
1839
- tokens.sort((a, b) => a.startOffset - b.startOffset);
1840
- tslib_1.__classPrivateFieldSet(this, _MLDocument_tokenList, Object.freeze(tokens), "f");
1841
- return tslib_1.__classPrivateFieldGet(this, _MLDocument_tokenList, "f");
1842
- }
1843
- /**
1844
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1845
- *
1846
- * @unsupported
1847
- * @implements DOM API: `Document`
1848
- */
1849
- hasFocus() {
1850
- throw new unexpected_call_error_1.default('Not supported "hasFocus" method');
1851
- }
1852
- /**
1853
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1854
- *
1855
- * @unsupported
1856
- * @implements DOM API: `Document`
1857
- */
1858
- hasStorageAccess() {
1859
- throw new unexpected_call_error_1.default('Not supported "hasStorageAccess" method');
1860
- }
1861
- /**
1862
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1863
- *
1864
- * @unsupported
1865
- * @implements DOM API: `Document`
1866
- */
1867
- importNode(node, deep) {
1868
- throw new unexpected_call_error_1.default('Not supported "importNode" method');
1869
- }
1870
- /**
1871
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1872
- *
1873
- * @unsupported
1874
- * @implements DOM API: `Document`
1875
- */
1876
- open(url, name, features) {
1877
- throw new unexpected_call_error_1.default('Not supported "open" method');
1878
- }
1879
- /**
1880
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1881
- *
1882
- * @deprecated
1883
- * @unsupported
1884
- * @implements DOM API: `Document`
1885
- */
1886
- queryCommandEnabled(commandId) {
1887
- throw new unexpected_call_error_1.default('Not supported "queryCommandEnabled" method');
1888
- }
1889
- /**
1890
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1891
- *
1892
- * @deprecated
1893
- * @unsupported
1894
- * @implements DOM API: `Document`
1895
- */
1896
- queryCommandIndeterm(commandId) {
1897
- throw new unexpected_call_error_1.default('Not supported "queryCommandIndeterm" method');
1898
- }
1899
- /**
1900
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1901
- *
1902
- * @deprecated
1903
- * @unsupported
1904
- * @implements DOM API: `Document`
1905
- */
1906
- queryCommandState(commandId) {
1907
- throw new unexpected_call_error_1.default('Not supported "queryCommandState" method');
1908
- }
1909
- /**
1910
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1911
- *
1912
- * @deprecated
1913
- * @unsupported
1914
- * @implements DOM API: `Document`
1915
- */
1916
- queryCommandSupported(commandId) {
1917
- throw new unexpected_call_error_1.default('Not supported "queryCommandSupported" method');
1918
- }
1919
- /**
1920
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1921
- *
1922
- * @deprecated
1923
- * @unsupported
1924
- * @implements DOM API: `Document`
1925
- */
1926
- queryCommandValue(commandId) {
1927
- throw new unexpected_call_error_1.default('Not supported "queryCommandValue" method');
1928
- }
1929
- /**
1930
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1931
- *
1932
- * @deprecated
1933
- * @unsupported
1934
- * @implements DOM API: `Document`
1935
- */
1936
- releaseEvents() {
1937
- throw new unexpected_call_error_1.default('Not supported "releaseEvents" method');
1938
- }
1939
- /**
1940
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1941
- *
1942
- * @unsupported
1943
- * @implements DOM API: `Document`
1944
- */
1945
- requestStorageAccess() {
1946
- throw new unexpected_call_error_1.default('Not supported "requestStorageAccess" method');
1947
- }
1948
- /**
1949
- * @implements `@markuplint/ml-core` API: `MLDocument`
1950
- */
1951
- setRule(rule) {
1952
- this.currentRule = rule;
1953
- }
1954
- /**
1955
- * @implements `@markuplint/ml-core` API: `MLDocument`
1956
- */
1957
- toString() {
1958
- const html = [];
1959
- for (const node of this.getTokenList()) {
1960
- html.push(node.toString());
1961
- }
1962
- return html.join('');
1963
- }
1964
- walkOn(type, walker, skipWhenRuleIsDisabled = true) {
1965
- return (0, walkers_1.sequentialWalker)(this.nodeList, node => {
1966
- if (skipWhenRuleIsDisabled && node.rule.disabled) {
1967
- return;
1968
- }
1969
- if (type === 'Element' && node.is(node.ELEMENT_NODE)) {
1970
- return walker(node);
1971
- }
1972
- if (type === 'Text' && node.is(node.TEXT_NODE)) {
1973
- return walker(node);
1974
- }
1975
- if (type === 'Comment' && node.is(node.COMMENT_NODE)) {
1976
- return walker(node);
1977
- }
1978
- if (type === 'Attr' && node.is(node.ELEMENT_NODE)) {
1979
- return (0, walkers_1.sequentialWalker)(Array.from(node.attributes), attr => walker(attr));
1980
- }
1981
- if (type === 'ElementCloseTag' && node.is(node.ELEMENT_NODE) && node.closeTag) {
1982
- return walker(node.closeTag);
1983
- }
1984
- });
1985
- }
1986
- /**
1987
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1988
- *
1989
- * @unsupported
1990
- * @implements DOM API: `Document`
1991
- */
1992
- write(...text) {
1993
- throw new unexpected_call_error_1.default('Not supported "write" method');
1994
- }
1995
- /**
1996
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1997
- *
1998
- * @unsupported
1999
- * @implements DOM API: `Document`
2000
- */
2001
- writeln(...text) {
2002
- throw new unexpected_call_error_1.default('Not supported "writeln" method');
2003
- }
2004
- _ruleMapping(ruleset) {
2005
- if (docLog.enabled) {
2006
- docLog('Rule Mapping: %O', Object.keys(ruleset.rules));
2007
- }
2008
- const ruleMapper = new rule_mapper_1.RuleMapper(this);
2009
- // global rules to #document
2010
- Object.keys(ruleset.rules).forEach(ruleName => {
2011
- const rule = ruleset.rules[ruleName];
2012
- ruleMapper.set(this, ruleName, {
2013
- from: 'rules',
2014
- specificity: [0, 0, 0],
2015
- rule,
2016
- });
2017
- });
2018
- // add rules to node
2019
- for (const node of this.nodeList) {
2020
- if (docLog.enabled) {
2021
- docLog('Add rules to node <%s>', node.nodeName);
2022
- }
2023
- // global rules to each element
2024
- Object.keys(ruleset.rules).forEach(ruleName => {
2025
- const rule = ruleset.rules[ruleName];
2026
- ruleMapper.set(node, ruleName, {
2027
- from: 'rules',
2028
- specificity: [0, 0, 0],
2029
- rule,
2030
- });
2031
- });
2032
- if (!node.is(node.ELEMENT_NODE) && !node.is(node.TEXT_NODE)) {
2033
- continue;
2034
- }
2035
- const selectorTarget = node.is(node.ELEMENT_NODE) ? node : null;
2036
- // node specs and special rules for node by selector
2037
- ruleset.nodeRules.forEach(nodeRule => {
2038
- if (!nodeRule.rules) {
2039
- return;
2040
- }
2041
- if (!selectorTarget) {
2042
- return;
2043
- }
2044
- const selector = nodeRule.selector || nodeRule.regexSelector;
2045
- const matches = (0, selector_1.matchSelector)(selectorTarget, selector);
2046
- if (!matches.matched) {
2047
- return;
2048
- }
2049
- if (docLog.enabled) {
2050
- docLog('Matched nodeRule: <%s>(%s)', node.nodeName, matches.selector || '*');
2051
- }
2052
- const ruleList = Object.keys(nodeRule.rules);
2053
- for (const ruleName of ruleList) {
2054
- const rule = nodeRule.rules[ruleName];
2055
- const convertedRule = (0, ml_config_1.exchangeValueOnRule)(rule, matches.data || {});
2056
- if (convertedRule === undefined) {
2057
- continue;
2058
- }
2059
- const globalRule = ruleset.rules[ruleName];
2060
- const mergedRule = globalRule ? (0, ml_config_1.mergeRule)(globalRule, convertedRule) : convertedRule;
2061
- ruleLog('↑ nodeRule (%s): %O', ruleName, mergedRule);
2062
- ruleMapper.set(node, ruleName, {
2063
- from: 'nodeRules',
2064
- specificity: matches.specificity,
2065
- rule: mergedRule,
2066
- });
2067
- }
2068
- });
2069
- // overwrite rule to child node
2070
- if (selectorTarget && ruleset.childNodeRules.length) {
2071
- const descendants = [];
2072
- const children = Array.from(selectorTarget.childNodes);
2073
- (0, walkers_1.syncWalk)(children, childNode => {
2074
- descendants.push(childNode);
2075
- });
2076
- ruleset.childNodeRules.forEach((nodeRule, i) => {
2077
- if (!nodeRule.rules) {
2078
- return;
2079
- }
2080
- const nodeRuleRules = nodeRule.rules;
2081
- const selector = nodeRule.selector || nodeRule.regexSelector;
2082
- if (!selector) {
2083
- return;
2084
- }
2085
- const matches = (0, selector_1.matchSelector)(selectorTarget, selector);
2086
- if (!matches.matched) {
2087
- return;
2088
- }
2089
- if (docLog.enabled) {
2090
- docLog('Matched childNodeRule: <%s>(%s), inheritance: %o', selectorTarget.nodeName, matches.selector || '*', !!nodeRule.inheritance);
2091
- }
2092
- const targetDescendants = nodeRule.inheritance ? descendants : children;
2093
- Object.keys(nodeRuleRules).forEach(ruleName => {
2094
- const rule = nodeRuleRules[ruleName];
2095
- const convertedRule = (0, ml_config_1.exchangeValueOnRule)(rule, matches.data || {});
2096
- if (convertedRule === undefined) {
2097
- return;
2098
- }
2099
- const globalRule = ruleset.rules[ruleName];
2100
- const mergedRule = globalRule ? (0, ml_config_1.mergeRule)(globalRule, convertedRule) : convertedRule;
2101
- ruleLog('↑ childNodeRule (%s): %O', ruleName, mergedRule);
2102
- targetDescendants.forEach(descendant => {
2103
- ruleMapper.set(descendant, ruleName, {
2104
- from: 'childNodeRules',
2105
- specificity: matches.specificity,
2106
- rule: mergedRule,
2107
- });
2108
- });
2109
- });
2110
- });
2111
- }
2112
- }
2113
- ruleMapper.apply();
2114
- }
2115
- }
2116
- exports.MLDocument = MLDocument;
2117
- _MLDocument_filename = new WeakMap(), _MLDocument_tokenList = new WeakMap();