changing wlxml.WLXMLElementNode.getMEtaAttributes api
[fnpeditor.git] / src / wlxml / wlxml.js
index bdf7527..3195efa 100644 (file)
@@ -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);
 
@@ -22,18 +22,20 @@ $.extend(WLXMLElementNode.prototype, smartxml.ElementNode.prototype, {
         return this.getAttr('class');
     },
     getMetaAttributes: function() {
-        var toret = {};
+        var toret = [];
         this.getAttrs().forEach(function(attr) {
-            if(isMetaAttribute(attr.name))
-                meta[attr.name.substr(5)] = attr.value;
+            if(isMetaAttribute(attr.name)) {
+                toret.push({name: attr.name.substr(5), value: 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;
     }