Bug 16424 - Invalid return value specified for the pre-instert algorithm
Invalid return value specified for the pre-instert algorithm
Product: WebAppsWG
Classification: Unclassified
Component: DOM
All All
: P2 critical
: ---
Assigned To: Ms2ger
Depends on:
  Show dependency treegraph
Reported: 2012-03-18 17:14 UTC by manish.tripathi.777
Modified: 2012-03-18 18:45 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description manish.tripathi.777 2012-03-18 17:14:30 UTC
According to http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-pre-insert , step 8, pre-insert algorithm returns a "child", but in the context of that particular alrogitm, a "child" is a reference node, NOT the inserted node.

Therefore, step 8 should read: "8. Return <i>node</i>."

This is critical, because the value returned by pre-insert algoritm is passed on to and returned by the Node.appendChild(node) and Node.insertBefore(node, child) method.

If implemented as is, Node.appendChild(node) will ALWAYS return null, whereas it must return the inserted node.