X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/81f3c62162311a0c697007389567e79aae9e597f..921b131224a4b6210b8631c5ab7926304bcf3069:/src/wlxml/wlxml.js?ds=inline diff --git a/src/wlxml/wlxml.js b/src/wlxml/wlxml.js index bdf7527..1619e57 100644 --- a/src/wlxml/wlxml.js +++ b/src/wlxml/wlxml.js @@ -12,8 +12,8 @@ var isMetaAttribute = function(attrName) { // -var WLXMLElementNode = function(nativeNode) { - smartxml.ElementNode.call(this, nativeNode); +var WLXMLElementNode = function(nativeNode, document) { + smartxml.ElementNode.call(this, nativeNode, document); }; WLXMLElementNode.prototype = Object.create(smartxml.ElementNode.prototype); @@ -24,16 +24,18 @@ $.extend(WLXMLElementNode.prototype, smartxml.ElementNode.prototype, { getMetaAttributes: function() { var toret = {}; this.getAttrs().forEach(function(attr) { - if(isMetaAttribute(attr.name)) - meta[attr.name.substr(5)] = attr.value; + if(isMetaAttribute(attr.name)) { + toret[attr.name.substr(5)] = attr.value; + } }); return toret; }, getOtherAttributes: function() { var toret = {}; this.getAttrs().forEach(function(attr) { - if(attr.name != 'class' && !isMetaAttribute(attr.name)) + if(attr.name !== 'class' && !isMetaAttribute(attr.name)) { toret[attr.name] = attr.value; + } }); return toret; }