mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 15:17:07 +00:00
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:
parent
17585c42fe
commit
a3c209d53b
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue