[REBOL] Re: [Plugin] is cool
From: bry:itnisk at: 21-Apr-2004 19:41
I guess there should be an error try on that
do-browser right?
> Hi,
>
> The plugin module for MSIE is cool. And
with the javascript access to the browser's
DOM
tree, interesting things can be done.
> I've added a feature to the rix search
engine: plug the scripts in directly. So if
you get
plugable
results from a search (e.g.
http://www.oops-as.no/rix?q=plugin&st=sfh),
there
will be a link with the words "plug it in!".
Once you click it, you get to see the script
as a plugin right away.
> But.
>
> How can I know the width and height
parameters of all rebol scripts? I can't.
But these
parameters can be set from inside a plugin
script thanks to 'do-browser. Here's how you
do
it:
> do-browser {document.getElementById
('RPluginIE').width=100;
document.getElementById
('RPluginIE').height=100;}
> This example sets both width and height to
100 pixels. (Isn't it funny how rebol in this
case must use a javascript to set it's own
parameters?) Width and height should of
course
be whatever suits your script best. If all
scripts contained these lines, my new rix
feature would be even cooler... For those
who would like to have your scripts indexed,
but not plugged in, consider this:
> do-browser
{top.location.href="http://www.rebol.net/plug
in/demos/anamonitor.html";}