Plain javascript api to asynchronously load javascript or css files#13407
Conversation
go go go 🚀 |
3298dba to
25e658c
Compare
|
@ChristophWurst @skjnldsv I have moved the loader to the webpack build in core/ and made it extend the existing window.OCP object. Should we have this as a separate entrypoint and chunk or keep it in the one bundle for now? Besides that, it is ready for review. |
I think that is fine for now. We should be able to refactor that and move code around if necessary :) |
0dbe21f to
b40dd20
Compare
I agree. Basically the OCP stuff should always be loaded if possible anyway. So makes sense to have this in the dist pack. |
b40dd20 to
6cbd09f
Compare
|
So this can go in? |
|
Yes, please review. |
rullzer
left a comment
There was a problem hiding this comment.
Looks good to me and will make lazy loading much better :D
|
This will give a nice conflict with #13635 🤐 |
| if (msie > 0 || trident > 0) { | ||
| cssVars(); | ||
| cssVars({ | ||
| watch: true |
There was a problem hiding this comment.
poor browser will die of exhaustion ⚰️
There was a problem hiding this comment.
pff so be it ;) No need to keep everybody stuck with crappy old stuff just ebcause of IE ;)
|
Please rebase and rebuild to resolve the conflict. |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6cbd09f to
64b5c0c
Compare
This PR adds a javascript only public API to replace OC.addScript and OC.addStyle (which require jquery) to dynamically load js and css files after the initial loading.
Waiting for #13156 to integrate it into the webpack build.
Uses: