-1
我对内容脚本有问题。Chrome扩展内容脚本DOM未加载
当oi使用断点运行它的工作正常,但没有断点无法正常工作。 $(本)的.html(a.farewell);不更新DOM。
我的清单包含 “run_at”: “document_end”
$(function() {
$(document).ready(function() {
console.log("ready!");
var a = "1";
var rows = $("tr.row");
rows.each(function (i) {
var id = $(this).attr("data-bull-id");
chrome.runtime.sendMessage({ getStorage: id }, function (response) {
a = response;
console.log(response.farewell);
$(this).html(a.farewell);
});
// this.innerHTML = a.test;
});
console.log("ready2!");
});
});
您是否尝试删除*两个* DOM准备好的处理程序? – adeneo
可否请您添加您的html –
adeneo,是的,我尝试删除这两个处理程序 - 没有影响; – Actimele