Apps documentation for firefox OS - firefox-os

After installing Gaia to my phone. In most apps buttons are not working. I have to debug that.
Is there any documents which will explain by each app by app basis.
I have solved all HTML and CSS problem but not able to find the code in .js files. Is it documented any where that in which .js file button events are handled.
Thanks for the help.

From Firefox 33 (this is not in the stable release) you should have a little 'ev' flag next to an element when it has events attached. You can then use this to attach to an event handler. See this blogpost.
Otherwise go to the Debugger with the App manager attached. Click on 'Expand panes' (next to the search box), and you can then choose the Events pane. All registered event listeners are located here. If you toggle the checkbox the code will automatically break when the event happens and you can debug it.

Related

Is it possible to move Google Chrome tab between windows? got it :)

Edit: Thank you wOxxOm. It worked :)
chrome.tabs.move(XXX,{windowId:YYY, index:ZZZ})
Somehow I did not see the move option :(
I am writing simple Google Chrome web extension and I want to manipulate the tabs and windows. I actually want to be able to move a tab between the windows. The tab will have programatically spawned dynamic page, that I do not want to reload. The windowId is not listed in the modifiable properties chrome.tabs.
Am I missing something or it is currently not supported? What are the workarounds?
p.s. In extreme case also powershell or .Net might be acceptable (I have total control of the target PC). Currently spawning clearly distinguishable iframe over the web pages (background script injected and message listener) but the iframe gets reloaded, which I want to avoid.
p.p.s. Workaround might be to detect the currently active window and spawn new tab in the active window (if required), but this would require to save the page state, close the inactive tab and spown new one in the active window (this should be possible)
p.p.p.s. Main target is Google Chrome, but want it also for Microsoft Edge. Hopefully also for other browsers.
Edit: Thank you wOxxOm. It worked :)
chrome.tabs.move(XXX,{windowId:YYY, index:ZZZ})
Somehow I did not see the move option :(

When ToastBar messages are manually cleared, components below them are clicked as well... Any suggestions?

I am testing a mobile app I have built and noticed that when I manually clear a ToastBar message through the touch interface, if there is a Component beneath it, such as a Button, it is clicked as well.
I know that in Android native development, it is possible to mark a Component in a way that does not allow this to happen. Does anyone know if there is such a method or "attribute" in Codename One too?

HTML Audio in IE

I am having an issue in IE 10 and IE 11 where if the audio device is disabled my website will not load. Looking at the console the load does not progress past loading the first audio item. I am using soundjs does anyone know if there is a way to detect if the hardware is disabled in the browser in order for me to add some kind of error message asking the user to please enable their sound device?
From the documentation
The function:
createInstance ( src [startTime=null] [duration=null] )
Works like this:
Creates a AbstractSoundInstance using the passed in src.
If the src does not have a supported extension or if there is no
available plugin, a default AbstractSoundInstance will be returned
that can be called safely but does nothing.
If you can test for the default AbstractSoundInstance, then you'll know when plugins are not available on the clients browser.
This looks like an issue with soundJS because when testing on createjs.com/soundjs the issue is re-created.
Visit createjs.com/soundjs
Head down to test the sounds and click to play.
Disable your machines sound bu right clicking in the tool bar and selecting disable.
Reload the page.
Now sounds do not load.
Side by side comparrison

How is the panel displayed when launching Chrome Hangout extension made to be always on top and pinned?

When launching the Chrome Extension Google-Hangouts, a panel initially appears that lists members and a link/button to create a new Hangout.
This panel is initially pinned to the bottom right of the browser window. When pinned like this, it remains always on top as a browser navigation session continues: users can go to different URLs, change tabs, etc. and that panel stays at the bottom right and stays on top of all other windows (or at least on top of the main browser window).
Once it's unpinned, you can drag it around the window, but it no longer stays always on top.
My question is, how was that achieved - what code, or what functions, do i need to call to create that window/panel so that it stays initially pinned and always on top? Is there some binding to some native code that's involved? Some other approach?
If anyone know and can show or explain, i would be hugely grateful as this feature is key to an extension i'm trying to build.
Thanks a lot!
This may not be an answer but to get a clue of what is happening I extracted the crx file to view its content there are a few OS specific files : ace.dll , libace.so and ace. After researching a bit i found this. This is a plugin. Hangouts extension is using ace plugin which is actually running on your desktop(i'm not sure about this). You can check this article
I found this related post: How to build an chrome extension like Google Hangouts
ACE is actually not what makes the window, Chrome has that capability built in, apparently. Even if you don't enable panels, extensions from Google can still make them, provided your OS is capable.

How to programmatically toggle the console panel from a custom developer tools Chrome extension?

Is there a way to programmatically toggle the console from inside a custom devtools panel?
What's happening is that on the stock panels, you can press Esc to toggle the bottom console panel; but it seems that inside a custom devtools panel, this doesn't work.
The fallback would be to catch the key press and toggle it programmatically but I can't figure out how to do the second part.
I dug through some of the "official" code for devtools and found the _toggleConsoleButtonClicked method attached to the WebInspector object but I can't find how to access that object from my context.
Any pointers would be appreciated!
For context, I'm working with the Backbone devtools extension.
PS: there are more keyboard shortcuts that stop working. Things like Ctrl/Cmd+[number] to switch to a different panel, Ctrl/Cmd+R to reload the page. That might mean that it's more of a feature request for Chrome than something I'm missing. In the meantime, if you have ideas for some of these, I'll take them!
You have to enable Developer Mode in chrome://extensions/. Here is a nice tutorial to debug Chrome extensions http://developer.chrome.com/extensions/tut_debugging.html
I found this issue relative to your question:
https://bugs.chromium.org/p/chromium/issues/detail?id=445240
I don't know where is it now...

Resources