File: node.xml

package info (click to toggle)
datatables.js 1.10.21%2Bdfsg-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,604 kB
  • sloc: javascript: 64,254; xml: 10,441; php: 4,623; sh: 523; makefile: 21
file content (32 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8" ?>
<dt-type group="js">
	<name>node</name>
	<summary>DOM element</summary>

	<description>
	<![CDATA[

When working with the DOM, as is typical in a web-browser using Javascript(!), you will often assign DOM elements to a variable - we define this as a `node` for ease of reference. For example:

```js
var node = document.getElementById('example');
```

Or with jQuery:

```js
var node = $('#example').get(0);
```

Technically this is an `dt-type object` primitive, but defining such objects as a `node` allows the documentation to be much more succinct.


## Use in DataTables

Where a parameter is shown as accepting a node type, or a method returning a node type, it indicates that an object is expect / returned which refers to a DOM element.

Note that `node` refers to the native DOM element, not a jQuery object containing the element. Many DataTables methods will accept both a `node` and a `dt-type jQuery` instance, but this isn't always the case, particularly when considering returned values.

	]]>
	</description>
</dt-type>