cubicweb.js — CubicWeb 3.11.0

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.11.0 »
- Web side development »
- Javascript »
- <no title> »

# cubicweb.js

`cubicweb.js.` `jqNode`(node)

safe version of jQuery(‘#nodeid’) because we use ‘:’ in nodeids which messes with jQuery selection mechanism

`cubicweb.js.` `toISOTimestamp`(date)

`cubicweb.js.` `nodeWalkDepthFirst`(node, visitor)

depth-first implementation of the nodeWalk function found in MochiKit.Base

`cubicweb.js.` `formContents`(elem /* = document.body */)

this implementation comes from MochiKit

`cubicweb.js.` `sliceList`(lst, start, stop, step)

returns a subslice of lst using start/stop/step start, stop might be negative

    >>> sliceList(['a', 'b', 'c', 'd', 'e', 'f'], 2)
    ['c', 'd', 'e', 'f']
    >>> sliceList(['a', 'b', 'c', 'd', 'e', 'f'], 2, -2)
    ['c', 'd']
    >>> sliceList(['a', 'b', 'c', 'd', 'e', 'f'], -3)
    ['d', 'e', 'f']

`cubicweb.js.` `difference`(lst1, lst2)

returns a list containing all elements in lst1 that are not in lst2.

`cubicweb.js.` `domid`(string)

return a valid DOM id from a string (should also be usable in jQuery search expression...). This is the javascript implementation of `cubicweb.uilib.domid()`.

`cubicweb.js.` `strFuncCall`(fname, *args)

return a string suitable to call the fname javascript function with the given arguments (which should be correctly typed).. This is providing javascript implementation equivalent to `cubicweb.uilib.js()`.

DOM factories *******************************************************

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.11.0 »
- Web side development »
- Javascript »
- <no title> »