Bug 211 : add mayscript="true" to applet html is the javascript library is imported
Last modified: 2005-11-26 06:00




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P5
Severity:
enhancement

 

Reporter:
jedierikb
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2005-11-14 09:07
adding the attribute mayscript="true" to the applet html element ensures that java and
javascript will talk to each other.
Additional Comment #1 From fry 2005-11-14 13:53
interesting.. i see three options

1) we include the tag when the javascript lib is exported. this requires the export code to
know about the javascript lib and give it special treatment (the sort of caveats in code that
can complicate things and introduce bugs). it's not a general solution so it's a bit of a
concern.. do we start doing this with other libs as well? the pro is that it "just works."

2) we always include the MAYSCRIPT tag on everything. no special code, but is there a
downside to telling a browser that the applet is javascript ready even though it's not?

3) we make people do it by hand, because it's a minority of users that use the javascript lib.
one can copy the applet.html file from the lib directory to the sketch folder and include the
mayscript tag in that version so that it always works that way. in fact, an item for the tools
menu could be made that says "add mayscript version of applet.html to sketch". this would
be the most flexible, but is somewhat awkward.
Additional Comment #2 From fry 2005-11-26 06:00
just added it to the default html, not gonna bother with figuring out whether javascript is
imported or not. hopefully this won't throw off the browsers or anything.