'use strict';
+/* globals Node */
+
// utils
var isMetaAttribute = function(attrName) {
_.keys(methods).concat(_.keys(transformations)).forEach(function(key) {
instance.object[key] = _.bind(instance.object[key], instance);
});
-}
+};
var WLXMLElementNode = function(nativeNode, document) {
smartxml.ElementNode.call(this, nativeNode, document);
return this.getAttr('class') || '';
},
setClass: function(klass) {
- var methods, object;
if(klass !== this.klass) {
installObject(this, klass);
return this.setAttr('class', klass);
var WLXMLDocumentNode = function() {
smartxml.DocumentNode.apply(this, arguments);
-}
+};
WLXMLDocumentNode.prototype = Object.create(smartxml.DocumentNode.prototype);
var WLXMLDocument = function(xml, options) {
}
//}
}
-
+ /* globals document */
el.replaceWith(document.createTextNode(text.transformed));
});
this.trigger('contentSet');
thisClassTransformations[Transformation.prototype.name] = function(args) {
var nodeInstance = this;
return nodeInstance.transform(Transformation, args);
- }
+ };
},
registerClassMethod: function(methodName, method, className) {
var name = pair[0],
desc = pair[1];
doc.registerClassTransformation(transformations.createContextTransformation(desc, name), className);
- });
+ });
});
}