New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy is not typed in a useful way #11829
Comments
In the generated Chrome Packaged App the variable is initialized: var appWindow = js.context.chrome.app.window.current() as AppWindow; The value of 'js.context' is a Proxy instance wrapping a JS object. I was going to suggest rewriting the generated code to include specific types, but even that won't work here. About half the methods documented for AppWindow are not even defined in the Dart class. I'm not sure what to do about Proxy in general. cc @devoncarew. |
Attachment: |
Adding justin, who's thinking about how to improve this from the js interop library point of view. cc @justinfagnani. |
You definitely don't want to do this. appWindow is a Proxy, not an AppWindow. AppWindow lives in the dart:chrome library, which is a totally separate way of accessing the chrome apis. This example is using js interop. |
I think we want to allow exactly that in the future. DOM objects that are sent via js-interop should be seamlessly "serialized" (by reference) instead of using proxies. In any case, currently there's no real way to type Proxy objects, that's a future goal. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Closing as stale. |
Code completion not working in example chrome app.
For example,
// ...
bounds.left -= boundsChange ~/ 2;
appWindow.setBounds(bounds);
appWindow.set|
Popup does not list "setBounds".
////////////////////////////////////////////////////////////////////////////////////
Editor: 0.1.2_r24980 (2013-07-12)
OS: Windows 7 - amd64 (6.1)
JVM: 1.7.0_05
projects: 1
open dart files: 1
auto-run pub: true
localhost resolves to: 127.0.0.1
mem max/total/free: 889 / 351 / 289 MB
thread count: 24
index: 150985 relationships in 34300 keys in 147 sources
SDK installed: true
Dartium installed: true
analysis engine: new
The text was updated successfully, but these errors were encountered: