When trying to set a new icon for my chrome extension, it only gives me the string option Lets use. I'm trying to use the dictionary so that Chrome can choose the best icon based on the user. Even I have so far:
Clear:
"icons": {"16": "Picture / icon page", "48": "Image / icon", "128": "image / icon 128.png"}, "browser_app": {"default_icon": {"16": "image / icon page", "48": "image / icon 48 . Png "," 128 ":" images / icon128.png "},} ...
content_script.js:
chrome.browserAction.setIcon ({Path: {"16": "Picture / icon page", "48": "Picture / icon 48.png", "128": "Picture / icon 128.png"}});
< / Pre>When my code reaches the setIcon code, it throws this error:
Error: invalid value for reasoning 1. Property 'path': Value is not any Match valid type options
I have tried a few things but the only way to work for it is to ring a dictionary Pair is a link to add a string
The problem is that Chrome is expected to have some sizes , And if there is something then it throws this error. / P>
Not very informative, I agree.
Right now, the documentation says:
If the number of image pixels that are equal to a screen space unit
scale
, then the image with the size will be selectedscale * 19
. Initially only the scales 1 and 2 will be supported.
Therefore, it only size 19
and < 38
. Anything else in the dictionary will be the result of the above disturbances.
Note that the image is not for this exact size; It will be small as needed.
Comments
Post a Comment