Search completed in 1.01 seconds.
WindowEventHandlers.onunload - Web APIs
the
onunload property of the windoweventhandlers mixin is the eventhandler for processing unload events. these events fire when the window is unloading its content and resources. the resource removal is processed after the unload event occurs. note: browsers equipped with pop-up blockers will ignore all window.open() method calls in
onunload event handler functions. syntax window.addeventlistener("unload", function(event) { ... }); window.
onunload = function(event) { ... }; typically, it is better to use window.addeventlistener() and the unload event, instead of
onunload. specifications specification status comment html living standardthe definition of '
onunload' in that specification. living standard html 5.1the definition of 'globaleventhand...
onunload - XUL
this code is used by some programmers to annoyingly pop up alert boxes preventing the users from leaving the page. closing the window calls this eventhandler on the prefwindow. ...
Creating Event Targets - Archive of obsolete content
modules as event targets we can adapt this code into a separate module that exposes the sdk's standard event interface. to do this we'll use the event/core module. create a new file in "lib" called "bookmarks.js", and add the f...
... we use any other module that emits module-level events, such as tabs. for example, we can adapt "index.js" as follows: var bookmarks = require("./bookmarks"); function logadded(uri) { console.log("added: " + uri); } function logvisited(uri) { console.log("visited: " + uri); } exports.main = function() { bookmarks.on("added", logadded); bookmarks.on("visited", logvisited); }; exports.
onunload = function() { bookmarks.removelistener("added", logadded); bookmarks.removelistener("visited", logvisited); } classes as event targets sometimes we want to emit events at the level of individual objects, rather than at the level of the module. to do this, we can inherit from the sdk's eventtarget class. eventtarget provides an implementation of the functions needed to add and remove even...
...for example, you can listen to the panel object's show event either by calling: mypanel.on("show", listenerfunctio...
...andled for you. ...
Listening for Load and Unload - Archive of obsolete content
to follow this tutorial you'll need to have learned the basics of jpm. if your add-on exports a function called main(), then that function will be called whenever the add-on is loaded, and it will be passed an object containing a string describing the reason it was loaded as well as any arguments passed to it. if your add-on exports a function called
onunload(), then that function will be called when the add-on is unloaded, and it will be passed a string describing the reason it was unloaded. you don't have to use exports.main() or exports.
onunload(). you can just place your add-on's code at the top level instead of wrapping it in a function assigned to exports.main(). it will be loaded in the same circumstances, but you won't get access to the load/unload reason or arguments. exports.main(...
...l require() statements have run (so generally after all dependent modules have been loaded). exports.main = function (options, callbacks) {}; options is an object describing the parameters with which your add-on was loaded. ...
...ll dependent modules have been loaded). exports.main = function (options, callbacks) {}; options is an object describing the parameters with which your add-on was loaded. options.loadreason options.loadreason is one of the following strings describing the reason your add-on was loaded: install enable startup upgrade downgrade exports.
onunload() if your add-on exports a function called
onunload(), that function will be called when the add-on is unloaded. exports.
onunload = function (reason) {}; reason reason is one of the following strings describing the reason your add-on was unloaded: uninstall disable shutdown upgrade downgrade if your add-on is disabled, then uninstalled, your
onunload listener will only be called once, with the disable reason. this happens because disabl...
... when the add-on is unloaded. exports.
onunload = function (reason) {}; reason reason is one of the following strings describing the reason your add-on was unloaded: uninstall disable shutdown upgrade downgrade if your add-on is disabled, then uninstalled, your
onunload listener will only be called once, with the disable reason. this happens because disabling an add-on also disables its
onunload listeners, so there is no listener remaining when the add-on is uninstalled. for more, see bug 627432, in particular comment 12 on that bug. ...
prefwindow - Archive of obsolete content
ng the general behavior of the window and in particular the list of prefpanes. prefer the classical window.opendialog() with the following window features: "chrome,titlebar,toolbar,centerscreen,dialog=yes". ...
...be passed to the window } function initwithparams(aparams) { // this will also get called when an already open window is activated using openwindow() } closing a prefwindow sometimes you need to do things when the prefwindow is closed, such as things that can't (or shouldn't) be handled as preferences, such as saving passwords or updating sqlite data. ...
... closed, such as things that can't (or shouldn't) be handled as preferences, such as saving passwords or updating sqlite data. to do this, you can set the prefwindow's
onunload attribute to a function that will be run when the prefwindow is closed. <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="my-config-dialog" title="my application: configuration"
onunload="
onunload(event.target)"> </prefwindow> function
onunload(prefwindow) { // do actions there like saving values, password setting (that is not handled as a preference), etc. return true; } opening a modal sub dialog a sub dialog can only be opened via document.documentelement and not via window. therefore, an example call to opensubdialog() would look like this: document.documentelement.o...
HTMLBodyElement - Web APIs
ode to be called when the resize event is raised. windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised. windoweventhandlers.onunhandledrejection an eventhandler representing the code executed when the unhandledrejection event is raised, indicating that a promise was rejected but the rejection was not handled. windoweventhandlers.
onunload is an eventhandler representing the code to be called when the unload event is raised. specifications specification status comment html living standardthe definition of 'htmlbodyelement' in that specification. living standard technically, the event-related properties onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagech...
...ised. specifications specification status comment html living standardthe definition of 'htmlbodyelement' in that specification. living standard technically, the event-related properties onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagechange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and
onunload, have been moved to windoweventhandlers. htmlbodyelement implements this interface. html 5.1the definition of 'htmlbodyelement' in that specification. recommendation html5the definition of 'htmlbodyelement' in that specification. recommendation the following properties are now obsolete: alink, bgcolor, background, link, text, and vlink. the following properties ...
... html5the definition of 'htmlbodyelement' in that specification. recommendation the following properties are now obsolete: alink, bgcolor, background, link, text, and vlink. the following properties have been added: onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and
onunload. document object model (dom) level 2 html specificationthe definition of 'htmlbodyelement' in that specification. obsolete no change from document object model (dom) level 1 specification. document object model (dom) level 1 specificationthe definition of 'htmlbodyelement' in that specification. obsolete initial definition. ...
Window - Web APIs
r called when the pointer enters the window globaleventhandlers.onmouseup called when any mouse button is released windoweventhandlers.onoffline called when network connection is lost. see offline event. windoweventhandlers.ononline called when network connection is established. see online event. windoweventhandlers.onpagehide called when the user navigates away from the page, before the
onunload event. see pagehide event. windoweventhandlers.onpageshow called after all resources and the dom are fully loaded. see pageshow event. windoweventhandlers.onpopstate called when a back button is pressed. globaleventhandlers.onreset called when a form is reset globaleventhandlers.onresize called continuously as you are resizing the window. globaleventhandlers.onscroll called when the scr...
... is an eventhandler representing the code to be called when the selectionchange event is raised. windoweventhandlers.onstorage called when there is a change in session storage or local storage. see storage event globaleventhandlers.onsubmit called when a form is submitted windoweventhandlers.onunhandledrejection an event handler for unhandled promise rejection events. windoweventhandlers.
onunload called when the user navigates away from the page. events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. error fired when a resource failed to load, or can't be used. for example, if a script has an execution error or an image can't be found or is invalid. also available via the onerror property. languagec...
... domcontentloaded fired when the document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading. load fired when the whole page has loaded, including all dependent resources such as stylesheets images. also available via the onload property. unload fired when the document or a child resource is being unloaded. also available via the
onunload property. manifest events appinstalled fired when the browser has successfully installed a page as an application. also available via the onappinstalled property. beforeinstallprompt fired when a user is about to be prompted to install a web application. also available via the onbeforeinstallprompt property. messaging events message fired when the window receives a message, for ex...
/loader - Archive of obsolete content
on to allow use of the observer service for defining hooks reacting on the unload of a specific loader. the sdk builds a higher level api on top of this for handling unloads and performing cleanup: let unloadsubject = require('@loader/unload'); let observerservice = cc['@mozilla.org/observer-service;1']. getservice(ci.nsiobserverservice); let observer = { observe: function
onunload(subject, topic, reason) { // if this module is unloaded then `subject.wrappedjsobject` will be // `unloadsubject`. `topic` will be `'sdk:loader:destroy'`, and // `reason` will be a string describing the reason (e.g. `'disable'`). if (subject.wrappedjsobject === unloadsubject) console.log("i am about to unload, reason is " + reason); }}; observerservice.addobserver(observer, 'sdk:load...
Bookmarks - Archive of obsolete content
itemmoved: function(aitemid, aoldparent, aoldindex, anewparent, anewindex) {}, queryinterface: xpcomutils.generateqi([components.interfaces.nsinavbookmarkobserver]) }; // an extension var myextension = { // this function is called when my add-on is loaded onload: function() { bmsvc.addobserver(myext_bookmarklistener, false); }, // this function is called when my add-on is unloaded
onunload: function() { bmsvc.removeobserver(myext_bookmarklistener); }, dosomething: function() { alert("did something."); } }; see also nsinavbookmarksservice nsinavbookmarkobserver places using xpcom without chrome - bookmark observer ...
Adding Events and Commands - Archive of obsolete content
ion is triggered by event handlers attached to dom elements. the most commonly used event is the onload event, which is used in overlays and other windows to detect when the window has loaded and then run initialization code: // rest of overlay code goes here. window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); you can do something similar with the
onunload event, to do any cleanup you may need. please read appendix a for recommendations on how to use the load event to initialize your add-on without having a negative performance impact on firefox. another way to attach event handlers, just like html, is to place the handler in the xul code: <overlay id="xulschoolhello-browser-overlay" onload="xulschoolchrome.browseroverlay.init();" xmlns="htt...
Index - Archive of obsolete content
no summary! 982 onselect no summary! 983 ontextcommand xul attributes, xul reference no summary! 984 ontextentered xul attributes, xul reference no summary! 985 ontextrevert xul attributes, xul reference no summary! 986 ontextreverted xul attributes, xul reference no summary! 987
onunload xul attributes, xul reference no summary! 988 open needshelp, xul attributes, xul reference, needsattention no summary! 989 ordinal xul attributes, xul reference no summary! 990 orient xul attributes, xul reference no summary! 991 pack xul attributes, xul reference no summary! 992 page ...
JavaScript crypto - Archive of obsolete content
this allows the page to automatically login and logout based on the presence of the smartcard. generating keys and issuing user certificates there are several crypto object methods used in generating keys for certificates: generatecrmfrequest(), importusercertifi...
jspage - Archive of obsolete content
new window(window);var document=new native({name:"document",legacy:(browser.engine.trident)?null:window.document,initialize:function(a){$uid(a);a.head=a.getelementsbytagname("head")[0]; a.html=a.getelementsbytagname("html")[0];if(browser.engine.trident&&browser.engine.version<=4){$try(function(){a.execcommand("backgroundimagecache",false,true); });}if(browser.engine.trident){a.window.attachevent("
onunload",function(){a.window.detachevent("
onunload",arguments.callee);a.head=a.html=a.window=null; });}return $extend(a,document.prototype);},afterimplement:function(b,a){document[b]=document.prototype[b]=a;}});document.prototype={$family:{name:"document"}}; new document(document);array.implement({every:function(c,d){for(var b=0,a=this.length;b<a;b++){if(!c.call(d,this[b],b,this)){return false;}}return t...
statusBar - Archive of obsolete content
m to the statusbar. many of the options are optional. syntax jetpack.statusbar.append(options); possible options are: url width (string/length) the width of the panel-item html (string) the html code which will be used inside the item onload (event) this event fires when the item was appended. its acutally not implemented in the current version. onready (event) occurs when the item was loaded
onunload (event) triggers when the item was removed. example jetpack.statusbar.append({ html: 'hello <i>world</i>!', onready: function(widget){ $(widget).click(function(){ jetpack.tabs.open("http://www.jogkey.de"); }); } }); ...
Attribute (XUL) - Archive of obsolete content
oncommandupdate ondialogaccept ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onpopupshown onsearchcomplete onselect ontextcommand ontextentered ontextrevert ontextreverted
onunload onwizardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent parsetype persist persistence phase pickertooltiptext placeholder popup position predicate preference preference-editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny search...
XUL Events - Archive of obsolete content
this event is sent to a listbox or tree when an item is selected. attribute: onselect unload this event is sent to a window when the window has closed. this is done after the close event. you should place this event handler on the window element. attribute:
onunload mutation dom events event description domattrmodified this event is sent to an element when one of its attributes is modified. in the event handler, you can retrieve the attribute that was modified using the event's attrname prope...
Index - Archive of obsolete content
no summary! 247 onselect no summary! 248 ontextcommand xul attributes, xul reference no summary! 249 ontextentered xul attributes, xul reference no summary! 250 ontextrevert xul attributes, xul reference no summary! 251 ontextreverted xul attributes, xul reference no summary! 252
onunload xul attributes, xul reference no summary! 253 onwizardback xul attributes, xul reference no summary! 254 onwizardcancel xul attributes, xul reference no summary! 255 onwizardfinish xul attributes, xul reference no summary! 256 onwizardnext xul attributes, xul reference no summary! 257 open ...
XUL Questions and Answers - Archive of obsolete content
emplate be used for rss? you should be able to use a xul template to display feeds, although you may have to write the feed data to an rdf datasource first. specifying window.onload function to specify a function to run when the window is loaded,add the following code between the script tags in the xul file: window.addeventlistener("load", function(e) { startup(); }, false); similarly, for
onunload use the code: window.addeventlistener("unload", function(e) { shutdown(); }, false); is there an event which is called when the firefox browser is initialized? an event is initiated when the application starts up and when the profile is changed. for more information please look at the following link: nsextensionmanager.js is nsivariant fully supported using python? python has full suppor...
Performance
pdates or the user turning it off and on will load to unload/reload events. not handling those properly can lead to duplicate or conflicting code execution, especially when messages are sent. it can also lead to conflicts between the old and new code. under some circumstances it may even cause exceptions when attempting to register something twice under the same id. ...
Manipulating bookmarks using Places
itemmoved: function(aitemid, aoldparent, aoldindex, anewparent, anewindex) {}, queryinterface: xpcomutils.generateqi([components.interfaces.nsinavbookmarkobserver]) }; // an extension var myextension = { // this function is called when my add-on is loaded onload: function() { bmsvc.addobserver(myext_bookmarklistener, false); }, // this function is called when my add-on is unloaded
onunload: function() { bmsvc.removeobserver(myext_bookmarklistener); }, dosomething: function() { alert("did something."); } }; see also nsinavbookmarksservice nsinavbookmarkobserver places using xpcom without chrome - bookmark observer ...
nsIDocShell
have differently than a non-app tab docshell in some cases, such as when handling link clicks. docshells are not app tabs unless told otherwise. isexecutingonloadhandler boolean returns true if the docshell is currently executing the onload handler. read only. isinunload boolean find out whether the docshell is currently in the middle of a page transition (after the
onunload event has fired, but before the new document has been set up) read only. isoffscreenbrowser boolean if true, this docshell is not visible in the traditional sense, but is being actively rendered to the screen (such as by being painted to a canvas), and should be treated accordingly. layouthistorystate nsilayouthistorystate loadedtransindex long kee...
Using the Beacon API - Web APIs
url and the data to send. the data argument is optional and its type may be an arraybufferview, blob, domstring, or formdata. if the browser successfully queues the request for delivery, the method returns true and returns false otherwise. the following example specifies a handler for the load and beforeunload events. the handler calls sendbeacon() with the current url. ...
GlobalEventHandlers.onclose - Web APIs
syntax target.onclose = functionref; value functionref is a function name or a function expression. the function receives an event object as its sole argument. only one onclose handler can be assigned to an object at a time. ...
HTMLFrameSetElement - Web APIs
w event is raised. windoweventhandlers.onpopstate is an eventhandler representing the code to be called when the popstate event is raised. windoweventhandlers.onresize is an eventhandler representing the code to be called when the resize event is raised. windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised. windoweventhandlers.
onunload is an eventhandler representing the code to be called when the unload event is raised. specifications specification status comment html living standardthe definition of 'htmlframesetelement' in that specification. living standard from the html5 snapshot, the windoweventhandlers interface now have a onlanguagechange property. html5the definition of 'htmlf...
Index - Web APIs
5091 windoweventhandlers.onunhandledrejection api, event handler, html dom, promises, property, reference, windoweventhandlers, events, onunhandledrejection the onunhandledrejection property of the windoweventhandlers mixin is the eventhandler for processing unhandledrejection events. these events are raised for unhandled promise rejections. 5092 windoweventhandlers.
onunload api, event handler, makebrowseragnostic, property, reference, windoweventhandlers the
onunload property of the windoweventhandlers mixin is the eventhandler for processing unload events. these events fire when the window is unloading its content and resources. the resource removal is processed after the unload event occurs. 5093 windoworworkerglobalscope api, dom, dom api...
SVGElement: unload event - Web APIs
the unload event is fired when the dom implementation removes an svg document from a window or frame. bubbles no cancelable no interface svgevent event handler property
onunload examples svgelem.addeventlistener('unload', () => { console.log('svg unloaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'unload' in that specification. candidate recommendation initial definition ...
SVGElement - Web APIs
ed in the browser. also available via the onload property. resize fired when an svg document is being resized. also available via the onresize property. scroll fired when an svg document view is being shifted along the x and/or y axes. also available via the onscroll property. unload fired when the dom implementation removes an svg document from a window or frame. also available via the
onunload property. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification. candidate recommendation adds the dataset property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgelement' in that specification. recommendation initial definition ...
Window: unload event - Web APIs
the unload event is fired when the document or a child resource is being unloaded. bubbles no cancelable no interface event event handler property
onunload it is fired after: beforeunload (cancelable event) pagehide the document is in the following state: all the resources still exist (img, iframe etc.) nothing is visible anymore to the end user ui interactions are ineffective (window.open, alert, confirm, etc.) an error won't stop the unloading workflow please note that the unload event also follows the document tree: parent frame unload will happen before child frame unload (see example below). examples <!doctype html> <html> <head> <title>parent frame</title> <script> window.addeventlistener('beforeunload',...
WindowEventHandlers - Web APIs
jected and the rejection has been handled. windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised. windoweventhandlers.onunhandledrejection is an eventhandler representing the code to be called when the unhandledrejection event is raised, indicating that a promise was rejected but the rejection was not handled. windoweventhandlers.
onunload is an eventhandler representing the code to be called when the unload event is raised. methods this interface defines no method. specifications specification status comment html living standardthe definition of 'windoweventhandlers' in that specification. living standard no change since the latest snapshot, html 5.1. html 5.1the definition of 'wind...
Using XMLHttpRequest - Web APIs
ed if you conclude with an xmlhttprequest receiving status=0 and statustext=null, this means the request was not allowed to be performed. it was unsent. a likely cause for this is when the xmlhttprequest origin (at the creation of the xmlhttprequest) has changed when the xmlhttprequest is subsequently open(). this case can happen, for example, when one has an xmlhttprequest that gets fired on an
onunload event for a window, the expected xmlhttprequest is created when the window to be closed is still there, and finally sending the request (in otherwords, open()) when this window has lost its focus and another window gains focus. the most effective way to avoid this problem is to set a listener on the new window's activate event which is set once the terminated window has its unload event triggered...
<body>: The Document Body element - HTML: Hypertext Markup Language
n has been restored. onpopstate function to call when the user has navigated session history. onredo function to call when the user has moved forward in undo transaction history. onresize function to call when the document has been resized. onstorage function to call when the storage area has changed. onundo function to call when the user has moved backward in undo transaction history.
onunload function to call when the document is going away. rightmargin the margin of the right of the body. this method is non-conforming, use css margin-right property on the element instead. text foreground color of text. this method is non-conforming, use css color property on the element instead. topmargin the margin of the top of the body. this method is non-conforming, use css margin-to...
SVG Event Attributes - SVG: Scalable Vector Graphics
an event attribute, following the same requirements as for html event attributes. the global event attributes are available on all svg elements. other event attributes are available on a case by case basis for each elements. all event attribute are not animatable. ...
requiredFeatures - SVG: Scalable Vector Graphics
ca> elements http://www.w3.org/tr/svg11/feature#basicfilter the browser supports the <filter>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <feoffset>, <fetile>, <fefuncr>, <fefuncg>, <fefuncb> and <fefunca> elements http://www.w3.org/tr/svg11/feature#documenteventsattribute the browser supports the
onunload, onabort, onerror, onresize, onscroll and onzoom attributes http://www.w3.org/tr/svg11/feature#graphicaleventsattribute the browser supports the onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout and onload attributes http://www.w3.org/tr/svg11/feature#animationeventsattribute the browser supports the onbegin, onend, onrepeat and o...
SVG Attribute reference - SVG: Scalable Vector Graphics
ation timing attributes begin, dur, end, min, max, restart, repeatcount, repeatdur, fill animation value attributes calcmode, values, keytimes, keysplines, from, to, by, autoreverse, accelerate, decelerate animation addition attributes additive, accumulate event attributes animation event attributes onbegin, onend, onrepeat document event attributes onabort, onerror, onresize, onscroll,
onunload global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onm...