Eliminate dynamic call of .createElement in html_dart2js.
Change-Id: I76ab0063eee4213f20483172c16f86e651536945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256740
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
diff --git a/pkg/compiler/test/analyses/api_allowed.json b/pkg/compiler/test/analyses/api_allowed.json
index 4f4eb91..5ef2eb0 100644
--- a/pkg/compiler/test/analyses/api_allowed.json
+++ b/pkg/compiler/test/analyses/api_allowed.json
@@ -33,8 +33,7 @@
"Dynamic invocation of 'toLowerCase'.": 1,
"Dynamic invocation of 'attached'.": 1,
"Dynamic invocation of 'detached'.": 1,
- "Dynamic invocation of 'attributeChanged'.": 1,
- "Dynamic invocation of 'createElement'.": 1
+ "Dynamic invocation of 'attributeChanged'.": 1
},
"org-dartlang-sdk:///lib/html/html_common/conversions.dart": {
"Dynamic invocation of '[]='.": 1
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index f33cff7..1de334d 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -40207,7 +40207,8 @@
}
}
-Function _registerCustomElement(context, document, String tag, [Map? options]) {
+Function _registerCustomElement(context, Document document, String tag,
+ [Map? options]) {
// Function follows the same pattern as the following JavaScript code for
// registering a custom element.
//
diff --git a/tools/dom/src/dart2js_CustomElementSupport.dart b/tools/dom/src/dart2js_CustomElementSupport.dart
index aea853a..8f7a9dd 100644
--- a/tools/dom/src/dart2js_CustomElementSupport.dart
+++ b/tools/dom/src/dart2js_CustomElementSupport.dart
@@ -66,7 +66,8 @@
}
}
-Function _registerCustomElement(context, document, String tag, [Map? options]) {
+Function _registerCustomElement(context, Document document, String tag,
+ [Map? options]) {
// Function follows the same pattern as the following JavaScript code for
// registering a custom element.
//