mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +00:00 
			
		
		
		
	Merge pull request #769 from buggyj/xlink2
added support for xlink: attribute prefix
This commit is contained in:
		| @@ -263,9 +263,15 @@ Widget.prototype.assignAttributes = function(domNode,options) { | |||||||
| 			v = undefined; | 			v = undefined; | ||||||
| 		} | 		} | ||||||
| 		if(v !== undefined) { | 		if(v !== undefined) { | ||||||
|  | 			var b = a.split(":"); | ||||||
| 			// Setting certain attributes can cause a DOM error (eg xmlns on the svg element) | 			// Setting certain attributes can cause a DOM error (eg xmlns on the svg element) | ||||||
| 			try { | 			try { | ||||||
|  | 				if (b.length == 2 && b[0] == "xlink"){ | ||||||
|  | 					domNode.setAttributeNS("http://www.w3.org/1999/xlink",b[1],v); | ||||||
|  | 				} | ||||||
|  | 				else { | ||||||
| 					domNode.setAttributeNS(null,a,v); | 					domNode.setAttributeNS(null,a,v); | ||||||
|  | 				} | ||||||
| 			} catch(e) { | 			} catch(e) { | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston