If a JavaScript function in a web page adds STYLE or SCRIPT elements to the HEAD element, will the browser load the specified styles and scripts, or will such programmatic changes to the DOM ignored after the page has been loaded?
Is the behavior consist across all mainstream browsers?
Yes, you can add scripts and stylesheets via JavaScript, and they will work. Google Analytics does this, for example.