Tcl/Tk Plugin V2 Console Applet

[ Back to the V2 Tclets Demos ]

Try interactively the following or reproducing what other Tclets here does, also try the error...

policy home
# this will produce an security check error:
socket 2000
# this is ok from security standpoint (but will fail
# because nothing runs on that port):
socket {} 2000
# or
set homeHost [getattr originSocketHost]
socket $homeHost 2000
Or see the power (and dangers) of the Javascript policy:
policy javascript
set s [browser::openStream _blank]
browser::writeToStream $s "<h1>Hi !</h1>"
# and now really fun: let's clone ourselves:
browser::writeToStream $s "<embed src=[getattr originURL] height=400 width=400><br>"
# Don't forget this one:
browser::closeStream $s

click in and start typing Tcl commands (ps: no you can't paste!):


This applet is included in your plugin distribution (the file plugin/console.tcl) and is mostly Jeff Hobb's tkcon work.
(Reminder: To see those demos you need Tcl/Tk Plugin Version 2.0.3 or later and Netscape Navigator/Communicator or Internet Explorer).