fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smartxml: ElementNode.prepend
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
56e78af
..
91dd8bb
100644
(file)
--- a/
src/smartxml/smartxml.js
+++ b/
src/smartxml/smartxml.js
@@
-154,6
+154,11
@@
$.extend(ElementNode.prototype, {
this._$.append(node.nativeNode);
},
this._$.append(node.nativeNode);
},
+ prepend: function(node) {
+ node = node instanceof DocumentNode ? node : this.document.createElementNode(node);
+ this._$.prepend(node.nativeNode);
+ },
+
unwrapContent: function() {
var parent = this.parent();
if(!parent) {
unwrapContent: function() {
var parent = this.parent();
if(!parent) {