SharePad.io
About
Run
Collaborate
Share
Python
Python 2
C
C++
C#
Java
JavaScript
debug=false VideoResolution$="1920x1080x60p" msgPort = CreateObject("roMessagePort") r = CreateObject("roRectangle", 0, 0, 1920, 720) config = { url: "file:///index.html", nodejs_enabled: true, } h = CreateObject("roHtmlWidget", r, config) h.SetPort(msgPort) sleep(10000) h.Show() while true msg = wait(0, msgPort) print "type(msg)=";type(msg) if type(msg) = "roHtmlWidgetEvent" then eventData = msg.GetData() if type(eventData) = "roAssociativeArray" and type(eventData.reason) = "roString" then print "reason = ";eventData.reason if eventData.reason = "load-error" then print "message = ";eventData.message endif endif endif end while
Input
Output
Click 'Run' to see program output.
Share this URL
×
Share this live link
×