html-standard 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +78 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +78 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -212,7 +212,79 @@ var globalAttributes = /* @__PURE__ */ new Set([
|
|
|
212
212
|
"slot",
|
|
213
213
|
"xmlns",
|
|
214
214
|
"xml:lang",
|
|
215
|
-
"xml:space"
|
|
215
|
+
"xml:space",
|
|
216
|
+
// event handlers
|
|
217
|
+
"onauxclick",
|
|
218
|
+
"onbeforeinput",
|
|
219
|
+
"onbeforematch",
|
|
220
|
+
"onbeforetoggle",
|
|
221
|
+
"onblur",
|
|
222
|
+
"oncancel",
|
|
223
|
+
"oncanplay",
|
|
224
|
+
"oncanplaythrough",
|
|
225
|
+
"onchange",
|
|
226
|
+
"onclick",
|
|
227
|
+
"onclose",
|
|
228
|
+
"oncommand",
|
|
229
|
+
"oncontextlost",
|
|
230
|
+
"oncontextmenu",
|
|
231
|
+
"oncontextrestored",
|
|
232
|
+
"oncopy",
|
|
233
|
+
"oncuechange",
|
|
234
|
+
"oncut",
|
|
235
|
+
"ondblclick",
|
|
236
|
+
"ondrag",
|
|
237
|
+
"ondragend",
|
|
238
|
+
"ondragenter",
|
|
239
|
+
"ondragleave",
|
|
240
|
+
"ondragover",
|
|
241
|
+
"ondragstart",
|
|
242
|
+
"ondrop",
|
|
243
|
+
"ondurationchange",
|
|
244
|
+
"onemptied",
|
|
245
|
+
"onended",
|
|
246
|
+
"onerror",
|
|
247
|
+
"onfocus",
|
|
248
|
+
"onformdata",
|
|
249
|
+
"oninput",
|
|
250
|
+
"oninvalid",
|
|
251
|
+
"onkeydown",
|
|
252
|
+
"onkeypress",
|
|
253
|
+
"onkeyup",
|
|
254
|
+
"onload",
|
|
255
|
+
"onloadeddata",
|
|
256
|
+
"onloadedmetadata",
|
|
257
|
+
"onloadstart",
|
|
258
|
+
"onmousedown",
|
|
259
|
+
"onmouseenter",
|
|
260
|
+
"onmouseleave",
|
|
261
|
+
"onmousemove",
|
|
262
|
+
"onmouseout",
|
|
263
|
+
"onmouseover",
|
|
264
|
+
"onmouseup",
|
|
265
|
+
"onpaste",
|
|
266
|
+
"onpause",
|
|
267
|
+
"onplay",
|
|
268
|
+
"onplaying",
|
|
269
|
+
"onprogress",
|
|
270
|
+
"onratechange",
|
|
271
|
+
"onreset",
|
|
272
|
+
"onresize",
|
|
273
|
+
"onscroll",
|
|
274
|
+
"onscrollend",
|
|
275
|
+
"onsecuritypolicyviolation",
|
|
276
|
+
"onseeked",
|
|
277
|
+
"onseeking",
|
|
278
|
+
"onselect",
|
|
279
|
+
"onslotchange",
|
|
280
|
+
"onstalled",
|
|
281
|
+
"onsubmit",
|
|
282
|
+
"onsuspend",
|
|
283
|
+
"ontimeupdate",
|
|
284
|
+
"ontoggle",
|
|
285
|
+
"onvolumechange",
|
|
286
|
+
"onwaiting",
|
|
287
|
+
"onwheel"
|
|
216
288
|
]);
|
|
217
289
|
|
|
218
290
|
// src/helpers/content-attributes.ts
|
|
@@ -226,7 +298,11 @@ var contentAttributes = (global, specific) => {
|
|
|
226
298
|
const specificAttributes = new Set(specific);
|
|
227
299
|
return {
|
|
228
300
|
has(name) {
|
|
229
|
-
|
|
301
|
+
const key = name.toLowerCase();
|
|
302
|
+
if (key.startsWith("data-")) {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
return globalAttributes.has(key) || specificAttributes.has(key);
|
|
230
306
|
}
|
|
231
307
|
};
|
|
232
308
|
};
|