Quote Originally Posted by softv View Post
...it looked like that the above resulted in the existing function
[Document.addEventListener('DOMContentLoaded', function ()] in my ".js" file
to not to take effect. ...
If it is enclosed by "my" outer "onload"-callback-snippet, then "your" (inner) event-listener-installation comes "too late" ...
since you prepare your listening, when the document-load-event has already happened (was already catched by me) -
and therefore installing the Listener "at that point in time" will never trigger the code in "your" inner callback-function-block...

Easy solution would be, to remove your own listener-installation from your js-source-file
(also in preparation for a potentially upcoming bugfix by MS for the AddScriptToExecuteOnDocumentCreated-call).

Olaf