(Please do not mark this question as a duplicate to Can scripts be inserted with innerHTML? because it is not.)
I wonder why a script element created via innerHTML does not get executed when appended to DOM:
container=document.createElement('div');
container.innerHTML='<script>alert()</'+'script>';
document.body.appendChild(container.firstChild);
... while the same script created via document.createElement gets executed when appended to DOM:
script=document.createElement('script');
script.innerHTML='alert()';
document.body.appendChild(script);
It looks to me as inconsistency: in both cases I append a script element (which looks the same), so I do not understand why appending the same script gives different results depending on how this script was generated.