如何使用chrome.tabs.executeScript触发输入事件
我下面的代码不起作用:(
script.js
chrome.tabs.executeScript(null, {file:"jquery.js"}, function() {
chrome.tabs.executeScript(null, {
code: `
var word = "bla bla";
var enter = $.Event("keydown", {
keyCode: 13
});
$("#chatbox").val(${word}).trigger(enter);
`
});
});