google-chrome-devtools

How can I inspect and tweak :before and :after pseudo-elements in-browser?

て烟熏妆下的殇ゞ 提交于 2019-11-26 22:44:27
问题 I have created some fairly elaborate DOM elements with an :after pseudo-element, and I'd like to be able to inspect and tweak them in either Chrome Inspector or Firebug or equivalent. Despite this feature being mentioned in this WebKit/Safari blog post (dated 2010), I can't find this feature at all in either Chrome or Safari. Chrome does at least have checkboxes to inspect :hover, :visited and :active states, but :before and :after are nowhere to be seen. Additionally, this blog post (dated

How do you save an entire folder from Google Chrome's Developer Tools' Sources tab?

☆樱花仙子☆ 提交于 2019-11-26 22:34:11
问题 In Google Chrome's Developer Tools' Sources tabs there is a left side panel which has three tabs with the first one being Sources. Is there a way to download a folder with multiple files and nested folders from this interface? You can right click individual files and 'Save as...' but this is cumbersome. 回答1: Currently not possible. "Saving whole folders is not currently supported." https://github.com/GoogleChrome/devtools-docs/issues/30#issuecomment-76999063 回答2: It's not possible to do

Find JavaScript function definition in Chrome

左心房为你撑大大i 提交于 2019-11-26 22:13:37
问题 Chrome's Developer Tools rock, but one thing they don't seem to have (that I could find) is a way to find a JavaScript function's definition. This would be super handy for me because I'm working on a site that includes many external JS files. Sure grep solves this but in the browser would be much better. I mean, the browser has to know this, so why not expose it? What I expected was something like: Select 'Inspect Element' from page, which highlights the line in the Elements tab Right-click

How to detect the memory allocations that are triggering garbage collection in JavaScript?

百般思念 提交于 2019-11-26 22:04:39
问题 While looking for performance issues in a JavaScript library (rivets), i found that garbage collection occurs three to four times in a run, taking ~15% of execution time (using Chrome DevTools JS Profile). There are at least 30 places where temporary functions / objects are created being potential candidates for the reason of the garbage collection. I'd like to know if there's a way to find what functions are responsible for the allocation of the memory being garbage collected, so i can focus

sending message to chrome extension from a web page

。_饼干妹妹 提交于 2019-11-26 22:02:07
I want to send message from the console of the random web page to my chrome extension. chrome.extension.sendMessage doesn't seem to work. Silviu-Marian According to the official docs you should use postMessage in the sender and message event listener in the receiver. Here is an example: Your website's page.html var data = { type: "FROM_PAGE", text: "Hello from the webpage!" }; window.postMessage(data, "*"); Content script: (injected using chrome.tabs.executeScript(tabid, {code:... ) window.addEventListener("message", function(event) { // We only accept messages from ourselves if (event.source

How do you inspect the web inspector in Chrome?

∥☆過路亽.° 提交于 2019-11-26 21:38:57
According to Google this you to be accomplished by visiting "chrome-devtools://devtools/devtools.html" in Chrome but now visiting that page in the stable version of Chrome (or Canary), just shows a 99% stripped version of the inspector. To reiterate my "title" this is in reference to "inspecting" the inspector. Not just inspecting a normal webpage. And while I don't think it's necessary to know to resolve the issue, I"m inspecting the inspector so I can style it as discussed by Paul Irish and here: http://darcyclarke.me/design/skin-your-chrome-inspector/ JDavis Follow these easy steps! Press

Chrome DevTools Devices does not detect device when plugged in

孤者浪人 提交于 2019-11-26 21:13:01
I cannot seem to get the DevTools Devices feature to work on my Samsung Galaxy S4 even after following the steps outlined at https://developers.google.com/chrome-developer-tools/docs/remote-debugging My device has Chrome v32 and Chrome Beta v33, while my PC has Chrome v33 and Chrome Canary v35. USB debugging is enabled on my device and device driver has been installed. I have never got the prompt as outline in step 3 from the above link to approve the RSA key fingerprint yet the device does connect to my PC to allow media transfer. I have even revoked all USB debugging authorizations as per

Find JavaScript function definition in Chrome

好久不见. 提交于 2019-11-26 21:09:27
Chrome's Developer Tools rock, but one thing they don't seem to have (that I could find) is a way to find a JavaScript function's definition. This would be super handy for me because I'm working on a site that includes many external JS files. Sure grep solves this but in the browser would be much better. I mean, the browser has to know this, so why not expose it? What I expected was something like: Select 'Inspect Element' from page, which highlights the line in the Elements tab Right-click the line and select 'Go to function definition' Correct script is loaded in the Scripts tab and it jumps

How to send message FROM native app TO Chrome extension?

此生再无相见时 提交于 2019-11-26 20:27:58
问题 I have read docs, but still cannot realize. I have desktop application written in C and Chrome extension. I know how to receive this message in my chrome extension: port.onMessage.addListener(function(msg) { console.log("Received" + msg); }); What should I write in my C application to send a message to my chrome extension? Python/NodeJS examples are also appropriate. 回答1: In order for a native messaging host to send data back to Chrome, you must first send four bytes of length information and

How to get list of network requests done by HTML

∥☆過路亽.° 提交于 2019-11-26 19:57:36
问题 How can i get the list of network requests using Javascript done by the HTML, as seen in the chrome devtools. For example: This is the devtools for google.com. I want to, using javascript get all these request in a list. is this possible? if yes how? 回答1: Some browsers have implemented a version of the not-yet-standard, Resource Timing API where you can collect some of this information. Some browsers may have some of this info available to browser extensions as part of their developer tools