Chromium Code Reviews| Index: sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate |
| diff --git a/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate b/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate |
| index d92979b3943fa7acc996993f44a2d37b267efef1..affcb7c5569ac4c85ab71ca3d5b09d1506a35b32 100644 |
| --- a/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate |
| +++ b/sdk/lib/html/templates/html/dart2js/factoryprovider_MutationObserver.darttemplate |
| @@ -5,20 +5,10 @@ |
| part of html; |
| class $FACTORYPROVIDER { |
| - static $CONSTRUCTOR create$(CONSTRUCTOR)(MutationCallback callback) { |
| - // This is a hack to cause MutationRecord to appear to be instantiated. |
| - // |
| - // MutationCallback has a parameter type List<MutationRecord>. From this we |
| - // infer a list is created in the browser, but not the element type, because |
| - // other native fields and methods return plain List which is too general |
| - // and would imply creating anything. This statement is a work-around. |
| - JS('MutationRecord','0'); |
| - |
| - return _create$(CONSTRUCTOR)(callback); |
| - } |
| - |
| - static $CONSTRUCTOR _create$(CONSTRUCTOR)(MutationCallback callback) native ''' |
| + @Creates('MutationObserver') |
| + @Creates('MutationRecord') |
|
vsm
2012/11/20 18:33:46
Should MutationRecord be somehow specified on Muta
sra1
2012/11/20 19:26:33
1. Inference through the callback is broken for tw
|
| + static $CONSTRUCTOR create$(CONSTRUCTOR)(MutationCallback callback) native ''' |
| var constructor = |
| window.MutationObserver || window.WebKitMutationObserver || |
| window.MozMutationObserver; |