mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-28 17:40:07 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
934cae33f3
commit
8afe54e69e
@ -1808,17 +1808,11 @@ var Outline = {
|
||||
&& (res[attr] = true) }
|
||||
return res }, {})),
|
||||
...(deep ?
|
||||
//{children: this.json(elem)}
|
||||
{children: [...elem.lastChild.children]
|
||||
.map(function(elem){
|
||||
return that.data(elem) })}
|
||||
{children: this.data([...elem.lastChild.children])}
|
||||
: {}),
|
||||
} },
|
||||
// XXX do we need both this and data???
|
||||
// ...the only differences are:
|
||||
// - the default behavior node vs all
|
||||
// - .json() always returns an array
|
||||
// XXX should this always return a list???
|
||||
// Same as .data(..) but by default returns the root nodes.
|
||||
// NOTE: this always returns an array
|
||||
json: function(node='all'){
|
||||
return [this.data(...(
|
||||
arguments.length == 0 ?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user