Closed RalfEggert closed 8 years ago
@RalfEggert Sounds good; feel free to submit a pull request!
I'm not sure why I used headScript(). I think I copied it from somewhere. The reason it's at the bottom is to speed up page loading.
EDIT: I remember now. The reason is that I prefer all JavaScript at the bottom so rendering of the page is not being blocked if you have several JavaScript libraries to load. headScript()
does exactly what it needs to do, you could call it footerScript(), but then you might still use the headScript() to add JavaScript libraries. That's why I just use that helper and place it at the bottom.
What I should have done there is add a comment and explain the reason why it is down there.
@weierophinney PR is there
Close with #45.
I wonder if it is a bug or done by intention. When the Bootstrap and jQuery JS files are added to the
Zend\View
layout theheadScript()
view helper is used.https://github.com/zendframework/zend-expressive-skeleton/blob/master/src/ExpressiveInstaller/Resources/templates/zend-view-layout.phtml#L73
I think the
inlineScript()
view helper might be a better choice.