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!
> 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!
> -- > You received this message because you are subscribed to the Google Groups > "Chromium-extensions" group. > 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> > . > For more options, visit this group at > http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
"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:
> > 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!
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > 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>
> > .
> > For more options, visit this group at
> >http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.