JQuery getScript equivalent in prototype

Is there any jQuery getScript equivalent in Prototype?

+3
source share
1 answer
var head;

var script;

head = $$('head')[0];
if (head)
{
    script = new Element('script', { type: 'text/javascript', src: 'dynamic.js' });
    head.appendChild(script);
}
+5
source

Source: https://habr.com/ru/post/1744132/


All Articles