Sorry if it sounds like quite a disoriented question but would it be possible to run Pd online as an embedded application within a browser? To say something, like actionscript does within flash to create new objects. It can create classes, instance of the classes, methods etc. I do not know much about the tcl interpreter and tk although.
Here is the idea (flash plugin needed) > http://www.acusmatica.com/php/pdtest.swf
Ricardo