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
15 changes: 10 additions & 5 deletions modules/angular2/src/dom/html_adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,15 @@ class Html5LibDomAdapter implements DomAdapter {
clearNodes(el) {
throw 'not implemented';
}
appendChild(el, node) => null;
appendChild(el, node) => el.append(node.remove());
removeChild(el, node) {
throw 'not implemented';
}
remove(el) => null;
insertBefore(el, node) => null;
remove(el) => el.remove();
insertBefore(el, node) {
if (el.parent == null) throw '$el must have a parent';
el.parent.insertBefore(node, el);
}
insertAllBefore(el, nodes) {
throw 'not implemented';
}
Expand Down Expand Up @@ -229,9 +232,11 @@ class Html5LibDomAdapter implements DomAdapter {
getAttribute(element, String attribute) {
throw 'not implemented';
}
setAttribute(element, String name, String value) => null;
setAttribute(element, String name, String value) {
element.attributes[name] = value;
}
removeAttribute(element, String attribute) {
throw 'not implemented';
element.attributes.remove(attribute);
}

templateAwareRoot(el) => el;
Expand Down
X Tutup