@markuplint/ml-core 2.3.3 → 3.0.0-alpha.1

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 (113) hide show
  1. package/lib/configs.d.ts +1 -1
  2. package/lib/configs.js +29 -9
  3. package/lib/index.d.ts +8 -8
  4. package/lib/index.js +18 -10
  5. package/lib/ml-core.d.ts +3 -3
  6. package/lib/ml-core.js +48 -44
  7. package/lib/ml-dom/helper/accname.d.ts +3 -2
  8. package/lib/ml-dom/helper/accname.js +53 -5
  9. package/lib/ml-dom/helper/create-node.d.ts +4 -5
  10. package/lib/ml-dom/helper/create-node.js +12 -16
  11. package/lib/ml-dom/helper/debug.d.ts +2 -2
  12. package/lib/ml-dom/helper/debug.js +35 -21
  13. package/lib/ml-dom/helper/getIndent.d.ts +5 -5
  14. package/lib/ml-dom/helper/getIndent.js +14 -14
  15. package/lib/ml-dom/helper/walkers.d.ts +5 -4
  16. package/lib/ml-dom/helper/walkers.js +39 -3
  17. package/lib/ml-dom/index.d.ts +8 -3
  18. package/lib/ml-dom/index.js +3 -15
  19. package/lib/ml-dom/manipulations/child-node-methods.d.ts +33 -0
  20. package/lib/ml-dom/manipulations/child-node-methods.js +73 -0
  21. package/lib/ml-dom/manipulations/get-children.d.ts +4 -0
  22. package/lib/ml-dom/manipulations/get-children.js +10 -0
  23. package/lib/ml-dom/node/attr.d.ts +98 -0
  24. package/lib/ml-dom/node/attr.js +157 -0
  25. package/lib/ml-dom/node/block.d.ts +38 -0
  26. package/lib/ml-dom/node/block.js +53 -0
  27. package/lib/ml-dom/node/character-data.d.ts +57 -0
  28. package/lib/ml-dom/node/character-data.js +87 -0
  29. package/lib/ml-dom/node/child-node.d.ts +9 -0
  30. package/lib/ml-dom/node/child-node.js +10 -0
  31. package/lib/ml-dom/node/comment.d.ts +17 -0
  32. package/lib/ml-dom/node/comment.js +24 -0
  33. package/lib/ml-dom/node/document-fragment.d.ts +24 -0
  34. package/lib/ml-dom/node/document-fragment.js +33 -0
  35. package/lib/ml-dom/node/document-type.d.ts +38 -0
  36. package/lib/ml-dom/node/document-type.js +52 -0
  37. package/lib/ml-dom/node/document.d.ts +1563 -0
  38. package/lib/ml-dom/node/document.js +2140 -0
  39. package/lib/ml-dom/node/dom-token-list.d.ts +33 -0
  40. package/lib/ml-dom/node/dom-token-list.js +137 -0
  41. package/lib/ml-dom/node/element.d.ts +1844 -0
  42. package/lib/ml-dom/node/element.js +2601 -0
  43. package/lib/ml-dom/node/named-node-map.d.ts +42 -0
  44. package/lib/ml-dom/node/named-node-map.js +64 -0
  45. package/lib/ml-dom/node/node-list.d.ts +6 -0
  46. package/lib/ml-dom/node/node-list.js +39 -0
  47. package/lib/ml-dom/node/node-store.d.ts +14 -0
  48. package/lib/ml-dom/{helper → node}/node-store.js +8 -4
  49. package/lib/ml-dom/node/node.d.ts +482 -0
  50. package/lib/ml-dom/node/node.js +675 -0
  51. package/lib/ml-dom/node/parent-node.d.ts +66 -0
  52. package/lib/ml-dom/node/parent-node.js +131 -0
  53. package/lib/ml-dom/node/rule-mapper.d.ts +17 -0
  54. package/lib/ml-dom/{rule-mapper.js → node/rule-mapper.js} +20 -28
  55. package/lib/ml-dom/node/text.d.ts +51 -0
  56. package/lib/ml-dom/node/text.js +76 -0
  57. package/lib/ml-dom/node/types.d.ts +35 -0
  58. package/lib/ml-dom/{types.js → node/types.js} +0 -0
  59. package/lib/ml-dom/node/unexpected-call-error.d.ts +2 -0
  60. package/lib/ml-dom/node/unexpected-call-error.js +5 -0
  61. package/lib/ml-dom/token/token.d.ts +47 -0
  62. package/lib/ml-dom/token/token.js +89 -0
  63. package/lib/ml-rule/ml-rule-context.d.ts +14 -10
  64. package/lib/ml-rule/ml-rule-context.js +29 -6
  65. package/lib/ml-rule/ml-rule.d.ts +12 -12
  66. package/lib/ml-rule/ml-rule.js +63 -63
  67. package/lib/ml-rule/types.d.ts +12 -2
  68. package/lib/ruleset/index.d.ts +2 -2
  69. package/lib/test/index.d.ts +3 -1
  70. package/lib/test/index.js +12 -5
  71. package/lib/types.d.ts +3 -2
  72. package/package.json +11 -10
  73. package/tsconfig.tsbuildinfo +1 -1
  74. package/lib/ml-dom/document.d.ts +0 -85
  75. package/lib/ml-dom/document.js +0 -273
  76. package/lib/ml-dom/helper/index.d.ts +0 -4
  77. package/lib/ml-dom/helper/index.js +0 -12
  78. package/lib/ml-dom/helper/mapped-nodes.d.ts +0 -4
  79. package/lib/ml-dom/helper/mapped-nodes.js +0 -2
  80. package/lib/ml-dom/helper/match-selector.d.ts +0 -16
  81. package/lib/ml-dom/helper/match-selector.js +0 -233
  82. package/lib/ml-dom/helper/node-store.d.ts +0 -9
  83. package/lib/ml-dom/helper/selector.d.ts +0 -11
  84. package/lib/ml-dom/helper/selector.js +0 -549
  85. package/lib/ml-dom/rule-mapper.d.ts +0 -16
  86. package/lib/ml-dom/tokens/abstract-element.d.ts +0 -49
  87. package/lib/ml-dom/tokens/abstract-element.js +0 -249
  88. package/lib/ml-dom/tokens/attribute.d.ts +0 -42
  89. package/lib/ml-dom/tokens/attribute.js +0 -85
  90. package/lib/ml-dom/tokens/comment.d.ts +0 -9
  91. package/lib/ml-dom/tokens/comment.js +0 -15
  92. package/lib/ml-dom/tokens/doctype.d.ts +0 -15
  93. package/lib/ml-dom/tokens/doctype.js +0 -32
  94. package/lib/ml-dom/tokens/element-close-tag.d.ts +0 -24
  95. package/lib/ml-dom/tokens/element-close-tag.js +0 -45
  96. package/lib/ml-dom/tokens/element.d.ts +0 -23
  97. package/lib/ml-dom/tokens/element.js +0 -66
  98. package/lib/ml-dom/tokens/index.d.ts +0 -10
  99. package/lib/ml-dom/tokens/index.js +0 -26
  100. package/lib/ml-dom/tokens/node.d.ts +0 -39
  101. package/lib/ml-dom/tokens/node.js +0 -126
  102. package/lib/ml-dom/tokens/omitted-element.d.ts +0 -10
  103. package/lib/ml-dom/tokens/omitted-element.js +0 -12
  104. package/lib/ml-dom/tokens/preprocessor-specific-attribute.d.ts +0 -24
  105. package/lib/ml-dom/tokens/preprocessor-specific-attribute.js +0 -37
  106. package/lib/ml-dom/tokens/preprocessor-specific-block.d.ts +0 -11
  107. package/lib/ml-dom/tokens/preprocessor-specific-block.js +0 -16
  108. package/lib/ml-dom/tokens/text.d.ts +0 -15
  109. package/lib/ml-dom/tokens/text.js +0 -26
  110. package/lib/ml-dom/tokens/token.d.ts +0 -16
  111. package/lib/ml-dom/tokens/token.js +0 -55
  112. package/lib/ml-dom/types.d.ts +0 -27
  113. package/markuplint-recommended.json +0 -196
