Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Merge pull request #342 from webcomponents/removeAttribute-logic
Browse files Browse the repository at this point in the history
Use the same logic as setAttribute for removeAttribute
  • Loading branch information
dfreedm committed May 3, 2019
2 parents a73f393 + 6589182 commit d432db9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/patches/Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ export const ElementPatches = utils.getOwnPropertyDescriptors({
* @param {string} attr
*/
removeAttribute(attr) {
if (!scopeClassAttribute(this, attr, '')) {
if (this.ownerDocument !== doc) {
this[utils.NATIVE_PREFIX + 'removeAttribute'](attr);
} else if (!scopeClassAttribute(this, attr, '')) {
this[utils.NATIVE_PREFIX + 'removeAttribute'](attr);
distributeAttributeChange(this, attr);
}
Expand Down

0 comments on commit d432db9

Please sign in to comment.