From 8ccb4f24fd8d2d0a40bc58aa0c4069dc8120dd52 Mon Sep 17 00:00:00 2001 From: Mike Tonks Date: Fri, 8 Mar 2019 17:06:57 +0000 Subject: [PATCH] Make position a real string, when passed to syscall/js --- element.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }