Open GoogleCodeExporter opened 9 years ago
I forgot to mention my changes are at line 24 and lines 76 to 93
Original comment by vascowhite
on 10 Aug 2011 at 5:37
Since EDK doesn't use those libraries, I don't think it makes sense to hardcode
them in the core. It would make it easier to be sure all mods using that
library used the same version, but do you really want to depend on someone that
doesn't even use the library to decide what is there?
For now you would be better off using Page::addHeader() to add the script line.
You will get multiple copies if multiple mods add their script, but so far this
is not a problem.
Longer term, would adding getHeaders() be enough? You could then use string
functions to search for 'jquery', for example, to see if the library was loaded.
If there's any more demand for an EDK-specified set of libraries, such as your
code has, I don't mind adding it, I just have doubts about how well maintained
it would be. *Any* more demand. ;)
Original comment by kovellia
on 11 Aug 2011 at 12:08
"Longer term, would adding getHeaders() be enough?"
Yes, I think that would probably do the job. So long as there is a way of
checking what is already loaded I suppose. Would that make it into 3.3?
Original comment by vascowhite
on 11 Aug 2011 at 11:01
Yes, 3.3. Or 4.0, whichever is next.
I'm actually leaning back to having some libraries specified in the core now.
^^ If there's going to be a problem with mods wanting different versions of a
library, it's actually more likely if the version is chosen by which mod loads
first. So it's probably more helpful to have the core specify the version, even
if it's out of date.
So, are there any other libraries common enough to include?
Original comment by kovellia
on 11 Aug 2011 at 11:48
I'm not sure what other mod devs would want to see, but for me I think jquery
would be the main one. I haven't used any others to any great extent, but maybe
prototype and dojo would be worth thinking about.
Maybe it would be a question for you to ask in the mod section of the forum?
I don't think the libraries need to be included unless requested by a mod if
such a mechanism can be set up. I agree that the core should specify the
version of the library that is loaded. This all depends on mods being well
behaved ofcourse :)
I don't think there is any harm in more niche libraries being included with the
mod as there is less likelyhood of duplication.
Original comment by vascowhite
on 11 Aug 2011 at 12:41
Added this with r1486. I'll add any other to it library if there's demand and
it seems useful enough.
Original comment by kovellia
on 11 Aug 2011 at 1:19
Quick work, thanks.
Original comment by vascowhite
on 11 Aug 2011 at 1:33
Original issue reported on code.google.com by
vascowhite
on 10 Aug 2011 at 5:35Attachments: