Can't see dynamically loaded code in Chrome Developer Tools 22

后端 未结 5 1575
悲哀的现实
悲哀的现实 2021-01-31 09:46

When I dynamically load a snippet of html containing javascript via AJAX, I cannot see that content in the source tab in the developer tools window in Chrome 22.0.1229.94. Tell

5条回答
  •  南旧
    南旧 (楼主)
    2021-01-31 10:08

    You can use //@ sourceURL. Chrome doesn't seem to be supporting //@ sourceURL for inline scripts. However, it does work on eval expressions. This article gives more details about naming eval blocks and naming of any anonymous functions in your code.

    Instead of using eval, you can try embedding a script tag or JSONP may be.

    Varunkumar Nagarajan

提交回复
热议问题