go-js-dom icon indicating copy to clipboard operation
go-js-dom copied to clipboard

Add Element.ReplaceChildren

Open alexflint opened this issue 2 years ago • 1 comments

Would it be possible to implement Element.ReplaceChildren?

I'd be happy to submit a PR.

alexflint avatar Aug 06 '23 19:08 alexflint

Have you thought about what signature it would use in Go?

It seems the JavaScript version of this API permits the parameters to be either Nodes or strings, which unfortunately complicates things. I think it means we either don't support one of them, or need to use interface{} as the type, or end up having two versions of the method.

dmitshur avatar Aug 08 '23 04:08 dmitshur