Cross-browser library dependencies (js, css)?

Hi.


I used a little changed plugin for jQuery is $.include to manage dependencies and loading of required scripts/styles from the ini file, until I realized that it is very strange behavior in IE(and 9 versions too) — sometimes the callback is invoked three times, files can be underused, odd elusive error. Accordingly made a bunch of hacks in which everything seems to work, but somehow unstable and on crutches.


Is there an analogue of this extension which is working fine in all modern(and some ancient) browsers? I'm very picky — the callback at the end of the script or download link and import procedures.
October 8th 19 at 01:40
3 answers
October 8th 19 at 01:42
Solution
Not tried it myself but read about using requirejs. Itself yuzayu backbone js for client side, I think to try requirejs backbonetutorials.com/organizing-backbone-using-modules/

Then there's this approach habrahabr.ru/company/mailru/blog/136899/ (Mail, Yandex, etc...):

"Let the resulting HTML that was the result of testing all of our logic will be the config that need to be connected."
As described above, requireJS is a great option. From myself I will add that the choice of script role script loader'not as important as he used the approach to manage dependencies/modularity (the same as requireJS can be used with multiple approaches). It can be AMD (Asynchronous Module Definition) or CommonJS or UMD. It is also worth mentioning that the specification is already ES harmony modules and module falls in loader'y. My favorite for use in web AMD, and what others say. Plugin system for AMD, by the way, will allow you to upload styles and any other resources.

If true, that's a very comprehensive article about modularity in JS (English): Writing Modular JavaScript With AMD, CommonJS & ES Harmony. I think everyone should know frontend developer. - joyce68 commented on October 8th 19 at 01:45
Thanks for the links, I esteem. But I don't have a lot of modules and the main objective was to 'fuck value mother download Yes you all right!' :) - Easton_Kessl commented on October 8th 19 at 01:48
PS: hard for me Pontedera to call, but sometimes you have to do it, especially because the application is simple and also coder to drive would be irrational. - Easton_Kessl commented on October 8th 19 at 01:51
October 8th 19 at 01:44
In this post there is a link on the comparison and the volume list of this kind of tools.
There is a link on the funky pivot table — spreadsheets.google.com/lv?key=tDdcrv9wNQRCNCRCflWxhYQ - joyce68 commented on October 8th 19 at 01:47
October 8th 19 at 01:46
Yepnope.js? Actually, I'd better write something.
Maximalism to write everything yourself has passed. Thanks for the info about the library. - joyce68 commented on October 8th 19 at 01:49

Find more questions by tags jQueryJavaScriptCross-browserismInternet Explorer