Electron features (e.g. aardvark.dialog) do not work within pages

chrome debugger says::

?page=controls:1 Uncaught TypeError: Cannot read property 'showOpenDialog' of undefined
    at HTMLButtonElement.onclick (?page=controls:1)

it appears that aardvark or aardvark.dialog is not available in iframes...

Posted 1 years ago
Votes Newest

Answers 2

use top to adress aardvark/electron objects, e.g. top.aardvark.dialog.openFileDialog...

more info can be found here:

When using iframes and/or multiple windows, your parent is referenced in the field window.opener. I.e. to find the topmost window (containing top.aardvark):

function win() { var w = window; while(w.opener) w = w.opener; return w; }
Posted 9 months ago