display normal html + JS in a Widget
Added by Bruno Zerbo almost 6 years ago
I have a standard web page in html + JS (no Wt) and, by now and for testing and learning purpose, I would like to contruct a Widget that simply show that contents. Something where I can simply paste my html + JS code to show it.
Can you give me some hints to do that?
thank you
Replies (1)
RE: display normal html + JS in a Widget - Added by Apivan Tuntakurn almost 6 years ago
For JS, you can use
https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WApplication.html#ae88546224ed32cade783da188b145138
WT is a single page web application.
So, for html, the closest way is to get what you want is to use WTemplate or WText with unsafe mode for the
. For
, use addMetaHeader() instead.
https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WTemplate.html
https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WApplication.html#abb9103bc749dac6942649ea693dc9a3d