Skip to content

Commit

Permalink
Use the name 'target' instead of 'parent' in the insertion event, for…
Browse files Browse the repository at this point in the history
… better consistency with the other events. Makes the rust code simpler.
  • Loading branch information
fzzzy committed Mar 7, 2012
1 parent 889a01a commit 84b7ab6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion servo/IFrameRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ IFrameRenderer.prototype.handleMutation = function(event) {
break;

case MUTATE_INSERT:
var parent = this.nodes[mutation.parent];
var parent = this.nodes[mutation.target];
var target = parent.childNodes[mutation.index];
var child = DOMSTR.parse(mutation.child, parent.ownerDocument);
this.assignNid(child, mutation.nid);
Expand Down
2 changes: 1 addition & 1 deletion servo/TreeRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var TreeRenderer = (function() {
assign_nid(parsed, mutation.nid);
var nodes = create_dom(parsed);
//console.log('mutation parent', mutation.parent);
document.getElementById("n" + mutation.parent).appendChild(nodes);
document.getElementById("n" + mutation.target).appendChild(nodes);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/impl/Document.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ defineLazyProperty(impl, "Document", function() {
if (this.mutationHandler) {
this.mutationHandler({
type: MUTATE_INSERT,
parent: node.parentNode._nid,
target: node.parentNode._nid,
index: node.index,
nid: node._nid,
child: DOMSTR.serialize(node)
Expand Down

0 comments on commit 84b7ab6

Please sign in to comment.