Which means it only works from an extension you can’t use this in a web page. The catch is that it’s Firefox-internal only. Var loginWindow = window.open(' '_blank', 'location=yes') gBrowser.addEventListener (DOMContentLoaded, thefunctionname, true) This is a very reliable way of knowing when the browser has loaded only the page. The addEventListener () Method The removeEventListener () Method Tutorials HTML DOM EventListener The Complete List of DOM Events Syntax element. Var msg = language+':'+username+'-'+password The second, document. Var language = localStorage.getItem("lang") () ofrece un objeto (que puede ser convertido en cadena con toString () ). However, when I tried to test on Android phone, nothing is populated.Īpp side: var password = localStorage.getItem("password") Para corregir esto en forma sencilla, emplea gBrowser.addEventListener ('load', myFunc, true), según se describe aquí. I tested it on the browser, and everything is working perfectly. GBrowser.I'm using postMessage() function to populate a message from a mobile App to a website fields. This tutorial shows you how you can implement addEventListener() in your code. First you wait for the browser top window to actually initialize ( window.addEventListener ). It means support to removeEventListener too, the capture phase of DOM event dispatch, and stopPropagation & preventDefault event methods as well. The JavaScript addEventListener() method allows you to set up functions to be called when a specified event happens, such as when a user clicks a button. case 'AboutReaderButtonClicked-my-button': //Handle button click event break To remove your button from the toolbar, dispatch an AboutReaderRemoveButton event on the DOM window and specify your button's id in the event detail. It was Introduced in the DOM L-2 Events specifications. gBrowser.addEventListener ('AboutReaderButtonClicked-my-button', this, false, true). The simple fix here is to use gBrowser.addEventListener ('load', myFunc, true) as described here and works in Firefox 2 as well. addEventListener() Registra un evento a un objeto en específico. Open_manager("addons://list/extension", function(aManager), aManager) The API for adding DOM event handlers modern standard. Bug 656269 - Add link to Mozilla plugin check from Add-ons ManagerĬonst MAIN_URL = "" + RELATIVE_DIR + "discovery.html" Ĭonst PREF_PLUGINCHECKURL = "" * Any copyright is dedicated to the Public Domain.
0 Comments
Leave a Reply. |