We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d4e819 commit 6c5f31aCopy full SHA for 6c5f31a
dom-element.js
@@ -128,13 +128,10 @@ DOMElement.prototype.getAttributeNS =
128
129
DOMElement.prototype.removeAttributeNS =
130
function _Element_removeAttributeNS(namespace, name) {
131
- var forbiddenKeys = ['__proto__', 'constructor', 'prototype'];
132
- if (forbiddenKeys.includes(name)) {
133
- return; // Ignore dangerous keys
134
- }
+ // Safely access and delete the attribute
135
var attributes = this._attributes[namespace];
136
- if (attributes) {
137
- delete attributes[name]
+ if (attributes && Object.prototype.hasOwnProperty.call(attributes, name)) {
+ delete attributes[name];
138
}
139
140
0 commit comments