html-standard 0.0.5 → 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.js CHANGED
@@ -192,7 +192,79 @@ var globalAttributes = /* @__PURE__ */ new Set([
192
192
  "slot",
193
193
  "xmlns",
194
194
  "xml:lang",
195
- "xml:space"
195
+ "xml:space",
196
+ // event handlers
197
+ "onauxclick",
198
+ "onbeforeinput",
199
+ "onbeforematch",
200
+ "onbeforetoggle",
201
+ "onblur",
202
+ "oncancel",
203
+ "oncanplay",
204
+ "oncanplaythrough",
205
+ "onchange",
206
+ "onclick",
207
+ "onclose",
208
+ "oncommand",
209
+ "oncontextlost",
210
+ "oncontextmenu",
211
+ "oncontextrestored",
212
+ "oncopy",
213
+ "oncuechange",
214
+ "oncut",
215
+ "ondblclick",
216
+ "ondrag",
217
+ "ondragend",
218
+ "ondragenter",
219
+ "ondragleave",
220
+ "ondragover",
221
+ "ondragstart",
222
+ "ondrop",
223
+ "ondurationchange",
224
+ "onemptied",
225
+ "onended",
226
+ "onerror",
227
+ "onfocus",
228
+ "onformdata",
229
+ "oninput",
230
+ "oninvalid",
231
+ "onkeydown",
232
+ "onkeypress",
233
+ "onkeyup",
234
+ "onload",
235
+ "onloadeddata",
236
+ "onloadedmetadata",
237
+ "onloadstart",
238
+ "onmousedown",
239
+ "onmouseenter",
240
+ "onmouseleave",
241
+ "onmousemove",
242
+ "onmouseout",
243
+ "onmouseover",
244
+ "onmouseup",
245
+ "onpaste",
246
+ "onpause",
247
+ "onplay",
248
+ "onplaying",
249
+ "onprogress",
250
+ "onratechange",
251
+ "onreset",
252
+ "onresize",
253
+ "onscroll",
254
+ "onscrollend",
255
+ "onsecuritypolicyviolation",
256
+ "onseeked",
257
+ "onseeking",
258
+ "onselect",
259
+ "onslotchange",
260
+ "onstalled",
261
+ "onsubmit",
262
+ "onsuspend",
263
+ "ontimeupdate",
264
+ "ontoggle",
265
+ "onvolumechange",
266
+ "onwaiting",
267
+ "onwheel"
196
268
  ]);
197
269
 
198
270
  // src/helpers/content-attributes.ts
@@ -206,7 +278,11 @@ var contentAttributes = (global, specific) => {
206
278
  const specificAttributes = new Set(specific);
207
279
  return {
208
280
  has(name) {
209
- return globalAttributes.has(name) || specificAttributes.has(name);
281
+ const key = name.toLowerCase();
282
+ if (key.startsWith("data-")) {
283
+ return true;
284
+ }
285
+ return globalAttributes.has(key) || specificAttributes.has(key);
210
286
  }
211
287
  };
212
288
  };