Skip to content

Commit

Permalink
Added the missing tagName, link, to support the crossOrigin property.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnny Zarate authored and ljharb committed Jan 26, 2018
1 parent a19b2ad commit d64a16b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const DOM_ATTRIBUTE_NAMES = {
};

const ATTRIBUTE_TAGS_MAP = {
crossOrigin: ['script', 'img', 'video']
crossOrigin: ['script', 'img', 'video', 'link']
};

const SVGDOM_ATTRIBUTE_NAMES = {
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ ruleTester.run('no-unknown-property', rule, {
errors: [{message: 'Unknown property \'clip-path\' found, use \'clipPath\' instead'}]
}, {
code: '<div crossOrigin />',
errors: [{message: 'Invalid property \'crossOrigin\' found on tag \'div\', but it is only allowed on: script, img, video'}]
errors: [{message: 'Invalid property \'crossOrigin\' found on tag \'div\', but it is only allowed on: script, img, video, link'}]
}]
});

0 comments on commit d64a16b

Please sign in to comment.