How to control a dart popup

I wonder if it is possible to open a popup in dart and then control it from the openener context.

I would like to open a popup and then control its contents and the event from the script that opened it.

The propaganda is that window.open only returns a WindowBase, which can only close the popup, nothing more.

So is this doable?

+4
source share
2 answers

I can't check right now, but this should work:

var w = window.open(...); w.document.body.innerHtml = 'from parent'; 

This, of course, will not work if the open site is not in the same origin.

If this is the site you are managing, you can pass a parameter to the URL that you can read and act on.

+1
source

A div with a high z-index, and proper positioning and style can function as a popup that is easy to manipulate.

-1
source

Source: https://habr.com/ru/post/1488922/


All Articles