-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChildNode.cljs
60 lines (43 loc) · 1.79 KB
/
ChildNode.cljs
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(ns web.ChildNode
"The ChildNode interface contains methods that are particular
`web.Node` objects that can have a parent."
(:refer-clojure :exclude [remove]))
(defn remove
"Method.
The ChildNode.remove() method removes the object from the tree
belongs to.
`node.remove();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove`"
[this ]
(-> this (.remove)))
(defn before
"Method.
The ChildNode.before() method inserts a set of `web.Node` or
objects in the children list of this ChildNode's parent, just
this ChildNode. `web.dom.DOMString` objects are inserted as equivalent
nodes.
`[Throws, Unscopable]
void ChildNode.before((Node or DOMString)... nodes);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/before`"
[this & args]
(-> this .-before (.apply this (clj->js args))))
(defn after
"Method.
The ChildNode.after() method inserts a set of `web.Node` or `web.dom.DOMString`
in the children list of this ChildNode's parent, just after this
`web.dom.DOMString` objects are inserted as equivalent `web.Text`
`[Throws, Unscopable]
void ChildNode.after((Node or DOMString)... nodes);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/after`"
[this & args]
(-> this .-after (.apply this (clj->js args))))
(defn replace-with
"Method.
The ChildNode.replaceWith() method replaces this ChildNode in
children list of its parent with a set of `web.Node` or `web.dom.DOMString`
`web.dom.DOMString` objects are inserted as equivalent `web.Text`
`[Throws, Unscopable]
void ChildNode.replaceWith((Node or DOMString)... nodes);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/replaceWith`"
[this & args]
(-> this .-replaceWith (.apply this (clj->js args))))