diff --git a/element.go b/element.go index d0ba0ff..2ee9261 100644 --- a/element.go +++ b/element.go @@ -286,5 +286,5 @@ func (e *Element) AttachShadow(opts AttachShadowOpts) *ShadowRoot { // InsertAdjacentElement inserts a given element node at a given position relative to the element it is invoked upon. func (e *Element) InsertAdjacentElement(position Position, newElement *Element) js.Value { - return e.v.Call("insertAdjacentElement", position, newElement.v) + return e.v.Call("insertAdjacentElement", string(position), newElement.v) }