Skip to content

Commit

Permalink
Revert "Put common aliases in Map/Set instead of switch over strings (#…
Browse files Browse the repository at this point in the history
…26551)"

This reverts commit c155796.
  • Loading branch information
kassens committed Apr 20, 2023
1 parent 039652e commit 7b4bbe6
Show file tree
Hide file tree
Showing 5 changed files with 1,446 additions and 491 deletions.
27 changes: 0 additions & 27 deletions packages/react-dom-bindings/src/client/DOMPropertyOperations.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,33 +140,6 @@ export function setValueForAttribute(
}
}

export function setValueForKnownAttribute(
node: Element,
name: string,
value: mixed,
) {
if (value === null) {
node.removeAttribute(name);
return;
}
switch (typeof value) {
case 'undefined':
case 'function':
case 'symbol':
case 'boolean': {
node.removeAttribute(name);
return;
}
}
if (__DEV__) {
checkAttributeStringCoercion(value, name);
}
node.setAttribute(
name,
enableTrustedTypesIntegration ? (value: any) : '' + (value: any),
);
}

export function setValueForNamespacedAttribute(
node: Element,
namespace: string,
Expand Down
Loading

0 comments on commit 7b4bbe6

Please sign in to comment.