Use JavaScriptFunction for _registerCustomElement

"=Object" was inacurate and contradicted the inferred type <Function> in strong mode.

Change-Id: Ibee4351357dde4aaacf95ff7265cd335fc5d06ea
Reviewed-on: https://dart-review.googlesource.com/49832
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This commit is contained in:
Sigmund Cherem 2018-04-06 23:14:13 +00:00 committed by commit-bot@chromium.org
parent 6656233fcc
commit 133cd9d182
3 changed files with 6 additions and 3 deletions

View file

@ -70,6 +70,7 @@ import 'dart:_js_helper'
import 'dart:_interceptors'
show
Interceptor,
JavaScriptFunction,
JSExtendableArray,
JSUInt31,
findInterceptorConstructorForType,
@ -50892,7 +50893,8 @@ Function _registerCustomElement(context, document, String tag, [Map options]) {
JS('=Object', '#.extends = #', opts, extendsTagName);
}
return JS('=Object', '#.registerElement(#, #)', document, tag, opts);
return JS(
'JavaScriptFunction', '#.registerElement(#, #)', document, tag, opts);
}
//// Called by Element.created to do validation & initialization.

View file

@ -147,7 +147,8 @@ Function _registerCustomElement(context, document, String tag, [Map options]) {
JS('=Object', '#.extends = #', opts, extendsTagName);
}
return JS('=Object', '#.registerElement(#, #)', document, tag, opts);
return JS(
'JavaScriptFunction', '#.registerElement(#, #)', document, tag, opts);
}
//// Called by Element.created to do validation & initialization.

View file

@ -58,7 +58,7 @@ import 'dart:_js_helper' show
findDispatchTagForInterceptorClass, setNativeSubclassDispatchRecord,
makeLeafDispatchRecord, registerGlobalObject, applyExtension;
import 'dart:_interceptors' show
Interceptor, JSExtendableArray, JSUInt31,
Interceptor, JavaScriptFunction, JSExtendableArray, JSUInt31,
findInterceptorConstructorForType,
findConstructorForNativeSubclassType,
getNativeInterceptor,