【发布时间】:2012-02-13 21:16:57
【问题描述】:
弹出页面有chrome.tabs.create函数,后台页面有chrome.tabs.onCreated.addListener,onCreated.addListener中有chrome.tabs.getSelected,不明白为什么代码不能没有警报就继续。代码是这样的
$(document).ready(function() { chrome.tabs.onCreated.addListener(function() {
alert("Login"); //without this can not go on.only click the alert can work
$("#dialog").dialog("open");chrome.tabs.getSelected(null,function(tab) {chrome.tabs.sendRequest(tab.id,
【问题讨论】:
-
请澄清您的问题。很难理解你想要完成什么,什么没有奏效。