-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Window#closed doesn't seem to work in dart2js #3472
Comments
Do you have a small sample available? cc @kasperl. |
This comment was originally written by sammcca...@google.com main() => print(window.open("about:blank", "_blank").closed); NoSuchMethodException : method not found: 'get$closed' |
This comment was originally written by ngeoffray@google.com Window.open returns a Window from a different JS environment, so it does not have the methods that we put on the Object prototype (a different JS environment means a different Object prototype). Assigning to Area-DOM. |
This comment was originally written by sammcca...@google.com BTW, I'm pretty sure this used to work. |
Removed Priority-Medium label. |
Issue #3671 has been merged into this issue. |
Isn't this the same problem as with contentDocument on iframes? What about window.open(...).document? |
Peter: yes, same problem. We've been fixing by hand, but I'd like to automate our scripts to do the right thing on anything that returns Window (and potentially History or Location). For now, window.open / close / closed are fixed with r8988. Added Fixed label. |
Vijay: thank you for the explanation. What is the right thing to to for Window.document? Is there hope that that and contentDocument might work in the future? |
This comment was originally written by sammcca...@google.com Thanks a lot for this fix! |
…st, vector_math. Revisions updated by `dart tools/rev_sdk_deps.dart`. collection (https://github.com/dart-lang/collection/compare/db343da..0a2885a): 0a2885a 2023-07-25 Devon Carew prep for publishing 1.18.0 (#299) dartdoc (https://github.com/dart-lang/dartdoc/compare/a04ac3e..1cf8870): 1cf88707 2023-07-26 Sam Rawlins Convert 'p' prefixes to 'path' in tool/ (#3472) d44c8056 2023-07-26 Sam Rawlins Move a few more grinder tasks to package:args commands (#3468) f66eb72d 2023-07-26 Sam Rawlins Use path as import prefix in lib/ and test/ (#3471) 34441f21 2023-07-25 Sam Rawlins Move flutter-doc tasks to package:args; remove unused grinder tasks (#3466) ecosystem (https://github.com/dart-lang/ecosystem/compare/27ff3e9..97fc1a7): 97fc1a7 2023-07-25 Moritz Fix comment posting from forks (#144) test (https://github.com/dart-lang/test/compare/37e54e3..7f81dee): 7f81deea 2023-07-24 Nate Bosch Drop the Condition abstraction (#1956) vector_math (https://github.com/google/vector_math.dart/compare/048777a..88bada3): 88bada3 2023-07-26 John McCutchan Revert "Fix rotation around Y axis (#262)" (#300) Change-Id: Ib7bc8c1bab60450e6b328c3075207adef4cf642b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316621 Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was originally filed by sammcca...@google.com
I create a popup with Window#open, and then try to access the 'closed' property to check if the user has closed it.
I get:
Uncaught TypeError: Object [object Window] has no method 'get$closed' schedule.dart.js:3460
Isolate.$defineClass.poll$0 schedule.dart.js:3460
The text was updated successfully, but these errors were encountered: