Re: [whatwg/dom] Introduce a StaticRange constructor (#590)

Thanks @annevk ! I’m happy to help with all of those things.

I think Range and StaticRange should have the same set of allowed/disallowed nodes. From looking at the spec for Range.setStart/setEnd (https://dom.spec.whatwg.org/#concept-range-bp-set), it seems that doctype is the only disallowed one right now. So I propose we throw an exception (InvalidNodeTypeError) only if a doctype is passed to the StaticRange constructor. In the future, if we want to disallow other node types like Attr, we can make an update to disallow them on both range types.

Let me know if that sounds good.

cc: @BoCupp-Microsoft, @gked


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/590#issuecomment-518955295

Received on Wednesday, 7 August 2019 06:12:32 UTC