@@ -0,0 +1,2601 @@
1
+ "use strict";
2
+ var _MLElement_attributes, _MLElement_fixedNodeName, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, _MLElement_localName, _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_localName.set(this, void 0);
26
+ _MLElement_normalizedAttrs.set(this, new Map());
27
+ _MLElement_normalizedString.set(this, null);
28
+ this.pretenderContext = null;
29
+ _MLElement_tagOpenChar.set(this, void 0);
30
+ tslib_1.__classPrivateFieldSet(this, _MLElement_attributes, astNode.attributes.map(attr => new attr_1.MLAttr(attr, this)), "f");
31
+ this.hasSpreadAttr = astNode.hasSpreadAttr;
32
+ this.selfClosingSolidus = astNode.selfClosingSolidus ? new token_1.MLToken(astNode.selfClosingSolidus) : null;
33
+ this.endSpace = astNode.endSpace ? new token_1.MLToken(astNode.endSpace) : null;
34
+ this.closeTag = astNode.pearNode ? new token_1.MLToken(astNode.pearNode) : null;
35
+ const ns = (0, ml_spec_1.resolveNamespace)(astNode.nodeName, astNode.namespace);
36
+ this.namespaceURI = ns.namespaceURI;
37
+ this.elementType = astNode.elementType;
38
+ tslib_1.__classPrivateFieldSet(this, _MLElement_localName, ns.localName, "f");
39
+ this.isForeignElement = this.namespaceURI !== HTML_NAMESPACE;
40
+ tslib_1.__classPrivateFieldSet(this, _MLElement_fixedNodeName, astNode.nodeName, "f");
41
+ this.isOmitted = astNode.isGhost;
42
+ tslib_1.__classPrivateFieldSet(this, _MLElement_tagOpenChar, astNode.tagOpenChar, "f");
43
+ }
44
+ /**
45
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
46
+ *
47
+ * @deprecated
48
+ * @unsupported
49
+ * @implements DOM API: `Element`
50
+ */
51
+ get accessKey() {
52
+ throw new unexpected_call_error_1.default('Not supported "accessKey" property');
53
+ }
54
+ /**
55
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
56
+ *
57
+ * @deprecated
58
+ * @unsupported
59
+ * @implements DOM API: `Element`
60
+ */
61
+ get accessKeyLabel() {
62
+ throw new unexpected_call_error_1.default('Not supported "accessKeyLabel" property');
63
+ }
64
+ /**
65
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
66
+ *
67
+ * @deprecated
68
+ * @unsupported
69
+ * @implements DOM API: `Element`
70
+ */
71
+ get ariaAtomic() {
72
+ throw new unexpected_call_error_1.default('Not supported "ariaAtomic" property');
73
+ }
74
+ /**
75
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
76
+ *
77
+ * @deprecated
78
+ * @unsupported
79
+ * @implements DOM API: `Element`
80
+ */
81
+ get ariaAutoComplete() {
82
+ throw new unexpected_call_error_1.default('Not supported "ariaAutoComplete" property');
83
+ }
84
+ /**
85
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
86
+ *
87
+ * @deprecated
88
+ * @unsupported
89
+ * @implements DOM API: `Element`
90
+ */
91
+ get ariaBusy() {
92
+ throw new unexpected_call_error_1.default('Not supported "ariaBusy" property');
93
+ }
94
+ /**
95
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
96
+ *
97
+ * @deprecated
98
+ * @unsupported
99
+ * @implements DOM API: `Element`
100
+ */
101
+ get ariaChecked() {
102
+ throw new unexpected_call_error_1.default('Not supported "ariaChecked" property');
103
+ }
104
+ /**
105
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
106
+ *
107
+ * @deprecated
108
+ * @unsupported
109
+ * @implements DOM API: `Element`
110
+ */
111
+ get ariaColCount() {
112
+ throw new unexpected_call_error_1.default('Not supported "ariaColCount" property');
113
+ }
114
+ /**
115
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
116
+ *
117
+ * @deprecated
118
+ * @unsupported
119
+ * @implements DOM API: `Element`
120
+ */
121
+ get ariaColIndex() {
122
+ throw new unexpected_call_error_1.default('Not supported "ariaColIndex" property');
123
+ }
124
+ /**
125
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
126
+ *
127
+ * @deprecated
128
+ * @unsupported
129
+ * @implements DOM API: `Element`
130
+ */
131
+ get ariaColSpan() {
132
+ throw new unexpected_call_error_1.default('Not supported "ariaColSpan" property');
133
+ }
134
+ /**
135
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
136
+ *
137
+ * @deprecated
138
+ * @unsupported
139
+ * @implements DOM API: `Element`
140
+ */
141
+ get ariaCurrent() {
142
+ throw new unexpected_call_error_1.default('Not supported "ariaCurrent" property');
143
+ }
144
+ /**
145
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
146
+ *
147
+ * @deprecated
148
+ * @unsupported
149
+ * @implements DOM API: `Element`
150
+ */
151
+ get ariaDisabled() {
152
+ throw new unexpected_call_error_1.default('Not supported "ariaDisabled" property');
153
+ }
154
+ /**
155
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
156
+ *
157
+ * @deprecated
158
+ * @unsupported
159
+ * @implements DOM API: `Element`
160
+ */
161
+ get ariaExpanded() {
162
+ throw new unexpected_call_error_1.default('Not supported "ariaExpanded" property');
163
+ }
164
+ /**
165
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
166
+ *
167
+ * @deprecated
168
+ * @unsupported
169
+ * @implements DOM API: `Element`
170
+ */
171
+ get ariaHasPopup() {
172
+ throw new unexpected_call_error_1.default('Not supported "ariaHasPopup" property');
173
+ }
174
+ /**
175
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
176
+ *
177
+ * @deprecated
178
+ * @unsupported
179
+ * @implements DOM API: `Element`
180
+ */
181
+ get ariaHidden() {
182
+ throw new unexpected_call_error_1.default('Not supported "ariaHidden" property');
183
+ }
184
+ /**
185
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
186
+ *
187
+ * @deprecated
188
+ * @unsupported
189
+ * @implements DOM API: `Element`
190
+ */
191
+ get ariaKeyShortcuts() {
192
+ throw new unexpected_call_error_1.default('Not supported "ariaKeyShortcuts" property');
193
+ }
194
+ /**
195
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
196
+ *
197
+ * @deprecated
198
+ * @unsupported
199
+ * @implements DOM API: `Element`
200
+ */
201
+ get ariaLabel() {
202
+ throw new unexpected_call_error_1.default('Not supported "ariaLabel" property');
203
+ }
204
+ /**
205
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
206
+ *
207
+ * @deprecated
208
+ * @unsupported
209
+ * @implements DOM API: `Element`
210
+ */
211
+ get ariaLevel() {
212
+ throw new unexpected_call_error_1.default('Not supported "ariaLevel" property');
213
+ }
214
+ /**
215
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
216
+ *
217
+ * @deprecated
218
+ * @unsupported
219
+ * @implements DOM API: `Element`
220
+ */
221
+ get ariaLive() {
222
+ throw new unexpected_call_error_1.default('Not supported "ariaLive" property');
223
+ }
224
+ /**
225
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
226
+ *
227
+ * @deprecated
228
+ * @unsupported
229
+ * @implements DOM API: `Element`
230
+ */
231
+ get ariaModal() {
232
+ throw new unexpected_call_error_1.default('Not supported "ariaModal" property');
233
+ }
234
+ /**
235
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
236
+ *
237
+ * @deprecated
238
+ * @unsupported
239
+ * @implements DOM API: `Element`
240
+ */
241
+ get ariaMultiLine() {
242
+ throw new unexpected_call_error_1.default('Not supported "ariaMultiLine" property');
243
+ }
244
+ /**
245
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
246
+ *
247
+ * @deprecated
248
+ * @unsupported
249
+ * @implements DOM API: `Element`
250
+ */
251
+ get ariaMultiSelectable() {
252
+ throw new unexpected_call_error_1.default('Not supported "ariaMultiSelectable" property');
253
+ }
254
+ /**
255
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
256
+ *
257
+ * @deprecated
258
+ * @unsupported
259
+ * @implements DOM API: `Element`
260
+ */
261
+ get ariaOrientation() {
262
+ throw new unexpected_call_error_1.default('Not supported "ariaOrientation" property');
263
+ }
264
+ /**
265
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
266
+ *
267
+ * @deprecated
268
+ * @unsupported
269
+ * @implements DOM API: `Element`
270
+ */
271
+ get ariaPlaceholder() {
272
+ throw new unexpected_call_error_1.default('Not supported "ariaPlaceholder" property');
273
+ }
274
+ /**
275
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
276
+ *
277
+ * @deprecated
278
+ * @unsupported
279
+ * @implements DOM API: `Element`
280
+ */
281
+ get ariaPosInSet() {
282
+ throw new unexpected_call_error_1.default('Not supported "ariaPosInSet" property');
283
+ }
284
+ /**
285
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
286
+ *
287
+ * @deprecated
288
+ * @unsupported
289
+ * @implements DOM API: `Element`
290
+ */
291
+ get ariaPressed() {
292
+ throw new unexpected_call_error_1.default('Not supported "ariaPressed" property');
293
+ }
294
+ /**
295
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
296
+ *
297
+ * @deprecated
298
+ * @unsupported
299
+ * @implements DOM API: `Element`
300
+ */
301
+ get ariaReadOnly() {
302
+ throw new unexpected_call_error_1.default('Not supported "ariaReadOnly" property');
303
+ }
304
+ /**
305
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
306
+ *
307
+ * @deprecated
308
+ * @unsupported
309
+ * @implements DOM API: `Element`
310
+ */
311
+ get ariaRequired() {
312
+ throw new unexpected_call_error_1.default('Not supported "ariaRequired" property');
313
+ }
314
+ /**
315
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
316
+ *
317
+ * @deprecated
318
+ * @unsupported
319
+ * @implements DOM API: `Element`
320
+ */
321
+ get ariaRoleDescription() {
322
+ throw new unexpected_call_error_1.default('Not supported "ariaRoleDescription" property');
323
+ }
324
+ /**
325
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
326
+ *
327
+ * @deprecated
328
+ * @unsupported
329
+ * @implements DOM API: `Element`
330
+ */
331
+ get ariaRowCount() {
332
+ throw new unexpected_call_error_1.default('Not supported "ariaRowCount" property');
333
+ }
334
+ /**
335
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
336
+ *
337
+ * @deprecated
338
+ * @unsupported
339
+ * @implements DOM API: `Element`
340
+ */
341
+ get ariaRowIndex() {
342
+ throw new unexpected_call_error_1.default('Not supported "ariaRowIndex" property');
343
+ }
344
+ /**
345
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
346
+ *
347
+ * @deprecated
348
+ * @unsupported
349
+ * @implements DOM API: `Element`
350
+ */
351
+ get ariaRowSpan() {
352
+ throw new unexpected_call_error_1.default('Not supported "ariaRowSpan" property');
353
+ }
354
+ /**
355
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
356
+ *
357
+ * @deprecated
358
+ * @unsupported
359
+ * @implements DOM API: `Element`
360
+ */
361
+ get ariaSelected() {
362
+ throw new unexpected_call_error_1.default('Not supported "ariaSelected" property');
363
+ }
364
+ /**
365
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
366
+ *
367
+ * @deprecated
368
+ * @unsupported
369
+ * @implements DOM API: `Element`
370
+ */
371
+ get ariaSetSize() {
372
+ throw new unexpected_call_error_1.default('Not supported "ariaSetSize" property');
373
+ }
374
+ /**
375
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
376
+ *
377
+ * @deprecated
378
+ * @unsupported
379
+ * @implements DOM API: `Element`
380
+ */
381
+ get ariaSort() {
382
+ throw new unexpected_call_error_1.default('Not supported "ariaSort" property');
383
+ }
384
+ /**
385
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
386
+ *
387
+ * @deprecated
388
+ * @unsupported
389
+ * @implements DOM API: `Element`
390
+ */
391
+ get ariaValueMax() {
392
+ throw new unexpected_call_error_1.default('Not supported "ariaValueMax" property');
393
+ }
394
+ /**
395
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
396
+ *
397
+ * @deprecated
398
+ * @unsupported
399
+ * @implements DOM API: `Element`
400
+ */
401
+ get ariaValueMin() {
402
+ throw new unexpected_call_error_1.default('Not supported "ariaValueMin" property');
403
+ }
404
+ /**
405
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
406
+ *
407
+ * @deprecated
408
+ * @unsupported
409
+ * @implements DOM API: `Element`
410
+ */
411
+ get ariaValueNow() {
412
+ throw new unexpected_call_error_1.default('Not supported "ariaValueNow" property');
413
+ }
414
+ /**
415
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
416
+ *
417
+ * @deprecated
418
+ * @unsupported
419
+ * @implements DOM API: `Element`
420
+ */
421
+ get ariaValueText() {
422
+ throw new unexpected_call_error_1.default('Not supported "ariaValueText" property');
423
+ }
424
+ /**
425
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
426
+ *
427
+ * @unsupported
428
+ * @implements DOM API: `Element`
429
+ * @see https://dom.spec.whatwg.org/#dom-slotable-assignedslot
430
+ */
431
+ get assignedSlot() {
432
+ throw new unexpected_call_error_1.default('Not supported "assignedSlot" property');
433
+ }
434
+ /**
435
+ * @implements DOM API: `Element`
436
+ * @see https://dom.spec.whatwg.org/#dom-element-attributes
437
+ */
438
+ get attributes() {
439
+ var _a;
440
+ const origin = ((_a = this.pretenderContext) === null || _a === void 0 ? void 0 : _a.type) === 'pretender' ? tslib_1.__classPrivateFieldGet(this.pretenderContext.as, _MLElement_attributes, "f") : tslib_1.__classPrivateFieldGet(this, _MLElement_attributes, "f");
441
+ if (tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedAttrs, "f").has(origin)) {
442
+ return tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedAttrs, "f").get(origin);
443
+ }
444
+ const names = new Set();
445
+ const attrs = [];
446
+ for (const attr of origin) {
447
+ if (names.has(attr.name)) {
448
+ /**
449
+ * Skips a duplicated attribute
450
+ *
451
+ *@see https://html.spec.whatwg.org/#parse-error-duplicate-attribute
452
+ */
453
+ continue;
454
+ }
455
+ attrs.push(attr);
456
+ }
457
+ const map = (0, named_node_map_1.toNamedNodeMap)(attrs);
458
+ tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedAttrs, "f").set(origin, map);
459
+ return map;
460
+ }
461
+ /**
462
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
463
+ *
464
+ * @deprecated
465
+ * @unsupported
466
+ * @implements DOM API: `Element`
467
+ */
468
+ get autocapitalize() {
469
+ throw new unexpected_call_error_1.default('Not supported "autocapitalize" property');
470
+ }
471
+ /**
472
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
473
+ *
474
+ * @deprecated
475
+ * @unsupported
476
+ * @implements DOM API: `Element`
477
+ */
478
+ get autofocus() {
479
+ throw new unexpected_call_error_1.default('Not supported "autofocus" property');
480
+ }
481
+ /**
482
+ * @implements DOM API: `Element`
483
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-classlist%E2%91%A0
484
+ */
485
+ get classList() {
486
+ const classAttrs = this.getAttributeToken('class');
487
+ const value = classAttrs.map(c => c.value).join(' ');
488
+ return new dom_token_list_1.MLDomTokenList(value, classAttrs);
489
+ }
490
+ /**
491
+ * @implements DOM API: `Element`
492
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-classname%E2%91%A0
493
+ */
494
+ get className() {
495
+ return this.classList.value;
496
+ }
497
+ /**
498
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
499
+ *
500
+ * @unsupported
501
+ * @implements DOM API: `Element`
502
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clientheight-1
503
+ */
504
+ get clientHeight() {
505
+ throw new unexpected_call_error_1.default('Not supported "clientHeight" property');
506
+ }
507
+ /**
508
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
509
+ *
510
+ * @unsupported
511
+ * @implements DOM API: `Element`
512
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clientleft-1
513
+ */
514
+ get clientLeft() {
515
+ throw new unexpected_call_error_1.default('Not supported "clientLeft" property');
516
+ }
517
+ /**
518
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
519
+ *
520
+ * @unsupported
521
+ * @implements DOM API: `Element`
522
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clienttop-1
523
+ */
524
+ get clientTop() {
525
+ throw new unexpected_call_error_1.default('Not supported "clientTop" property');
526
+ }
527
+ /**
528
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
529
+ *
530
+ * @unsupported
531
+ * @implements DOM API: `Element`
532
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-clientwidth-1
533
+ */
534
+ get clientWidth() {
535
+ throw new unexpected_call_error_1.default('Not supported "clientWidth" property');
536
+ }
537
+ /**
538
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
539
+ *
540
+ * @deprecated
541
+ * @unsupported
542
+ * @implements DOM API: `Element`
543
+ */
544
+ get contentEditable() {
545
+ throw new unexpected_call_error_1.default('Not supported "contentEditable" property');
546
+ }
547
+ /**
548
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
549
+ *
550
+ * @deprecated
551
+ * @unsupported
552
+ * @implements DOM API: `Element`
553
+ */
554
+ get dataset() {
555
+ throw new unexpected_call_error_1.default('Not supported "dataset" property');
556
+ }
557
+ /**
558
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
559
+ *
560
+ * @deprecated
561
+ * @unsupported
562
+ * @implements DOM API: `Element`
563
+ */
564
+ get dir() {
565
+ throw new unexpected_call_error_1.default('Not supported "dir" property');
566
+ }
567
+ /**
568
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
569
+ *
570
+ * @deprecated
571
+ * @unsupported
572
+ * @implements DOM API: `Element`
573
+ */
574
+ get draggable() {
575
+ throw new unexpected_call_error_1.default('Not supported "draggable" property');
576
+ }
577
+ /**
578
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
579
+ *
580
+ * @deprecated
581
+ * @unsupported
582
+ * @implements DOM API: `Element`
583
+ */
584
+ get enterKeyHint() {
585
+ throw new unexpected_call_error_1.default('Not supported "enterKeyHint" property');
586
+ }
587
+ /**
588
+ * @implements `@markuplint/ml-core` API: `MLElement`
589
+ */
590
+ get fixedNodeName() {
591
+ return tslib_1.__classPrivateFieldGet(this, _MLElement_fixedNodeName, "f");
592
+ }
593
+ /**
594
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
595
+ *
596
+ * @deprecated
597
+ * @unsupported
598
+ * @implements DOM API: `Element`
599
+ */
600
+ get hidden() {
601
+ throw new unexpected_call_error_1.default('Not supported "hidden" property');
602
+ }
603
+ /**
604
+ * @implements DOM API: `Element`
605
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-id%E2%91%A0
606
+ */
607
+ get id() {
608
+ return this.getAttribute('id') || '';
609
+ }
610
+ /**
611
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
612
+ *
613
+ * @deprecated
614
+ * @unsupported
615
+ * @implements DOM API: `Element`
616
+ * @see https://html.spec.whatwg.org/multipage/interaction.html#dom-inert
617
+ */
618
+ get inert() {
619
+ throw new unexpected_call_error_1.default('Not supported "inert" property');
620
+ }
621
+ /**
622
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
623
+ *
624
+ * @unsupported
625
+ * @implements DOM API: `Element`
626
+ * @see https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml
627
+ */
628
+ get innerHTML() {
629
+ throw new unexpected_call_error_1.default('Not supported "innerHTML" property');
630
+ }
631
+ /**
632
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
633
+ *
634
+ * @deprecated
635
+ * @unsupported
636
+ * @implements DOM API: `Element`
637
+ */
638
+ get innerText() {
639
+ throw new unexpected_call_error_1.default('Not supported "innerText" property');
640
+ }
641
+ /**
642
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
643
+ *
644
+ * @deprecated
645
+ * @unsupported
646
+ * @implements DOM API: `Element`
647
+ */
648
+ get inputMode() {
649
+ throw new unexpected_call_error_1.default('Not supported "inputMode" property');
650
+ }
651
+ /**
652
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
653
+ *
654
+ * @deprecated
655
+ * @unsupported
656
+ * @implements DOM API: `Element`
657
+ */
658
+ get isContentEditable() {
659
+ throw new unexpected_call_error_1.default('Not supported "isContentEditable" property');
660
+ }
661
+ /**
662
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
663
+ *
664
+ * @deprecated
665
+ * @unsupported
666
+ * @implements DOM API: `Element`
667
+ */
668
+ get lang() {
669
+ throw new unexpected_call_error_1.default('Not supported "lang" property');
670
+ }
671
+ /**
672
+ * Returns a lowercase name if it is an HTML element.
673
+ *
674
+ * ```html
675
+ * <div> => "div"
676
+ * <DIV> => "div"
677
+ * <svg> => "svg"
678
+ * <foreignObject> => "foreignObject"
679
+ * <x-foo> => "x-foo"
680
+ * <X-FOO> => "x-foo"
681
+ * ```
682
+ *
683
+ * @implements DOM API: `Element`
684
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-localname%E2%91%A0
685
+ */
686
+ get localName() {
687
+ var _a;
688
+ if (((_a = this.pretenderContext) === null || _a === void 0 ? void 0 : _a.type) === 'pretender') {
689
+ return this.pretenderContext.as.localName;
690
+ }
691
+ if (this.isForeignElement || this.elementType !== 'html') {
692
+ return tslib_1.__classPrivateFieldGet(this, _MLElement_localName, "f");
693
+ }
694
+ return tslib_1.__classPrivateFieldGet(this, _MLElement_localName, "f").toLowerCase();
695
+ }
696
+ /**
697
+ * The element immediately following the specified one in its parent's children list.
698
+ *
699
+ * @readonly
700
+ * @implements DOM API: `Element`
701
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-nondocumenttypechildnode-nextelementsibling%E2%91%A1
702
+ */
703
+ get nextElementSibling() {
704
+ return (0, child_node_methods_1.nextElementSibling)(this);
705
+ }
706
+ /**
707
+ * Returns a string appropriate for the type of node as `Element`
708
+ *
709
+ * @see https://dom.spec.whatwg.org/#ref-for-element%E2%91%A2%E2%93%AA
710
+ */
711
+ get nodeName() {
712
+ var _a;
713
+ if (((_a = this.pretenderContext) === null || _a === void 0 ? void 0 : _a.type) === 'pretender') {
714
+ return this.pretenderContext.as.nodeName;
715
+ }
716
+ if (this.isForeignElement || this.elementType !== 'html') {
717
+ return this._astToken.nodeName;
718
+ }
719
+ return this._astToken.nodeName.toUpperCase();
720
+ }
721
+ /**
722
+ * Returns a number appropriate for the type of `Element`
723
+ */
724
+ get nodeType() {
725
+ return this.ELEMENT_NODE;
726
+ }
727
+ /**
728
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
729
+ *
730
+ * @deprecated
731
+ * @unsupported
732
+ * @implements DOM API: `Element`
733
+ */
734
+ get nonce() {
735
+ throw new unexpected_call_error_1.default('Not supported "nonce" property');
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, _b;
1739
+ if (((_a = this.pretenderContext) === null || _a === void 0 ? void 0 : _a.type) === 'pretender') {
1740
+ return this.originRaw;
1741
+ }
1742
+ let fixed = this.originRaw;
1743
+ let gap = 0;
1744
+ if (this.nodeName !== this.fixedNodeName) {
1745
+ fixed = (0, string_splice_1.stringSplice)(fixed, tslib_1.__classPrivateFieldGet(this, _MLElement_tagOpenChar, "f").length, this.nodeName.length, this.fixedNodeName);
1746
+ gap = gap + this.fixedNodeName.length - this.nodeName.length;
1747
+ }
1748
+ for (const attr of Array.from(this.attributes)) {
1749
+ const startOffset = (((_b = attr.spacesBeforeName) === null || _b === void 0 ? void 0 : _b.startOffset) || attr.startOffset) - this.startOffset;
1750
+ const fixedAttr = attr.toString();
1751
+ if (attr.originRaw !== fixedAttr) {
1752
+ fixed = (0, string_splice_1.stringSplice)(fixed, startOffset + gap, attr.originRaw.length, fixedAttr);
1753
+ gap = gap + fixedAttr.length - attr.originRaw.length;
1754
+ }
1755
+ }
1756
+ return fixed;
1757
+ }
1758
+ /**
1759
+ * @implements `@markuplint/ml-core` API: `MLElement`
1760
+ */
1761
+ get rawName() {
1762
+ return this._astToken.nodeName;
1763
+ }
1764
+ /**
1765
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1766
+ *
1767
+ * @unsupported
1768
+ * @implements DOM API: `Element`
1769
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrollheight-1
1770
+ */
1771
+ get scrollHeight() {
1772
+ throw new unexpected_call_error_1.default('Not supported "scrollHeight" property');
1773
+ }
1774
+ /**
1775
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1776
+ *
1777
+ * @unsupported
1778
+ * @implements DOM API: `Element`
1779
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrollleft-1
1780
+ */
1781
+ get scrollLeft() {
1782
+ throw new unexpected_call_error_1.default('Not supported "scrollLeft" property');
1783
+ }
1784
+ /**
1785
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1786
+ *
1787
+ * @unsupported
1788
+ * @implements DOM API: `Element`
1789
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrolltop-1
1790
+ */
1791
+ get scrollTop() {
1792
+ throw new unexpected_call_error_1.default('Not supported "scrollTop" property');
1793
+ }
1794
+ /**
1795
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1796
+ *
1797
+ * @unsupported
1798
+ * @implements DOM API: `Element`
1799
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-scrollwidth-1
1800
+ */
1801
+ get scrollWidth() {
1802
+ throw new unexpected_call_error_1.default('Not supported "scrollWidth" property');
1803
+ }
1804
+ /**
1805
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1806
+ *
1807
+ * @unsupported
1808
+ * @implements DOM API: `Element`
1809
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-shadowroot%E2%91%A0
1810
+ */
1811
+ get shadowRoot() {
1812
+ throw new unexpected_call_error_1.default('Not supported "shadowRoot" property');
1813
+ }
1814
+ /**
1815
+ * @implements DOM API: `Element`
1816
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-slot%E2%91%A0
1817
+ */
1818
+ get slot() {
1819
+ return this.getAttribute('slot') || '';
1820
+ }
1821
+ /**
1822
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1823
+ *
1824
+ * @deprecated
1825
+ * @unsupported
1826
+ * @implements DOM API: `Element`
1827
+ */
1828
+ get spellcheck() {
1829
+ throw new unexpected_call_error_1.default('Not supported "spellcheck" property');
1830
+ }
1831
+ /**
1832
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1833
+ *
1834
+ * @deprecated
1835
+ * @unsupported
1836
+ * @implements DOM API: `Element`
1837
+ */
1838
+ get style() {
1839
+ throw new unexpected_call_error_1.default('Not supported "style" property');
1840
+ }
1841
+ /**
1842
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1843
+ *
1844
+ * @deprecated
1845
+ * @unsupported
1846
+ * @implements DOM API: `Element`
1847
+ */
1848
+ get tabIndex() {
1849
+ throw new unexpected_call_error_1.default('Not supported "tabIndex" property');
1850
+ }
1851
+ /**
1852
+ * Returns the HTML-uppercased qualified name.
1853
+ *
1854
+ * If this is in the HTML namespace and its node document is an HTML document, then set qualifiedName to qualifiedName in ASCII uppercase.
1855
+ *
1856
+ * (In markuplint evaluation, the node document always is an HTML document.)
1857
+ *
1858
+ * ```html
1859
+ * <div> => "DIV"
1860
+ * <svg> => "svg"
1861
+ * <x-foo> => "X-FOO"
1862
+ * ```
1863
+ *
1864
+ * @implements DOM API: `Element`
1865
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-tagname%E2%91%A0
1866
+ */
1867
+ get tagName() {
1868
+ var _a;
1869
+ if (((_a = this.pretenderContext) === null || _a === void 0 ? void 0 : _a.type) === 'pretender') {
1870
+ return this.pretenderContext.as.nodeName;
1871
+ }
1872
+ return this.nodeName;
1873
+ }
1874
+ get textContent() {
1875
+ return Array.from(this.childNodes)
1876
+ .map(child => child.textContent || '')
1877
+ .join('');
1878
+ }
1879
+ /**
1880
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1881
+ *
1882
+ * @deprecated
1883
+ * @unsupported
1884
+ * @implements DOM API: `Element`
1885
+ */
1886
+ get title() {
1887
+ throw new unexpected_call_error_1.default('Not supported "title" property');
1888
+ }
1889
+ /**
1890
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1891
+ *
1892
+ * @deprecated
1893
+ * @unsupported
1894
+ * @implements DOM API: `Element`
1895
+ */
1896
+ get translate() {
1897
+ throw new unexpected_call_error_1.default('Not supported "translate" property');
1898
+ }
1899
+ /**
1900
+ * @implements DOM API: `Element`
1901
+ */
1902
+ after(...nodes) {
1903
+ (0, child_node_methods_1.after)(this, ...nodes);
1904
+ }
1905
+ /**
1906
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1907
+ *
1908
+ * @unsupported
1909
+ * @implements DOM API: `Element`
1910
+ * @see https://www.w3.org/TR/web-animations-1/#dom-animatable-animate
1911
+ */
1912
+ animate(keyframes, options) {
1913
+ throw new unexpected_call_error_1.default('Not supported "animate" method');
1914
+ }
1915
+ /**
1916
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1917
+ *
1918
+ * @deprecated
1919
+ * @unsupported
1920
+ * @implements DOM API: `Element`
1921
+ */
1922
+ attachInternals() {
1923
+ throw new unexpected_call_error_1.default('Not supported "attachInternals" method');
1924
+ }
1925
+ /**
1926
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1927
+ *
1928
+ * @unsupported
1929
+ * @implements DOM API: `Element`
1930
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-attachshadow%E2%91%A0
1931
+ */
1932
+ attachShadow(init) {
1933
+ throw new unexpected_call_error_1.default('Not supported "attachShadow" method');
1934
+ }
1935
+ /**
1936
+ * @implements DOM API: `Element`
1937
+ */
1938
+ before(...nodes) {
1939
+ (0, child_node_methods_1.before)(this, ...nodes);
1940
+ }
1941
+ /**
1942
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1943
+ *
1944
+ * @deprecated
1945
+ * @unsupported
1946
+ * @implements DOM API: `Element`
1947
+ */
1948
+ blur() {
1949
+ throw new unexpected_call_error_1.default('Not supported "blur" method');
1950
+ }
1951
+ /**
1952
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1953
+ *
1954
+ * @deprecated
1955
+ * @unsupported
1956
+ * @implements DOM API: `Element`
1957
+ */
1958
+ click() {
1959
+ throw new unexpected_call_error_1.default('Not supported "click" method');
1960
+ }
1961
+ /**
1962
+ * @implements DOM API: `Element`
1963
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-closest%E2%91%A0
1964
+ */
1965
+ closest(selectors) {
1966
+ let el = this;
1967
+ do {
1968
+ if (el.matches(selectors)) {
1969
+ return el;
1970
+ }
1971
+ el = el.parentElement;
1972
+ } while (el !== null && el.is(el.ELEMENT_NODE));
1973
+ return null;
1974
+ }
1975
+ fixNodeName(name) {
1976
+ tslib_1.__classPrivateFieldSet(this, _MLElement_fixedNodeName, name, "f");
1977
+ }
1978
+ /**
1979
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1980
+ *
1981
+ * @deprecated
1982
+ * @unsupported
1983
+ * @implements DOM API: `Element`
1984
+ */
1985
+ focus(options) {
1986
+ throw new unexpected_call_error_1.default('Not supported "focus" method');
1987
+ }
1988
+ /**
1989
+ * @implements `@markuplint/ml-core` API: `MLElement`
1990
+ */
1991
+ getAccessibleName(version) {
1992
+ return (0, accname_1.getAccname)(this, version);
1993
+ }
1994
+ /**
1995
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
1996
+ *
1997
+ * @unsupported
1998
+ * @implements DOM API: `Element`
1999
+ * @see https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations
2000
+ */
2001
+ getAnimations(options) {
2002
+ throw new unexpected_call_error_1.default('Not supported "getAnimations" method');
2003
+ }
2004
+ /**
2005
+ * @implements DOM API: `Element`
2006
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getattribute%E2%91%A0
2007
+ */
2008
+ getAttribute(attrName) {
2009
+ for (const attr of Array.from(this.attributes)) {
2010
+ if (attr.name.toLowerCase() === attrName.toLowerCase()) {
2011
+ return attr.value;
2012
+ }
2013
+ }
2014
+ return null;
2015
+ }
2016
+ /**
2017
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2018
+ *
2019
+ * @unsupported
2020
+ * @implements DOM API: `Element`
2021
+ * @see https://dom.spec.whatwg.org/#dom-element-getattributenodens
2022
+ */
2023
+ getAttributeNS(namespace, localName) {
2024
+ throw new unexpected_call_error_1.default('Not supported "getAttributeNS" method');
2025
+ }
2026
+ /**
2027
+ * @implements DOM API: `Element`
2028
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getattributenames%E2%91%A0
2029
+ */
2030
+ getAttributeNames() {
2031
+ return Array.from(this.attributes).map(attr => attr.name);
2032
+ }
2033
+ /**
2034
+ * @implements DOM API: `Element`
2035
+ * @see https://dom.spec.whatwg.org/#dom-element-getattributenode
2036
+ */
2037
+ getAttributeNode(qualifiedName) {
2038
+ return this.getAttributeToken(qualifiedName)[0] || null;
2039
+ }
2040
+ /**
2041
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2042
+ *
2043
+ * @unsupported
2044
+ * @implements DOM API: `Element`
2045
+ * @see https://dom.spec.whatwg.org/#dom-element-getattributenodens
2046
+ */
2047
+ getAttributeNodeNS(namespace, localName) {
2048
+ throw new unexpected_call_error_1.default('Not supported "getAttributeNodeNS" method');
2049
+ }
2050
+ /**
2051
+ * @implements `@markuplint/ml-core` API: `MLElement`
2052
+ */
2053
+ getAttributePretended(attrName) {
2054
+ for (const attr of Array.from(tslib_1.__classPrivateFieldGet(this, _MLElement_attributes, "f"))) {
2055
+ if (attr.name.toLowerCase() === attrName.toLowerCase()) {
2056
+ return attr.value;
2057
+ }
2058
+ }
2059
+ return null;
2060
+ }
2061
+ /**
2062
+ * @implements `@markuplint/ml-core` API: `MLElement`
2063
+ */
2064
+ getAttributeToken(attrName) {
2065
+ const attrs = [];
2066
+ attrName = attrName.toLowerCase();
2067
+ for (const attr of this.getAttributeTokens()) {
2068
+ if (attr.name === attrName) {
2069
+ attrs.push(attr);
2070
+ }
2071
+ }
2072
+ return attrs;
2073
+ }
2074
+ /**
2075
+ * @implements `@markuplint/ml-core` API: `MLElement`
2076
+ */
2077
+ getAttributeTokens() {
2078
+ var _a;
2079
+ return Object.freeze(((_a = this.pretenderContext) === null || _a === void 0 ? void 0 : _a.type) === 'pretender' ? tslib_1.__classPrivateFieldGet(this.pretenderContext.as, _MLElement_attributes, "f") : tslib_1.__classPrivateFieldGet(this, _MLElement_attributes, "f"));
2080
+ }
2081
+ /**
2082
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2083
+ *
2084
+ * @unsupported
2085
+ * @implements DOM API: `Element`
2086
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-getboundingclientrect-1
2087
+ */
2088
+ getBoundingClientRect() {
2089
+ throw new unexpected_call_error_1.default('Not supported "getBoundingClientRect" method');
2090
+ }
2091
+ getChildElementsAndTextNodeWithoutWhitespaces() {
2092
+ if (tslib_1.__classPrivateFieldGet(this, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, "f")) {
2093
+ return tslib_1.__classPrivateFieldGet(this, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, "f");
2094
+ }
2095
+ const filteredNodes = [];
2096
+ this.childNodes.forEach(node => {
2097
+ if (node.is(node.ELEMENT_NODE)) {
2098
+ if (node.isOmitted) {
2099
+ const children = node.getChildElementsAndTextNodeWithoutWhitespaces();
2100
+ filteredNodes.push(...children);
2101
+ }
2102
+ else {
2103
+ filteredNodes.push(node);
2104
+ }
2105
+ }
2106
+ if (node.is(node.TEXT_NODE) && !node.isWhitespace()) {
2107
+ filteredNodes.push(node);
2108
+ }
2109
+ });
2110
+ tslib_1.__classPrivateFieldSet(this, _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache, filteredNodes, "f");
2111
+ return filteredNodes;
2112
+ }
2113
+ /**
2114
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2115
+ *
2116
+ * @unsupported
2117
+ * @implements DOM API: `Element`
2118
+ * @see https://www.w3.org/TR/cssom-view-1/#ref-for-dom-element-getclientrects-1
2119
+ */
2120
+ getClientRects() {
2121
+ throw new unexpected_call_error_1.default('Not supported "getClientRects" method');
2122
+ }
2123
+ /**
2124
+ * @implements DOM API: `Element`
2125
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getelementsbyclassname
2126
+ */
2127
+ getElementsByClassName(classNames) {
2128
+ return (0, node_list_1.toHTMLCollection)(this._descendantsToArray(node => {
2129
+ if (node.is(node.ELEMENT_NODE) && node.classList.contains(classNames)) {
2130
+ return node;
2131
+ }
2132
+ }));
2133
+ }
2134
+ /**
2135
+ * @implements DOM API: `Element`
2136
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-getelementsbyclassname
2137
+ */
2138
+ getElementsByTagName(qualifiedName) {
2139
+ return (0, node_list_1.toHTMLCollection)(this._descendantsToArray(node => {
2140
+ if (node.is(node.ELEMENT_NODE) && node.nodeName.toLowerCase() === qualifiedName.toLowerCase()) {
2141
+ return node;
2142
+ }
2143
+ }));
2144
+ }
2145
+ /**
2146
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2147
+ *
2148
+ * @unsupported
2149
+ * @implements DOM API: `Element`
2150
+ * @see https://dom.spec.whatwg.org/#dom-element-getelementsbytagnamens
2151
+ */
2152
+ getElementsByTagNameNS(namespace, localName) {
2153
+ throw new unexpected_call_error_1.default('Not supported "getElementsByTagNameNS" method');
2154
+ }
2155
+ /**
2156
+ * @implements `@markuplint/ml-core` API: `MLElement`
2157
+ */
2158
+ getNameLocation() {
2159
+ return {
2160
+ offset: this.startOffset,
2161
+ line: this.startLine,
2162
+ col: this.startCol + tslib_1.__classPrivateFieldGet(this, _MLElement_tagOpenChar, "f").length,
2163
+ };
2164
+ }
2165
+ /**
2166
+ * @implements DOM API: `Element`
2167
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-hasattribute%E2%91%A0
2168
+ */
2169
+ hasAttribute(qualifiedName) {
2170
+ return this.getAttribute(qualifiedName) !== null;
2171
+ }
2172
+ /**
2173
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2174
+ *
2175
+ * @unsupported
2176
+ * @implements DOM API: `Element`
2177
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-hasattributens%E2%91%A0
2178
+ */
2179
+ hasAttributeNS(namespace, localName) {
2180
+ throw new unexpected_call_error_1.default('Not supported "hasAttributeNS" method');
2181
+ }
2182
+ /**
2183
+ * @implements DOM API: `Element`
2184
+ * @see https://dom.spec.whatwg.org/#dom-element-hasattributes
2185
+ */
2186
+ hasAttributes() {
2187
+ return !!this.attributes.length;
2188
+ }
2189
+ /**
2190
+ * @implements `@markuplint/ml-core` API: `MLElement`
2191
+ */
2192
+ hasMutableAttributes() {
2193
+ for (const attr of Array.from(this.attributes)) {
2194
+ if (!attr.nameNode) {
2195
+ return true;
2196
+ }
2197
+ if (attr.isDynamicValue) {
2198
+ return true;
2199
+ }
2200
+ }
2201
+ return false;
2202
+ }
2203
+ /**
2204
+ * This element has "Preprocessor Specific Block". In other words, Its children are potentially mutable.
2205
+ *
2206
+ * @implements `@markuplint/ml-core` API: `MLElement`
2207
+ */
2208
+ hasMutableChildren(attr = false) {
2209
+ for (const child of Array.from(this.childNodes)) {
2210
+ if (child.is(child.MARKUPLINT_PREPROCESSOR_BLOCK)) {
2211
+ return true;
2212
+ }
2213
+ if (child.is(child.ELEMENT_NODE)) {
2214
+ if (attr && child.hasMutableAttributes()) {
2215
+ return true;
2216
+ }
2217
+ if (child.hasMutableChildren()) {
2218
+ return true;
2219
+ }
2220
+ }
2221
+ }
2222
+ return false;
2223
+ }
2224
+ /**
2225
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2226
+ *
2227
+ * @unsupported
2228
+ * @implements DOM API: `Element`
2229
+ * @see https://www.w3.org/TR/pointerevents2/#dom-element-haspointercapture
2230
+ */
2231
+ hasPointerCapture(pointerId) {
2232
+ throw new unexpected_call_error_1.default('Not supported "hasPointerCapture" method');
2233
+ }
2234
+ /**
2235
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2236
+ *
2237
+ * @unsupported
2238
+ * @implements DOM API: `Element`
2239
+ * @see https://dom.spec.whatwg.org/#dom-element-insertadjacentelement
2240
+ */
2241
+ insertAdjacentElement(where, element) {
2242
+ // TODO:
2243
+ throw new unexpected_call_error_1.default('Does not implement "insertAdjacentElement" method yet');
2244
+ }
2245
+ /**
2246
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2247
+ *
2248
+ * @unsupported
2249
+ * @implements DOM API: `Element`
2250
+ * @see https://w3c.github.io/DOM-Parsing/#widl-Element-insertAdjacentHTML-void-DOMString-position-DOMString-text
2251
+ */
2252
+ insertAdjacentHTML(position, text) {
2253
+ // TODO:
2254
+ throw new unexpected_call_error_1.default('Does not implement "insertAdjacentHTML" method yet');
2255
+ }
2256
+ /**
2257
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2258
+ *
2259
+ * @unsupported
2260
+ * @implements DOM API: `Element`
2261
+ * @see https://dom.spec.whatwg.org/#dom-element-insertadjacenttext
2262
+ */
2263
+ insertAdjacentText(where, data) {
2264
+ // TODO:
2265
+ throw new unexpected_call_error_1.default('Does not implement "insertAdjacentText" method yet');
2266
+ }
2267
+ /**
2268
+ * @implements `@markuplint/ml-core` API: `MLElement`
2269
+ */
2270
+ isDescendantByUUIDList(uuidList) {
2271
+ let el = this.parentElement;
2272
+ if (el === null) {
2273
+ return false;
2274
+ }
2275
+ do {
2276
+ if (uuidList.includes(el.uuid)) {
2277
+ return true;
2278
+ }
2279
+ el = el.parentElement;
2280
+ } while (el !== null && el.is(el.ELEMENT_NODE));
2281
+ return false;
2282
+ }
2283
+ /**
2284
+ * @implements DOM API: `Element`
2285
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-matches%E2%91%A0
2286
+ */
2287
+ matches(selector) {
2288
+ var _a;
2289
+ return !!(0, selector_1.createSelector)(selector, this.ownerMLDocument.specs).match(
2290
+ // Prioritize the pretender
2291
+ ((_a = this.pretenderContext) === null || _a === void 0 ? void 0 : _a.type) === 'pretender' ? this.pretenderContext.as : this);
2292
+ }
2293
+ /**
2294
+ * Pretenders Initialization
2295
+ */
2296
+ pretending(pretenders) {
2297
+ const pretenderConfig = pretenders === null || pretenders === void 0 ? void 0 : pretenders.find(option => this.matches(option.selector));
2298
+ if (!pretenderConfig) {
2299
+ return;
2300
+ }
2301
+ let nodeName;
2302
+ let namespace = 'html';
2303
+ const attributes = [];
2304
+ let aria;
2305
+ if (typeof pretenderConfig.as === 'string') {
2306
+ nodeName = pretenderConfig.as;
2307
+ }
2308
+ else {
2309
+ nodeName = pretenderConfig.as.element;
2310
+ namespace = pretenderConfig.as.namespace || namespace;
2311
+ if (pretenderConfig.as.inheritAttrs) {
2312
+ attributes.push(...this._astToken.attributes);
2313
+ }
2314
+ if (pretenderConfig.as.attrs) {
2315
+ attributes.push(...pretenderConfig.as.attrs.map(({ name, value }, i) => {
2316
+ const _value = value
2317
+ ? typeof value === 'string'
2318
+ ? value
2319
+ : this.getAttribute(value.fromAttr) || ''
2320
+ : '';
2321
+ return {
2322
+ ...this._astToken,
2323
+ uuid: `${this.uuid}_attr_${i}`,
2324
+ type: 'html-attr',
2325
+ nodeName: name,
2326
+ spacesBeforeName: {
2327
+ ...this._astToken,
2328
+ raw: '',
2329
+ },
2330
+ name: {
2331
+ ...this._astToken,
2332
+ raw: name,
2333
+ },
2334
+ spacesBeforeEqual: {
2335
+ ...this._astToken,
2336
+ raw: '',
2337
+ },
2338
+ equal: {
2339
+ ...this._astToken,
2340
+ raw: '',
2341
+ },
2342
+ spacesAfterEqual: {
2343
+ ...this._astToken,
2344
+ raw: '',
2345
+ },
2346
+ startQuote: {
2347
+ ...this._astToken,
2348
+ raw: '',
2349
+ },
2350
+ value: {
2351
+ ...this._astToken,
2352
+ raw: _value,
2353
+ },
2354
+ endQuote: {
2355
+ ...this._astToken,
2356
+ raw: '',
2357
+ },
2358
+ isDuplicatable: true,
2359
+ parentNode: null,
2360
+ nextNode: null,
2361
+ prevNode: null,
2362
+ isFragment: false,
2363
+ isGhost: false,
2364
+ };
2365
+ }));
2366
+ }
2367
+ aria = pretenderConfig.as.aria;
2368
+ }
2369
+ const as = new MLElement({
2370
+ ...this._astToken,
2371
+ uuid: this.uuid + '_pretender',
2372
+ raw: `<${nodeName}>`,
2373
+ nodeName,
2374
+ namespace,
2375
+ elementType: 'html',
2376
+ attributes,
2377
+ }, this.ownerMLDocument);
2378
+ as.resetChildren(this.childNodes);
2379
+ as.pretenderContext = {
2380
+ type: 'origin',
2381
+ origin: this,
2382
+ };
2383
+ this.pretenderContext = {
2384
+ type: 'pretender',
2385
+ as,
2386
+ aria,
2387
+ };
2388
+ }
2389
+ /**
2390
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2391
+ *
2392
+ * @unsupported
2393
+ * @implements DOM API: `Element`
2394
+ * @see https://www.w3.org/TR/pointerevents2/#dom-element-releasepointercapture
2395
+ */
2396
+ releasePointerCapture(pointerId) {
2397
+ throw new unexpected_call_error_1.default('Not supported "releasePointerCapture" method');
2398
+ }
2399
+ /**
2400
+ * @implements DOM API: `Element`
2401
+ */
2402
+ remove() {
2403
+ (0, child_node_methods_1.remove)(this);
2404
+ }
2405
+ /**
2406
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2407
+ *
2408
+ * @unsupported
2409
+ * @implements DOM API: `Element`
2410
+ * @see https://dom.spec.whatwg.org/#dom-element-removeattribute
2411
+ */
2412
+ removeAttribute(qualifiedName) {
2413
+ throw new unexpected_call_error_1.default('Not supported "removeAttribute" method');
2414
+ }
2415
+ /**
2416
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2417
+ *
2418
+ * @unsupported
2419
+ * @implements DOM API: `Element`
2420
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-removeattributens%E2%91%A0
2421
+ */
2422
+ removeAttributeNS(namespace, localName) {
2423
+ throw new unexpected_call_error_1.default('Not supported "removeAttributeNS" method');
2424
+ }
2425
+ /**
2426
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2427
+ *
2428
+ * @unsupported
2429
+ * @implements DOM API: `Element`
2430
+ * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-D589198
2431
+ */
2432
+ removeAttributeNode(attr) {
2433
+ throw new unexpected_call_error_1.default('Not supported "removeAttributeNode" method');
2434
+ }
2435
+ /**
2436
+ * @implements DOM API: `Element`
2437
+ */
2438
+ replaceWith(...nodes) {
2439
+ (0, child_node_methods_1.replaceWith)(this, ...nodes);
2440
+ }
2441
+ /**
2442
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2443
+ *
2444
+ * @unsupported
2445
+ * @implements DOM API: `Element`
2446
+ * @see https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
2447
+ */
2448
+ requestFullscreen(options) {
2449
+ throw new unexpected_call_error_1.default('Not supported "requestFullscreen" method');
2450
+ }
2451
+ /**
2452
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2453
+ *
2454
+ * @unsupported
2455
+ * @implements DOM API: `Element`
2456
+ * @see https://w3c.github.io/pointerlock/#dom-element-requestpointerlock
2457
+ */
2458
+ requestPointerLock() {
2459
+ throw new unexpected_call_error_1.default('Not supported "requestPointerLock" method');
2460
+ }
2461
+ /**
2462
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2463
+ *
2464
+ * @unsupported
2465
+ * @implements DOM API: `Element`
2466
+ * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scroll
2467
+ */
2468
+ scroll(x, y) {
2469
+ throw new unexpected_call_error_1.default('Not supported "scroll" method');
2470
+ }
2471
+ /**
2472
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2473
+ *
2474
+ * @unsupported
2475
+ * @implements DOM API: `Element`
2476
+ * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scrollby
2477
+ */
2478
+ scrollBy(x, y) {
2479
+ throw new unexpected_call_error_1.default('Not supported "scrollBy" method');
2480
+ }
2481
+ /**
2482
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2483
+ *
2484
+ * @unsupported
2485
+ * @implements DOM API: `Element`
2486
+ * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scrollintoview
2487
+ */
2488
+ scrollIntoView(arg) {
2489
+ throw new unexpected_call_error_1.default('Not supported "scrollIntoView" method');
2490
+ }
2491
+ /**
2492
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2493
+ *
2494
+ * @unsupported
2495
+ * @implements DOM API: `Element`
2496
+ * @see https://www.w3.org/TR/cssom-view-1/#dom-element-scrollto
2497
+ */
2498
+ scrollTo(x, y) {
2499
+ throw new unexpected_call_error_1.default('Not supported "scrollTo" method');
2500
+ }
2501
+ /**
2502
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2503
+ *
2504
+ * @unsupported
2505
+ * @implements DOM API: `Element`
2506
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-setattribute%E2%91%A0
2507
+ */
2508
+ setAttribute(qualifiedName, value) {
2509
+ throw new unexpected_call_error_1.default('Not supported "setAttribute" method');
2510
+ }
2511
+ /**
2512
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2513
+ *
2514
+ * @unsupported
2515
+ * @implements DOM API: `Element`
2516
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-setattributens%E2%91%A0
2517
+ */
2518
+ setAttributeNS(namespace, qualifiedName, value) {
2519
+ throw new unexpected_call_error_1.default('Not supported "setAttributeNS" method');
2520
+ }
2521
+ /**
2522
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2523
+ *
2524
+ * @unsupported
2525
+ * @implements DOM API: `Element`
2526
+ * @see https://dom.spec.whatwg.org/#dom-element-setattributenode
2527
+ */
2528
+ setAttributeNode(attr) {
2529
+ throw new unexpected_call_error_1.default('Not supported "setAttributeNode" method');
2530
+ }
2531
+ /**
2532
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2533
+ *
2534
+ * @unsupported
2535
+ * @implements DOM API: `Element`
2536
+ * @see https://dom.spec.whatwg.org/#dom-element-setattributenodens
2537
+ */
2538
+ setAttributeNodeNS(attr) {
2539
+ throw new unexpected_call_error_1.default('Not supported "setAttributeNodeNS" method');
2540
+ }
2541
+ /**
2542
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2543
+ *
2544
+ * @unsupported
2545
+ * @implements DOM API: `Element`
2546
+ * @see https://www.w3.org/TR/pointerevents2/#idl-def-element-setpointercapture-pointerid
2547
+ */
2548
+ setPointerCapture(pointerId) {
2549
+ throw new unexpected_call_error_1.default('Not supported "setPointerCapture" method');
2550
+ }
2551
+ /**
2552
+ * @implements `@markuplint/ml-core` API: `MLElement`
2553
+ */
2554
+ toNormalizeString() {
2555
+ if (tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedString, "f")) {
2556
+ return tslib_1.__classPrivateFieldGet(this, _MLElement_normalizedString, "f");
2557
+ }
2558
+ const children = this.getChildElementsAndTextNodeWithoutWhitespaces();
2559
+ const attrs = this.attributes.map(attr => attr.toNormalizeString());
2560
+ const attrString = attrs.length ? ' ' + attrs.join('') : '';
2561
+ const startTag = `<${this.nodeName}${attrString}>`;
2562
+ const childNodes = children.map(node => {
2563
+ if (node.is(node.ELEMENT_NODE)) {
2564
+ return node.toNormalizeString();
2565
+ }
2566
+ return node.originRaw;
2567
+ });
2568
+ const endTag = `</${this.nodeName}>`;
2569
+ const normalizedString = `${startTag}${childNodes.join('')}${endTag}`;
2570
+ tslib_1.__classPrivateFieldSet(this, _MLElement_normalizedString, normalizedString, "f");
2571
+ return normalizedString;
2572
+ }
2573
+ /**
2574
+ * @implements `@markuplint/ml-core` API: `MLElement`
2575
+ */
2576
+ toString() {
2577
+ return this.raw;
2578
+ }
2579
+ /**
2580
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2581
+ *
2582
+ * @unsupported
2583
+ * @implements DOM API: `Element`
2584
+ * @see https://dom.spec.whatwg.org/#ref-for-dom-element-toggleattribute%E2%91%A0
2585
+ */
2586
+ toggleAttribute(qualifiedName, force) {
2587
+ throw new unexpected_call_error_1.default('Not supported "toggleAttribute" method');
2588
+ }
2589
+ /**
2590
+ * **IT THROWS AN ERROR WHEN CALLING THIS.**
2591
+ *
2592
+ * @deprecated
2593
+ * @unsupported
2594
+ * @implements DOM API: `Element`
2595
+ */
2596
+ webkitMatchesSelector(selectors) {
2597
+ throw new unexpected_call_error_1.default('Not supported "webkitMatchesSelector" method');
2598
+ }
2599
+ }
2600
+ exports.MLElement = MLElement;
2601
+ _MLElement_attributes = new WeakMap(), _MLElement_fixedNodeName = new WeakMap(), _MLElement_getChildElementsAndTextNodeWithoutWhitespacesCache = new WeakMap(), _MLElement_localName = new WeakMap(), _MLElement_normalizedAttrs = new WeakMap(), _MLElement_normalizedString = new WeakMap(), _MLElement_tagOpenChar = new WeakMap();