News for hackers. Stuff that matters.
Re:Safari releases are development hell by LegionMammal978 on Wednesday April 05, 2023 @10:09AM (#35454515)
I just don't see how you interpreted the remark in the way you did. Regardless, I've filed a PR to make the docs clearer [0] so neither of us has to waste any more time on this.

[0] https://github.com/mdn/content/pull/25925

Re:Safari releases are development hell by cxr on Wednesday April 05, 2023 @11:29AM (#35455831)
> I just don't see how you interpreted the remark in the way you did

Can you be concrete? (This reply doesn't really clear up anything about the previous comment.)

Re:Safari releases are development hell by LegionMammal978 on Wednesday April 05, 2023 @12:02PM (#35456340)
Well, it literally says, "If the element has no parent element, setting its outerHTML property will not change it or its descendants. Many browsers will also throw an exception." I interpret this as, "If the element has no parent element, setting its outerHTML property will not change it or its descendants. Many browsers will throw an exception [on setting an element's outerHTML property if it has no parent element]."

This contains two independent statements, (a) "If the element has no parent element, setting its outerHTML property will not change it or its descendants," and (b) "Many browsers will also throw an exception [on setting an element's outerHTML property if it has no parent element]."

Statement (b) is true, since Chromium- and WebKit-based browsers will throw an exception if the element doesn't have a parent node which is also an element. Statement (a) isn't browser-specific, and thus it is false, since on Firefox, setting an element's outerHTML will change it and its descendants if its parent node is a document fragment (which is not a parent element).

Where we differ might be that I don't see the "many browsers" qualification as applying to the first statement.