swiftwasm/WebAPIKit

ShadowRoot append child incorrect

bestwnh opened this issue · 0 comments

Now if I do this

let shadowRoot = rootView.attachShadow(init: .init(mode: .open, delegatesFocus: true, slotAssignment: .manual))
shadowRoot.ownerDocument?.body?.appendChild(node: childNode)

The shadow root is open correct, but the childNode wound't add to it.
But if I change the second line to

shadowRoot.jsValue.appendChild(node.jsValue)

It would work.