This will call the function above and return back to your stack (here with the name 'myStandalone') the window width and height via the handler 'js2LC_resizeStack' (or whatever you want to call it).
Add this to your stack script to handle the returned parameters: