Skip to content

Commit cb3fb01

Browse files
committed
Revert "Put common aliases in Map/Set instead of switch over strings (#26551)"
This reverts commit c155796.
1 parent 5f06848 commit cb3fb01

File tree

5 files changed

+1446
-491
lines changed

5 files changed

+1446
-491
lines changed

packages/react-dom-bindings/src/client/DOMPropertyOperations.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -140,33 +140,6 @@ export function setValueForAttribute(
140140
}
141141
}
142142

143-
export function setValueForKnownAttribute(
144-
node: Element,
145-
name: string,
146-
value: mixed,
147-
) {
148-
if (value === null) {
149-
node.removeAttribute(name);
150-
return;
151-
}
152-
switch (typeof value) {
153-
case 'undefined':
154-
case 'function':
155-
case 'symbol':
156-
case 'boolean': {
157-
node.removeAttribute(name);
158-
return;
159-
}
160-
}
161-
if (__DEV__) {
162-
checkAttributeStringCoercion(value, name);
163-
}
164-
node.setAttribute(
165-
name,
166-
enableTrustedTypesIntegration ? (value: any) : '' + (value: any),
167-
);
168-
}
169-
170143
export function setValueForNamespacedAttribute(
171144
node: Element,
172145
namespace: string,

0 commit comments

Comments
 (0)