Re: A question about Range#insertNode

Looks like you're correct, that bit should be removed.  If you update
the test to match the new algorithm (assuming I wrote a test for it,
I'm pretty sure I did) and it doesn't change which browsers pass, then
we could be extra super sure.  :)

On Tue, Jul 7, 2015 at 4:27 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Tue, Jul 7, 2015 at 12:48 PM, Ms2ger <ms2ger@gmail.com> wrote:
>> Step 7 of <https://dom.spec.whatwg.org/#concept-range-insert> reads
>>
>>> If /range/’s start node is a Text node, split it with offset
>>> /range/’s start offset, set /referenceNode/ to the result, and set
>>> /parent/ to /referenceNode/’s parent.
>>
>> In this case, /referenceNode/ has been set to /range/’s start node
>> (step 3), and /parent/ has been set to /referenceNode/’s parent (step
>> 5). The split algorithm returns a node with the same parent as its
>> argument, so I believe that this step doesn't actually change /parent/.
>>
>> Could you confirm and maybe add a note to the spec here?
>
> You mean removing setting /parent/ again? Seems conrrect. I wonder if
> Aryeh has a second to take a look since I believe he wrote that
> algorithm.
>
>
> --
> https://annevankesteren.nl/

Received on Wednesday, 8 July 2015 11:03:22 UTC