Element#insert should leave external script tags
Reported by metavida | June 2nd, 2008 @ 06:28 PM | in 1.6.1
You cannot currently use Element#insert to add a script tag linking to an external file (e.g. with a src attribute).
$(document.body).insert('<script type="text/javascript" src="../test.js"></script>')
There are two related problems that should be addressed:
- String#stripScripts should have the option to leave script tags with the src attribute, and Element#insert should use that option.
- String#extractScripts should ignore the content of script tags with the src attribute (correct me if this is incorrect behavior).
I'm in the process of writing some tests & will upload them soon.
Comments and changes to this ticket
-
metavida June 2nd, 2008 @ 06:31 PM
- no changes were found...
-
-
-
-
Tobie Langel June 16th, 2008 @ 02:05 AM
- → State changed from new to enhancement
-
John-David Dalton June 16th, 2008 @ 10:04 PM
- → Milestone changed from to 1.6.1
-
John-David Dalton June 16th, 2008 @ 10:18 PM
I think IE may still have an issue with that. For scripts with a src attribute it should probably manually insert a script dom element with the src attribute via the evalScripts method.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
