From: Aleksander Ɓukasz Date: Thu, 10 Oct 2013 13:40:00 +0000 (+0200) Subject: smartxml: allow for setting metadata on nodes X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/dab8e2daf3587e367922dd59c94999e565faeec0?ds=sidebyside smartxml: allow for setting metadata on nodes --- diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index bac53af..034b907 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -54,6 +54,13 @@ var ElementNode = function(nativeNode, document) { $.extend(ElementNode.prototype, DocumentNode.prototype, { nodeType: Node.ELEMENT_NODE, + setData: function(key, value) { + this._$.data(key, value); + }, + getData: function(key) { + return this._$.data(key); + }, + getTagName: function() { return this.nativeNode.tagName.toLowerCase(); },