X Tutup
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/angular2/src/dom/browser_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
}
clearNodes(el) {
while (el.firstChild) {
el.firstChild.remove();
el.removeChild(el.firstChild);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you write a comment that can explain the reason why the refactor is needed or simply a comment with a url to the issue

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gdi2290 this commit has a reference to the original issue, so hopfully it should be enough. And as soon as we plug other browsers on the CI it will be self-verifying.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right I jumped to conclusion and we have github/git blame/CI for a reason. If someone were to optimize this they would first check git blame then the git commit history before proceeding and if that fails CI will prevail. With all that said, comments are important to show hot path, document unorthodox/failed optimizations, unimportant technical debt via TODO:, or code documentation

}
}
appendChild(el, node) { el.appendChild(node); }
removeChild(el, node) { el.removeChild(node); }
replaceChild(el: Node, newChild, oldChild) { el.replaceChild(newChild, oldChild); }
remove(node): Node {
node.remove();
node.parentNode.removeChild(node);
return node;
}
insertBefore(el, node) { el.parentNode.insertBefore(node, el); }
Expand Down
X Tutup