fix(compiler): properly bind to properties that don't have matching attr name
Fixes #619 Closes #783
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user