mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:12:43 +00:00 
			
		
		
		
	 e5d45eeeb1
			
		
	
	
		e5d45eeeb1
		
	
	
	
	
		
			
			The main behavioural difference here is that the full qualified name is appended to the element, rather than just the local name and value.
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			891 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			891 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script src="../include.js"></script>
 | |
| <svg xmlns="http://www.w3.org/2000/svg">
 | |
|     <script id="explicit-xlink-href" xlink:href="test"></script>
 | |
|     <script id="implicit-xlink-href" href="test"></script>
 | |
| </svg>
 | |
| <script id="svg-script-element">
 | |
|     function dumpAttribute(elementName) {
 | |
|         println("---------------");
 | |
|         println(elementName);
 | |
|         println("---------------");
 | |
|         const attr = document.getElementById(elementName).attributes[1];
 | |
|         println(`localName -> ${attr.localName}`);
 | |
|         println(`name -> ${attr.name}`);
 | |
|         println(`namespaceURI -> ${attr.namespaceURI}`);
 | |
|         println(`ownerElement -> ${attr.ownerElement.id}`);
 | |
|         println(`prefix -> ${attr.prefix}`);
 | |
|         println(`value -> ${attr.value}`);
 | |
|     }
 | |
| 
 | |
|     test(() => {
 | |
|         dumpAttribute('explicit-xlink-href');
 | |
|         dumpAttribute('implicit-xlink-href');
 | |
|     });
 | |
| </script>
 |