onli wrote:I don't remember anymore oO. I remember there was something, maybe the cache invalidation of the entry editor? But that would be in the core now. Theme specific entry javascript, as in the photo theme?
I don't, either. And the thing is, these are
backend JS assets. Why would we need them in the preview iframe? There is nothing going on in there that is part of the
backend theme, all JS that is required in that iframe should be part of the
frontend theme.
I stumbled across this because with the correct “routing” of frontend + backend assets, the admin/serendipity_editor.js now throws an error in themes that do not use Modernizr (like clean-blog), so
Code: Select all
if(Modernizr.indexeddb && {$use_autosave})
does not work within the iframe (because Modernizr is not available in the iframe if the theme to be previewed does not include it). And I
assume that this might speed up iframe preview a bit considering that those two files are not exactly slim …
Let's see … plugins.js is a combined and minified version of all backend JS plugins, that includes Magnific Popup, the equal heights script, tabs, canvas to Blob, autoscroll, sortable, cookie, details polyfill and accessifyHTML5. If any of those are required, it is because some function from serendipity_editor.js is applied within the preview iframe. Does the whole part concerning {$updertHooks} and messages maybe need something from that file?
serendipity_editor.js is our “backend JS function lib”, most of it is about adding functionality to the editor and/or related to the media db. About the only things I could see being needed here are autosave and cookies …? (But yes, I can and will test this a little.)
YL