dart:js_util: add bool return type to instanceof and hasProperty

Change-Id: Ib3f52a42a25d3a14089a7aa7d74c206603eed80d
Reviewed-on: https://dart-review.googlesource.com/59280
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
Kevin Moore 2018-06-08 01:37:03 +00:00 committed by commit-bot@chromium.org
parent 17585c42fe
commit a3c209d53b

View file

@ -60,14 +60,14 @@ _convertDataTree(data) {
newObject() => JS('=Object', '{}');
hasProperty(o, name) => JS('bool', '# in #', name, o);
bool hasProperty(o, name) => JS('bool', '# in #', name, o);
getProperty(o, name) => JS('Object|Null', '#[#]', o, name);
setProperty(o, name, value) => JS('', '#[#]=#', o, name, value);
callMethod(o, String method, List args) =>
JS('Object|Null', '#[#].apply(#, #)', o, method, o, args);
instanceof(o, Function type) => JS('bool', '# instanceof #', o, type);
bool instanceof(o, Function type) => JS('bool', '# instanceof #', o, type);
callConstructor(Function constr, List arguments) {
if (arguments == null) {
return JS('Object', 'new #()', constr);