addScriptToHead reports false positives when checking for duplicates
This is an open discussion with 3 replies, filed under General.
Search
I think somewhere I read some guidelines which suggested that extensions included the name in any js/css files.
Not sure if intended but might make sense for example if you bundle a library.js
and another extension also includes library.js
you do not want to load this twice too. Assuming that library.js
refers to the same library.
I think somewhere I read some guidelines which suggested that extensions included the name in any js/css files.
Yeah. I read it as well. Here's the guide, under Conventions.
@gunglien this makes perfectly sense, but imagine the case two extensions bundle jquery-ui-1.8.18.custom.js
. Both files share the name but not necessarily the same content. I think, adding something like add global option to addScriptToHead
would be convenient
Create an account or sign in to comment.
Just filed a possible bug on github.
I ran into trouble when installing codemirror and filemanager, since both extensions add an
int.js
file to the document head. Seems likeaddScriptToHead
is only validating the scripts name instead of its path if$duplicate
is set tofalse
. I think this is not the intended behavior.