@@ -284,9 +284,9 @@ const attributeSetterData = [
284
284
{
285
285
api :"Attr.value" ,
286
286
acceptNS : true ,
287
- acceptTrustedTypeArgumentInIDL : false ,
288
- runSetter : function ( element , attrNS , attrName , attrValue , type ) {
289
- element . setAttributeNS ( attrNS , attrName , createTrustedOutput ( type , "" ) ) ;
287
+ acceptTrustedTypeArgumentInIDL : false ,
288
+ runSetter : function ( element , attrNS , attrName , attrValue , type , initialAttrValue = "" ) {
289
+ element . setAttributeNS ( attrNS , attrName , createTrustedOutput ( type , initialAttrValue ) ) ;
290
290
this . lastAttributeNode = findAttribute ( element , attrNS , attrName ) ;
291
291
assert_true ( ! ! this . lastAttributeNode ) ;
292
292
return ( this . lastAttributeNode . value = attrValue ) ;
@@ -296,8 +296,8 @@ const attributeSetterData = [
296
296
api : "Node.nodeValue" ,
297
297
acceptNS : true ,
298
298
acceptTrustedTypeArgumentInIDL : false ,
299
- runSetter : function ( element , attrNS , attrName , attrValue , type ) {
300
- element . setAttributeNS ( attrNS , attrName , createTrustedOutput ( type , "" ) ) ;
299
+ runSetter : function ( element , attrNS , attrName , attrValue , type , initialAttrValue = "" ) {
300
+ element . setAttributeNS ( attrNS , attrName , createTrustedOutput ( type , initialAttrValue ) ) ;
301
301
this . lastAttributeNode = findAttribute ( element , attrNS , attrName ) ;
302
302
assert_true ( ! ! this . lastAttributeNode ) ;
303
303
return ( this . lastAttributeNode . nodeValue = attrValue ) ;
@@ -307,8 +307,8 @@ const attributeSetterData = [
307
307
api : "Node.textContent" ,
308
308
acceptNS : true ,
309
309
acceptTrustedTypeArgumentInIDL : false ,
310
- runSetter : function ( element , attrNS , attrName , attrValue , type ) {
311
- element . setAttributeNS ( attrNS , attrName , createTrustedOutput ( type , "" ) ) ;
310
+ runSetter : function ( element , attrNS , attrName , attrValue , type , initialAttrValue = "" ) {
311
+ element . setAttributeNS ( attrNS , attrName , createTrustedOutput ( type , initialAttrValue ) ) ;
312
312
this . lastAttributeNode = findAttribute ( element , attrNS , attrName ) ;
313
313
assert_true ( ! ! this . lastAttributeNode ) ;
314
314
return ( this . lastAttributeNode . textContent = attrValue ) ;
0 commit comments