Skip to content

Commit

Permalink
Add noModule boolean attribute (facebook#11900)
Browse files Browse the repository at this point in the history
  • Loading branch information
aweary authored and yenshih committed Jan 6, 2018
1 parent 2730d2b commit cda18d4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions fixtures/attribute-behavior/AttributeTableSnapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -7173,6 +7173,31 @@
| `nonce=(null)`| (initial)| `<null>` |
| `nonce=(undefined)`| (initial)| `<null>` |

## `noModule` (on `<script>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
| `noModule=(string)`| (changed)| `<boolean: true>` |
| `noModule=(empty string)`| (initial)| `<boolean: false>` |
| `noModule=(array with string)`| (changed)| `<boolean: true>` |
| `noModule=(empty array)`| (changed)| `<boolean: true>` |
| `noModule=(object)`| (changed)| `<boolean: true>` |
| `noModule=(numeric string)`| (changed)| `<boolean: true>` |
| `noModule=(-1)`| (changed)| `<boolean: true>` |
| `noModule=(0)`| (initial)| `<boolean: false>` |
| `noModule=(integer)`| (changed)| `<boolean: true>` |
| `noModule=(NaN)`| (initial, warning)| `<boolean: false>` |
| `noModule=(float)`| (changed)| `<boolean: true>` |
| `noModule=(true)`| (changed)| `<boolean: true>` |
| `noModule=(false)`| (initial)| `<boolean: false>` |
| `noModule=(string 'true')`| (changed)| `<boolean: true>` |
| `noModule=(string 'false')`| (changed)| `<boolean: true>` |
| `noModule=(string 'on')`| (changed)| `<boolean: true>` |
| `noModule=(string 'off')`| (changed)| `<boolean: true>` |
| `noModule=(symbol)`| (initial, warning)| `<boolean: false>` |
| `noModule=(function)`| (initial, warning)| `<boolean: false>` |
| `noModule=(null)`| (initial)| `<boolean: false>` |
| `noModule=(undefined)`| (initial)| `<boolean: false>` |

## `noValidate` (on `<form>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
Expand Down
1 change: 1 addition & 0 deletions fixtures/attribute-behavior/src/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,7 @@ const attributes = [
tagName: 'color-profile',
read: getSVGAttribute('color-profile'),
},
{name: 'noModule', tagName: 'script'},
{name: 'nonce', read: getAttribute('nonce')},
{name: 'noValidate', tagName: 'form'},
{
Expand Down
1 change: 1 addition & 0 deletions packages/react-dom/src/shared/DOMProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ new Map([
'formNoValidate',
'hidden',
'loop',
'noModule',
'noValidate',
'open',
'playsInline',
Expand Down
1 change: 1 addition & 0 deletions packages/react-dom/src/shared/possibleStandardNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const possibleStandardNames = {
multiple: 'multiple',
muted: 'muted',
name: 'name',
nomodule: 'noModule',
nonce: 'nonce',
novalidate: 'noValidate',
open: 'open',
Expand Down

0 comments on commit cda18d4

Please sign in to comment.