@@ -41,34 +41,39 @@ func (w nodeWrapper) initializePrototype(prototype *g.Object, vm *g.Runtime) {
41
41
}
42
42
43
43
func (w nodeWrapper ) getRootNode (c g.FunctionCall ) g.Value {
44
+ log .Debug (w .logger (c ), "V8 Function call: Node.getRootNode" )
44
45
instance := w .getInstance (c )
45
46
options := w .decodeGetRootNodeOptions (c .Arguments [0 ])
46
47
result := instance .GetRootNode (options )
47
48
return w .toNode (result )
48
49
}
49
50
50
51
func (w nodeWrapper ) cloneNode (c g.FunctionCall ) g.Value {
52
+ log .Debug (w .logger (c ), "V8 Function call: Node.cloneNode" )
51
53
instance := w .getInstance (c )
52
54
subtree := w .decodeboolean (c .Arguments [0 ])
53
55
result := instance .CloneNode (subtree )
54
56
return w .toNode (result )
55
57
}
56
58
57
59
func (w nodeWrapper ) isSameNode (c g.FunctionCall ) g.Value {
60
+ log .Debug (w .logger (c ), "V8 Function call: Node.isSameNode" )
58
61
instance := w .getInstance (c )
59
62
otherNode := w .decodeNode (c .Arguments [0 ])
60
63
result := instance .IsSameNode (otherNode )
61
64
return w .toBoolean (result )
62
65
}
63
66
64
67
func (w nodeWrapper ) contains (c g.FunctionCall ) g.Value {
68
+ log .Debug (w .logger (c ), "V8 Function call: Node.contains" )
65
69
instance := w .getInstance (c )
66
70
other := w .decodeNode (c .Arguments [0 ])
67
71
result := instance .Contains (other )
68
72
return w .toBoolean (result )
69
73
}
70
74
71
75
func (w nodeWrapper ) insertBefore (c g.FunctionCall ) g.Value {
76
+ log .Debug (w .logger (c ), "V8 Function call: Node.insertBefore" )
72
77
instance := w .getInstance (c )
73
78
node := w .decodeNode (c .Arguments [0 ])
74
79
child := w .decodeNode (c .Arguments [1 ])
@@ -80,6 +85,7 @@ func (w nodeWrapper) insertBefore(c g.FunctionCall) g.Value {
80
85
}
81
86
82
87
func (w nodeWrapper ) appendChild (c g.FunctionCall ) g.Value {
88
+ log .Debug (w .logger (c ), "V8 Function call: Node.appendChild" )
83
89
instance := w .getInstance (c )
84
90
node := w .decodeNode (c .Arguments [0 ])
85
91
result , err := instance .AppendChild (node )
@@ -90,6 +96,7 @@ func (w nodeWrapper) appendChild(c g.FunctionCall) g.Value {
90
96
}
91
97
92
98
func (w nodeWrapper ) removeChild (c g.FunctionCall ) g.Value {
99
+ log .Debug (w .logger (c ), "V8 Function call: Node.removeChild" )
93
100
instance := w .getInstance (c )
94
101
child := w .decodeNode (c .Arguments [0 ])
95
102
result , err := instance .RemoveChild (child )
@@ -100,24 +107,28 @@ func (w nodeWrapper) removeChild(c g.FunctionCall) g.Value {
100
107
}
101
108
102
109
func (w nodeWrapper ) nodeName (c g.FunctionCall ) g.Value {
110
+ log .Debug (w .logger (c ), "V8 Function call: Node.nodeName" )
103
111
instance := w .getInstance (c )
104
112
result := instance .NodeName ()
105
113
return w .toDOMString (result )
106
114
}
107
115
108
116
func (w nodeWrapper ) isConnected (c g.FunctionCall ) g.Value {
117
+ log .Debug (w .logger (c ), "V8 Function call: Node.isConnected" )
109
118
instance := w .getInstance (c )
110
119
result := instance .IsConnected ()
111
120
return w .toBoolean (result )
112
121
}
113
122
114
123
func (w nodeWrapper ) ownerDocument (c g.FunctionCall ) g.Value {
124
+ log .Debug (w .logger (c ), "V8 Function call: Node.ownerDocument" )
115
125
instance := w .getInstance (c )
116
126
result := instance .OwnerDocument ()
117
127
return w .toDocument (result )
118
128
}
119
129
120
130
func (w nodeWrapper ) parentElement (c g.FunctionCall ) g.Value {
131
+ log .Debug (w .logger (c ), "V8 Function call: Node.parentElement" )
121
132
instance := w .getInstance (c )
122
133
result := instance .ParentElement ()
123
134
return w .toElement (result )
@@ -129,18 +140,21 @@ func (w nodeWrapper) childNodes(c g.FunctionCall) g.Value {
129
140
}
130
141
131
142
func (w nodeWrapper ) firstChild (c g.FunctionCall ) g.Value {
143
+ log .Debug (w .logger (c ), "V8 Function call: Node.firstChild" )
132
144
instance := w .getInstance (c )
133
145
result := instance .FirstChild ()
134
146
return w .toNode (result )
135
147
}
136
148
137
149
func (w nodeWrapper ) previousSibling (c g.FunctionCall ) g.Value {
150
+ log .Debug (w .logger (c ), "V8 Function call: Node.previousSibling" )
138
151
instance := w .getInstance (c )
139
152
result := instance .PreviousSibling ()
140
153
return w .toNode (result )
141
154
}
142
155
143
156
func (w nodeWrapper ) nextSibling (c g.FunctionCall ) g.Value {
157
+ log .Debug (w .logger (c ), "V8 Function call: Node.nextSibling" )
144
158
instance := w .getInstance (c )
145
159
result := instance .NextSibling ()
146
160
return w .toNode (result )
0 commit comments