Hi Roland;
FYI: Appeon Web uses its own proprietary plug-in to control the PB application. Appeon developer has already cross compiled your PowerScript into HTML plus JScript optimised for the Appeon Web Plug-in to render.
So I doubt that your direction will even work. Even if you got something to work, I would be leery that it will continue across future releases nor consistently across various web browsers like Appeon does today.
For a new GUI look & feel, I would look into refactoring the current PB application using standard PB classes. I would only do that once you have the application running 100% properly under Appeon Web.
BTW: I'll be addressing Web GUI in my May 18, 2016 PBTV webcast.
Just my $0.02.
Regards ... Chris