How to include JavaScript file or library in Chrome console?

后端 未结 10 1896
广开言路
广开言路 2020-11-27 08:58

Is there a simpler (native perhaps?) way to include an external script file in the Google Chrome browser?

Currently I’m doing it like this:

document.         


        
10条回答
  •  伪装坚强ぢ
    2020-11-27 09:34

    In chrome, your best option might be the Snippets tab under Sources in the Developer Tools.

    It will allow you to write and run code, for example, in a about:blank page.

    More information here: https://developers.google.com/web/tools/chrome-devtools/debug/snippets/?hl=en

提交回复
热议问题