Skip to content
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

Closed
DartBot opened this issue Jun 8, 2012 · 11 comments
Closed

Window#closed doesn't seem to work in dart2js #3472

DartBot opened this issue Jun 8, 2012 · 11 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@DartBot
Copy link

DartBot commented Jun 8, 2012

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

@dgrove
Copy link
Contributor

dgrove commented Jun 11, 2012

Do you have a small sample available?


cc @kasperl.
cc @rakudrama.
Added NeedsInfo label.

@DartBot
Copy link
Author

DartBot commented Jun 11, 2012

This comment was originally written by sammcca...@google.com


main() => print(window.open("about:blank", "_blank").closed);

NoSuchMethodException : method not found: 'get$closed'
Receiver:
Arguments: []

@DartBot
Copy link
Author

DartBot commented Jun 11, 2012

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.


Added Area-DOM, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 15, 2012

This comment was originally written by sammcca...@google.com


BTW, I'm pretty sure this used to work.
I'd guess this regressed with the move to wrapperless DOM libraries.

@sethladd
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-High label.

@vsmenon
Copy link
Member

vsmenon commented Jun 20, 2012

I'll fix this today.


Set owner to @vsmenon.
Added Accepted label.

@vsmenon
Copy link
Member

vsmenon commented Jun 20, 2012

Issue #3671 has been merged into this issue.

@peter-ahe-google
Copy link
Contributor

Isn't this the same problem as with contentDocument on iframes?

What about window.open(...).document?

@vsmenon
Copy link
Member

vsmenon commented Jun 21, 2012

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.

@peter-ahe-google
Copy link
Contributor

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?

@DartBot
Copy link
Author

DartBot commented Jun 22, 2012

This comment was originally written by sammcca...@google.com


Thanks a lot for this fix!

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures labels Jun 22, 2012
copybara-service bot pushed a commit that referenced this issue Jul 27, 2023
…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 closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

5 participants