Side navigation
#7971 closed enhancement (duplicate)
Opened January 14, 2011 01:37PM UTC
Closed January 14, 2011 05:08PM UTC
Last modified January 14, 2011 05:08PM UTC
load() shouldn't add already referenced scripts
Reported by: | pere.cil@wanadoo.fr | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Suppose the following scenario:
- "document a" contains a reference to jquery, and a jquery plugin.
- "document b" contains a reference to jquery only
- "document a" loads "document b" via the load() method.
Now, the jquery instance of "document a" has been overwritten by the "document b"'s version, and the plugin loaded before on document a is not available anymore in the jquery object.
I'm not sure if this behavior is applicable to every javascript out there, but it could be nice if we could check if a reference already exists in the main document when adding the new javascript via the load() method.