Skip to content

Commit d64a16b

Browse files
Johnny Zarateljharb
Johnny Zarate
authored andcommitted
Added the missing tagName, link, to support the crossOrigin property.
1 parent a19b2ad commit d64a16b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rules/no-unknown-property.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const DOM_ATTRIBUTE_NAMES = {
2525
};
2626

2727
const ATTRIBUTE_TAGS_MAP = {
28-
crossOrigin: ['script', 'img', 'video']
28+
crossOrigin: ['script', 'img', 'video', 'link']
2929
};
3030

3131
const SVGDOM_ATTRIBUTE_NAMES = {

tests/lib/rules/no-unknown-property.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ ruleTester.run('no-unknown-property', rule, {
8282
errors: [{message: 'Unknown property \'clip-path\' found, use \'clipPath\' instead'}]
8383
}, {
8484
code: '<div crossOrigin />',
85-
errors: [{message: 'Invalid property \'crossOrigin\' found on tag \'div\', but it is only allowed on: script, img, video'}]
85+
errors: [{message: 'Invalid property \'crossOrigin\' found on tag \'div\', but it is only allowed on: script, img, video, link'}]
8686
}]
8787
});

0 commit comments

Comments
 (0)