【发布时间】:2011-10-27 13:42:42
【问题描述】:
我正在编写(或尝试编写)我的第一个 Chrome 扩展程序,但我无法弄清楚我不断收到的这个错误。我的后台代码是
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
console.log('works?');
chrome.tabs.executeScript(null, {code:"document.body.style.fontSize = 20"});
console.log('print again');
</script>
</body>
当我尝试运行此扩展程序时,我收到错误: tabs.executeScript 期间出错:未知错误。扩展/扩展进程 bindings.js:85
有谁知道这可能是什么或如何解决它?当我不包含行 chrome.tabs.executeScript 时,我没有收到错误,无论我为 chrome.tabs.executeScript 的参数编写什么,我都会收到错误消息。 当我在每当单击 browserAction 时调用的函数中包含 chrome.tabs.executeScript 时,我也会收到错误
任何帮助将不胜感激,谢谢!
【问题讨论】:
标签: html google-chrome google-chrome-extension