fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wip: lists + uri extensions
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
712c0ad
..
fc9715b
100644
(file)
--- a/
src/smartxml/smartxml.js
+++ b/
src/smartxml/smartxml.js
@@
-242,12
+242,18
@@
$.extend(ElementNode.prototype, {
return this.nativeNode.tagName.toLowerCase();
},
return this.nativeNode.tagName.toLowerCase();
},
- contents: function() {
+ contents: function(
selector
) {
var toret = [],
document = this.document;
var toret = [],
document = this.document;
- this._$.contents().each(function() {
- toret.push(document.createDocumentNode(this));
- });
+ if(selector) {
+ this._$.children(selector).each(function() {
+ toret.push(document.createDocumentNode(this));
+ });
+ } else {
+ this._$.contents().each(function() {
+ toret.push(document.createDocumentNode(this));
+ });
+ }
return toret;
},
return toret;
},