dev_compiler
dev_compiler copied to clipboard
Fix created constructors for dart:html types
Fix created constructors for dart:html types so that they stop generating uneccessary code that will probably mess up element rendering. The problem is we need to track that native fields on native classes do not need to be initialized. This is a P1 blocker for custom element support
For example the created constructor for InputElement looks like
created() {
this[dartx.accept] = null;
this[dartx.alt] = null;
this[dartx.autocapitalize] = null;
this[dartx.autocomplete] = null;
this[dartx.autofocus] = null;
this[dartx.capture] = null;
this[dartx.checked] = null;
this[dartx.defaultChecked] = null;
this[dartx.defaultValue] = null;
this[dartx.dirName] = null;
this[dartx.disabled] = null;
this[dartx.files] = null;
this[dartx.form] = null;
this[dartx.formAction] = null;
this[dartx.formEnctype] = null;
this[dartx.formMethod] = null;
this[dartx.formNoValidate] = null;
this[dartx.formTarget] = null;
this[dartx.height] = null;
this[dartx.incremental] = null;
this[dartx.indeterminate] = null;
this[dartx.inputMode] = null;
this[dartx.labels] = null;
this[dartx.list] = null;
this[dartx.max] = null;
this[dartx.maxLength] = null;
this[dartx.min] = null;
this[dartx.minLength] = null;
this[dartx.multiple] = null;
this[dartx.name] = null;
this[dartx.pattern] = null;
this[dartx.placeholder] = null;
this[dartx.readOnly] = null;
this[dartx.required] = null;
this[dartx.selectionDirection] = null;
this[dartx.selectionEnd] = null;
this[dartx.selectionStart] = null;
this[dartx.size] = null;
this[dartx.src] = null;
this[dartx.step] = null;
this[dartx.type] = null;
this[dartx.validationMessage] = null;
this[dartx.validity] = null;
this[dartx.value] = null;
this[_get_valueAsDate] = null;
this[dartx.valueAsNumber] = null;
this[dartx.entries] = null;
this[dartx.directory] = null;
this[dartx.width] = null;
this[dartx.willValidate] = null;
super.created();
}
when it should look like
created() {
super.created();
}
I thought custom elements were not P1? https://github.com/dart-lang/dev_compiler/issues/521