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 29174 - ProcessingInstruction node is correct (as context) for Range.createContextualFragment() method
Summary: ProcessingInstruction node is correct (as context) for Range.createContextual...
Status: NEW
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM Parsing and Serialization (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-03 01:03 UTC by Arkadiusz Michalski (Spirit)
Modified: 2015-10-03 01:03 UTC (History)
2 users (show)

See Also:


Attachments

Description Arkadiusz Michalski (Spirit) 2015-10-03 01:03:36 UTC
In algo for Range.createContextualFragment() method:
http://www.w3.org/TR/DOM-Parsing/#dfn-dom-range-createcontextualfragment
ProcessingInstruction node should not be forbidden as context, DOM4 prevents only DocumentType when setting range's start/end node:
http://www.w3.org/TR/dom/#concept-range-bp-set
and browsers (Firefox, Chrome, IE11) not throw for ProcessingInstruction.
This node probably should be treat the same as Text and Comment.

BTW, will be better changing variable names to something more obvious (what whe have for other methods):
- passing argument /fragment/ to /text/ or /str/ (step 1)
- /fragment node/ to /fragment/ (step 3/4/5)
- and maybe /element/ to /context/ (like whe have for insertAdjacentHTML)
- correct IDL and green box too

One more thing, tables with Parameter/Type/Nullable/Optional are necessary? The same infos we see directly in IDL, so why repeat and unnecessarily making spec bigger?