fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smartxml: DocumentElement.parents
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
5ad3010
..
9a402cf
100644
(file)
--- a/
src/smartxml/smartxml.js
+++ b/
src/smartxml/smartxml.js
@@
-45,6
+45,15
@@
$.extend(DocumentNode.prototype, {
return null;
},
return null;
},
+ parents: function() {
+ var parent = this.parent(),
+ parents = parent ? parent.parents() : [];
+ if(parent) {
+ parents.unshift(parent);
+ }
+ return parents;
+ },
+
after: function(node) {
var insertion = this.getNodeInsertion(node);
this._$.after(insertion.ofNode.nativeNode);
after: function(node) {
var insertion = this.getNodeInsertion(node);
this._$.after(insertion.ofNode.nativeNode);