Skip to content

Commit

Permalink
Rix HTMLElement.removeAttributeNode support for IE11.
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorKarjanis committed Feb 17, 2022
1 parent 87828bc commit 0b238da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client/sandbox/node/element.ts
Expand Up @@ -452,8 +452,9 @@ export default class ElementSandbox extends SandboxBase {

if (formatedAttr !== 'autocomplete') {
if (isNode) {
const original = nativeMethods.getAttributeNodeNS.call(el, node.namespaceURI, node.name);
result = nativeMethods.removeAttributeNode.apply(el, [original].concat(Array.from(args).slice(1)));
const removeArgs = [nativeMethods.getAttributeNodeNS.call(el, node.namespaceURI, node.name)];
for (let i = 1, ilen = args.length; i < ilen; ++i) removeArgs.push(args[i]);
result = nativeMethods.removeAttributeNode.apply(el, removeArgs);
}
else {
const removeAttrFunc = isNs ? nativeMethods.removeAttributeNS : nativeMethods.removeAttribute;
Expand Down

0 comments on commit 0b238da

Please sign in to comment.