Skip to content

Now as 20143 is fixed I'm not able to find a way to resize a dialog window #20216

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

Closed
DartBot opened this issue Jul 26, 2014 · 3 comments
Closed
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report library-html

Comments

@DartBot
Copy link

DartBot commented Jul 26, 2014

This issue was originally filed by @zoechi


Before https://code.google.com/p/dart/issues/detail?id=20143 was fixed I was able to do

    Window dialog = window.open('dialog.html');
    dialog.resizeTo(700,700)

now

    window.open(...)

returns a _DOMWindowCrossFrame
and I am not able to figure out how I can access the resizeTo() method

Dart VM version: 1.6.0-edge.38568 (Thu Jul 24 18:05:28 2014) on "linux_x64"

@DartBot
Copy link
Author

DartBot commented Aug 7, 2014

This comment was originally written by silviu...@gmail.com


You can do this:

    Window dialog = window.open('dialog.html') as Window; // forced cast
    dialog.resizeTo(700,700);

but I agree that this is not an obvious way to do this because window.open currently returns a WindowBase instance and WindowBase is not a subclass of Window. And probably the window.open method could return a Window instance which has a 'document' property for manipulating the contents of the window and methods like 'resizeTo'.

Related bug: https://code.google.com/p/dart/issues/detail?id=20407

@DartBot
Copy link
Author

DartBot commented Aug 8, 2014

This comment was originally written by @zoechi


This doesn't change anything. This "cast" is only for the analyzer and totally ignored in production and it is what I did before the 'fix' to 20143.
In the recent releases a '_DomWindowCrossFrame' is returned instead of a 'WindowBase' and this can't be "cast" to a 'Window' anymore.

@vsmenon
Copy link
Member

vsmenon commented Aug 12, 2014

Added Duplicate label.
Marked as being merged into #20146.

@DartBot DartBot added Type-Defect library-html area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report labels Aug 12, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report library-html
Projects
None yet
Development

No branches or pull requests

3 participants