1 define(['libs/jquery-1.9.1.min'], function($) {
\r
5 var tagSelector = '[wlxml-tag]';
\r
7 var Node = function(domNode) {
\r
10 id: domNode.attr('id'),
\r
11 tag: domNode.attr('wlxml-tag'),
\r
12 klass: domNode.attr('wlxml-class'),
\r
13 parent: function() {
\r
14 var node = domNode.parent(tagSelector);
\r
16 return new Node(node);
\r
19 children: function() {
\r
21 domNode.children(tagSelector).each(function() {
\r
22 list.push(new Node($(this)));
\r
26 parents: function() {
\r
28 domNode.parents(tagSelector).each(function() {
\r
29 list.push(new Node($(this)));
\r
37 return { Node: Node}
\r