chrome.windows vs chrome.tabs extra prop

86 views
Skip to first unread message

Wolf War

unread,
Feb 21, 2015, 3:17:20 AM2/21/15
to chromium-...@chromium.org
I've noticed that tab object in chrome.windows.getAll (probably in individual .get too)
is adding additional property favIcoImg (in base64)

This is not documented anywhere, because, in chrome.windows.getAll callback, Window object is referring to array of tabs from chrome.tabs tab object, and there is only favIcoUrl (no favIcoImg)

is there any way we can access those favIcoImg data from tabs API and in which point they are created?... can it be used somehow without windows API?

Wolf War

unread,
Feb 21, 2015, 3:18:22 AM2/21/15
to chromium-...@chromium.org
btw. I'm not sure that I've seen it before
I'm using Canary channel


PhistucK

unread,
Feb 21, 2015, 4:39:52 AM2/21/15
to Wolf War, Chromium-extensions
I cannot find it in the source code or in chromium-checkins... I am not sure how it got there.
Perhaps it was check in by mistake and removed after the canary has already been released. Wait a few days and see if it keeps appearing. If it does, reply back here, please.

Also, make sure you did not load any library that might be messing with it.

Thank you!


PhistucK

On Sat, Feb 21, 2015 at 10:18 AM, Wolf War <wolf...@gmail.com> wrote:
btw. I'm not sure that I've seen it before
I'm using Canary channel


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/96d8641d-0656-46b2-b785-383de444f66b%40chromium.org.

Wolf War

unread,
Feb 21, 2015, 5:57:11 AM2/21/15
to chromium-...@chromium.org, wolf...@gmail.com
I just tested it in Chrome stable (+ canary 42.0.2310.2 canary (64-bit))
I had Version 40.0.2214.1111 m and made update to 40.0.2214.115 m. In both versions favIcoImg is present, so obviously is there for long time now.
I'm not using any library's (I'm not sure if they could even alter native Chrome API result).
What I'm doing is this:

chrome.windows.getAll({'populate': true}, function (windows) {
var sessionWindows = windows;
console.log(sessionWindows);
              
                /*..... the rest of the code....*/
});

and the console is displaying like in the image (for non-chrome pages, eg. extensions, //newab etc....).
I guess it's a valid feature and I wasn't aware of it... (nor it is documented anywhere)

PhistucK

unread,
Feb 21, 2015, 6:04:13 AM2/21/15
to Wolf War, Antony Sargent, Chromium-extensions
Antony, as far as I looked, I cannot even find it in the source code. Do you have any idea regarding this favIcoImg field?


PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.

Wolf War

unread,
Feb 22, 2015, 5:11:23 AM2/22/15
to chromium-...@chromium.org, wolf...@gmail.com, asar...@chromium.org
I'm sorry, Its my custom property that I'm adding much later in the code (I totally forgot about it)
But I didn't know that code in callback also behaves asynchronously.
because:

chrome.windows.getAll({'populate': true}, function (windows) {
var sessionWindows = windows;
console.log(sessionWindows); // <-------- second line logged to console
for loop1 {
/*some code*/
}
for loop2 {
/*some code*/
for loop3 {
/*some code*/
for loop4 {
/*some code*/
if test {
tb[j]['favIcoImg']// <-------- here I'm adding property
}
}
}
}
});


code between console and adding prop is just nested loops, but still, property is listed on console

PhistucK

unread,
Feb 22, 2015, 6:47:11 AM2/22/15
to Wolf War, Chromium-extensions, Antony Sargent
Logging is partly asynchronous -
The preview is synchronous, I think, but expanding the object shows the current snapshot (there is a warning sign that tells you that).
If you break at the logging line, expanding the object in the console should not show the later addition.


PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.

Wolf War

unread,
Feb 22, 2015, 10:54:06 AM2/22/15
to chromium-...@chromium.org, wolf...@gmail.com, asar...@chromium.org
ok, tnx for clearing that up
btw, I don't see any warnings sign (yellow triangle)

PhistucK

unread,
Feb 22, 2015, 12:59:32 PM2/22/15
to Wolf War, Chromium-extensions, Antony Sargent
Sorry, my memory misled me. It is a blue rectangle with an exclamation point to the right of the preview that only shows up when you expand the logged object. Hovering over it shows -
"Object state below is captured upon first expansion."


PhistucK

On Sun, Feb 22, 2015 at 5:54 PM, Wolf War <wolf...@gmail.com> wrote:
ok, tnx for clearing that up
btw, I don't see any warnings sign (yellow triangle)

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.

Wolf War

unread,
Feb 22, 2015, 2:35:43 PM2/22/15
to chromium-...@chromium.org, wolf...@gmail.com, asar...@chromium.org
ahaa, thing are clearer now...I saw that rectangle million times and never paying attention to it... yea, and the tooltip say it all :)
tnx again 
Reply all
Reply to author
Forward
0 new messages