Skip to content

Commit 9ff3ce6

Browse files
awearygaearon
authored andcommitted
Add noModule boolean attribute (#11900)
1 parent faa4218 commit 9ff3ce6

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

fixtures/attribute-behavior/AttributeTableSnapshot.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7173,6 +7173,31 @@
71737173
| `nonce=(null)`| (initial)| `<null>` |
71747174
| `nonce=(undefined)`| (initial)| `<null>` |
71757175

7176+
## `noModule` (on `<script>` inside `<div>`)
7177+
| Test Case | Flags | Result |
7178+
| --- | --- | --- |
7179+
| `noModule=(string)`| (changed)| `<boolean: true>` |
7180+
| `noModule=(empty string)`| (initial)| `<boolean: false>` |
7181+
| `noModule=(array with string)`| (changed)| `<boolean: true>` |
7182+
| `noModule=(empty array)`| (changed)| `<boolean: true>` |
7183+
| `noModule=(object)`| (changed)| `<boolean: true>` |
7184+
| `noModule=(numeric string)`| (changed)| `<boolean: true>` |
7185+
| `noModule=(-1)`| (changed)| `<boolean: true>` |
7186+
| `noModule=(0)`| (initial)| `<boolean: false>` |
7187+
| `noModule=(integer)`| (changed)| `<boolean: true>` |
7188+
| `noModule=(NaN)`| (initial, warning)| `<boolean: false>` |
7189+
| `noModule=(float)`| (changed)| `<boolean: true>` |
7190+
| `noModule=(true)`| (changed)| `<boolean: true>` |
7191+
| `noModule=(false)`| (initial)| `<boolean: false>` |
7192+
| `noModule=(string 'true')`| (changed)| `<boolean: true>` |
7193+
| `noModule=(string 'false')`| (changed)| `<boolean: true>` |
7194+
| `noModule=(string 'on')`| (changed)| `<boolean: true>` |
7195+
| `noModule=(string 'off')`| (changed)| `<boolean: true>` |
7196+
| `noModule=(symbol)`| (initial, warning)| `<boolean: false>` |
7197+
| `noModule=(function)`| (initial, warning)| `<boolean: false>` |
7198+
| `noModule=(null)`| (initial)| `<boolean: false>` |
7199+
| `noModule=(undefined)`| (initial)| `<boolean: false>` |
7200+
71767201
## `noValidate` (on `<form>` inside `<div>`)
71777202
| Test Case | Flags | Result |
71787203
| --- | --- | --- |

fixtures/attribute-behavior/src/attributes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,7 @@ const attributes = [
12221222
tagName: 'color-profile',
12231223
read: getSVGAttribute('color-profile'),
12241224
},
1225+
{name: 'noModule', tagName: 'script'},
12251226
{name: 'nonce', read: getAttribute('nonce')},
12261227
{name: 'noValidate', tagName: 'form'},
12271228
{

packages/react-dom/src/shared/DOMProperty.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ new Map([
281281
'formNoValidate',
282282
'hidden',
283283
'loop',
284+
'noModule',
284285
'noValidate',
285286
'open',
286287
'playsInline',

packages/react-dom/src/shared/possibleStandardNames.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const possibleStandardNames = {
106106
multiple: 'multiple',
107107
muted: 'muted',
108108
name: 'name',
109+
nomodule: 'noModule',
109110
nonce: 'nonce',
110111
novalidate: 'noValidate',
111112
open: 'open',

0 commit comments

Comments
 (0)