chrome.tabs.onUpdated, changeInfo.status start "complete"

5.027 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Wesllei H.

ungelesen,
09.09.2010, 16:19:4309.09.10
an Chromium-extensions
Chrome 6.0.472.55

This is an excerpt from my code:
-----------------------------------------------------------------------------------------------------------------------------
chrome.tabs.update(tab.id,update,function(utab){
chrome.tabs.onUpdated.addListener(function (tabId,info,tab){
console.log(info.status)
if(info.status == "complete"){
insertScript(tab);
//chrome.tabs.onUpdated.removeListener(arguments.callee);
}
});
});
-----------------------------------------------------------------------------------------------------------------------------
The log:
complete
loading
complete

By entering the event, the variable "info.status" has the value
"complete", but really have not updated the page.

The line "chrome.tabs.onUpdated.removeListener(arguments.callee);"
just removing the event before running the script.

Excuse the language, I used an automatic translator!

PhistucK

ungelesen,
10.09.2010, 15:04:4510.09.10
an Wesllei H., Chromium-extensions
Try to also log the URL (info.url), it might give you a hint for what is going on.

PhistucK




--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Die Nachricht wurde gelöscht

Wesllei H.

ungelesen,
10.09.2010, 18:00:5510.09.10
an Chromium-extensions
"console.log(info)" instead of "console.log(info.status)"
Results:
Object
status: "complete"
__proto__: Object
Object
status: "loading"
url: "http://xxxxxx/"
__proto__: Object
Object
status: "complete"
__proto__: Object
Other log in this stretch:
"chrome.tabs.update(tab.id,update,function(utab){
console.log(utab);"
Result:
Object
id: 401
incognito: false
index: 13
selected: true
status: "loading" <======
title: "Speed Dial"
url: "http://xxxxxxxx/"
windowId: 1
__proto__: Object
After function chrome.tabs.update the tab.status has value "loading",
but to enter the event the value changes "complete".
This really was to be normal behavior?
Anyway, thanks!

On 10 set, 15:04, PhistucK <phist...@gmail.com> wrote:
> Try to also log the URL (info.url), it might give you a hint for what is
> going on.
>
> ☆*PhistucK*
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>
> > .
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten