Closed Bug 267953 Opened 20 years ago Closed 19 years ago

Allow text/ecmascript for SVG script elements

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: tor, Assigned: tor)

References

Details

Attachments

(1 file)

Lots of SVG content in the wild uses text/ecmascript for the type
attribute of <svg:script>.  To allow better interoperability with
other SVG implementations I think we should allow this mimetype.

Allowing this mimetype has been proposed for the entire browser in
bug 62485, but as that shows no signs of being resolved soon we
can deal with this for only SVG using a very simple patch.
Attachment #164746 - Flags: review?(jonathan.watt)
Attachment #164746 - Flags: review?(jonathan.watt) → review+
so we're ok with invading ietf's namespace? good to know.
If we allow this, it should be allowed for all content, not just SVG.
I don't think we should do this while this is not an official mimetype
(ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/text)
text/javascript isn't official either, yet we accept that.  The SVG
specification specifically spells out text/ecmascrpt.
I think Ian's right -- we should either allow this for all scripts, or not at all...
Re: comment 4: the URL now is http://www.iana.org/assignments/media-types/text/.

ECMA and w3.org folks have been contacted; I'll keep this bug apprised of plans
and progress.

/be
brendan:

Any progress on this?
A new Internet-Draft is available from

  http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-01.txt
  http://www.websitedev.de/ietf/draft-hoehrmann-script-types-01.txt

If you have comments please send them to the ietf-types mailing list,
see http://www.alvestrand.no/mailman/listinfo/ietf-types for details.
There's a v02 version of the draft available:

http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-02.txt

Rick
just voted for that bug for practical reasons:

I got a bunch of SVG example files together with the batik plugin for exlipse IDE.

The ones that contain script are all defined as text/ecmascript - don't work in
mozilla.

Once I change that to text/javascript most examples run fine in svg-enabled
mozilla. But then the eclipse internal (batik-based) svg renderer doesn't like
the files anymore untill i change scripting type bach to ecma :(
It looks like this is being fixed as part of bug 62485.
Fixed by the fix for bug 62485.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 299003 has been marked as a duplicate of this bug. ***
Does this also apply to scripts that are linked? I have an SVG with this as a
script:

<script type="text/ecmascript" xlink:href="javascript/svg.js" />

which doesn't work. When changing it to type/javascript it works. I am using
Deer Park alpha 1 for this. Perhaps the fix is in a later version (or will be in
Fx 1.1) ?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: