Skip to content

Commit cac74c7

Browse files
author
Tim Blasi
committed
feat(dart/transform): Add stub implementations to Html5LibAdapter
Stub out some methods used in the `CompilerPipeline`.
1 parent f375dbd commit cac74c7

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

modules/angular2/src/dom/html_adapter.dart

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ class Html5LibDomAdapter implements DomAdapter {
99
setRootDomAdapter(new Html5LibDomAdapter());
1010
}
1111

12+
@override
13+
final attrToPropMap = const {
14+
'innerHtml': 'innerHtml',
15+
'readonly': 'readOnly',
16+
'tabindex': 'tabIndex',
17+
};
18+
1219
Element parse(String templateHtml) => parser.parse(templateHtml).firstChild;
1320
query(selector) {
1421
throw 'not implemented';
@@ -69,18 +76,12 @@ class Html5LibDomAdapter implements DomAdapter {
6976
clearNodes(el) {
7077
throw 'not implemented';
7178
}
72-
appendChild(el, node) {
73-
throw 'not implemented';
74-
}
79+
appendChild(el, node) => null;
7580
removeChild(el, node) {
7681
throw 'not implemented';
7782
}
78-
remove(el) {
79-
throw 'not implemented';
80-
}
81-
insertBefore(el, node) {
82-
throw 'not implemented';
83-
}
83+
remove(el) => null;
84+
insertBefore(el, node) => null;
8485
insertAllBefore(el, nodes) {
8586
throw 'not implemented';
8687
}
@@ -176,9 +177,7 @@ class Html5LibDomAdapter implements DomAdapter {
176177
getAttribute(element, String attribute) {
177178
throw 'not implemented';
178179
}
179-
setAttribute(element, String name, String value) {
180-
throw 'not implemented';
181-
}
180+
setAttribute(element, String name, String value) => null;
182181
removeAttribute(element, String attribute) {
183182
throw 'not implemented';
184183
}

0 commit comments

Comments
 (0)