1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-05 00:08:06 +00:00

Fixes to make SVG and MathML elements work properly

This commit is contained in:
Jeremy Ruston
2013-10-13 20:14:31 +01:00
parent ed35d91be6
commit b0503cf709
4 changed files with 33 additions and 7 deletions

View File

@@ -26,12 +26,13 @@ var TW_TextNode = function(text) {
this.textContent = text;
};
var TW_Element = function(tag) {
var TW_Element = function(tag,namespace) {
bumpSequenceNumber(this);
this.tag = tag;
this.attributes = {};
this.isRaw = false;
this.children = [];
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
};
TW_Element.prototype.setAttribute = function(name,value) {
@@ -160,7 +161,7 @@ var document = {
sequenceNumber = value;
},
createElementNS: function(namespace,tag) {
return new TW_Element(tag);
return new TW_Element(tag,namespace);
},
createElement: function(tag) {
return new TW_Element(tag);