Skip to content

Commit 1bdd345

Browse files
Correct issue #53
1 parent 00ce833 commit 1bdd345

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/util/tags.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ function isTransition(name) {
127127
}
128128

129129
function isHtmlAttribute(value) {
130-
return ["id", "class", "role", "style"].includes(value) || value.startsWith("data-") || value.startsWith("aria-");
130+
return (
131+
["id", "class", "role", "style"].includes(value) ||
132+
value.startsWith("data-") ||
133+
value.startsWith("aria-") ||
134+
value.startsWith("on")
135+
);
131136
}
132137

133138
export { isHtmlTag, isHtmlAttribute, isTransition };

tests/unit/util/tags.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ describe("isHtmlAttribute", () => {
2424
["role", true],
2525
["data-whatever", true],
2626
["aria-whatever", true],
27+
["onclick", true],
28+
["onAnything", true],
2729
["style", true],
2830
["notattribute", false],
2931
["href", false],

0 commit comments

Comments
 (0)