Last active
December 16, 2015 05:19
-
-
Save bmatusiak/5383164 to your computer and use it in GitHub Desktop.
Uncaught TypeError: undefined is not a function apf_release.js:15360
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.$createNode = function(doc, nodeType, xmlNode, namespaceURI, nodeName, nodeValue){ | |
var o; | |
switch (nodeType) { | |
case 1: | |
var id, prefix; | |
if (xmlNode) { | |
if ((namespaceURI = xmlNode.namespaceURI || apf.ns.xhtml) | |
&& !(prefix = doc.$prefixes[namespaceURI])) { | |
doc.$prefixes[prefix = xmlNode.prefix || xmlNode.scopeName || ""] = namespaceURI; | |
doc.$namespaceURIs[namespaceURI] = prefix; | |
if (!doc.namespaceURI && !prefix) { | |
doc.namespaceURI = namespaceURI; | |
doc.prefix = prefix; | |
} | |
} | |
nodeName = xmlNode.baseName || xmlNode.localName || xmlNode.tagName.split(":").pop(); | |
} | |
else { | |
prefix = doc.$prefixes[namespaceURI] || ""; | |
} | |
var els = apf.namespaces[namespaceURI].elements; | |
try{ | |
o = new (els[nodeName] || els["@default"])(null, nodeName); | |
}catch(e){ | |
console.error(nodeName,e) | |
break; | |
} | |
o.prefix = prefix || ""; | |
o.namespaceURI = namespaceURI; | |
o.tagName = prefix ? prefix + ":" + nodeName : nodeName; | |
if (xmlNode) { | |
if ((id = xmlNode.getAttribute("id")) && !self[id]) | |
o.$propHandlers["id"].call(o, o.id = id); | |
//attributes | |
var attr = xmlNode.attributes, n; | |
for (var a, na, i = 0, l = attr.length; i < l; i++) { | |
o.attributes.push(na = new apf.AmlAttr(o, | |
(n = (a = attr[i]).nodeName), a.nodeValue)); | |
if (n == "render") | |
o.render = true; | |
else | |
if (n.substr(0, 2) == "on") | |
na.$triggerUpdate(); | |
} | |
} | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.$createNode = function(doc, nodeType, xmlNode, namespaceURI, nodeName, nodeValue){ | |
var o; | |
switch (nodeType) { | |
case 1: | |
var id, prefix; | |
if (xmlNode) { | |
if ((namespaceURI = xmlNode.namespaceURI || apf.ns.xhtml) | |
&& !(prefix = doc.$prefixes[namespaceURI])) { | |
doc.$prefixes[prefix = xmlNode.prefix || xmlNode.scopeName || ""] = namespaceURI; | |
doc.$namespaceURIs[namespaceURI] = prefix; | |
if (!doc.namespaceURI && !prefix) { | |
doc.namespaceURI = namespaceURI; | |
doc.prefix = prefix; | |
} | |
} | |
nodeName = xmlNode.baseName || xmlNode.localName || xmlNode.tagName.split(":").pop(); | |
} | |
else { | |
prefix = doc.$prefixes[namespaceURI] || ""; | |
} | |
var els = apf.namespaces[namespaceURI].elements; | |
o = new (els[nodeName] || els["@default"])(null, nodeName); | |
o.prefix = prefix || ""; | |
o.namespaceURI = namespaceURI; | |
o.tagName = prefix ? prefix + ":" + nodeName : nodeName; | |
if (xmlNode) { | |
if ((id = xmlNode.getAttribute("id")) && !self[id]) | |
o.$propHandlers["id"].call(o, o.id = id); | |
//attributes | |
var attr = xmlNode.attributes, n; | |
for (var a, na, i = 0, l = attr.length; i < l; i++) { | |
o.attributes.push(na = new apf.AmlAttr(o, | |
(n = (a = attr[i]).nodeName), a.nodeValue)); | |
if (n == "render") | |
o.render = true; | |
else | |
if (n.substr(0, 2) == "on") | |
na.$triggerUpdate(); | |
} | |
} | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment