fix(compiler): properly bind to properties that don't have matching attr name

Fixes #619
Closes #783
This commit is contained in:
Pawel Kozlowski
2015-02-25 15:30:37 +01:00
parent e490861ba2
commit 7e6f536cf5
5 changed files with 91 additions and 8 deletions
+7 -1
View File
@@ -17,7 +17,8 @@ export 'dart:html' show
InputElement,
AnchorElement,
Text,
window;
window,
attrToPropMap;
// TODO(tbosch): Is there a builtin one? Why is Dart
// removing unknown elements by default?
@@ -36,6 +37,11 @@ void gc() {
final identitySanitizer = new IdentitySanitizer();
// override JS logic of attribute to property mapping
var attrToPropMap = {
"inner-html": "innerHtml"
};
class DOM {
static query(String selector) => document.querySelector(selector);
+2
View File
@@ -16,6 +16,8 @@ export var gc = window.gc ? () => window.gc() : () => null;
export var CssRule = window.CSSRule;
export var CssKeyframesRule = window.CSSKeyframesRule;
export var attrToPropMap = {};
export class DOM {
static query(selector) {
return document.querySelector(selector);