Bugzilla – Bug 16426
Non-existent reference to a 'child' in the pre-remove algorithm
Last modified: 2012-03-19 09:18:30 UTC
Either all instances of the word 'child' in items 1,2,3 should be replaced by the word 'node', or the word 'node' should be replaced by the word 'child' in the title of the algorithm.
As it stands now, the algorithm announces that it takes a 'node' as an input, but later references it as a 'child' (shown in the extract below by embedding the respective words in ****):
To pre-remove a **node** from a parent, run these steps:
1. If **child's** parent is not parent, throw a "NotFoundError" exception and terminate these steps.
2. Remove **child** from parent.
3. Return **child**.