【问题标题】:Chrome devtools extension inspect windowChrome devtools 扩展检查窗口
【发布时间】:2014-03-13 13:13:38
【问题描述】:

我使用 chrome.devtools.inspectedWindow.onResourceContentCommitted.addListener 事件来获取检查窗口上的 css 更改。

chrome.devtools.inspectedWindow.onResourceContentCommitted.addListener(function(resource, content) {
    // some code
});

当我更改具有资源文件的 css 时,它可以完美运行。但是,当我更改文档(html 或 css)时,它不会触发事件。

我想念什么吗?文档的事件是否不同?

谢谢,

塔尔。

【问题讨论】:

  • 你找到解决办法了吗?

标签: javascript google-chrome google-chrome-extension google-chrome-devtools


【解决方案1】:

onResourceContentCommitted

在提交资源的新版本时触发(例如,用户 在开发者工具中保存资源的编辑版本)

所以您需要保存更改才能触发它

【讨论】:

  • 嘿,我确实获得了资源更改,但我需要更改文档,例如内联 css 或 DIV 中的文本。 :) 谢谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-04-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-05-25
  • 1970-01-01
相关资源
最近更新 更多