@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,2483 +0,0 @@
1
- "use strict";
2
- var _MLElement_attributes, _MLElement_fixedNodeName, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, _MLElement_normalizedAttrs, _MLElement_normalizedString, _MLElement_tagOpenChar;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.MLElement = void 0;
5
- const tslib_1 = require("tslib");
6
- const ml_spec_1 = require("@markuplint/ml-spec");
7
- const selector_1 = require("@markuplint/selector");
8
- const string_splice_1 = require("../../utils/string-splice");
9
- const accname_1 = require("../helper/accname");
10
- const child_node_methods_1 = require("../manipulations/child-node-methods");
11
- const token_1 = require("../token/token");
12
- const attr_1 = require("./attr");
13
- const dom_token_list_1 = require("./dom-token-list");
14
- const named_node_map_1 = require("./named-node-map");
15
- const node_list_1 = require("./node-list");
16
- const parent_node_1 = require("./parent-node");
17
- const unexpected_call_error_1 = tslib_1.__importDefault(require("./unexpected-call-error"));
18
- const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
19
- class MLElement extends parent_node_1.MLParentNode {
20
- constructor(astNode, document) {
21
- super(astNode, document);
22
- _MLElement_attributes.set(this, void 0);
23
- _MLElement_fixedNodeName.set(this, void 0);
24
- _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache.set(this, null);
25
- _MLElement_normalizedAttrs.set(this, null);
26
- _MLElement_normalizedString.set(this, null);
27
- _MLElement_tagOpenChar.set(this, void 0);
28
- tslib_1.__classPrivateFieldSet(this, _MLElement_attributes, astNode.attributes.map(attr => new attr_1.MLAttr(attr, this)), "f");
29
- this.hasSpreadAttr = astNode.hasSpreadAttr;
30
- this.selfClosingSolidus = astNode.selfClosingSolidus ? new token_1.MLToken(astNode.selfClosingSolidus) : null;
31
- this.endSpace = astNode.endSpace ? new token_1.MLToken(astNode.endSpace) : null;
32
- this.closeTag = astNode.pearNode ? new token_1.MLToken(astNode.pearNode) : null;
33
- this.namespaceURI = astNode.namespace || HTML_NAMESPACE;
34
- this.isForeignElement = this.namespaceURI !== HTML_NAMESPACE;
35
- this.isCustomElement = astNode.isCustomElement;
36
- tslib_1.__classPrivateFieldSet(this, _MLElement_fixedNodeName, astNode.nodeName, "f");
37
- this.isOmitted = astNode.isGhost;
38
- tslib_1.__classPrivateFieldSet(this, _MLElement_tagOpenChar, astNode.tagOpenChar, "f");
39
- }
40
- /**
41
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
42
- *
43
- * @deprecated
44
- * @unsupported
45
- * @implements DOM API: `Element`
46
- */
47
- get accessKey() {
48
- throw new unexpected_call_error_1.default('Not supported "accessKey" property');
49
- }
50
- /**
51
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
52
- *
53
- * @deprecated
54
- * @unsupported
55
- * @implements DOM API: `Element`
56
- */
57
- get accessKeyLabel() {
58
- throw new unexpected_call_error_1.default('Not supported "accessKeyLabel" property');
59
- }
60
- /**
61
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
62
- *
63
- * @deprecated
64
- * @unsupported
65
- * @implements DOM API: `Element`
66
- */
67
- get ariaAtomic() {
68
- throw new unexpected_call_error_1.default('Not supported "ariaAtomic" property');
69
- }
70
- /**
71
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
72
- *
73
- * @deprecated
74
- * @unsupported
75
- * @implements DOM API: `Element`
76
- */
77
- get ariaAutoComplete() {
78
- throw new unexpected_call_error_1.default('Not supported "ariaAutoComplete" property');
79
- }
80
- /**
81
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
82
- *
83
- * @deprecated
84
- * @unsupported
85
- * @implements DOM API: `Element`
86
- */
87
- get ariaBusy() {
88
- throw new unexpected_call_error_1.default('Not supported "ariaBusy" property');
89
- }
90
- /**
91
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
92
- *
93
- * @deprecated
94
- * @unsupported
95
- * @implements DOM API: `Element`
96
- */
97
- get ariaChecked() {
98
- throw new unexpected_call_error_1.default('Not supported "ariaChecked" property');
99
- }
100
- /**
101
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
102
- *
103
- * @deprecated
104
- * @unsupported
105
- * @implements DOM API: `Element`
106
- */
107
- get ariaColCount() {
108
- throw new unexpected_call_error_1.default('Not supported "ariaColCount" property');
109
- }
110
- /**
111
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
112
- *
113
- * @deprecated
114
- * @unsupported
115
- * @implements DOM API: `Element`
116
- */
117
- get ariaColIndex() {
118
- throw new unexpected_call_error_1.default('Not supported "ariaColIndex" property');
119
- }
120
- /**
121
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
122
- *
123
- * @deprecated
124
- * @unsupported
125
- * @implements DOM API: `Element`
126
- */
127
- get ariaColSpan() {
128
- throw new unexpected_call_error_1.default('Not supported "ariaColSpan" property');
129
- }
130
- /**
131
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
132
- *
133
- * @deprecated
134
- * @unsupported
135
- * @implements DOM API: `Element`
136
- */
137
- get ariaCurrent() {
138
- throw new unexpected_call_error_1.default('Not supported "ariaCurrent" property');
139
- }
140
- /**
141
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
142
- *
143
- * @deprecated
144
- * @unsupported
145
- * @implements DOM API: `Element`
146
- */
147
- get ariaDisabled() {
148
- throw new unexpected_call_error_1.default('Not supported "ariaDisabled" property');
149
- }
150
- /**
151
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
152
- *
153
- * @deprecated
154
- * @unsupported
155
- * @implements DOM API: `Element`
156
- */
157
- get ariaExpanded() {
158
- throw new unexpected_call_error_1.default('Not supported "ariaExpanded" property');
159
- }
160
- /**
161
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
162
- *
163
- * @deprecated
164
- * @unsupported
165
- * @implements DOM API: `Element`
166
- */
167
- get ariaHasPopup() {
168
- throw new unexpected_call_error_1.default('Not supported "ariaHasPopup" property');
169
- }
170
- /**
171
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
172
- *
173
- * @deprecated
174
- * @unsupported
175
- * @implements DOM API: `Element`
176
- */
177
- get ariaHidden() {
178
- throw new unexpected_call_error_1.default('Not supported "ariaHidden" property');
179
- }
180
- /**
181
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
182
- *
183
- * @deprecated
184
- * @unsupported
185
- * @implements DOM API: `Element`
186
- */
187
- get ariaKeyShortcuts() {
188
- throw new unexpected_call_error_1.default('Not supported "ariaKeyShortcuts" property');
189
- }
190
- /**
191
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
192
- *
193
- * @deprecated
194
- * @unsupported
195
- * @implements DOM API: `Element`
196
- */
197
- get ariaLabel() {
198
- throw new unexpected_call_error_1.default('Not supported "ariaLabel" property');
199
- }
200
- /**
201
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
202
- *
203
- * @deprecated
204
- * @unsupported
205
- * @implements DOM API: `Element`
206
- */
207
- get ariaLevel() {
208
- throw new unexpected_call_error_1.default('Not supported "ariaLevel" property');
209
- }
210
- /**
211
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
212
- *
213
- * @deprecated
214
- * @unsupported
215
- * @implements DOM API: `Element`
216
- */
217
- get ariaLive() {
218
- throw new unexpected_call_error_1.default('Not supported "ariaLive" property');
219
- }
220
- /**
221
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
222
- *
223
- * @deprecated
224
- * @unsupported
225
- * @implements DOM API: `Element`
226
- */
227
- get ariaModal() {
228
- throw new unexpected_call_error_1.default('Not supported "ariaModal" property');
229
- }
230
- /**
231
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
232
- *
233
- * @deprecated
234
- * @unsupported
235
- * @implements DOM API: `Element`
236
- */
237
- get ariaMultiLine() {
238
- throw new unexpected_call_error_1.default('Not supported "ariaMultiLine" property');
239
- }
240
- /**
241
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
242
- *
243
- * @deprecated
244
- * @unsupported
245
- * @implements DOM API: `Element`
246
- */
247
- get ariaMultiSelectable() {
248
- throw new unexpected_call_error_1.default('Not supported "ariaMultiSelectable" property');
249
- }
250
- /**
251
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
252
- *
253
- * @deprecated
254
- * @unsupported
255
- * @implements DOM API: `Element`
256
- */
257
- get ariaOrientation() {
258
- throw new unexpected_call_error_1.default('Not supported "ariaOrientation" property');
259
- }
260
- /**
261
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
262
- *
263
- * @deprecated
264
- * @unsupported
265
- * @implements DOM API: `Element`
266
- */
267
- get ariaPlaceholder() {
268
- throw new unexpected_call_error_1.default('Not supported "ariaPlaceholder" property');
269
- }
270
- /**
271
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
272
- *
273
- * @deprecated
274
- * @unsupported
275
- * @implements DOM API: `Element`
276
- */
277
- get ariaPosInSet() {
278
- throw new unexpected_call_error_1.default('Not supported "ariaPosInSet" property');
279
- }
280
- /**
281
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
282
- *
283
- * @deprecated
284
- * @unsupported
285
- * @implements DOM API: `Element`
286
- */
287
- get ariaPressed() {
288
- throw new unexpected_call_error_1.default('Not supported "ariaPressed" property');
289
- }
290
- /**
291
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
292
- *
293
- * @deprecated
294
- * @unsupported
295
- * @implements DOM API: `Element`
296
- */
297
- get ariaReadOnly() {
298
- throw new unexpected_call_error_1.default('Not supported "ariaReadOnly" property');
299
- }
300
- /**
301
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
302
- *
303
- * @deprecated
304
- * @unsupported
305
- * @implements DOM API: `Element`
306
- */
307
- get ariaRequired() {
308
- throw new unexpected_call_error_1.default('Not supported "ariaRequired" property');
309
- }
310
- /**
311
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
312
- *
313
- * @deprecated
314
- * @unsupported
315
- * @implements DOM API: `Element`
316
- */
317
- get ariaRoleDescription() {
318
- throw new unexpected_call_error_1.default('Not supported "ariaRoleDescription" property');
319
- }
320
- /**
321
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
322
- *
323
- * @deprecated
324
- * @unsupported
325
- * @implements DOM API: `Element`
326
- */
327
- get ariaRowCount() {
328
- throw new unexpected_call_error_1.default('Not supported "ariaRowCount" property');
329
- }
330
- /**
331
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
332
- *
333
- * @deprecated
334
- * @unsupported
335
- * @implements DOM API: `Element`
336
- */
337
- get ariaRowIndex() {
338
- throw new unexpected_call_error_1.default('Not supported "ariaRowIndex" property');
339
- }
340
- /**
341
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
342
- *
343
- * @deprecated
344
- * @unsupported
345
- * @implements DOM API: `Element`
346
- */
347
- get ariaRowSpan() {
348
- throw new unexpected_call_error_1.default('Not supported "ariaRowSpan" property');
349
- }
350
- /**
351
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
352
- *
353
- * @deprecated
354
- * @unsupported
355
- * @implements DOM API: `Element`
356
- */
357
- get ariaSelected() {
358
- throw new unexpected_call_error_1.default('Not supported "ariaSelected" property');
359
- }
360
- /**
361
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
362
- *
363
- * @deprecated
364
- * @unsupported
365
- * @implements DOM API: `Element`
366
- */
367
- get ariaSetSize() {
368
- throw new unexpected_call_error_1.default('Not supported "ariaSetSize" property');
369
- }
370
- /**
371
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
372
- *
373
- * @deprecated
374
- * @unsupported
375
- * @implements DOM API: `Element`
376
- */
377
- get ariaSort() {
378
- throw new unexpected_call_error_1.default('Not supported "ariaSort" property');
379
- }
380
- /**
381
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
382
- *
383
- * @deprecated
384
- * @unsupported
385
- * @implements DOM API: `Element`
386
- */
387
- get ariaValueMax() {
388
- throw new unexpected_call_error_1.default('Not supported "ariaValueMax" property');
389
- }
390
- /**
391
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
392
- *
393
- * @deprecated
394
- * @unsupported
395
- * @implements DOM API: `Element`
396
- */
397
- get ariaValueMin() {
398
- throw new unexpected_call_error_1.default('Not supported "ariaValueMin" property');
399
- }
400
- /**
401
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
402
- *
403
- * @deprecated
404
- * @unsupported
405
- * @implements DOM API: `Element`
406
- */
407
- get ariaValueNow() {
408
- throw new unexpected_call_error_1.default('Not supported "ariaValueNow" property');
409
- }
410
- /**
411
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
412
- *
413
- * @deprecated
414
- * @unsupported
415
- * @implements DOM API: `Element`
416
- */
417
- get ariaValueText() {
418
- throw new unexpected_call_error_1.default('Not supported "ariaValueText" property');
419
- }
420
- /**
421
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
422
- *
423
- * @unsupported
424
- * @implements DOM API: `Element`
425
- * @see https://dom.spec.whatwg.org/#dom-slotable-assignedslot
426
- */
427
- get assignedSlot() {
428
- throw new unexpected_call_error_1.default('Not supported "assignedSlot" property');
429
- }
430
- /**
431
- * @implements DOM API: `Element`
432
- * @see https://dom.spec.whatwg.org/#dom-element-attributes
433
- */
434
- get attributes() {
435
- if (tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedAttrs, "f")) {
436
- return tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedAttrs, "f");
437
- }
438
- const names = new Set();
439
- const attrs = [];
440
- for (const attr of tslib_1.__classPrivateFieldGet(this, _MLElement_attributes, "f")) {
441
- if (names.has(attr.name)) {
442
- /**
443
- * Skips a duplicated attribute
444
- *
445
- *@see https://html.spec.whatwg.org/#parse-error-duplicate-attribute
446
- */
447
- continue;
448
- }
449
- attrs.push(attr);
450
- }
451
- tslib_1.__classPrivateFieldSet(this, _MLElement_normalizedAttrs, (0, named_node_map_1.toNamedNodeMap)(attrs), "f");
452
- return tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedAttrs, "f");
453
- }
454
- /**
455
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
456
- *
457
- * @deprecated
458
- * @unsupported
459
- * @implements DOM API: `Element`
460
- */
461
- get autocapitalize() {
462
- throw new unexpected_call_error_1.default('Not supported "autocapitalize" property');
463
- }
464
- /**
465
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
466
- *
467
- * @deprecated
468
- * @unsupported
469
- * @implements DOM API: `Element`
470
- */
471
- get autofocus() {
472
- throw new unexpected_call_error_1.default('Not supported "autofocus" property');
473
- }
474
- /**
475
- * @implements DOM API: `Element`
476
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-classlist%E2%91%A0
477
- */
478
- get classList() {
479
- return (0, dom_token_list_1.toDOMTokenList)(this.className);
480
- }
481
- /**
482
- * @implements DOM API: `Element`
483
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-classname%E2%91%A0
484
- */
485
- get className() {
486
- const classNames = [];
487
- for (const classNameToken of this.getAttributeToken('class')) {
488
- if (classNames.length === 0 || classNameToken.isDuplicatable) {
489
- classNames.push(classNameToken.value);
490
- }
491
- }
492
- return classNames.join(' ');
493
- }
494
- /**
495
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
496
- *
497
- * @unsupported
498
- * @implements DOM API: `Element`
499
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clientheight-1
500
- */
501
- get clientHeight() {
502
- throw new unexpected_call_error_1.default('Not supported "clientHeight" property');
503
- }
504
- /**
505
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
506
- *
507
- * @unsupported
508
- * @implements DOM API: `Element`
509
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clientleft-1
510
- */
511
- get clientLeft() {
512
- throw new unexpected_call_error_1.default('Not supported "clientLeft" property');
513
- }
514
- /**
515
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
516
- *
517
- * @unsupported
518
- * @implements DOM API: `Element`
519
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clienttop-1
520
- */
521
- get clientTop() {
522
- throw new unexpected_call_error_1.default('Not supported "clientTop" property');
523
- }
524
- /**
525
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
526
- *
527
- * @unsupported
528
- * @implements DOM API: `Element`
529
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clientwidth-1
530
- */
531
- get clientWidth() {
532
- throw new unexpected_call_error_1.default('Not supported "clientWidth" property');
533
- }
534
- /**
535
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
536
- *
537
- * @deprecated
538
- * @unsupported
539
- * @implements DOM API: `Element`
540
- */
541
- get contentEditable() {
542
- throw new unexpected_call_error_1.default('Not supported "contentEditable" property');
543
- }
544
- /**
545
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
546
- *
547
- * @deprecated
548
- * @unsupported
549
- * @implements DOM API: `Element`
550
- */
551
- get dataset() {
552
- throw new unexpected_call_error_1.default('Not supported "dataset" property');
553
- }
554
- /**
555
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
556
- *
557
- * @deprecated
558
- * @unsupported
559
- * @implements DOM API: `Element`
560
- */
561
- get dir() {
562
- throw new unexpected_call_error_1.default('Not supported "dir" property');
563
- }
564
- /**
565
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
566
- *
567
- * @deprecated
568
- * @unsupported
569
- * @implements DOM API: `Element`
570
- */
571
- get draggable() {
572
- throw new unexpected_call_error_1.default('Not supported "draggable" property');
573
- }
574
- /**
575
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
576
- *
577
- * @deprecated
578
- * @unsupported
579
- * @implements DOM API: `Element`
580
- */
581
- get enterKeyHint() {
582
- throw new unexpected_call_error_1.default('Not supported "enterKeyHint" property');
583
- }
584
- /**
585
- * @implements `@markuplint/ml-core` API: `MLElement`
586
- */
587
- get fixedNodeName() {
588
- return tslib_1.__classPrivateFieldGet(this, _MLElement_fixedNodeName, "f");
589
- }
590
- /**
591
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
592
- *
593
- * @deprecated
594
- * @unsupported
595
- * @implements DOM API: `Element`
596
- */
597
- get hidden() {
598
- throw new unexpected_call_error_1.default('Not supported "hidden" property');
599
- }
600
- /**
601
- * @implements DOM API: `Element`
602
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-id%E2%91%A0
603
- */
604
- get id() {
605
- return this.getAttribute('id') || '';
606
- }
607
- /**
608
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
609
- *
610
- * @unsupported
611
- * @implements DOM API: `Element`
612
- * @see https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml
613
- */
614
- get innerHTML() {
615
- throw new unexpected_call_error_1.default('Not supported "innerHTML" property');
616
- }
617
- /**
618
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
619
- *
620
- * @deprecated
621
- * @unsupported
622
- * @implements DOM API: `Element`
623
- */
624
- get innerText() {
625
- throw new unexpected_call_error_1.default('Not supported "innerText" property');
626
- }
627
- /**
628
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
629
- *
630
- * @deprecated
631
- * @unsupported
632
- * @implements DOM API: `Element`
633
- */
634
- get inputMode() {
635
- throw new unexpected_call_error_1.default('Not supported "inputMode" property');
636
- }
637
- /**
638
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
639
- *
640
- * @deprecated
641
- * @unsupported
642
- * @implements DOM API: `Element`
643
- */
644
- get isContentEditable() {
645
- throw new unexpected_call_error_1.default('Not supported "isContentEditable" property');
646
- }
647
- /**
648
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
649
- *
650
- * @deprecated
651
- * @unsupported
652
- * @implements DOM API: `Element`
653
- */
654
- get lang() {
655
- throw new unexpected_call_error_1.default('Not supported "lang" property');
656
- }
657
- /**
658
- * Returns a lowercase name if it is an HTML element.
659
- *
660
- * ```html
661
- * <div> => "div"
662
- * <DIV> => "div"
663
- * <svg> => "svg"
664
- * <foreignObject> => "foreignObject"
665
- * <x-foo> => "x-foo"
666
- * <X-FOO> => "x-foo"
667
- * ```
668
- *
669
- * @implements DOM API: `Element`
670
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-localname%E2%91%A0
671
- */
672
- get localName() {
673
- if (this.isForeignElement || this.isCustomElement) {
674
- return this._astToken.nodeName;
675
- }
676
- return this._astToken.nodeName.toLowerCase();
677
- }
678
- /**
679
- * @implements `@markuplint/ml-core` API: `MLElement`
680
- */
681
- get nameWithNS() {
682
- if (/[a-z]:[a-z]/i.test(this.localName)) {
683
- return this.localName;
684
- }
685
- const ns = (0, ml_spec_1.getNS)(this.namespaceURI || '');
686
- if (ns === 'html') {
687
- return this.localName;
688
- }
689
- return `${ns}:${this.localName}`;
690
- }
691
- /**
692
- * The element immediately following the specified one in its parent's children list.
693
- *
694
- * @readonly
695
- * @implements DOM API: `Element`
696
- * @see https://dom.spec.whatwg.org/#ref-for-dom-nondocumenttypechildnode-nextelementsibling%E2%91%A1
697
- */
698
- get nextElementSibling() {
699
- return (0, child_node_methods_1.nextElementSibling)(this);
700
- }
701
- /**
702
- * Returns a string appropriate for the type of node as `Element`
703
- *
704
- * @see https://dom.spec.whatwg.org/#ref-for-element%E2%91%A2%E2%93%AA
705
- */
706
- get nodeName() {
707
- if (this.isForeignElement || this.isCustomElement) {
708
- return this._astToken.nodeName;
709
- }
710
- return this._astToken.nodeName.toUpperCase();
711
- }
712
- /**
713
- * Returns a number appropriate for the type of `Element`
714
- */
715
- get nodeType() {
716
- return this.ELEMENT_NODE;
717
- }
718
- /**
719
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
720
- *
721
- * @deprecated
722
- * @unsupported
723
- * @implements DOM API: `Element`
724
- */
725
- get nonce() {
726
- throw new unexpected_call_error_1.default('Not supported "nonce" property');
727
- }
728
- /**
729
- * @implements `@markuplint/ml-core` API: `MLElement`
730
- */
731
- get ns() {
732
- if (/[a-z]:[a-z]/i.test(this.localName)) {
733
- return this.localName.split(':')[0];
734
- }
735
- return (0, ml_spec_1.getNS)(this.namespaceURI || '');
736
- }
737
- /**
738
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
739
- *
740
- * @deprecated
741
- * @unsupported
742
- * @implements DOM API: `Element`
743
- */
744
- get offsetHeight() {
745
- throw new unexpected_call_error_1.default('Not supported "offsetHeight" property');
746
- }
747
- /**
748
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
749
- *
750
- * @deprecated
751
- * @unsupported
752
- * @implements DOM API: `Element`
753
- */
754
- get offsetLeft() {
755
- throw new unexpected_call_error_1.default('Not supported "offsetLeft" property');
756
- }
757
- /**
758
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
759
- *
760
- * @deprecated
761
- * @unsupported
762
- * @implements DOM API: `Element`
763
- */
764
- get offsetParent() {
765
- throw new unexpected_call_error_1.default('Not supported "offsetParent" property');
766
- }
767
- /**
768
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
769
- *
770
- * @deprecated
771
- * @unsupported
772
- * @implements DOM API: `Element`
773
- */
774
- get offsetTop() {
775
- throw new unexpected_call_error_1.default('Not supported "offsetTop" property');
776
- }
777
- /**
778
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
779
- *
780
- * @deprecated
781
- * @unsupported
782
- * @implements DOM API: `Element`
783
- */
784
- get offsetWidth() {
785
- throw new unexpected_call_error_1.default('Not supported "offsetWidth" property');
786
- }
787
- /**
788
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
789
- *
790
- * @deprecated
791
- * @unsupported
792
- * @implements DOM API: `Element`
793
- */
794
- get onabort() {
795
- throw new unexpected_call_error_1.default('Not supported "onabort" property');
796
- }
797
- /**
798
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
799
- *
800
- * @deprecated
801
- * @unsupported
802
- * @implements DOM API: `Element`
803
- */
804
- get onanimationcancel() {
805
- throw new unexpected_call_error_1.default('Not supported "onanimationcancel" property');
806
- }
807
- /**
808
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
809
- *
810
- * @deprecated
811
- * @unsupported
812
- * @implements DOM API: `Element`
813
- */
814
- get onanimationend() {
815
- throw new unexpected_call_error_1.default('Not supported "onanimationend" property');
816
- }
817
- /**
818
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
819
- *
820
- * @deprecated
821
- * @unsupported
822
- * @implements DOM API: `Element`
823
- */
824
- get onanimationiteration() {
825
- throw new unexpected_call_error_1.default('Not supported "onanimationiteration" property');
826
- }
827
- /**
828
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
829
- *
830
- * @deprecated
831
- * @unsupported
832
- * @implements DOM API: `Element`
833
- */
834
- get onanimationstart() {
835
- throw new unexpected_call_error_1.default('Not supported "onanimationstart" property');
836
- }
837
- /**
838
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
839
- *
840
- * @deprecated
841
- * @unsupported
842
- * @implements DOM API: `Element`
843
- */
844
- get onauxclick() {
845
- throw new unexpected_call_error_1.default('Not supported "onauxclick" property');
846
- }
847
- /**
848
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
849
- *
850
- * @deprecated
851
- * @unsupported
852
- * @implements DOM API: `Element`
853
- */
854
- get onblur() {
855
- throw new unexpected_call_error_1.default('Not supported "onblur" property');
856
- }
857
- /**
858
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
859
- *
860
- * @deprecated
861
- * @unsupported
862
- * @implements DOM API: `Element`
863
- */
864
- get oncanplay() {
865
- throw new unexpected_call_error_1.default('Not supported "oncanplay" property');
866
- }
867
- /**
868
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
869
- *
870
- * @deprecated
871
- * @unsupported
872
- * @implements DOM API: `Element`
873
- */
874
- get oncanplaythrough() {
875
- throw new unexpected_call_error_1.default('Not supported "oncanplaythrough" property');
876
- }
877
- /**
878
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
879
- *
880
- * @deprecated
881
- * @unsupported
882
- * @implements DOM API: `Element`
883
- */
884
- get onchange() {
885
- throw new unexpected_call_error_1.default('Not supported "onchange" property');
886
- }
887
- /**
888
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
889
- *
890
- * @deprecated
891
- * @unsupported
892
- * @implements DOM API: `Element`
893
- */
894
- get onclick() {
895
- throw new unexpected_call_error_1.default('Not supported "onclick" property');
896
- }
897
- /**
898
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
899
- *
900
- * @deprecated
901
- * @unsupported
902
- * @implements DOM API: `Element`
903
- */
904
- get onclose() {
905
- throw new unexpected_call_error_1.default('Not supported "onclose" property');
906
- }
907
- /**
908
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
909
- *
910
- * @deprecated
911
- * @unsupported
912
- * @implements DOM API: `Element`
913
- */
914
- get oncontextmenu() {
915
- throw new unexpected_call_error_1.default('Not supported "oncontextmenu" property');
916
- }
917
- /**
918
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
919
- *
920
- * @deprecated
921
- * @unsupported
922
- * @implements DOM API: `Element`
923
- */
924
- get oncopy() {
925
- throw new unexpected_call_error_1.default('Not supported "oncopy" property');
926
- }
927
- /**
928
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
929
- *
930
- * @deprecated
931
- * @unsupported
932
- * @implements DOM API: `Element`
933
- */
934
- get oncuechange() {
935
- throw new unexpected_call_error_1.default('Not supported "onpointerleave" property');
936
- }
937
- /**
938
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
939
- *
940
- * @deprecated
941
- * @unsupported
942
- * @implements DOM API: `Element`
943
- */
944
- get oncut() {
945
- throw new unexpected_call_error_1.default('Not supported "onpointerleave" property');
946
- }
947
- /**
948
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
949
- *
950
- * @deprecated
951
- * @unsupported
952
- * @implements DOM API: `Element`
953
- */
954
- get ondblclick() {
955
- throw new unexpected_call_error_1.default('Not supported "ondblclick" property');
956
- }
957
- /**
958
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
959
- *
960
- * @deprecated
961
- * @unsupported
962
- * @implements DOM API: `Element`
963
- */
964
- get ondrag() {
965
- throw new unexpected_call_error_1.default('Not supported "ondrag" property');
966
- }
967
- /**
968
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
969
- *
970
- * @deprecated
971
- * @unsupported
972
- * @implements DOM API: `Element`
973
- */
974
- get ondragend() {
975
- throw new unexpected_call_error_1.default('Not supported "ondragend" property');
976
- }
977
- /**
978
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
979
- *
980
- * @deprecated
981
- * @unsupported
982
- * @implements DOM API: `Element`
983
- */
984
- get ondragenter() {
985
- throw new unexpected_call_error_1.default('Not supported "ondragenter" property');
986
- }
987
- /**
988
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
989
- *
990
- * @deprecated
991
- * @unsupported
992
- * @implements DOM API: `Element`
993
- */
994
- get ondragleave() {
995
- throw new unexpected_call_error_1.default('Not supported "ondragleave" property');
996
- }
997
- /**
998
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
999
- *
1000
- * @deprecated
1001
- * @unsupported
1002
- * @implements DOM API: `Element`
1003
- */
1004
- get ondragover() {
1005
- throw new unexpected_call_error_1.default('Not supported "ondragover" property');
1006
- }
1007
- /**
1008
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1009
- *
1010
- * @deprecated
1011
- * @unsupported
1012
- * @implements DOM API: `Element`
1013
- */
1014
- get ondragstart() {
1015
- throw new unexpected_call_error_1.default('Not supported "ondragstart" property');
1016
- }
1017
- /**
1018
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1019
- *
1020
- * @deprecated
1021
- * @unsupported
1022
- * @implements DOM API: `Element`
1023
- */
1024
- get ondrop() {
1025
- throw new unexpected_call_error_1.default('Not supported "ondrop" property');
1026
- }
1027
- /**
1028
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1029
- *
1030
- * @deprecated
1031
- * @unsupported
1032
- * @implements DOM API: `Element`
1033
- */
1034
- get ondurationchange() {
1035
- throw new unexpected_call_error_1.default('Not supported "ondurationchange" property');
1036
- }
1037
- /**
1038
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1039
- *
1040
- * @deprecated
1041
- * @unsupported
1042
- * @implements DOM API: `Element`
1043
- */
1044
- get onemptied() {
1045
- throw new unexpected_call_error_1.default('Not supported "onemptied" property');
1046
- }
1047
- /**
1048
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1049
- *
1050
- * @deprecated
1051
- * @unsupported
1052
- * @implements DOM API: `Element`
1053
- */
1054
- get onended() {
1055
- throw new unexpected_call_error_1.default('Not supported "onended" property');
1056
- }
1057
- /**
1058
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1059
- *
1060
- * @deprecated
1061
- * @unsupported
1062
- * @implements DOM API: `Element`
1063
- */
1064
- get onerror() {
1065
- throw new unexpected_call_error_1.default('Not supported "onerror" property');
1066
- }
1067
- /**
1068
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1069
- *
1070
- * @deprecated
1071
- * @unsupported
1072
- * @implements DOM API: `Element`
1073
- */
1074
- get onfocus() {
1075
- throw new unexpected_call_error_1.default('Not supported "onfocus" property');
1076
- }
1077
- /**
1078
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1079
- *
1080
- * @deprecated
1081
- * @unsupported
1082
- * @implements DOM API: `Element`
1083
- */
1084
- get onformdata() {
1085
- throw new unexpected_call_error_1.default('Not supported "onformdata" property');
1086
- }
1087
- /**
1088
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1089
- *
1090
- * @deprecated
1091
- * @unsupported
1092
- * @implements DOM API: `Element`
1093
- */
1094
- get onfullscreenchange() {
1095
- throw new unexpected_call_error_1.default('Not supported "onfullscreenchange" property');
1096
- }
1097
- /**
1098
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1099
- *
1100
- * @deprecated
1101
- * @unsupported
1102
- * @implements DOM API: `Element`
1103
- */
1104
- get onfullscreenerror() {
1105
- throw new unexpected_call_error_1.default('Not supported "onfullscreenerror" property');
1106
- }
1107
- /**
1108
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1109
- *
1110
- * @deprecated
1111
- * @unsupported
1112
- * @implements DOM API: `Element`
1113
- */
1114
- get ongotpointercapture() {
1115
- throw new unexpected_call_error_1.default('Not supported "ongotpointercapture" property');
1116
- }
1117
- /**
1118
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1119
- *
1120
- * @deprecated
1121
- * @unsupported
1122
- * @implements DOM API: `Element`
1123
- */
1124
- get oninput() {
1125
- throw new unexpected_call_error_1.default('Not supported "oninput" property');
1126
- }
1127
- /**
1128
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1129
- *
1130
- * @deprecated
1131
- * @unsupported
1132
- * @implements DOM API: `Element`
1133
- */
1134
- get oninvalid() {
1135
- throw new unexpected_call_error_1.default('Not supported "oninvalid" property');
1136
- }
1137
- /**
1138
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1139
- *
1140
- * @deprecated
1141
- * @unsupported
1142
- * @implements DOM API: `Element`
1143
- */
1144
- get onkeydown() {
1145
- throw new unexpected_call_error_1.default('Not supported "onkeydown" property');
1146
- }
1147
- /**
1148
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1149
- *
1150
- * @deprecated
1151
- * @unsupported
1152
- * @implements DOM API: `Element`
1153
- */
1154
- get onkeypress() {
1155
- throw new unexpected_call_error_1.default('Not supported "onkeypress" property');
1156
- }
1157
- /**
1158
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1159
- *
1160
- * @deprecated
1161
- * @unsupported
1162
- * @implements DOM API: `Element`
1163
- */
1164
- get onkeyup() {
1165
- throw new unexpected_call_error_1.default('Not supported "onkeyup" property');
1166
- }
1167
- /**
1168
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1169
- *
1170
- * @deprecated
1171
- * @unsupported
1172
- * @implements DOM API: `Element`
1173
- */
1174
- get onload() {
1175
- throw new unexpected_call_error_1.default('Not supported "onload" property');
1176
- }
1177
- /**
1178
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1179
- *
1180
- * @deprecated
1181
- * @unsupported
1182
- * @implements DOM API: `Element`
1183
- */
1184
- get onloadeddata() {
1185
- throw new unexpected_call_error_1.default('Not supported "onloadeddata" property');
1186
- }
1187
- /**
1188
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1189
- *
1190
- * @deprecated
1191
- * @unsupported
1192
- * @implements DOM API: `Element`
1193
- */
1194
- get onloadedmetadata() {
1195
- throw new unexpected_call_error_1.default('Not supported "onloadedmetadata" property');
1196
- }
1197
- /**
1198
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1199
- *
1200
- * @deprecated
1201
- * @unsupported
1202
- * @implements DOM API: `Element`
1203
- */
1204
- get onloadstart() {
1205
- throw new unexpected_call_error_1.default('Not supported "onloadstart" property');
1206
- }
1207
- /**
1208
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1209
- *
1210
- * @deprecated
1211
- * @unsupported
1212
- * @implements DOM API: `Element`
1213
- */
1214
- get onlostpointercapture() {
1215
- throw new unexpected_call_error_1.default('Not supported "onlostpointercapture" property');
1216
- }
1217
- /**
1218
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1219
- *
1220
- * @deprecated
1221
- * @unsupported
1222
- * @implements DOM API: `Element`
1223
- */
1224
- get onmousedown() {
1225
- throw new unexpected_call_error_1.default('Not supported "onmousedown" property');
1226
- }
1227
- /**
1228
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1229
- *
1230
- * @deprecated
1231
- * @unsupported
1232
- * @implements DOM API: `Element`
1233
- */
1234
- get onmouseenter() {
1235
- throw new unexpected_call_error_1.default('Not supported "onmouseenter" property');
1236
- }
1237
- /**
1238
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1239
- *
1240
- * @deprecated
1241
- * @unsupported
1242
- * @implements DOM API: `Element`
1243
- */
1244
- get onmouseleave() {
1245
- throw new unexpected_call_error_1.default('Not supported "onmouseleave" property');
1246
- }
1247
- /**
1248
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1249
- *
1250
- * @deprecated
1251
- * @unsupported
1252
- * @implements DOM API: `Element`
1253
- */
1254
- get onmousemove() {
1255
- throw new unexpected_call_error_1.default('Not supported "onmousemove" property');
1256
- }
1257
- /**
1258
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1259
- *
1260
- * @deprecated
1261
- * @unsupported
1262
- * @implements DOM API: `Element`
1263
- */
1264
- get onmouseout() {
1265
- throw new unexpected_call_error_1.default('Not supported "onmouseout" property');
1266
- }
1267
- /**
1268
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1269
- *
1270
- * @deprecated
1271
- * @unsupported
1272
- * @implements DOM API: `Element`
1273
- */
1274
- get onmouseover() {
1275
- throw new unexpected_call_error_1.default('Not supported "onmouseover" property');
1276
- }
1277
- /**
1278
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1279
- *
1280
- * @deprecated
1281
- * @unsupported
1282
- * @implements DOM API: `Element`
1283
- */
1284
- get onmouseup() {
1285
- throw new unexpected_call_error_1.default('Not supported "onmouseup" property');
1286
- }
1287
- /**
1288
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1289
- *
1290
- * @deprecated
1291
- * @unsupported
1292
- * @implements DOM API: `Element`
1293
- */
1294
- get onpaste() {
1295
- throw new unexpected_call_error_1.default('Not supported "onpaste" property');
1296
- }
1297
- /**
1298
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1299
- *
1300
- * @deprecated
1301
- * @unsupported
1302
- * @implements DOM API: `Element`
1303
- */
1304
- get onpause() {
1305
- throw new unexpected_call_error_1.default('Not supported "onpause" property');
1306
- }
1307
- /**
1308
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1309
- *
1310
- * @deprecated
1311
- * @unsupported
1312
- * @implements DOM API: `Element`
1313
- */
1314
- get onplay() {
1315
- throw new unexpected_call_error_1.default('Not supported "onplay" property');
1316
- }
1317
- /**
1318
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1319
- *
1320
- * @deprecated
1321
- * @unsupported
1322
- * @implements DOM API: `Element`
1323
- */
1324
- get onplaying() {
1325
- throw new unexpected_call_error_1.default('Not supported "onplaying" property');
1326
- }
1327
- /**
1328
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1329
- *
1330
- * @deprecated
1331
- * @unsupported
1332
- * @implements DOM API: `Element`
1333
- */
1334
- get onpointercancel() {
1335
- throw new unexpected_call_error_1.default('Not supported "onpointercancel" property');
1336
- }
1337
- /**
1338
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1339
- *
1340
- * @deprecated
1341
- * @unsupported
1342
- * @implements DOM API: `Element`
1343
- */
1344
- get onpointerdown() {
1345
- throw new unexpected_call_error_1.default('Not supported "onpointerdown" property');
1346
- }
1347
- /**
1348
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1349
- *
1350
- * @deprecated
1351
- * @unsupported
1352
- * @implements DOM API: `Element`
1353
- */
1354
- get onpointerenter() {
1355
- throw new unexpected_call_error_1.default('Not supported "onpointerenter" property');
1356
- }
1357
- /**
1358
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1359
- *
1360
- * @deprecated
1361
- * @unsupported
1362
- * @implements DOM API: `Element`
1363
- */
1364
- get onpointerleave() {
1365
- throw new unexpected_call_error_1.default('Not supported "onpointerleave" property');
1366
- }
1367
- /**
1368
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1369
- *
1370
- * @deprecated
1371
- * @unsupported
1372
- * @implements DOM API: `Element`
1373
- */
1374
- get onpointermove() {
1375
- throw new unexpected_call_error_1.default('Not supported "onpointermove" property');
1376
- }
1377
- /**
1378
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1379
- *
1380
- * @deprecated
1381
- * @unsupported
1382
- * @implements DOM API: `Element`
1383
- */
1384
- get onpointerout() {
1385
- throw new unexpected_call_error_1.default('Not supported "onpointerout" property');
1386
- }
1387
- /**
1388
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1389
- *
1390
- * @deprecated
1391
- * @unsupported
1392
- * @implements DOM API: `Element`
1393
- */
1394
- get onpointerover() {
1395
- throw new unexpected_call_error_1.default('Not supported "onpointerover" property');
1396
- }
1397
- /**
1398
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1399
- *
1400
- * @deprecated
1401
- * @unsupported
1402
- * @implements DOM API: `Element`
1403
- */
1404
- get onpointerup() {
1405
- throw new unexpected_call_error_1.default('Not supported "onpointerup" property');
1406
- }
1407
- /**
1408
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1409
- *
1410
- * @deprecated
1411
- * @unsupported
1412
- * @implements DOM API: `Element`
1413
- */
1414
- get onprogress() {
1415
- throw new unexpected_call_error_1.default('Not supported "onprogress" property');
1416
- }
1417
- /**
1418
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1419
- *
1420
- * @deprecated
1421
- * @unsupported
1422
- * @implements DOM API: `Element`
1423
- */
1424
- get onratechange() {
1425
- throw new unexpected_call_error_1.default('Not supported "onratechange" property');
1426
- }
1427
- /**
1428
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1429
- *
1430
- * @deprecated
1431
- * @unsupported
1432
- * @implements DOM API: `Element`
1433
- */
1434
- get onreset() {
1435
- throw new unexpected_call_error_1.default('Not supported "onreset" property');
1436
- }
1437
- /**
1438
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1439
- *
1440
- * @deprecated
1441
- * @unsupported
1442
- * @implements DOM API: `Element`
1443
- */
1444
- get onresize() {
1445
- throw new unexpected_call_error_1.default('Not supported "onresize" property');
1446
- }
1447
- /**
1448
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1449
- *
1450
- * @deprecated
1451
- * @unsupported
1452
- * @implements DOM API: `Element`
1453
- */
1454
- get onscroll() {
1455
- throw new unexpected_call_error_1.default('Not supported "onscroll" property');
1456
- }
1457
- /**
1458
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1459
- *
1460
- * @deprecated
1461
- * @unsupported
1462
- * @implements DOM API: `Element`
1463
- */
1464
- get onsecuritypolicyviolation() {
1465
- throw new unexpected_call_error_1.default('Not supported "onsecuritypolicyviolation" property');
1466
- }
1467
- /**
1468
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1469
- *
1470
- * @deprecated
1471
- * @unsupported
1472
- * @implements DOM API: `Element`
1473
- */
1474
- get onseeked() {
1475
- throw new unexpected_call_error_1.default('Not supported "onseeked" property');
1476
- }
1477
- /**
1478
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1479
- *
1480
- * @deprecated
1481
- * @unsupported
1482
- * @implements DOM API: `Element`
1483
- */
1484
- get onseeking() {
1485
- throw new unexpected_call_error_1.default('Not supported "onseeking" property');
1486
- }
1487
- /**
1488
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1489
- *
1490
- * @deprecated
1491
- * @unsupported
1492
- * @implements DOM API: `Element`
1493
- */
1494
- get onselect() {
1495
- throw new unexpected_call_error_1.default('Not supported "onselect" property');
1496
- }
1497
- /**
1498
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1499
- *
1500
- * @deprecated
1501
- * @unsupported
1502
- * @implements DOM API: `Element`
1503
- */
1504
- get onselectionchange() {
1505
- throw new unexpected_call_error_1.default('Not supported "onselectionchange" property');
1506
- }
1507
- /**
1508
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1509
- *
1510
- * @deprecated
1511
- * @unsupported
1512
- * @implements DOM API: `Element`
1513
- */
1514
- get onselectstart() {
1515
- throw new unexpected_call_error_1.default('Not supported "onselectstart" property');
1516
- }
1517
- /**
1518
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1519
- *
1520
- * @deprecated
1521
- * @unsupported
1522
- * @implements DOM API: `Element`
1523
- */
1524
- get onslotchange() {
1525
- throw new unexpected_call_error_1.default('Not supported "onslotchange" property');
1526
- }
1527
- /**
1528
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1529
- *
1530
- * @deprecated
1531
- * @unsupported
1532
- * @implements DOM API: `Element`
1533
- */
1534
- get onstalled() {
1535
- throw new unexpected_call_error_1.default('Not supported "onstalled" property');
1536
- }
1537
- /**
1538
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1539
- *
1540
- * @deprecated
1541
- * @unsupported
1542
- * @implements DOM API: `Element`
1543
- */
1544
- get onsubmit() {
1545
- throw new unexpected_call_error_1.default('Not supported "onsubmit" property');
1546
- }
1547
- /**
1548
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1549
- *
1550
- * @deprecated
1551
- * @unsupported
1552
- * @implements DOM API: `Element`
1553
- */
1554
- get onsuspend() {
1555
- throw new unexpected_call_error_1.default('Not supported "onsuspend" property');
1556
- }
1557
- /**
1558
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1559
- *
1560
- * @deprecated
1561
- * @unsupported
1562
- * @implements DOM API: `Element`
1563
- */
1564
- get ontimeupdate() {
1565
- throw new unexpected_call_error_1.default('Not supported "ontimeupdate" property');
1566
- }
1567
- /**
1568
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1569
- *
1570
- * @deprecated
1571
- * @unsupported
1572
- * @implements DOM API: `Element`
1573
- */
1574
- get ontoggle() {
1575
- throw new unexpected_call_error_1.default('Not supported "ontoggle" property');
1576
- }
1577
- /**
1578
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1579
- *
1580
- * @deprecated
1581
- * @unsupported
1582
- * @implements DOM API: `Element`
1583
- */
1584
- get ontransitioncancel() {
1585
- throw new unexpected_call_error_1.default('Not supported "ontransitioncancel" property');
1586
- }
1587
- /**
1588
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1589
- *
1590
- * @deprecated
1591
- * @unsupported
1592
- * @implements DOM API: `Element`
1593
- */
1594
- get ontransitionend() {
1595
- throw new unexpected_call_error_1.default('Not supported "ontransitionend" property');
1596
- }
1597
- /**
1598
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1599
- *
1600
- * @deprecated
1601
- * @unsupported
1602
- * @implements DOM API: `Element`
1603
- */
1604
- get ontransitionrun() {
1605
- throw new unexpected_call_error_1.default('Not supported "ontransitionrun" property');
1606
- }
1607
- /**
1608
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1609
- *
1610
- * @deprecated
1611
- * @unsupported
1612
- * @implements DOM API: `Element`
1613
- */
1614
- get ontransitionstart() {
1615
- throw new unexpected_call_error_1.default('Not supported "ontransitionstart" property');
1616
- }
1617
- /**
1618
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1619
- *
1620
- * @deprecated
1621
- * @unsupported
1622
- * @implements DOM API: `Element`
1623
- */
1624
- get onvolumechange() {
1625
- throw new unexpected_call_error_1.default('Not supported "onvolumechange" property');
1626
- }
1627
- /**
1628
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1629
- *
1630
- * @deprecated
1631
- * @unsupported
1632
- * @implements DOM API: `Element`
1633
- */
1634
- get onwaiting() {
1635
- throw new unexpected_call_error_1.default('Not supported "onwaiting" property');
1636
- }
1637
- /**
1638
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1639
- *
1640
- * @deprecated
1641
- * @unsupported
1642
- * @implements DOM API: `Element`
1643
- */
1644
- get onwebkitanimationend() {
1645
- throw new unexpected_call_error_1.default('Not supported "onwebkitanimationend" property');
1646
- }
1647
- /**
1648
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1649
- *
1650
- * @deprecated
1651
- * @unsupported
1652
- * @implements DOM API: `Element`
1653
- */
1654
- get onwebkitanimationiteration() {
1655
- throw new unexpected_call_error_1.default('Not supported "onwebkitanimationiteration" property');
1656
- }
1657
- /**
1658
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1659
- *
1660
- * @deprecated
1661
- * @unsupported
1662
- * @implements DOM API: `Element`
1663
- */
1664
- get onwebkitanimationstart() {
1665
- throw new unexpected_call_error_1.default('Not supported "onwebkitanimationstart" property');
1666
- }
1667
- /**
1668
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1669
- *
1670
- * @deprecated
1671
- * @unsupported
1672
- * @implements DOM API: `Element`
1673
- */
1674
- get onwebkittransitionend() {
1675
- throw new unexpected_call_error_1.default('Not supported "onwebkittransitionend" property');
1676
- }
1677
- /**
1678
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1679
- *
1680
- * @deprecated
1681
- * @unsupported
1682
- * @implements DOM API: `Element`
1683
- */
1684
- get onwheel() {
1685
- throw new unexpected_call_error_1.default('Not supported "onwheel" property');
1686
- }
1687
- /**
1688
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1689
- *
1690
- * @unsupported
1691
- * @implements DOM API: `Element`
1692
- * @see https://w3c.github.io/DOM-Parsing/#dom-element-outerhtml
1693
- */
1694
- get outerHTML() {
1695
- throw new unexpected_call_error_1.default('Not supported "outerHTML" property');
1696
- }
1697
- /**
1698
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1699
- *
1700
- * @deprecated
1701
- * @unsupported
1702
- * @implements DOM API: `Element`
1703
- */
1704
- get outerText() {
1705
- throw new unexpected_call_error_1.default('Not supported "outerText" property');
1706
- }
1707
- /**
1708
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1709
- *
1710
- * @unsupported
1711
- * @implements DOM API: `Element`
1712
- * @see https://www.w3.org/TR/css-shadow-parts-1/#idl
1713
- */
1714
- get part() {
1715
- throw new unexpected_call_error_1.default('Not supported "part" property');
1716
- }
1717
- /**
1718
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1719
- *
1720
- * @unsupported
1721
- * @implements DOM API: `Element`
1722
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-prefix%E2%91%A0
1723
- */
1724
- get prefix() {
1725
- throw new unexpected_call_error_1.default('Not supported "prefix" property');
1726
- }
1727
- /**
1728
- * The element immediately prior the specified one in its parent's children list.
1729
- *
1730
- * @readonly
1731
- * @implements DOM API: `Element`
1732
- * @see https://dom.spec.whatwg.org/#ref-for-dom-nondocumenttypechildnode-previouselementsibling%E2%91%A1
1733
- */
1734
- get previousElementSibling() {
1735
- return (0, child_node_methods_1.previousElementSibling)(this);
1736
- }
1737
- get raw() {
1738
- var _a;
1739
- let fixed = this.originRaw;
1740
- let gap = 0;
1741
- if (this.nodeName !== this.fixedNodeName) {
1742
- fixed = (0, string_splice_1.stringSplice)(fixed, tslib_1.__classPrivateFieldGet(this, _MLElement_tagOpenChar, "f").length, this.nodeName.length, this.fixedNodeName);
1743
- gap = gap + this.fixedNodeName.length - this.nodeName.length;
1744
- }
1745
- for (const attr of Array.from(this.attributes)) {
1746
- const startOffset = (((_a = attr.spacesBeforeName) === null || _a === void 0 ? void 0 : _a.startOffset) || attr.startOffset) - this.startOffset;
1747
- const fixedAttr = attr.toString();
1748
- if (attr.originRaw !== fixedAttr) {
1749
- fixed = (0, string_splice_1.stringSplice)(fixed, startOffset + gap, attr.originRaw.length, fixedAttr);
1750
- gap = gap + fixedAttr.length - attr.originRaw.length;
1751
- }
1752
- }
1753
- return fixed;
1754
- }
1755
- /**
1756
- * @implements `@markuplint/ml-core` API: `MLElement`
1757
- */
1758
- get rawName() {
1759
- return this._astToken.nodeName;
1760
- }
1761
- /**
1762
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1763
- *
1764
- * @unsupported
1765
- * @implements DOM API: `Element`
1766
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrollheight-1
1767
- */
1768
- get scrollHeight() {
1769
- throw new unexpected_call_error_1.default('Not supported "scrollHeight" property');
1770
- }
1771
- /**
1772
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1773
- *
1774
- * @unsupported
1775
- * @implements DOM API: `Element`
1776
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrollleft-1
1777
- */
1778
- get scrollLeft() {
1779
- throw new unexpected_call_error_1.default('Not supported "scrollLeft" property');
1780
- }
1781
- /**
1782
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1783
- *
1784
- * @unsupported
1785
- * @implements DOM API: `Element`
1786
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrolltop-1
1787
- */
1788
- get scrollTop() {
1789
- throw new unexpected_call_error_1.default('Not supported "scrollTop" property');
1790
- }
1791
- /**
1792
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1793
- *
1794
- * @unsupported
1795
- * @implements DOM API: `Element`
1796
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrollwidth-1
1797
- */
1798
- get scrollWidth() {
1799
- throw new unexpected_call_error_1.default('Not supported "scrollWidth" property');
1800
- }
1801
- /**
1802
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1803
- *
1804
- * @unsupported
1805
- * @implements DOM API: `Element`
1806
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-shadowroot%E2%91%A0
1807
- */
1808
- get shadowRoot() {
1809
- throw new unexpected_call_error_1.default('Not supported "shadowRoot" property');
1810
- }
1811
- /**
1812
- * @implements DOM API: `Element`
1813
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-slot%E2%91%A0
1814
- */
1815
- get slot() {
1816
- return this.getAttribute('slot') || '';
1817
- }
1818
- /**
1819
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1820
- *
1821
- * @deprecated
1822
- * @unsupported
1823
- * @implements DOM API: `Element`
1824
- */
1825
- get spellcheck() {
1826
- throw new unexpected_call_error_1.default('Not supported "spellcheck" property');
1827
- }
1828
- /**
1829
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1830
- *
1831
- * @deprecated
1832
- * @unsupported
1833
- * @implements DOM API: `Element`
1834
- */
1835
- get style() {
1836
- throw new unexpected_call_error_1.default('Not supported "style" property');
1837
- }
1838
- /**
1839
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1840
- *
1841
- * @deprecated
1842
- * @unsupported
1843
- * @implements DOM API: `Element`
1844
- */
1845
- get tabIndex() {
1846
- throw new unexpected_call_error_1.default('Not supported "tabIndex" property');
1847
- }
1848
- /**
1849
- * Returns the HTML-uppercased qualified name.
1850
- *
1851
- * If this is in the HTML namespace and its node document is an HTML document, then set qualifiedName to qualifiedName in ASCII uppercase.
1852
- *
1853
- * (In markuplint evaluation, the node document always is an HTML document.)
1854
- *
1855
- * ```html
1856
- * <div> => "DIV"
1857
- * <svg> => "svg"
1858
- * <x-foo> => "X-FOO"
1859
- * ```
1860
- *
1861
- * @implements DOM API: `Element`
1862
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-tagname%E2%91%A0
1863
- */
1864
- get tagName() {
1865
- return this.nodeName;
1866
- }
1867
- get textContent() {
1868
- return Array.from(this.childNodes)
1869
- .map(child => child.textContent || '')
1870
- .join('');
1871
- }
1872
- /**
1873
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1874
- *
1875
- * @deprecated
1876
- * @unsupported
1877
- * @implements DOM API: `Element`
1878
- */
1879
- get title() {
1880
- throw new unexpected_call_error_1.default('Not supported "title" property');
1881
- }
1882
- /**
1883
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1884
- *
1885
- * @deprecated
1886
- * @unsupported
1887
- * @implements DOM API: `Element`
1888
- */
1889
- get translate() {
1890
- throw new unexpected_call_error_1.default('Not supported "translate" property');
1891
- }
1892
- /**
1893
- * @implements DOM API: `Element`
1894
- */
1895
- after(...nodes) {
1896
- (0, child_node_methods_1.after)(this, ...nodes);
1897
- }
1898
- /**
1899
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1900
- *
1901
- * @unsupported
1902
- * @implements DOM API: `Element`
1903
- * @see https://www.w3.org/TR/web-animations-1/#dom-animatable-animate
1904
- */
1905
- animate(keyframes, options) {
1906
- throw new unexpected_call_error_1.default('Not supported "animate" method');
1907
- }
1908
- /**
1909
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1910
- *
1911
- * @deprecated
1912
- * @unsupported
1913
- * @implements DOM API: `Element`
1914
- */
1915
- attachInternals() {
1916
- throw new unexpected_call_error_1.default('Not supported "attachInternals" method');
1917
- }
1918
- /**
1919
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1920
- *
1921
- * @unsupported
1922
- * @implements DOM API: `Element`
1923
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-attachshadow%E2%91%A0
1924
- */
1925
- attachShadow(init) {
1926
- throw new unexpected_call_error_1.default('Not supported "attachShadow" method');
1927
- }
1928
- /**
1929
- * @implements DOM API: `Element`
1930
- */
1931
- before(...nodes) {
1932
- (0, child_node_methods_1.before)(this, ...nodes);
1933
- }
1934
- /**
1935
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1936
- *
1937
- * @deprecated
1938
- * @unsupported
1939
- * @implements DOM API: `Element`
1940
- */
1941
- blur() {
1942
- throw new unexpected_call_error_1.default('Not supported "blur" method');
1943
- }
1944
- /**
1945
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1946
- *
1947
- * @deprecated
1948
- * @unsupported
1949
- * @implements DOM API: `Element`
1950
- */
1951
- click() {
1952
- throw new unexpected_call_error_1.default('Not supported "click" method');
1953
- }
1954
- /**
1955
- * @implements DOM API: `Element`
1956
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-closest%E2%91%A0
1957
- */
1958
- closest(selectors) {
1959
- let el = this;
1960
- do {
1961
- if (el.matches(selectors)) {
1962
- return el;
1963
- }
1964
- el = el.parentElement;
1965
- } while (el !== null && el.is(el.ELEMENT_NODE));
1966
- return null;
1967
- }
1968
- fixNodeName(name) {
1969
- tslib_1.__classPrivateFieldSet(this, _MLElement_fixedNodeName, name, "f");
1970
- }
1971
- /**
1972
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1973
- *
1974
- * @deprecated
1975
- * @unsupported
1976
- * @implements DOM API: `Element`
1977
- */
1978
- focus(options) {
1979
- throw new unexpected_call_error_1.default('Not supported "focus" method');
1980
- }
1981
- /**
1982
- * @implements `@markuplint/ml-core` API: `MLElement`
1983
- */
1984
- getAccessibleName() {
1985
- return (0, accname_1.getAccname)(this);
1986
- }
1987
- /**
1988
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
1989
- *
1990
- * @unsupported
1991
- * @implements DOM API: `Element`
1992
- * @see https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations
1993
- */
1994
- getAnimations(options) {
1995
- throw new unexpected_call_error_1.default('Not supported "getAnimations" method');
1996
- }
1997
- /**
1998
- * @implements DOM API: `Element`
1999
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getattribute%E2%91%A0
2000
- */
2001
- getAttribute(attrName) {
2002
- for (const attr of Array.from(this.attributes)) {
2003
- if (attr.name.toLowerCase() === attrName.toLowerCase()) {
2004
- return attr.value;
2005
- }
2006
- }
2007
- return null;
2008
- }
2009
- /**
2010
- * @implements DOM API: `Element`
2011
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getattributenames%E2%91%A0
2012
- */
2013
- getAttributeNames() {
2014
- return Array.from(this.attributes).map(attr => attr.name);
2015
- }
2016
- /**
2017
- * @implements DOM API: `Element`
2018
- * @see https://dom.spec.whatwg.org/#dom-element-getattributenode
2019
- */
2020
- getAttributeNode(qualifiedName) {
2021
- return this.getAttributeToken(qualifiedName)[0] || null;
2022
- }
2023
- /**
2024
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2025
- *
2026
- * @unsupported
2027
- * @implements DOM API: `Element`
2028
- * @see https://dom.spec.whatwg.org/#dom-element-getattributenodens
2029
- */
2030
- getAttributeNodeNS(namespace, localName) {
2031
- throw new unexpected_call_error_1.default('Not supported "getAttributeNodeNS" method');
2032
- }
2033
- /**
2034
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2035
- *
2036
- * @unsupported
2037
- * @implements DOM API: `Element`
2038
- * @see https://dom.spec.whatwg.org/#dom-element-getattributenodens
2039
- */
2040
- getAttributeNS(namespace, localName) {
2041
- throw new unexpected_call_error_1.default('Not supported "getAttributeNS" method');
2042
- }
2043
- /**
2044
- * @implements `@markuplint/ml-core` API: `MLElement`
2045
- */
2046
- getAttributeToken(attrName) {
2047
- const attrs = [];
2048
- attrName = attrName.toLowerCase();
2049
- for (const attr of this.getAttributeTokens()) {
2050
- if (attr.name === attrName) {
2051
- attrs.push(attr);
2052
- }
2053
- }
2054
- return attrs;
2055
- }
2056
- /**
2057
- * @implements `@markuplint/ml-core` API: `MLElement`
2058
- */
2059
- getAttributeTokens() {
2060
- return Object.freeze(tslib_1.__classPrivateFieldGet(this, _MLElement_attributes, "f"));
2061
- }
2062
- /**
2063
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2064
- *
2065
- * @unsupported
2066
- * @implements DOM API: `Element`
2067
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-getboundingclientrect-1
2068
- */
2069
- getBoundingClientRect() {
2070
- throw new unexpected_call_error_1.default('Not supported "getBoundingClientRect" method');
2071
- }
2072
- getChildElementsAndTextNodeWithoutWhitespaces() {
2073
- if (tslib_1.__classPrivateFieldGet(this, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, "f")) {
2074
- return tslib_1.__classPrivateFieldGet(this, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, "f");
2075
- }
2076
- const filteredNodes = [];
2077
- this.childNodes.forEach(node => {
2078
- if (node.is(node.ELEMENT_NODE)) {
2079
- if (node.isOmitted) {
2080
- const children = node.getChildElementsAndTextNodeWithoutWhitespaces();
2081
- filteredNodes.push(...children);
2082
- }
2083
- else {
2084
- filteredNodes.push(node);
2085
- }
2086
- }
2087
- if (node.is(node.TEXT_NODE) && !node.isWhitespace()) {
2088
- filteredNodes.push(node);
2089
- }
2090
- });
2091
- tslib_1.__classPrivateFieldSet(this, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, filteredNodes, "f");
2092
- return filteredNodes;
2093
- }
2094
- /**
2095
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2096
- *
2097
- * @unsupported
2098
- * @implements DOM API: `Element`
2099
- * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-getclientrects-1
2100
- */
2101
- getClientRects() {
2102
- throw new unexpected_call_error_1.default('Not supported "getClientRects" method');
2103
- }
2104
- /**
2105
- * @implements DOM API: `Element`
2106
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getelementsbyclassname
2107
- */
2108
- getElementsByClassName(classNames) {
2109
- return (0, node_list_1.toHTMLCollection)(this._descendantsToArray(node => {
2110
- if (node.is(node.ELEMENT_NODE) && node.classList.contains(classNames)) {
2111
- return node;
2112
- }
2113
- }));
2114
- }
2115
- /**
2116
- * @implements DOM API: `Element`
2117
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getelementsbyclassname
2118
- */
2119
- getElementsByTagName(qualifiedName) {
2120
- return (0, node_list_1.toHTMLCollection)(this._descendantsToArray(node => {
2121
- if (node.is(node.ELEMENT_NODE) && node.nodeName.toLowerCase() === qualifiedName.toLowerCase()) {
2122
- return node;
2123
- }
2124
- }));
2125
- }
2126
- /**
2127
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2128
- *
2129
- * @unsupported
2130
- * @implements DOM API: `Element`
2131
- * @see https://dom.spec.whatwg.org/#dom-element-getelementsbytagnamens
2132
- */
2133
- getElementsByTagNameNS(namespace, localName) {
2134
- throw new unexpected_call_error_1.default('Not supported "getElementsByTagNameNS" method');
2135
- }
2136
- /**
2137
- * @implements `@markuplint/ml-core` API: `MLElement`
2138
- */
2139
- getNameLocation() {
2140
- return {
2141
- offset: this.startOffset,
2142
- line: this.startLine,
2143
- col: this.startCol + tslib_1.__classPrivateFieldGet(this, _MLElement_tagOpenChar, "f").length,
2144
- };
2145
- }
2146
- /**
2147
- * @implements DOM API: `Element`
2148
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-hasattribute%E2%91%A0
2149
- */
2150
- hasAttribute(qualifiedName) {
2151
- return this.getAttribute(qualifiedName) !== null;
2152
- }
2153
- /**
2154
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2155
- *
2156
- * @unsupported
2157
- * @implements DOM API: `Element`
2158
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-hasattributens%E2%91%A0
2159
- */
2160
- hasAttributeNS(namespace, localName) {
2161
- throw new unexpected_call_error_1.default('Not supported "hasAttributeNS" method');
2162
- }
2163
- /**
2164
- * @implements DOM API: `Element`
2165
- * @see https://dom.spec.whatwg.org/#dom-element-hasattributes
2166
- */
2167
- hasAttributes() {
2168
- return !!this.attributes.length;
2169
- }
2170
- /**
2171
- * @implements `@markuplint/ml-core` API: `MLElement`
2172
- */
2173
- hasMutableAttributes() {
2174
- for (const attr of Array.from(this.attributes)) {
2175
- if (!attr.nameNode) {
2176
- return true;
2177
- }
2178
- if (attr.isDynamicValue) {
2179
- return true;
2180
- }
2181
- }
2182
- return false;
2183
- }
2184
- /**
2185
- * This element has "Preprocessor Specific Block". In other words, Its children are potentially mutable.
2186
- *
2187
- * @implements `@markuplint/ml-core` API: `MLElement`
2188
- */
2189
- hasMutableChildren(attr = false) {
2190
- for (const child of Array.from(this.childNodes)) {
2191
- if (child.is(child.MARKUPLINT_PREPROCESSOR_BLOCK)) {
2192
- return true;
2193
- }
2194
- if (child.is(child.ELEMENT_NODE)) {
2195
- if (attr && child.hasMutableAttributes()) {
2196
- return true;
2197
- }
2198
- if (child.hasMutableChildren()) {
2199
- return true;
2200
- }
2201
- }
2202
- }
2203
- return false;
2204
- }
2205
- /**
2206
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2207
- *
2208
- * @unsupported
2209
- * @implements DOM API: `Element`
2210
- * @see https://www.w3.org/TR/pointerevents2/#dom-element-haspointercapture
2211
- */
2212
- hasPointerCapture(pointerId) {
2213
- throw new unexpected_call_error_1.default('Not supported "hasPointerCapture" method');
2214
- }
2215
- /**
2216
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2217
- *
2218
- * @unsupported
2219
- * @implements DOM API: `Element`
2220
- * @see https://dom.spec.whatwg.org/#dom-element-insertadjacentelement
2221
- */
2222
- insertAdjacentElement(where, element) {
2223
- // TODO:
2224
- throw new unexpected_call_error_1.default('Does not implement "insertAdjacentElement" method yet');
2225
- }
2226
- /**
2227
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2228
- *
2229
- * @unsupported
2230
- * @implements DOM API: `Element`
2231
- * @see https://w3c.github.io/DOM-Parsing/#widl-Element-insertAdjacentHTML-void-DOMString-position-DOMString-text
2232
- */
2233
- insertAdjacentHTML(position, text) {
2234
- // TODO:
2235
- throw new unexpected_call_error_1.default('Does not implement "insertAdjacentHTML" method yet');
2236
- }
2237
- /**
2238
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2239
- *
2240
- * @unsupported
2241
- * @implements DOM API: `Element`
2242
- * @see https://dom.spec.whatwg.org/#dom-element-insertadjacenttext
2243
- */
2244
- insertAdjacentText(where, data) {
2245
- // TODO:
2246
- throw new unexpected_call_error_1.default('Does not implement "insertAdjacentText" method yet');
2247
- }
2248
- /**
2249
- * @implements `@markuplint/ml-core` API: `MLElement`
2250
- */
2251
- isDescendantByUUIDList(uuidList) {
2252
- let el = this.parentElement;
2253
- if (el === null) {
2254
- return false;
2255
- }
2256
- do {
2257
- if (uuidList.includes(el.uuid)) {
2258
- return true;
2259
- }
2260
- el = el.parentElement;
2261
- } while (el !== null && el.is(el.ELEMENT_NODE));
2262
- return false;
2263
- }
2264
- /**
2265
- * @implements DOM API: `Element`
2266
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-matches%E2%91%A0
2267
- */
2268
- matches(selector) {
2269
- return !!(0, selector_1.createSelector)(selector).match(this);
2270
- }
2271
- /**
2272
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2273
- *
2274
- * @unsupported
2275
- * @implements DOM API: `Element`
2276
- * @see https://www.w3.org/TR/pointerevents2/#dom-element-releasepointercapture
2277
- */
2278
- releasePointerCapture(pointerId) {
2279
- throw new unexpected_call_error_1.default('Not supported "releasePointerCapture" method');
2280
- }
2281
- /**
2282
- * @implements DOM API: `Element`
2283
- */
2284
- remove() {
2285
- (0, child_node_methods_1.remove)(this);
2286
- }
2287
- /**
2288
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2289
- *
2290
- * @unsupported
2291
- * @implements DOM API: `Element`
2292
- * @see https://dom.spec.whatwg.org/#dom-element-removeattribute
2293
- */
2294
- removeAttribute(qualifiedName) {
2295
- throw new unexpected_call_error_1.default('Not supported "removeAttribute" method');
2296
- }
2297
- /**
2298
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2299
- *
2300
- * @unsupported
2301
- * @implements DOM API: `Element`
2302
- * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-D589198
2303
- */
2304
- removeAttributeNode(attr) {
2305
- throw new unexpected_call_error_1.default('Not supported "removeAttributeNode" method');
2306
- }
2307
- /**
2308
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2309
- *
2310
- * @unsupported
2311
- * @implements DOM API: `Element`
2312
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-removeattributens%E2%91%A0
2313
- */
2314
- removeAttributeNS(namespace, localName) {
2315
- throw new unexpected_call_error_1.default('Not supported "removeAttributeNS" method');
2316
- }
2317
- /**
2318
- * @implements DOM API: `Element`
2319
- */
2320
- replaceWith(...nodes) {
2321
- (0, child_node_methods_1.replaceWith)(this, ...nodes);
2322
- }
2323
- /**
2324
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2325
- *
2326
- * @unsupported
2327
- * @implements DOM API: `Element`
2328
- * @see https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
2329
- */
2330
- requestFullscreen(options) {
2331
- throw new unexpected_call_error_1.default('Not supported "requestFullscreen" method');
2332
- }
2333
- /**
2334
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2335
- *
2336
- * @unsupported
2337
- * @implements DOM API: `Element`
2338
- * @see https://w3c.github.io/pointerlock/#dom-element-requestpointerlock
2339
- */
2340
- requestPointerLock() {
2341
- throw new unexpected_call_error_1.default('Not supported "requestPointerLock" method');
2342
- }
2343
- /**
2344
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2345
- *
2346
- * @unsupported
2347
- * @implements DOM API: `Element`
2348
- * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scroll
2349
- */
2350
- scroll(x, y) {
2351
- throw new unexpected_call_error_1.default('Not supported "scroll" method');
2352
- }
2353
- /**
2354
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2355
- *
2356
- * @unsupported
2357
- * @implements DOM API: `Element`
2358
- * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scrollby
2359
- */
2360
- scrollBy(x, y) {
2361
- throw new unexpected_call_error_1.default('Not supported "scrollBy" method');
2362
- }
2363
- /**
2364
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2365
- *
2366
- * @unsupported
2367
- * @implements DOM API: `Element`
2368
- * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scrollintoview
2369
- */
2370
- scrollIntoView(arg) {
2371
- throw new unexpected_call_error_1.default('Not supported "scrollIntoView" method');
2372
- }
2373
- /**
2374
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2375
- *
2376
- * @unsupported
2377
- * @implements DOM API: `Element`
2378
- * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scrollto
2379
- */
2380
- scrollTo(x, y) {
2381
- throw new unexpected_call_error_1.default('Not supported "scrollTo" method');
2382
- }
2383
- /**
2384
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2385
- *
2386
- * @unsupported
2387
- * @implements DOM API: `Element`
2388
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-setattribute%E2%91%A0
2389
- */
2390
- setAttribute(qualifiedName, value) {
2391
- throw new unexpected_call_error_1.default('Not supported "setAttribute" method');
2392
- }
2393
- /**
2394
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2395
- *
2396
- * @unsupported
2397
- * @implements DOM API: `Element`
2398
- * @see https://dom.spec.whatwg.org/#dom-element-setattributenode
2399
- */
2400
- setAttributeNode(attr) {
2401
- throw new unexpected_call_error_1.default('Not supported "setAttributeNode" method');
2402
- }
2403
- /**
2404
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2405
- *
2406
- * @unsupported
2407
- * @implements DOM API: `Element`
2408
- * @see https://dom.spec.whatwg.org/#dom-element-setattributenodens
2409
- */
2410
- setAttributeNodeNS(attr) {
2411
- throw new unexpected_call_error_1.default('Not supported "setAttributeNodeNS" method');
2412
- }
2413
- /**
2414
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2415
- *
2416
- * @unsupported
2417
- * @implements DOM API: `Element`
2418
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-setattributens%E2%91%A0
2419
- */
2420
- setAttributeNS(namespace, qualifiedName, value) {
2421
- throw new unexpected_call_error_1.default('Not supported "setAttributeNS" method');
2422
- }
2423
- /**
2424
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2425
- *
2426
- * @unsupported
2427
- * @implements DOM API: `Element`
2428
- * @see https://www.w3.org/TR/pointerevents2/#idl-def-element-setpointercapture-pointerid
2429
- */
2430
- setPointerCapture(pointerId) {
2431
- throw new unexpected_call_error_1.default('Not supported "setPointerCapture" method');
2432
- }
2433
- /**
2434
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2435
- *
2436
- * @unsupported
2437
- * @implements DOM API: `Element`
2438
- * @see https://dom.spec.whatwg.org/#ref-for-dom-element-toggleattribute%E2%91%A0
2439
- */
2440
- toggleAttribute(qualifiedName, force) {
2441
- throw new unexpected_call_error_1.default('Not supported "toggleAttribute" method');
2442
- }
2443
- /**
2444
- * @implements `@markuplint/ml-core` API: `MLElement`
2445
- */
2446
- toNormalizeString() {
2447
- if (tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedString, "f")) {
2448
- return tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedString, "f");
2449
- }
2450
- const children = this.getChildElementsAndTextNodeWithoutWhitespaces();
2451
- const attrs = this.attributes.map(attr => attr.toNormalizeString());
2452
- const attrString = attrs.length ? ' ' + attrs.join('') : '';
2453
- const startTag = `<${this.nodeName}${attrString}>`;
2454
- const childNodes = children.map(node => {
2455
- if (node.is(node.ELEMENT_NODE)) {
2456
- return node.toNormalizeString();
2457
- }
2458
- return node.originRaw;
2459
- });
2460
- const endTag = `</${this.nodeName}>`;
2461
- const normalizedString = `${startTag}${childNodes.join('')}${endTag}`;
2462
- tslib_1.__classPrivateFieldSet(this, _MLElement_normalizedString, normalizedString, "f");
2463
- return normalizedString;
2464
- }
2465
- /**
2466
- * @implements `@markuplint/ml-core` API: `MLElement`
2467
- */
2468
- toString() {
2469
- return this.raw;
2470
- }
2471
- /**
2472
- * **IT THROWS AN ERROR WHEN CALLING THIS.**
2473
- *
2474
- * @deprecated
2475
- * @unsupported
2476
- * @implements DOM API: `Element`
2477
- */
2478
- webkitMatchesSelector(selectors) {
2479
- throw new unexpected_call_error_1.default('Not supported "webkitMatchesSelector" method');
2480
- }
2481
- }
2482
- exports.MLElement = MLElement;
2483
- _MLElement_attributes = new WeakMap(), _MLElement_fixedNodeName = new WeakMap(), _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache = new WeakMap(), _MLElement_normalizedAttrs = new WeakMap(), _MLElement_normalizedString = new WeakMap(), _MLElement_tagOpenChar = new WeakMap();