在Angular的index.html里插入script,拦截所有动态创建标签页的场景
生活随笔
收集整理的這篇文章主要介紹了
在Angular的index.html里插入script,拦截所有动态创建标签页的场景
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
注意,下面這段代碼只能插入在Angular應用的index.html里,直接插入任何Component的index.html里不會生效:
<script>console.log("Jerry");debugger;var scripts = document.querySelectorAll("script");var old = document.createElement;var _this = window.document;document.createElement = function(input){console.log("trying to create new tag: " + input);return old.call(_this, input);}debugger; </script>總結
以上是生活随笔為你收集整理的在Angular的index.html里插入script,拦截所有动态创建标签页的场景的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: steam查看云存档图文教程
- 下一篇: Angular应用动态创建style标签