This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23707 - Use a switch for the checks on children of a document
Summary: Use a switch for the checks on children of a document
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-01 18:56 UTC by Ms2ger
Modified: 2014-02-12 19:42 UTC (History)
2 users (show)

See Also:


Attachments

Description Ms2ger 2013-11-01 18:56:55 UTC
In pre-insert and replace, step 6 ("If parent is a document, run these substeps: …") uses a chain of ifs that would be more straightforward as a switch on the node type.
Comment 1 Anne 2013-11-06 14:26:57 UTC
Not entirely convinced this improved the status quo.

https://github.com/whatwg/dom/commit/1fb01cf434d483c9f0b725eeb890730678b8fa3a