That's because it is rinting to a different console than background. Is a different view, the problem is that it doesn;t appear in chrome://extensions as active because when the popup closes, it is not active anymore. What you can do to debug UI and logic, is to open the popup's content in a new window. That way you will see it on chrome://extensions and you can inspect it.
You can also make the browser action communicate to a log method of your own in the background page, which will print it using console.log, so it will be viewable when inspecting the background page. Hope this helps! Marcos On Fri, Oct 30, 2009 at 6:19 AM, Nicholas Pufal <[email protected]>wrote: > > It's being really hard to debug. > > When I access through chrome-extension://, sweet, all works as a > normal HTML page, and I can debug using console.log(). > > However, when trying to achieve the same using it as a browser action, > console.log() also doesn't work. The exact same code, simply won't > print anything in the console. > > I tried to cause a forced refresh using window.location, > location.reload(),window.refresh and others, but no luck. > > Guess it's better wait for it to be more mature, and support those > functionalities. > > > On Oct 29, 7:58 pm, Antony Sargent <[email protected]> wrote: > > Usually console.log() is helpful here, since that logs to the javascript > > console inside the inspector. Unfortunately you can't currently inspect a > > browser actions popu, but you can often do development against the popup > > page specified in your manifest by just opening it in a tab, e.g. > > > > chrome-extension://YOUR_EXTENSION_ID_HERE/popup.html > > > > > > > > On Thu, Oct 29, 2009 at 3:51 PM, Pam Greene <[email protected]> wrote: > > > > > alert(), prompt(), and confirm() haven't yet been implemented in > > > extensions. I'm working on them, but for now you'll need a different > > > test function. > > > > > - Pam > > > > > On Thu, Oct 29, 2009 at 3:46 PM, Nicholas Pufal <[email protected]> > > > wrote: > > > > > > Sorry to post again. > > > > > > Just a quick example of my problem. Try to run this within a browser > > > > action: > > > > > > <button onClick="alert(Hi');">Hi</button> > > > > > > Won't work. Do the same within an basic HTML page, and works. > > > > > > Guess there is limitation? > > > > > > On Oct 29, 7:41 pm, Nicholas Pufal <[email protected]> wrote: > > > >> Oh I did a new discover. > > > > > >> The form itself is being posted. In my case after the form > submission, > > > >> the input values should be recorded into a cookie, and they are, in > > > >> fact, being recorded. However, the popup is not being refreshed > which > > > >> causes the impression of the form not being send. > > > > > >> Instead of the default behavior - POST information and refresh the > > > >> page - it's simply posting it without refresh. So the user needs to > > > >> submit the form (to save the settings into a cookie) and in order to > > > >> see changes based on the saved information, he needs also to click > > > >> twice in the browser action: one to close the popup, and another > time > > > >> to re-open it , which is going to make a new check and retrieve > > > >> information based on the newest settings. > > > > > >> Is it possible to refresh the content of the opened popup? Or in > order > > > >> to do that I will always need to click and open again, creating a > new > > > >> request? > > > > > >> It seems I'm not able to put an javascript alert or manipulate > somehow > > > >> the popup. It simply doesn't return anything. > > > > > >> On Oct 29, 6:38 pm, Nicholas Pufal <[email protected]> wrote: > > > > > >> > Nothing happens. It's like a button without actions. A fake > button. > > > > > >> > The form structure is pretty simple: > > > > > >> > <form action="generator.html" method="post" name="configform"> > > > >> > ..form elements here... > > > >> > </form> > > > > > >> > Really weird. I thought this was a limitation. > > > > > >> > On Oct 29, 1:04 am, Aaron Boodman <[email protected]> wrote: > > > > > >> > > On Wed, Oct 28, 2009 at 12:23 PM, Nicholas Pufal < > > > [email protected]> wrote: > > > > > >> > > > I have an extension in which is necessary to submit a form via > > > POST. > > > >> > > > As any other HTML page, the expected result was to click > "Submit" > > > and > > > >> > > > it should submit the form, reloading the page. However within > > > browser > > > >> > > > actions, I'm not able to do that more. I simply cannot submit > my > > > form > > > >> > > > once the submit is triggered. > > > > > >> > > It seems reasonable to me that this should work. What happens > > > instead? > > > > > >> > > - a > > > -- Marcos Aruj Alvarez Ingeniero de Software ------------------------------- [email protected] ----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en -~----------~----~----~----~------~----~------~--~---
