diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af53fd728..1a333bf811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`no-unknown-property`]: `controlsList`, not `controlList` ([#3397][] @ljharb) * [`no-unknown-property`]: add more capture event properties ([#3402][] @sjarva) * [`no-unknown-property`]: Add more one word properties found in DefinitelyTyped's react/index.d.ts ([#3402][] @sjarva) +* [`no-unknown-property`]: Mark onLoad/onError as supported on iframes ([#3398][] @maiis, [#3406][] @akx) +[#3406]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3406 [#3402]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3402 +[#3398]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3398 [#3397]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3397 [#3396]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3396 [#3394]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3394 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index b3850ddd87..6af662d1ed 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -68,8 +68,8 @@ const ATTRIBUTE_TAGS_MAP = { onEmptied: ['audio', 'video'], onEncrypted: ['audio', 'video'], onEnded: ['audio', 'video'], - onError: ['audio', 'video', 'img', 'link', 'source', 'script'], - onLoad: ['script', 'img', 'link'], + onError: ['audio', 'video', 'img', 'link', 'source', 'script', 'picture', 'iframe'], + onLoad: ['script', 'img', 'link', 'picture', 'iframe'], onLoadedData: ['audio', 'video'], onLoadedMetadata: ['audio', 'video'], onLoadStart: ['audio', 'video'], diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index c713ec9239..d2f3993236 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -50,7 +50,7 @@ ruleTester.run('no-unknown-property', rule, { { code: '' }, { code: '' }, { code: '
' }, - { code: '