ded/script.js

Position of Javascript inclusion

Closed this issue · 2 comments

Hi there,
in the current scriptjs version, Javascript resources are appended before title,meta and css resources of the page.

I think is better to include the javascript dependency after lastChild inside "head tag" to maintain the right structure of my html code.

FIX

In line 75:

head.insertBefore(el, head.firstChild);

instead of

head.insertBefore(el, head.lastChild);

Luciano

ded commented

i think you meant that the other way. you want lastChild instead of firstChild, correct?

Yes, correct! ;)