@@ -35,7 +35,9 @@ const supportedSinks = ['src']
35
35
// Store the original methods so we can call them without any side effects
36
36
const defaultElementMethods = {
37
37
setAttribute : HTMLElement . prototype . setAttribute ,
38
+ setAttributeNS : HTMLElement . prototype . setAttributeNS ,
38
39
getAttribute : HTMLElement . prototype . getAttribute ,
40
+ getAttributeNS : HTMLElement . prototype . getAttributeNS ,
39
41
removeAttribute : HTMLElement . prototype . removeAttribute ,
40
42
remove : HTMLElement . prototype . remove ,
41
43
removeChild : HTMLElement . prototype . removeChild
@@ -259,6 +261,13 @@ class DDGRuntimeChecks extends HTMLElement {
259
261
return this . _callMethod ( 'getAttribute' , name , value )
260
262
}
261
263
264
+ getAttributeNS ( namespace , name , value ) {
265
+ if ( namespace ) {
266
+ return this . _callMethod ( 'getAttributeNS' , namespace , name , value )
267
+ }
268
+ return Reflect . apply ( DDGRuntimeChecks . prototype . getAttribute , this , [ name , value ] )
269
+ }
270
+
262
271
setAttribute ( name , value ) {
263
272
if ( shouldFilterKey ( this . #tagName, 'attribute' , name ) ) return
264
273
if ( supportedSinks . includes ( name ) ) {
@@ -268,6 +277,13 @@ class DDGRuntimeChecks extends HTMLElement {
268
277
return this . _callMethod ( 'setAttribute' , name , value )
269
278
}
270
279
280
+ setAttributeNS ( namespace , name , value ) {
281
+ if ( namespace ) {
282
+ return this . _callMethod ( 'setAttributeNS' , namespace , name , value )
283
+ }
284
+ return Reflect . apply ( DDGRuntimeChecks . prototype . setAttribute , this , [ name , value ] )
285
+ }
286
+
271
287
removeAttribute ( name ) {
272
288
if ( shouldFilterKey ( this . #tagName, 'attribute' , name ) ) return
273
289
if ( supportedSinks . includes ( name ) ) {
0 commit comments