google-chrome-devtools

Find where element is selected in source

♀尐吖头ヾ 提交于 2019-12-12 20:24:59
问题 Is the any way (Chrome Extension) search for all selections of an element in source JavaScript (or CSS for that matter) files? Basically, I want to see where the source code modifies the element. For example, when a button is clicked. Instead of searching for where the button clicked event is bound, Chrome Dev Tools would do it for me and show me. Is this possible within Chrome Dev Tools or an extension? 回答1: There is and it is awesome :) CTRL-SHIFT-F on Windows and CMD-OPT-F on Mac. https:/

When jQuery parsing html - Chrome throwing net::ERR_FILE_NOT_FOUND

狂风中的少年 提交于 2019-12-12 18:36:48
问题 Here is my code: var some_HTML_string = "<img src='images/relative/path.jpg'>"; console.log("about to call $.parseHTML"); $.parseHTML(some_HTML_string) console.log("I've just called $.parseHTML"); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> In Chrome I'm getting error: GET file:///C:/Users/mstefanow/Desktop/images/relative/path.jpg net::ERR_FILE_NOT_FOUND (it doesn't throw this error in IE Edge, IE 11, Firefox 40) I want to solve it in a way that

Measure time taken by Angular to render a directive

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 18:22:21
问题 Is there a way I can measure the amount of time it took Angular to render a directive? Or even simpler, is there a way I can tell how much time it took Angular to detect a change in a data set and render the content of the new data set? For example, let's say I have this: <div ng-repeat="item in items"> {{ item.text }} </div> How can I know how much time it takes between each dataset-change in items and the last DOM-related operation? 回答1: Have you seen Angular Batarang? It has many

How to get access to the list of files of the network tab in chrome devtools?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 18:09:01
问题 I want to create a snippet of code that display the list of all files loaded and shown in the network tab of chrome devtools. Load a page in chrome, press CTRL+SHIFT+I, click network tab, press CTRL+SHIFT+I again to debug the debugger. There's an array called _nodesByRequestId in network_module.js. You can put some breakpoints, refresh the first page so code will halt on them, and then type this._nodesByRequestId to see its content. It works because the debugger is halted in local scope. How

What is the Chrome console displaying with log()?

[亡魂溺海] 提交于 2019-12-12 18:00:48
问题 I think I may have found a bug with Google Chrome (16.0.912.75 m, the latest stable at the time of this writing). var FakeFancy = function () {}; console.log(new FakeFancy()); var holder = { assignTo : function (func) { holder.constructor = func; } }; holder.assignTo(function () { this.type = 'anonymous' }); var globalConstructor = function () { this.type = 'global' } console.log(new holder.constructor()); If you run that block in Firefox, it shows both listed as "Object" with the second

How can I tell which Javascript module created an element/table on a webpage?

淺唱寂寞╮ 提交于 2019-12-12 17:21:30
问题 I started working at a place that has a huge webpage app built already. I have been hired to do front-end testing with Selenium, but I'm curious to see the inner workings of the app. My question is, with Chrome dev tools or something similar, how can I tell what Javascript module created an element / table / form that I am seeing on the page? I can 'inspect element' and look at the DOM, but I want to know which .js file to dig into to to see how the element was built. In essence, in Chrome

Console does not show event source from source map

偶尔善良 提交于 2019-12-12 17:19:26
问题 In FireFox I load my web application which has a Source Map. The Source Map seems to be loaded correctly, as the Debugger tab shows the original source files. However, the Console tab contains only links to the compiled code, instead of the Source Map code. Is a Source mapping done in FireFox Console? Do I have to enable anything? Update: I also tried it in chrome and there the console shows the original location of the event, BUT: only the first time after starting chrome AND only, if I

Why would my app crash in Chrome if I refresh a few times?

十年热恋 提交于 2019-12-12 17:07:58
问题 I'm building a web app that does a lot of DOM manipulation and uses CSS3 effects. I'm repeatedly refreshing the page, and on every 4th or 5th reload, Chrome displays the Aw, snap page indicating a tab crash. I think the page is consistently crashing around that many refreshes, so I don't think it's a probabilistic thing, but rather stems from something building up. How can I examine Chrome crashes to find out some potential culprit causes? I've tried taking CPU profiles and heap snapshots,

red dot in chrome debugger when writing LESS?

浪尽此生 提交于 2019-12-12 14:49:16
问题 I'm transforming my css files into LESS file. only part of my LESS is working well and I see a weird red dot line in the chrome debugger for those problematic lines, any idea what they means? 回答1: http://codemirror.net/doc/releases.html says that Version 2.33 of CodeMirror introduced "Show non-printing characters as red dots." 来源: https://stackoverflow.com/questions/23267505/red-dot-in-chrome-debugger-when-writing-less

Chrome Heap Snapshot — no colors for detached nodes

安稳与你 提交于 2019-12-12 12:37:21
问题 I'm following this tutorial under "Discover detached DOM tree memory leaks with Heap Snapshots". When I search for detached nodes, I see a bunch of "Detached" elements. But when I expand them, none of the contained elements are red or yellow, as described in the tutorial. Has this behavior changed? I'm using 70.0.3538.77 for Mac. 回答1: Following this proposal, the color coding was replaced by icons with tooltips: JS object that is reachable from window Was: yellow highlight Now: icon of a