@@ -22,6 +22,7 @@ func (wrapper Node[T]) Initialize(jsClass js.Class[T]) {
2222func (w Node [T ]) installPrototype (jsClass js.Class [T ]) {
2323 jsClass .CreatePrototypeMethod ("getRootNode" , w .getRootNode )
2424 jsClass .CreatePrototypeMethod ("cloneNode" , w .cloneNode )
25+ jsClass .CreatePrototypeMethod ("isEqualNode" , w .isEqualNode )
2526 jsClass .CreatePrototypeMethod ("isSameNode" , w .isSameNode )
2627 jsClass .CreatePrototypeMethod ("contains" , w .contains )
2728 jsClass .CreatePrototypeMethod ("insertBefore" , w .insertBefore )
@@ -73,6 +74,20 @@ func (w Node[T]) cloneNode(cbCtx js.CallbackContext[T]) (js.Value[T], error) {
7374 return codec .EncodeEntity (cbCtx , result )
7475}
7576
77+ func (w Node [T ]) isEqualNode (cbCtx js.CallbackContext [T ]) (js.Value [T ], error ) {
78+ cbCtx .Logger ().Debug ("JS Function call: Node.isEqualNode" )
79+ instance , errInst := js.As [dom.Node ](cbCtx .Instance ())
80+ if errInst != nil {
81+ return nil , errInst
82+ }
83+ otherNode , errArg1 := js .ConsumeArgument (cbCtx , "otherNode" , codec .ZeroValue , codec .DecodeNode )
84+ if errArg1 != nil {
85+ return nil , errArg1
86+ }
87+ result := instance .IsEqualNode (otherNode )
88+ return codec .EncodeBoolean (cbCtx , result )
89+ }
90+
7691func (w Node [T ]) isSameNode (cbCtx js.CallbackContext [T ]) (js.Value [T ], error ) {
7792 cbCtx .Logger ().Debug ("JS Function call: Node.isSameNode" )
7893 instance , errInst := js.As [dom.Node ](cbCtx .Instance ())
0 commit comments