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

5,019 views
Skip to first unread message

Wesllei H.

unread,
Sep 9, 2010, 4:19:43 PM9/9/10
to 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

unread,
Sep 10, 2010, 3:04:45 PM9/10/10
to 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.


Message has been deleted

Wesllei H.

unread,
Sep 10, 2010, 6:00:55 PM9/10/10
to 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>
> > .
Reply all
Reply to author
Forward
0 new messages