yiisoft / jquery-pjax

pushState + ajax = pjax
http://pjax.herokuapp.com
MIT License
144 stars 40 forks source link

It makes it possible to append scripts synchronously #22

Closed fourteenmeister closed 9 years ago

fourteenmeister commented 9 years ago

Sometimes it is necessary to add scripts dynamically. If you enable async option (true) pjax will operate as usual. If false, scripts to load synchronously. Why do it? Scripts are loaded on the fly, and client scripts waiting until all the necessary scripts to connect to and then work out fine.

fourteenmeister commented 9 years ago

Are you sure appending to head will load scripts in async mode?

Default async is true, so pjax work by default. Not quite correctly put it in the description. Fixed.

samdark commented 9 years ago

Looks good to me but I think it's generic enough to go directly into pjax upstream. Worth creating a pull request against it as well.

fourteenmeister commented 9 years ago

I think it's generic enough to go directly into pjax upstream.

Already, but they rejected. https://github.com/defunkt/jquery-pjax/pull/423#event-244872260

SilverFire commented 9 years ago

30 fixes the problem generally

SilverFire commented 9 years ago

Should be fixed by https://github.com/yiisoft/jquery-pjax/pull/30