Search completed in 0.94 seconds.
Object.prototype.watch() - Archive of obsolete content
deprecation warning: do not use
watch() and un
watch()!
...in addition, using
watchpoints has a serious negative impact on performance, which is especially true when used on global objects, such as window.
... the
watch() method
watches for a property to be assigned a value and runs a function when that occurs.
...And 11 more matches
Use watchpoints - Firefox Developer Tools
in the firefox debugger, this information can be provided by
watchpoints.
... by setting a
watchpoint on the property, rather than a breakpoint at a particular line, you can discover where that access occurs.
... there are three types of
watchpoints: get, set, and get or set.
...And 9 more matches
Set watch expressions - Firefox Developer Tools
when debugging code, sometimes it's useful to
watch expressions as executions are paused.
... the debugger features a pane for entering expressions to be
watched (
watch expressions).
... as you step through code, the debugger will
watch the expression and return any results.
...And 4 more matches
Object.prototype.unwatch() - Archive of obsolete content
deprecation warning: do not use un
watch() and
watch()!
...in addition, using
watchpoints has a serious negative impact on performance, which is especially true when used on global objects, such as window.
... the un
watch() method removes a
watchpoint set with the
watch() method.
...And 3 more matches
nsIWindowWatcher
embedding/components/window
watcher/public/nsiwindow
watcher.idlscriptable this interface is the keeper of gecko/dom windows.
...in nsidomwindow aparent, in string aurl, in string aname, in string afeatures, in nsisupports aarguments); void registernotification(in nsiobserver aobserver); void setwindowcreator(in nsiwindowcreator creator); void unregisternotification(in nsiobserver aobserver); attributes attribute type description activewindow nsidomwindow the
watcher serves as a global storage facility for the current active (front most non-floating-palette-type) window, storing and returning it on demand.
...nsiwindow
watcher keeps a list of all top-level dom windows currently open, along with their corresponding chrome interfaces.
...And 2 more matches
Examine, modify, and watch variables - Firefox Developer Tools
just click on the variable's current value and you'll be able to type there:
watch an expression
watch expressions are expressions that are evaluated each time execution pauses.
...to add a
watch expression, click in the box that says "add
watch expression" and enter a javascript expression whose output you'd like to monitor as you step through code.
...the
watch expression does nothing until you begin to step through your code, so nothing happens until you reach a breakpoint.
...And 2 more matches
Geolocation.watchPosition() - Web APIs
the geolocation method
watchposition() method is used to register a handler function that will be called automatically each time the position of the device changes.
... syntax navigator.geolocation.
watchposition(success[, error[, options]]) parameters success a callback function that takes a geolocationposition object as an input parameter.
... options optional an optional positionoptions object that provides configuration options for the location
watch.
...And 2 more matches
Geolocation.clearWatch() - Web APIs
the geolocation.clear
watch() method is used to unregister location/error monitoring handlers previously installed using geolocation.
watchposition().
... syntax navigator.geolocation.clear
watch(id); parameters id the id number returned by the geolocation.
watchposition() method when installing the handler you wish to remove.
... example var id, target, option; function success(pos) { var crd = pos.coords; if (target.latitude === crd.latitude && target.longitude === crd.longitude) { console.log('congratulation, you reach the target'); navigator.geolocation.clear
watch(id); } }; function error(err) { console.warn('error(' + err.code + '): ' + err.message); }; target = { latitude : 0, longitude: 0, } options = { enablehighaccuracy: false, timeout: 5000, maximumage: 0 }; id = navigator.geolocation.
watchposition(success, error, options); specifications specification status comment geolocation api recommendation initial specification.
::-moz-color-swatch - CSS: Cascading Style Sheets
the ::-moz-color-s
watch css pseudo-element is a mozilla extension that represents the color selected in an <input> of type="color".
... note: using ::-moz-color-s
watch with anything but an <input type="color"> doesn't match anything and has no effect.
... examples html <input type="color" value="#de2020" /> css input[type=color]::-moz-color-s
watch { border-radius: 10px; border-style: none; } result specifications not part of any standard.
Adding preferences to an extension - Archive of obsolete content
« previousnext » this article takes the creating a dynamic status bar extension sample to the next level, adding a popup menu that lets you quickly switch between multiple stocks to
watch.
...however, we do need to add one new line to the install.rdf file: <em:optionsurl>chrome://stock
watcher2/content/options.xul</em:optionsurl> this line establishes the url of the xul file that describes the options dialog.
...inside that, we create a file, defaults.js, that describes the default value of our preferences: pref("extensions.stock
watcher2.symbol", "goog"); the standard for third-party preferences, such as those used in extensions, is to use the string "extensions", a period, the name of the extension, another period, then a preference name, as seen in the example above.
...And 27 more matches
Debugger.Object - Firefox Developer Tools
all extant handler methods, breakpoints,
watchpoints, and so on remain active during the call.
...all extant handler methods, breakpoints,
watchpoints, and so on remain active during the call.
...all extant handler methods, breakpoints,
watchpoints, and so on remain active during the call.
...And 12 more matches
Index - Web APIs
1469 geolocation.clear
watch() api, geolocation, geolocation api, method, needsexample, reference, secure context the geolocation.clear
watch() method is used to unregister location/error monitoring handlers previously installed using geolocation.
watchposition().
... 1471 geolocation.
watchposition() api, geolocation, geolocation api, method, needsexample, reference, secure context the geolocation method
watchposition() method is used to register a handler function that will be called automatically each time the position of the device changes.
... 2182 intersectionobserver.disconnect() api, disconnect, intersection observer, intersection observer api, intersectionobserver, method, reference the intersectionobserver method disconnect() stops
watching all of its target elements for visibility changes.
...And 11 more matches
nsIWindowsRegKey
ned long mode); nsiwindowsregkey createchild(in astring relpath, in unsigned long mode); astring getchildname(in unsigned long index); astring getvaluename(in unsigned long index); unsigned long getvaluetype(in astring name); boolean haschanged(); boolean haschild(in astring name); boolean hasvalue(in astring name); boolean is
watching(); void open(in unsigned long rootkey, in astring relpath, in unsigned long mode); nsiwindowsregkey openchild(in astring relpath, in unsigned long mode); acstring readbinaryvalue(in astring name); unsigned long long readint64value(in astring name); unsigned long readintvalue(in astring name); astring readstringvalue(in astring name); ...
... void removechild(in astring relpath); void removevalue(in astring name); void start
watching(in boolean recurse); void stop
watching(); void writebinaryvalue(in astring name, in acstring data); void writeint64value(in astring name, in unsigned long long data); void writeintvalue(in astring name, in unsigned long data); void writestringvalue(in astring name, in astring data); attributes attribute type description childcount unsigned long this attribute returns the number of child keys.
...this method will always return false if start
watching() was not called.
...And 10 more matches
Localizing an extension - Archive of obsolete content
« previousnext » this article expands upon the previous samples on extension writing by adding localization support to our stock
watcher extension.
...the preference dialog, whose xul file is options.xul, has a corresponding options.dtd file that looks like this: <!entity options_window_title "stock
watcher 2 preferences"> <!entity options_symbol.label "stock to
watch: "> the "options_window_title" entity maps to the string "stock
watcher 2 preferences", which is used as the title of the preference window.
... the stock
watcher2.dtd file contains the mappings for the stock
watcher2.xul file: <!entity panel_loading "loading..."> <!entity menu_refresh_now.label "refresh now"> <!entity menu_apple.label "apple (aapl)"> <!entity menu_google.label "google (goog)"> <!entity menu_microsoft.label "microsoft (msft)"> <!entity menu_yahoo.label "yahoo (yhoo)"> update the xul files each xul file needs to reference its corresponding locale file.
...And 9 more matches
nsIPromptService
embedding/components/window
watcher/public/nsipromptservice.idlscriptable this interface can be used to display simple dialogs.
...void alert( in nsidomwindow aparent, in wstring adialogtitle, in wstring atext ); parameters aparent the parent window for the dialog, or null, in which case the parent window will be nsiwindow
watcher.activewindow.
...if set to null the parent window will be nsiwindow
watcher.activewindow.
...And 7 more matches
JXON - Archive of obsolete content
conversion snippets now imagine you have this sample xml document: example.xml <?xml version="1.0"?> <!doctype catalog system "catalog.dtd"> <catalog> <product description="cardigan sweater"> <catalog_item gender="men's"> <item_number>qwz5671</item_number> <price>39.95</price> <size description="medium"> <color_s
watch image="red_cardigan.jpg">red</color_s
watch> <color_s
watch image="burgundy_cardigan.jpg">burgundy</color_s
watch> </size> <size description="large"> <color_s
watch image="red_cardigan.jpg">red</color_s
watch> <color_s
watch image="burgundy_cardigan.jpg">burgundy</color_s
watch> </size> </catalog_item> <catalog_item gender="women's"> <item_number>rrx9856</i...
...tem_number> <discount_until>dec 25, 1995</discount_until> <price>42.50</price> <size description="medium"> <color_s
watch image="black_cardigan.jpg">black</color_s
watch> </size> </catalog_item> </product> <script type="text/javascript"><![cdata[function matchwo(a,b) { if (a < b && a < 0) { return 1; } else { return 0; } }]]></script> </catalog> first, create a dom tree like the previous example as described in the how to create a dom tree article.
... with this algorithm our example becomes: { "catalog": { "product": { "catalog_item": [{ "item_number": { "keyvalue": "qwz5671" }, "price": { "keyvalue": 39.95 }, "size": [{ "color_s
watch": [{ "keyvalue": "red", "keyattributes": { "image": "red_cardigan.jpg" } }, { "keyvalue": "burgundy", "keyattributes": { "image": "burgundy_cardigan.jpg" } }], "keyvalue": null, "keyattributes": { "description": "medium" } }, { "color_...
...And 6 more matches
Supporting private browsing mode - Archive of obsolete content
private browsing notifications there are notifications available that allow you to easily
watch for changes to the status of the private browsing mode, including detecting when it turns on and off.
... in addition, there is a browser:purge-session-history notification that is sent when the browser purges private data that extensions can
watch in order to know when it's time to do the same.
...function privatebrowsinglistener() { this.init(); } privatebrowsinglistener.prototype = { _os: null, _inprivatebrowsing: false, // whether we are in private browsing mode _
watcher: null, // the
watcher object init : function () { this._inited = true; this._os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); this._os.addobserver(this, "private-browsing", false); this._os.addobserver(this, "quit-application", false); try { var pbs = components.classes["@mozilla.org/privatebrowsing...
...And 6 more matches
Working with windows in chrome code
from xpcom components and modules if the window object is unavailable (for example, when opening a window from xpcom component code), you might want to use nsiwindow
watcher interface.
... its parameters are similar to window.open; in fact, window.open's implementation calls nsiwindow
watcher's methods.
... var ww = components.classes["@mozilla.org/embedcomp/window-
watcher;1"] .getservice(components.interfaces.nsiwindow
watcher); var win = ww.openwindow(null, "chrome://myextension/content/about.xul", "aboutmyextension", "chrome,centerscreen", null); window object note the win variable in the above section, which is assigned the return value of window.open.
...And 6 more matches
jpm - Archive of obsolete content
jpm
watchpost package your add-on as an xpi file whenever there is a file change and post that to some url.
... jpm post --post-url http://localhost:8888/ see using post and
watchpost for more information.
... -v --verbose verbose operation: jpm post --post-url http://localhost:8888/ -v jpm
watchpost this command packages the add-on as an xpi file then posts it to some url whenever a file in the current working directory changes.
...And 5 more matches
Index - Firefox Developer Tools
58 edit css filters css, devtools, filters, page inspector, tools css filter properties in the rules view have a circular gray and white s
watch next to them: 59 edit shape paths in css css, devtools, page inspector, rules view, tools, highlighter, shapes the shape path editor is a tool that helps you see and edit shapes created using clip-path and also the css shape-outside property and <basic-shape> values.
... 122 examine, modify, and
watch variables when the code has stopped at a breakpoint, you can examine its state in the variables pane of the debugger: 123 highlight and inspect dom nodes dom node, debugger, devtools, page inspector if you hover over a dom node in the
watch expresions, it will be highlighted in the page.
... 130 set
watch expressions when debugging code, sometimes it's useful to
watch expressions as executions are paused.
...And 5 more matches
Appendix F: Monitoring DOM changes - Archive of obsolete content
for instance, rather than
watching for the creation of <a> elements and adding event listeners to them as they are created, an event listener can be added to the root <html> element, and when the event fires, the event.target and its parents can be searched for a matching element.
... /** *
watches for nodes matching the given css selector to become * available.
... * @param {document} doc the document in which to
watch for new nodes.
...And 4 more matches
Introduction to automated testing - Learn web development
gulp comes with a
watch() function that you can use to
watch your files and run tests whenever you save a file.
... for example, try adding the following to the bottom of your gulpfile.js: gulp.task('
watch', function(){ gulp.
watch('src/*.html', ['html']); gulp.
watch('src/*.css', ['css']); gulp.
watch('src/*.js', ['js']); }); now try entering the gulp
watch command into your terminal.
... gulp will now
watch your directory, and run the appropriate tasks whenever you save a change to an html, css, or javascript file.
...And 4 more matches
Using the Geolocation API - Web APIs
watching the current position if the position data changes (either by device movement or if more accurate geo information arrives), you can set up a callback function that is called with that updated position information.
... this is done using the
watchposition() function, which has the same input parameters as getcurrentposition().
... note: you can use
watchposition() without an initial getcurrentposition() call.
...And 4 more matches
Intersection Observer API - Web APIs
this way, sites no longer need to do anything on the main thread to
watch for this kind of element intersection, and the browser is free to optimize the management of intersections as it sees fit.
...ersect by somewhere around n%, i need to do something." intersection observer concepts and usage the intersection observer api allows you to configure a callback that is called: (1) whenever one element, called the target, intersects either the device viewport or a specified element; for the purpose of this api, this is called the root element or root (2) and whenever the observer is asked to
watch a target for the very first time typically, you'll want to
watch for intersection changes with regard to the element's closest scrollable ancestor, or, if the element isn't a descendant of a scrollable element, the viewport.
... to
watch for intersection relative to the root element, specify null.
...And 4 more matches
Creating a dynamic status bar extension - Archive of obsolete content
download the sample update the install manifest replace all occurrences of the first sample's id, "status-bar-sample-1", with the new sample's id, "stock
watcher", and update the front end metadata to describe our new extension.
...update the chrome manifest the chrome manifest needs only a minor update from the previous sample; simply replace the id of the first sample, "status-bar-sample-1", with the name of the new sample, "stock
watcher".
...write the xul file we need a slightly more complicated xul file this time, in order to add a reference to the javascript code that will do the real work: <?xml version="1.0" encoding="utf-8"?> <!doctype overlay> <overlay id="stock
watcher-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://stock
watcher/content/stock
watcher.js"/> <!-- firefox --> <statusbar id="status-bar"> <statusbarpanel id="stock
watcher" label="loading..." tooltiptext="current value" onclick="stock
watcher.refreshinformation()" /> </statusbar> </overlay> also, notice that the definition of the status bar panel now includes a new property, onclick, which references th...
...And 3 more matches
Index - Archive of obsolete content
312 adding preferences to an extension add-ons, extensions, preferences system, xul this article takes the creating a dynamic status bar extension sample to the next level, adding a popup menu that lets you quickly switch between multiple stocks to
watch.
...between resolving conflicts, finding a good time to land,
watching the tree, and marking bugs as fixed, it takes around half a day.
... 2071 object.prototype.un
watch() debugging, deprecated, javascript, method, object, obsolete, prototype, reference the un
watch() method removes a
watchpoint set with the
watch() method.
...And 3 more matches
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
for example: mozilla mozilla = mozilla.getinstance(); windowcreator creator = new windowcreator(); // implements nsiwindowcreator nsiservicemanager servicemanager = mozilla.getservicemanager(); nsiwindow
watcher window
watcher = (nsiwindow
watcher) servicemanager .getservicebycontractid(ns_window
watcher_contractid, nsiwindow
watcher.ns_iwindow
watcher_iid); window
watcher.setwindowcreator(creator); in this example, we have a java class called windowcreator, which implements the nsiwindowcreator interface, and we want to register it with mozilla.
... to do so, we first get the service manager, through which we can get a reference to mozilla's window
watcher.
...art an xul application, so we get an instance of the xpcom service manager nsiservicemanager servicemanager = moz.getservicemanager(); // now we need to get the @mozilla.org/toolkit/app-startup;1 service: nsiappstartup appstartup = (nsiappstartup)servicemanager.getservicebycontractid("@mozilla.org/toolkit/app-startup;1", nsiappstartup.ns_iappstartup_iid); // get the nsiwindow
watcher interface to the above nsiwindowcreator windowcreator = (nsiwindowcreator)appstartup.queryinterface(nsiwindowcreator.ns_iwindowcreator_iid); // get the window
watcher service nsiwindow
watcher window
watcher = (nsiwindow
watcher)servicemanager.getservicebycontractid("@mozilla.org/embedcomp/window-
watcher;1", nsiwindow
watcher.ns_iwindow
watcher_iid); // set the window creator (...
...And 3 more matches
nsIDOMGeoGeolocation
tion = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsidomgeogeolocation); note: if nsidgeogeolocation throws an exception when importing, try using this: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsisupports); method overview void clear
watch(in unsigned short
watchid); void getcurrentposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback errorcallback, [optional] in nsidomgeopositionoptions options); unsigned short
watchposition(in nsidomgeopositioncallback successcallback, [optional] ...
... methods clear
watch() when the clear
watch() method is called, the
watch() process stops calling for new position identifiers and cease invoking callbacks.
... void clear
watch( in unsigned short
watchid ); parameters none.
...And 3 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
the accessible event
watcher shows what accessible events are being generated by a given piece of software.
...nt_system_contexthelpend event_system_dragdropstart event_system_dragdropend event_system_dialogstart event_system_dialogend event_system_scrollingstart event_system_scrollingend [possibly important, talk to at vendor] event_system_switchstart event_system_switchend event_system_minimizestart event_system_minimizeend event_object_create [don't implement,
watching system generated versions of this event causes assistive technology crashes] event_object_destroy [don't implement,
watching system generated versions of this event causes assistive technology crashes] event_object_show [can be important, depending on project] event_object_hide [can be important, depending on project] event_object_reorder [important for mutating docs] event...
...vendors have found that
watching these events causes crashes.
...And 3 more matches
Using workers in extensions - Archive of obsolete content
so we need to move the refreshinformation() method from the stock
watcher2.js file into a separate file that will host the worker thread.
...let's take a look: startup: function() { // register to receive notifications of preference changes this.prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice) .getbranch("stock
watcher2."); this.prefs.queryinterface(components.interfaces.nsiprefbranch2); this.prefs.addobserver("", this, false); this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.worker = new worker("chrome://stock
watcher2/content/ticker_worker.js"); // small little dance to get 'this' to refer to stock
watcher, not the // worker, when a message is received.
... the
watchstock() and refreshinformation() methods these two methods are very simple.
...And 2 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
you can do this the same way you stop timeouts — by passing the identifier returned by the setinterval() call to the clearinterval() function: const myinterval = setinterval(myfunction, 2000); clearinterval(myinterval); active learning: creating your own stop
watch!
...take a copy of our setinterval-clock.html example, and modify it to create your own simple stop
watch.
... you need to display a time as before, but in this example, you need: a "start" button to start the stop
watch running.
...And 2 more matches
Deployment and next steps - Learn web development
it also starts a development server and
watches for changes, recompiling the app and refreshing the page when a change occurs.
...in this case, svelte won't lunch a web server or keep
watching for changes.
... in the file package.json you can see that the dev and start scripts are just calling rollup: "scripts": { "build": "rollup -c", "dev": "rollup -c -w", "start": "sirv public" }, in the dev script we are passing the -w argument, which tells rollup to
watch files and rebuild on changes.
...And 2 more matches
Hacking Tips
break 'presshell::renderdocument(nsrect const&, unsigned int, unsigned int, gfxcontext*)' set print object on set $x = <your x value> set $y = <your y value> print &((cairo_image_surface_t*)athebescontext->mdt.mrawptr->msurface).data[$y * ((cairo_image_surface_t*)athebescontext->mdt.mrawptr->msurface).stride + $x * ((cairo_image_surface_t*)athebescontext->mdt.mrawptr->msurface).depth / 8]
watch *(char*)<address of previous command> (note: if you set a
watch on the previous expression gdb will
watch the expression and run out of
watchpoint) rr with emacs within emacs, do m-x gud-gdb and replace the command line with rr replay.
... debugging gc marking/rooting the js::debug namespace contains some functions that are useful for
watching mark bits for an individual jsobject* (or any cell*).
...reproduced here: // sample usage from gdb: // // (gdb) p $word = js::debug::getmarkwordaddress(obj) // $1 = (uintptr_t *) 0x7fa56d5fe360 // (gdb) p/x $mask = js::debug::getmarkmask(obj, js::gc::gray) // $2 = 0x200000000 // (gdb)
watch *$word // hardware
watchpoint 7: *$word // (gdb) cond 7 *$word & $mask // (gdb) cont // // note that this is *not* a
watchpoint on a single bit.
...And 2 more matches
Redis Tips
the redis command
watch lets you name keys you're worried about; it causes your next transaction to be immediately aborted if any of the
watched keys has been modified by anyone else.
...}); client.
watch("foo", function( err ){ if(err) throw err; client.get("foo", function(err, result) { if(err) throw err; // process result // heavy and time consuming operation here client.multi() .set("foo", "some heavy computation") .exec(function(err, results) { /** * if err is null, it means redis successfully attempted * the operation.
... you just have to be careful that you check the result type of an exec() when you're
watching variables.
...And 2 more matches
Accessing the Windows Registry Using XPCOM
s.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_current_user, "software\\mdc\\test", wrk.access_all); removechildrenrecursive(wrk); wrk.close(); monitoring registry keys if you would like to know whether a registry key has changed since you last checked it, you can use the start
watching(), stop
watching(), and haschanged() methods.
... you must call start
watching() for the key to be monitored.
... the method takes one parameter, a boolean indicating whether child keys should be
watched.
...And 2 more matches
MutationObserver.observe() - Web APIs
depending on the configuration, the observer may
watch a single node in the dom tree, or that node and some or all of its descendant nodes.
... syntax mutationobserver.observe(target, options) parameters target a dom node (which may be an element) within the dom tree to
watch for changes, or to be the root of a subtree of nodes to be
watched.
... usage notes reusing mutationobservers you can call observe() multiple times on the same mutationobserver to
watch for changes to different parts of the dom tree and/or different types of changes.
...And 2 more matches
Signaling and video calling - Web APIs
note: we don't
watch the disconnected signaling state here as it can indicate temporary issues and may go back to a connected state after some time.
...
watching it would close the video call on any temporary network issue.
... ice signaling state similarly, we
watch for signalingstatechange events.
...And 2 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
with functions that include a lot of variables, this will be hard to read, so you can point out specific variables that you want to
watch (figure 4).
...
watched variables appear under the
watches tab, and are updated every time they are evaluated.
... you can then continue with stepwise execution and
watch the changes in the program and variables.
... fixme: figure 4: adding a
watch target mozunit mozunit is a tool for javascript that assists with unit testing.
Embedding Tips
how do i
watch/intercept a load before it happens?
...
watch for changes in nsiuricontentlistener::onstarturiopen().
... implement and register a nsiwindowcreator object with the window
watcher service.
... nscomptr<nsiwindow
watcher> w
watch(do_getservice(ns_window
watcher_contractid)); if (w
watch) { w
watch->setwindowcreator(mywindowcreator); } i need the javascript inside the browser window to talk to my embedding client.
Index
you need to implement this interface to accept callbacks after using nsidomgeolocation.
watchposition().
...since an observer might
watch multiple microsummaries at the same time, the microsummary whose content has been updated gets passed to this handler.
...to get an instance, call the nsiwindow
watcher.getnewprompter().
... 1085 nsiwindow
watcher embedding mozilla, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference usage notes: this component has an activewindow property.
nsIWifiMonitor
implemented by @mozilla.org/wifi/monitor;1 as a service: var wifimonitor = components.classes["@mozilla.org/wifi/monitor;1"] .getservice(components.interfaces.nsiwifimonitor); method overview void start
watching(in nsiwifilistener alistener); void stop
watching(in nsiwifilistener alistener); methods start
watching() starts listening for changes to the wifi access point list.
... void start
watching( in nsiwifilistener alistener ); parameters alistener the nsiwifilistener object to receive notifications when the wifi access point list changes.
... stop
watching() stops listening for changes to the wifi access point list.
... void stop
watching( in nsiwifilistener alistener ); parameters alistener the nsiwifilistener object to stop receiving notifications on.
BluetoothDevice - Web APIs
gatt; readonly attribute frozenarray uuids; promise
watchadvertisements(); void un
watchadvertisements(); readonly attribute boolean
watchingadvertisements; }; bluetoothdevice implements eventtarget; bluetoothdevice implements bluetoothdeviceeventhandlers; bluetoothdevice implements characteristiceventhandlers; bluetoothdevice implements serviceeventhandlers; properties bluetoothdevice.id read only a domstring that uniquely identifies a devic...
... bluetoothdevice.
watchingadvertisements read only if advertisments were activated using bluetoothdevice.
watchadvertisements().
... methods bluetoothdevice.
watchadvertisments() a promise that resolves to undefined or is rejected with an error if advetisments can’t shown for any reason.
... bluetoothdevice.un
watchadvertisments() stops
watching for advertisments.
Starting up and shutting down a WebXR session - Web APIs
the key things you need (or may need) to do in order to finish the configuration of your session include: add handlers for the events you need to
watch.
... if you use xr input controllers,
watch the inputsourceschange event to detect the addition or removal of xr input controllers, and the various select and squeeze action events.
... you may want to
watch for the xrsystem event devicechange so you can be advised when the set of available immersive devices changes.
... detecting when the session has ended as previously established, you can detect when the webxr session has ended—whether because you've called its end() method, the user turned off their headset, or some sort of irresolvable error occurred in the xr system—by
watching for the end event to be sent to the xrsession.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
this also provides a way to monitor the audio's fetching process so you can
watch for errors or detect when enough is available to begin to play or manipulate it.
... for example, to detect when audio tracks are added to or removed from an <audio> element, you can use code like this: var elem = document.queryselector("audio"); elem.audiotracklist.onaddtrack = function(event) { trackeditor.addtrack(event.track); }; elem.audiotracklist.onremovetrack = function(event) { trackeditor.removetrack(event.track); }; this code
watches for audio tracks to be added to and removed from the element, and calls a hypothetical function on a track editor to register and remove the track from the editor's list of available tracks.
...in this episode we're discussing which swiss
watch is a wrist switch
watch?
...i mean, which wrist
watch is a swiss wrist
watch?
Session store API - Archive of obsolete content
firefox 3 note in firefox 3 and later, if you need to detect when a tab is about to be closed so that you can update data associated with the tab before it is closed, you can
watch for the "sstabclosing" event, which is sent to the tab.
... if you want to set permissions or otherwise manipulate a restored tab before the page is loaded into it, you should
watch sstabrestoring.
... if you want to do something after the page is loaded, you should
watch sstabrestored.
List of Mozilla-Based Applications - Archive of obsolete content
abstract accounting tool adobe acrobat and adobe reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular browser plug-in uses nss in linux version ad
watch content management system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok xul remote remote control for amarok music player ample sdk javascript gui-framework aol instant messenger im client uses nss apache web server doesn't use nss by...
... default, but can be configured to use nss with mod_nss ssl module apica
watch site performance monitoring tool uses firefox as part of its monitoring package astyle css editor editing tool atmail webmail client aviva for java mainframe connectivity product uses mozilla rhino babelgum internet tv service basilisk pre-servo xul-based web browser uses most of the firefox 55 source code batik java-based toolkit uses mozilla rhino bitbox security focused browser seemingly based on firefox blackbird browser for african american community bluegriffon wysiwyg editor next generation version of composer buzzbird twitter client built on xu...
...udio, and even devices such as zen, zune, pocketpcs, ipods, and psps mekhala browser part of the khmeros linux distro midbrowser mobile web browser mockery mockup creation tool built on xulrunner mongodb database project uses spidermonkey moyura email client part of the khmeros linux distro mozcards, jolistop
watch, jolitimer simple apps for maemo uses xulrunner moznet .net control embeddable gecko for .net applications wraps xulrunner for use in .net applications my internet browser localized browser uses gecko myna application server javascript application server for java uses mozilla rhino nextcms (fr) cms nightingale musi...
New Skin Notes - Archive of obsolete content
--waldo 21:09, 25 aug 2005 (pdt) not going to change (yet or possibly ever) adding pipes between buttons in horizontal nav-bar (ie: my talk | preferences | my
watchlist) (stricken part is done).
...thanks again --mmondor future fixes in l10n versions there all heading links are wrong - main link and documentation leads to english devmo, and devnews and web
watch should be hidden or localized too.
...devnews and web
watch are not currently being localised so shall remain as they are, with link to english wiki.
Template Builder Interface - Archive of obsolete content
if you do plan on generating non-xul content with a template, just
watch out for issues like this.
...however, one thing to
watch out for is that non-xul elements do not have their content generated lazily so all of the content will be generated at once.
...this is something to
watch out for if you are going to be manipulating the composite datasource.
Broadcasters and Observers - Archive of obsolete content
<broadcasterset> <broadcaster id="isoffline" label="offline"/> </broadcasterset> any elements that are
watching the broadcaster will be modified automatically whenever the broadcaster has its label attribute changed.
... making elements observers elements that are
watching the broadcaster are called observers because they observe the state of the broadcaster.
...the event is called whenever the observer notices a change to the attributes of the broadcaster that it is
watching.
Archive of obsolete content
adding preferences to an extension this article takes the creating a dynamic status bar extension sample to the next level, adding a popup menu that lets you quickly switch between multiple stocks to
watch.
... localizing an extension this article expands upon the previous samples on extension writing by adding localization support to our stock
watcher extension.
...we'll build upon the stock
watcher extension created in earlier articles in this series, updating it so it can also be used in thunderbird and sunbird (previous versions worked only in firefox).
What are browser developer tools? - Learn web development
find out more find more out about the inspector in different browsers: firefox page inspector ie dom explorer chrome dom inspector (opera's inspector works the same as this) safari dom inspector and style explorer the javascript debugger the javascript debugger allows you to
watch the value of variables and set breakpoints, places in your code that you want to pause execution and identify the problems that prevent your code from executing properly.
...
watch expressions and breakpoints the right-hand pane shows a list of the
watch expressions you have added and breakpoints you have set.
... in the image, the first section,
watch expressions, shows that the listitems variable has been added.
TypeScript support in Svelte - Learn web development
you can also run the validate script in
watch mode with npm run validate -- --
watch.
... let's start by running the validate script in
watch mode inside your project root: npm run validate -- --
watch this should output something like the following: svelte-check "--
watch" loading svelte-check in workspace: ./svelte-todo-typescript getting svelte diagnostics...
...you'll see some warnings in the output of the validate script: $ npm run validate -- --
watch > svelte-check "--
watch" ./svelte-todo-typescript getting svelte diagnostics...
Implementation Details
msaa/iaccessible2 at-spi avoiding memory leaks it is the assistive technology's responsibility to
watch for events that indicate when windows or content subtrees are being destroyed, and to release all accessible objects related to that window.
...mutation events should be
watched to invalidate the cache.
... under msaa/ia2,
watch for event_hide under atk/at-spi,
watch for children-changed:remove to help developers in that regard, there is memory leak monitor, a firefox extension.
nsIGeolocationProvider
method overview boolean isready(); obsolete since gecko 1.9.2 void shutdown(); void startup(); void
watch(in nsigeolocationupdate callback); methods isready() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) reports whether or not the device is ready and has a position.
...
watch() attaches a callback listener to be notified when a location change is observed.
... void
watch( in nsigeolocationupdate callback ); parameters callback an nsigeolocationupdate to be notified when position changes.
UI Tour - Firefox Developer Tools
the ui is split vertically into three panels source list pane source pane the contents of the third pane depend on the current state of the debugger and may include the following sections: toolbar
watch expressions breakpoints call stack scopes xhr breakpoints event listener breakpoints dom mutation breakpoints source list pane the source list pane lists all the javascript source files loaded into the page, and enables you to select one to debug.
...next to each breakpoint is a checkbox which you can use to enable/disable it:
watch expressions you can add
watch expressions in the right pane.
... within the scopes pane, you can create
watchpoints that pause the debugger when a value is read or assigned.
Style Editor - Firefox Developer Tools
then you can just start entering css into the new editor and
watch as the new styles are applied in real time just like changes to the other sheets.
... first, set up your preprocessor so it
watches the original source and automatically regenerates the css when the source changes.
... with sass you can do this simply by passing the --
watch option: sass index.scss:index.css --
watch next, save the original source in the style editor by clicking the "save" button next to the file, and saving it over the original file.
Geolocation API - Web APIs
geolocation.
watchposition(): registers a handler function that will be called automatically each time the position of the device changes, returning the updated location.
... interfaces geolocation the main class of this api — contains methods to retrieve the user's current position,
watch for changes in their position, and clear a previously-set
watch.
... dictionaries positionoptions represents an object containing options to pass in as a parameter of geolocation.getcurrentposition() and geolocation.
watchposition().
Timing element visibility with the Intersection Observer API - Web APIs
the options are configured to
watch for intersections with the document's viewport (by setting root to null).
...then we call the observe() method on our intersection observer, adobserver, to start
watching the ad for changes to its intersection with the viewport.
...try experimenting with scrolling around and
watch how visibility changes affect the timers in each ad.
MutationObserver.MutationObserver() - Web APIs
dom observation does not begin immediately; the observe() method must be called first to establish which portion of the dom to
watch and what kinds of changes to
watch for.
... example this example simply creates a new mutationobserver configured to
watch a node and all of its children for additions and removals of elements to the tree, as well as any changes to attributes on any of the elements in the tree.
...*/ break; } }); } the callback() function is invoked when the observer sees changes matching the configuration of the observation request specified when calling observe() to begin
watching the dom.
MutationObserverInit.attributes - Web APIs
the mutationobserverinit dictionary's optional attributes property is used to specify whether or not to
watch for attribute value changes on the node or nodes being observed.
... subtree lets you specify whether to
watch the target node and all of its descendants (true), or just the target node (false).
... example in this example, a mutation observer is set up to
watch for changes to the status and username attributes in any elements contained within a subtree that displays the names of users in a chat room.
RTCPeerConnection - Web APIs
instead of
watching for this obsolete event, you should
watch each for track events; one is sent for each mediastreamtrack added to the connection.
...instead of
watching for this obsolete event, you should
watch each stream for removetrack events on each stream within the rtcpeerconnection.
...you can detect when this value changes by
watching for an event of type icegatheringstatechange.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
cameras and relative movement when a classic live-action movie is filmed, the actors are on a set and move about the set as they perform, with one or more cameras
watching their moves.
...as much as possible, standard cinematographic techniques are used, since the viewer has likely grown up
watching films using those techniques, and has subconscious expectations that a film or animation will follow those methods.
... 3d games might also provide the ability for non-players to observe the action, either by positioning an invisible avatar of sorts or by choosing a fixed virtual camera to
watch from.
Coordinate systems - CSS: Cascading Style Sheets
this code will be called by the event handler for the various mouse events we
watch.
... displaying the coordinates as we'll see in the html, the inner box (the one we're
watching for events on) contains several paragraphs; one for each of the four coordinate systems we'll be reporting on.
...as you mouse in and around the blue box,
watch the values of the mouse's x and y coordinates change in the various coordinate systems in which you can obtain the values.
image() - CSS: Cascading Style Sheets
omitting image sources while including a color is valid and creates a color s
watch.
... the size of the color s
watch can be set with the background-size property.
...because we used image() along with the background-size property (and prevented the image from repeating with the background-repeat property, the color s
watch will only cover a quarter of the container.
<video>: The Video Embed element - HTML: Hypertext Markup Language
for example, to detect when audio tracks are added to or removed from a <video> element, you can use code like this: var elem = document.queryselector("video"); elem.audiotracklist.onaddtrack = function(event) { trackeditor.addtrack(event.track); }; elem.audiotracklist.onremovetrack = function(event) { trackeditor.removetrack(event.track); }; this code
watches for audio tracks to be added to and removed from the element, and calls a hypothetical function on a track editor to register and remove the track from the editor's list of available tracks.
...r from peach.blender.org --> <video controls src="https://archive.org/download/bigbuckbunny_124/content/big_buck_bunny_720p_surround.mp4" poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217" width="620"> sorry, your browser doesn't support embedded videos, but don't worry, you can <a href="https://archive.org/details/bigbuckbunny_124">download it</a> and
watch it with your favorite video player!
... multiple sources example this example builds on the last one, offering three different sources for the media; this allows the video to be
watched regardless of which video codecs are supported by the browser.
simple-prefs - Archive of obsolete content
console.log("the preference " + prefname + " value has changed!"); } require("sdk/simple-prefs").on("somepreference", onprefchange); require("sdk/simple-prefs").on("someotherpreference", onprefchange); // `""` listens to all changes in the extension's branch require("sdk/simple-prefs").on("", onprefchange); parameters prefname : string the name of the preference to
watch for changes.
... parameters prefname : string the name of the preference to
watch for changes.
system/events - Archive of obsolete content
on(type, listener, strong) listen to events of a given type parameters type : string the event type name to
watch.
... once(type, listener, strong) listen only once to a particular event type parameters type : string the event type name to
watch.
Monitoring WiFi access points - Archive of obsolete content
|| iid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_error_no_interface; }, } netscape.security.privilegemanager.enableprivilege('universalxpconnect'); var listener = new test(); var wifi_service = components.classes["@mozilla.org/wifi/monitor;1"].getservice(components.interfaces.nsiwifimonitor); wifi_service.start
watching(listener); </script> </head> <body> <div id="d"><p></p></div> <div id="c"><p></p></div> </body> </html> the nsiwifilistener object the first thing the code above does is to prototype the listener object that will be receiving notifications of changes to the access point list.
...the monitoring is started up on line 47, by calling the wifi monitoring service's start
watching() method.
What is RSS - Archive of obsolete content
for example: <?xml version="1.0"?> <rss version="2.0"> <channel> <title>kate's iptv show</title> <description>
watch it or else!
... -0800</lastbuilddate> <link>http://katetv.example.com/</link> <item> <title>this is fun</title> <guid>http://katetv.example.com/show/4</guid> <pubdate>tue, 23 aug 2005 21:02:05 -0800</pubdate> <enclosure url="http://katetv.example.com/show/4" length="1911146" type="application/ogg"/> </item> <item> <title>
watch this</title> <guid>http://katetv.example.com/show/3</guid> <pubdate>tue, 16 aug 2005 16:11:57 -0400</pubdate> <enclosure url="http://katetv.example.com/show/3" length="1387442" type="application/ogg"/> </item> <item> <title>it is me again</title> <guid>http://katetv.example.com/show/2</guid> <pubdate>tue, 9 au...
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
we'll build upon the stock
watcher extension created in earlier articles in this series, updating it so it can also be used in thunderbird and sunbird (previous versions worked only in firefox).
...we need to add lines to the manifest for thunderbird and sunbird, like this: # thunderbird overlay chrome://messenger/content/messenger.xul chrome://stock
watcher2/content/stock
watcher2.xul # sunbird overlay chrome://calendar/content/calendar.xul chrome://stock
watcher2/content/stock
watcher2.xul these lines cause the main thunderbird message list window and the main window in sunbird to be the target of the overlays we apply in the stock
watcher2.xul file.
Index - Game development
65 game over beginner, canvas, games, graphics, javascript, tutorial, game over it's fun to
watch the ball bouncing off the walls and be able to move the paddle around, but other than that the game does nothing and doesn't have any progression or end goal.
... 68 paddle and keyboard controls beginner, canvas, controls, games, graphics, javascript, tutorial, keyboard the ball is bouncing off the walls freely and you can
watch it indefinitely, but currently there's no interactivity.
Debugging on Windows
for easy importing obtaining stdout and other file handles running the following command in the command window in visual studio returns the value of stdout, which can be used with various debugging methods (such as nsgenericelement::list) that take a file* param: debug.evaluatestatement {,,msvcr80d}(&__iob_func()[1]) (alternatively you can evaluate {,,msvcr80d}(&__iob_func()[1]) in the quick
watch window) similarly, you can open a file on the disk using fopen: >debug.evaluatestatement {,,msvcr80d}fopen("c:\\123", "w") 0x10311dc0 { ..snip..
... for example, to print curent javascript stack to stdout, evaluate this in quick
watch window: {,,xul}dumpjsstack() note: visual c++ will show you something in the quick
watch window, but not the stack, you have to look in the os console for the output.
Creating Custom Events That Can Pass Data
var event = document.createevent("nsdommyevent"); event.initevent("nsdommyevent", true, true); window.dispatchevent(event); dispatching your event in c++ the following shows how to dispatch your event in c++: nscomptr<nsiwindow
watcher> w
watcher (do_getservice("@mozilla.org/embedcomp/window-
watcher;1")); // the window
watcher will be able to give me a handle to the window nscomptr<nsidomwindow> awindow; // a handle to the window nscomptr<nsidomdocument> adoc; // a handle to the document nscomptr<nsidomeventtarget> twindow; // the target window (really the same window as above but you need // a...
... w
watcher->getactivewindow(getter_addrefs(awindow)); //get the active window.
Mozilla Development Tools
it is our home-grown web-based tool for
watching the up-to-the-minute goings-on in our cvs repository (viewing checkins and log messages, reading diffs, etc.) tinderbox tinderbox is for knowing when the tree is in flames.
... it is our home-grown web-based tool for
watching the progress of the continuous builds that we run on multiple platforms.
Investigating leaks using DMD heap scan mode
first, in toolkit/components/terminator/nsterminator.cpp, delete everything in run
watchdog but the call to ns_setcurrentthreadname.
... this will keep the
watch dog from killing the browser when shut down takes multiple minutes.
Index
it
watches tcp connections and displays the data going by.
...it
watches tcp connections and displays the data going by.
Rhino Debugger
when you select a stack frame the variables and
watch windows are updated to reflect the names and values of the variables visible at that scope.
...the locals table is updated each time control returns to the debugger or when you change the stack location in the context: window
watch window you may enter arbitrary javascript expressions in the
watch: table located in the lower-right (dockable) pane in the debugger main window.
Invariants
(one reason for this is that the object may have
watchpoints set; the
watchpoint machinery assumes that all objects with
watched properties are native.
...js_set
watchpoint violates this rule.) whether a property is locked, and which one, is static information for almost every line of code.
JSAPI User Guide
to learn more about it,
watch the movie or read the book.
... fine-grained security another way to keep a snake from eating a mouse is to
watch the snake constantly, and if it tries to eat the mouse, intervene.
WebReplayRoadmap
object
watching (not yet implemented) it would be nice to log the changes to a specific object or one of its properties, so that the points of those changes can be seeked to later.
... one important issue is that any side effects from evaluating expressions via the console or the debugger's
watch expressions will not carry over when the tab resumes executing.
How To Pass an XPCOM Object to a New Window
for example: var ww = components.classes["@mozilla.org/embedcomp/window-
watcher;1"].
... getservice(components.interfaces.nsiwindow
watcher); var win = ww.openwindow(null, "chrome://myextension/content/debug.xul", "debug history", "chrome,centerscreen,resizable", myobject); note in this example that myobject is passed to the openwindow() method; you can pass any xpcom object (or any other value, for that matter) in this way.
Observer Notifications
the window id can be obtained from subject.queryinterface(components.interfaces.nsisupportspruint64).data toplevel-window-ready nsiwindow
watcher called just after a new top level window has been opened and is ready, but has not yet loaded a document.
... io notifications these topics can be used to
watch the io service for useful information.
nsIMsgDatabase
void markthreadignored(in nsimsgthread thread, in nsmsgkey threadkey, in boolean bignored, in nsidbchangelistener instigator); void markthread
watched(in nsimsgthread thread, in nsmsgkey threadkey, in boolean b
watched, in nsidbchangelistener instigator); void markheaderkilled(in nsimsgdbhdr msg, in boolean bignored, in nsidbchangelistener instigator); boolean isread(in nsmsgkey key); boolean isignored(in nsmsgkey key); boolean ismarked(in nsmsgkey key); boolean hasattachments(in nsmsgkey key); void markallread(in nsmsgkeyarrayptr ...
...threadread(in nsimsgthread thread, in nsidbchangelistener instigator, in nsmsgkeyarrayptr thosemarked); markthreadignored() void markthreadignored(in nsimsgthread thread, in nsmsgkey threadkey, in boolean bignored, in nsidbchangelistener instigator); markthread
watched() void markthread
watched(in nsimsgthread thread, in nsmsgkey threadkey, in boolean b
watched, in nsidbchangelistener instigator); markheaderkilled() void markheaderkilled(in nsimsgdbhdr msg, in boolean bignored, in nsidbchangelistener instigator); isread() boolean isread(in...
nsIWindowCreator
the application, either mozilla or an embedding app, must provide an implementation of the window
watcher component and notify the window
watcher during application initialization.
...see also nsiwindow
watcher for more details.
The Firefox JavaScript Debugger - Firefox Developer Tools
there are multiple ways to tell the debugger how and when to pause: set a breakpoint set a conditional breakpoint set an xhr breakpoint set event listener breakpoints break on exceptions use
watchpoints for property reads and writes break on dom mutation disable breakpoints control execution what can you do after execution pauses?
... set a logpoint set
watch expressions reference keyboard shortcuts source map errors ...
Performance Analysis - Firefox Developer Tools
using the performance analysis tool to run the performance analysis tool click the stop
watch icon in the toolbar.
... (alternatively, if you have only just opened the network monitor, so it's not yet populated with the list of requests, you'll get a stop
watch icon in the main window.) the network monitor then loads the site twice: once with an empty browser cache, and once with a primed browser cache.
Examine and edit CSS - Firefox Developer Tools
displaying pseudo-elements the rule view displays the following pseudo-elements, if they are applied to the selected element: ::after ::backdrop ::before ::first-letter ::first-line ::selection :-moz-color-s
watch :-moz-number-spin-box :-moz-number-spin-down :-moz-number-spin-up :-moz-number-text :-moz-number-wrapper :-moz-placeholder :-moz-progress-bar :-moz-range-progress :-moz-range-thumb :-moz-range-track :-moz-selection if the selected element has pseudo-elements applied to it, they are displayed before the selected element but hidden by a disclosure triangle: clicking the triangle disp...
...if you enter var( into a property value and then type a dash (-), any variables you have declared in your css will then appear in an autocomplete list, which shows a color s
watch so you can see exactly what color each variable choice is storing (bug 1451211).
Manipulating video using canvas - Web APIs
then addeventlistener() is called to begin
watching the video element so that we obtain notification when the user presses the play button on the video.
... in response to the user beginning playback, this code fetches the width and height of the video, halving each (we will be halving the size of the video when we perform the chroma-keying effect), then calls the timercallback() method to start
watching the video and computing the visual effect.
Geolocation - Web APIs
geolocation.
watchposition() secure context returns a long value representing the newly established callback function to be invoked whenever the device location changes.
... geolocation.clear
watch() secure context removes the particular handler previously installed using
watchposition().
IntersectionObserver.IntersectionObserver() - Web APIs
return value a new intersectionobserver which can be used to
watch for the visibility of a target element within the specified root crossing through any of the specified visibility thresholds.
... call its observe() method to begin
watching for the visibility changes on a given target.
IntersectionObserver.observe() - Web APIs
the intersectionobserver method observe() adds an element to the set of target elements being
watched by the intersectionobserver.
... one observer has one set of thresholds and one root, but can
watch multiple target elements for visibility changes in keeping with those.
IntersectionObserver - Web APIs
when an intersectionobserver is created, it's configured to
watch for given ratios of visibility within the root.
... the configuration cannot be changed once the intersectionobserver is created, so a given observer object is only useful for
watching for specific changes in degree of visibility; however, you can
watch multiple target elements with the same observer.
MouseEvent.pageX - Web APIs
html <div class="box"> <p> move the mouse around in this box to
watch its coordinates change.
... </p> <p> <code>pagex</code>: <span id="x">n/a</span> </p> <p> <code>pagey</code>: <span id="y">n/a</span> </p> </div> the html is simple; the box we'll be
watching for mouse events on is given the class "box".
MutationObserverInit.attributeFilter - Web APIs
if the attributes permission is true but no attributefilter is included in the options object, all attributes' values are
watched for changes.
... example in this example, a mutation observer is set up to
watch for changes to the status and username attributes in any elements contained within a subtree that displays the names of users in a chat room.
MutationObserverInit - Web APIs
attributes optional set to true to
watch for changes to the value of attributes on the node or nodes being monitored.
... attributeoldvalue optional set to true to record the previous value of any attribute that changes when monitoring the node or nodes for attribute changes; see monitoring attribute values in mutationobserver for details on
watching for attribute changes and value recording.
Page Visibility API - Web APIs
the page visibility api provides events you can
watch for to know when a document becomes visible or hidden, as well as features to look at the current visibility state of the page.
...for example,
watching for blur and focus events on the window helps you know when your page is not the active page, but it does not tell you that your page is actually hidden to the user.
RTCPeerConnection: addstream event - Web APIs
you should instead
watch for the track event, which is sent for each media track added to the rtcpeerconnection.
... bubbles no cancelable no interface mediastreamevent event handler property rtcpeerconnection.onaddstream you can, similarly,
watch for streams to be removed from the connection by monitoring the removestream event.
RTCPeerConnection.iceGatheringState - Web APIs
you can detect when the value of this property changes by
watching for an event of type icegatheringstatechange.
...you can detect when this value changes by
watching for an event of type icegatheringstatechange.
WebGL model view projection - Web APIs
resize the window and
watch as the box skews out of shape.
... exercise if that sounds a little abstract, open up the vertex shader and play around with the scale factor and
watch how it shrinks vertices more towards the surface.
Using DTMF with WebRTC - Web APIs
to accomplish that, we
watch for the caller to receive an iceconnectionstatechange event.
... tracking other state changes we can also
watch for changes to the signaling state (by accepting signalingstatechange events) and the ice gathering state (by accepting icegatheringstatechange events).
WebRTC API - Web APIs
you can be notified before closing completes by
watching for the closing event instead.
...you can detect the completion of the closing process by
watching for the close event.
Window.devicePixelRatio - Web APIs
ctx.scale(scale, scale); ctx.fillstyle = "#bada55"; ctx.fillrect(10, 10, 300, 300); ctx.fillstyle = "#ffffff"; ctx.font = '18px arial'; ctx.textalign = 'center'; ctx.textbaseline = 'middle'; var x = size / 2; var y = size / 2; var textstring = "i love mdn"; ctx.filltext(textstring, x, y); monitoring screen resolution or zoom level changes in this example, we'll set up a media query and
watch it to see when the device resolution changes, so that we can check the value of devicepixelratio to handle any updates we need to.
... try it and
watch what happens!</p> </div> <div class="pixel-ratio"></div> </div> css body { font: 22px arial, sans-serif; } .container { top: 2em; width: 22em; height: 14em; border: 2px solid #22d; margin: 0 auto; padding: 0; background-color: #a9f; } .inner-container { padding: 1em 2em; text-align: justify; text-justify: auto; } .pixel-ratio { position: relative; margin: au...
aspect-ratio - CSS: Cascading Style Sheets
html <div id='inner'>
watch this element as you resize your viewport's width and height.
... step="5" value="165"> <label id="hf" for="w">height:165</label> <input id="h" name="h" type="range" min="100" max="250" step="5" value="165"> <iframe id="outer" src="data:text/html,<style> @media (min-aspect-ratio: 8/5) { div { background: %239af; } } @media (max-aspect-ratio: 3/2) { div { background: %239ff; } } @media (aspect-ratio: 1/1) { div { background: %23f9a; } }</style><div id='inner'>
watch this element as you resize your viewport's width and height.</div>"> </iframe> css iframe{ display:block; } javascript outer.style.width=outer.style.height="165px" w.onchange=w.oninput=function(){ outer.style.width=w.value+"px" wf.textcontent="width:"+w.value } h.onchange=h.oninput=function(){ outer.style.height=h.value+"px" hf.textcontent="height:"+h.value } result specif...
Using CSS animations - CSS: Cascading Style Sheets
var element = document.getelementbyid("
watchme"); element.addeventlistener("animationstart", listener, false); element.addeventlistener("animationend", listener, false); element.addeventlistener("animationiteration", listener, false); element.classname = "slidein"; this is pretty standard code; you can get details on how it works in the documentation for eventtarget.addeventlistener().
... the html just for the sake of completeness, here’s the html that displays the page content, including the list into which the script inserts information about the received events: <h1 id="
watchme">
watch me move</h1> <p> this example shows how to use css animations to make <code>h1</code> elements move across the page.
Mouse gesture events - Developer guides
if you only care about the end results of the pinch gesture, you can simply
watch for this event; however, if you want to provide feedback during the handling of the gesture, you should also
watch the mozmagnifygesturestart and mozmagnifygestureupdate events.
...if you only care about the end results of the rotate gesture, you can simply
watch for this event; however, if you want to provide feedback during the handling of the gesture, you should also
watch the mozrotategesturestart and mozrotategestureupdate events.
<input type="color"> - HTML: Hypertext Markup Language
here's an example that
watches changes over time to the color value: colorpicker.addeventlistener("input", updatefirst, false); colorpicker.addeventlistener("change",
watchcolorpicker, false); function
watchcolorpicker(event) { document.queryselectorall("p").foreach(function(p) { p.style.color = event.target.value; }); } selecting the value if the <input> element's implementation of the color type on the user's ...
... <p>an example demonstrating the use of the <code><input type="color"></code> control.</p> <label for="colorwell">color:</label> <input type="color" value="#ff0000" id="colorwell"> <p>
watch the paragraph colors change when you adjust the color picker.
Object - JavaScript
object.prototype.un
watch() removes a
watchpoint from a property of the object.
... object.prototype.
watch() adds a
watchpoint to a property of the object.
Getting started (cfx) - Archive of obsolete content
le using grunt and grunt-shell: module.exports = function(grunt) { 'use strict'; require('matchdep').filterdev('grunt-!(cli)').foreach(grunt.loadnpmtasks); grunt.initconfig({ shell: { xpi: { command: [ 'cd pluginpath', 'cfx xpi', 'wget --post-file=pluginname.xpi http://localhost:8888/ || echo>/dev/null' ].join('&&') } },
watch: { xpi: { files: ['pluginpath/**'], tasks: ['shell:xpi'] } } }); grunt.loadnpmtasks('grunt-contrib-
watch'); grunt.loadnpmtasks('grunt-shell'); grunt.registertask('default', ['
watch']); }; ...
Alerts and Notifications - Archive of obsolete content
.showalertnotification(null, title, text, false, '', null); } catch(e) { // prevents runtime error on platforms that don't implement nsialertsservice } } if you need to display a comparable alert on a platform that doesn't support nsialertsservice, you can do this: function popup(title, msg) { var image = null; var win = components.classes['@mozilla.org/embedcomp/window-
watcher;1'] .getservice(components.interfaces.nsiwindow
watcher) .openwindow(null, 'chrome://global/content/alerts/alert.xul', '_blank', 'chrome,titlebar=no,popup=yes', null); win.arguments = [image, title, msg, false, '']; } using notification box another way of non-modal notification and further interaction with users is...
Windows - Archive of obsolete content
var wenum = components.classes["@mozilla.org/embedcomp/window-
watcher;1"] .getservice(components.interfaces.nsiwindow
watcher) .getwindowenumerator(); var index = 1; var windowname = "yourwindowname"; while (wenum.hasmoreelements()) { var win = wenum.getnext(); if (win.name == windowname) { win.focus(); return; } index++ } window.open("chrome://to/your/window.xul", windowname, "features"); uniquely i...
Appendix: What you should know about open-source software licenses - Archive of obsolete content
range of uses restricted to author unrestricted book print, publish, revise read music record, perform, revise listen movie distribute, screen, revise
watch software copy, distribute, modify execute licenses are a use permit in order to use (in the authorial sense) a copyrighted work, the user must either receive a use permit from the copyright holder, or must be assigned partial rights by the author.
Updating addons broken by private browsing changes - Archive of obsolete content
asyncfavicons nsifaviconservice nsiwebbrowserpersist ff 19: nsicontentprefservice nsidownloadmanager nsidownload nsihttpauthmanager nsistricttransportsecurityservice ff 20: nsiprivatebrowsingservice nsirecentbadcertservice furthermore, if your code uses any of these common chrome apis: ff 19: saveurl saveinternal openlinkin ff 20: openbrowserwindow gprivatebrowsingui finally, if your code
watches for any of these observer notifications: private-browsing private-browsing-cancel-vote private-browsing-change-granted private-browsing-transition-complete then your addon will require updating to correctly support the new per-window private browser feature in firefox 20 (and will require updating to work correctly in releases of firefox since the ones listed).
Mozilla Application Framework - Archive of obsolete content
tools venkman a javascript debugger with support for breakpoints, conditional breakpoints, local variable inspection,
watch variables, single step, stop on error, profile data collection, report generation, code reformatting (pretty printing), and more.
Archived SpiderMonkey docs - Archive of obsolete content
between resolving conflicts, finding a good time to land,
watching the tree, and marking bugs as fixed, it takes around half a day.spidermonkey coding conventionsthe spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
Venkman Introduction - Archive of obsolete content
the best way to get to know venkman, of course, is to play around with it — to set it up in the way that makes the most sense to you, to try loading scripts and setting breakpoints, evaluating expressions in the interactive session view,
watching the values of variables as they change when scripts are executed, getting profile data.
Code Samples - Archive of obsolete content
otherwise it opens the window: const name = "...internal name of the window..." const uri = "...chrome uri of the window..." var w = components .classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator) .getmostrecentwindow(name) if (w) w.focus() else components .classes["@mozilla.org/embedcomp/window-
watcher;1"] .getservice(components.interfaces.nsiwindow
watcher) .openwindow(null, uri, name, "chrome,resizable", null) change the first two lines to specify the window that you want to open.
prefwindow - Archive of obsolete content
note for mac os x: a common way of opening modal windows on mac os x that are not attached as a sheet to the main window is to use nsiwindow
watcher.openwindow() with a null parentwindow.
window - Archive of obsolete content
note: starting in gecko 1.9.2, you can detect when a window is activated or deactivated by
watching for the "activate" and "deactivate" events.
Building XULRunner with Python - Archive of obsolete content
the jsconsole can also be open and used from code, for example (in javascript) function openjavascriptconsole() { var w
watch = components.classes["@mozilla.org/embedcomp/window-
watcher;1"] .getservice(components.interfaces.nsiwindow
watcher); w
watch.openwindow(null, "chrome://global/content/console.xul", "_blank", "chrome,dialog=no,all", null); } // dump to the js console (xulrunner -jsconsole) function jsdump(str) { components.classes['@mozilla.org/consoleservice;1'] ...
Monitoring plugins - Archive of obsolete content
serverservice); observerservice.removeobserver(this, "experimental-notify-plugin-call"); skeleton observer class below is a skeleton class that you may use to listen to runtime notifications: function pluginobserver() { this.registered = false; this.register(); //takes care of registering this class with observer services as an observer for plugin runtime notifications } plugin
watcherobserver.prototype = { observe: function(subject, topic, data) { if (topic == "experimental-notify-plugin-call") //in case your class is registered to listen to other topics //this gets executed each time a runtime notification arrives // --your code goes here-- } }, //takes care of registering the observer services for the "experimental-notify-plugin-call" t...
New in JavaScript 1.3 - Archive of obsolete content
statements label switch do...while export import built-in objects regexp methods of built-in objects tosource() object.prototype.
watch() object.prototype.un
watch() function.arity function.prototype.apply() function.prototype.call() array.prototype.concat() array.prototype.pop() array.prototype.push() array.prototype.shift() array.prototype.slice() array.prototype.splice() string.prototype.concat() string.prototype.concat() string.prototype.match() string.prototype.search() string.prototype.slice() string.prototyp...
Archived JavaScript Reference - Archive of obsolete content
to be executed when a non-existent method is called on an object, but this function is no longer available.object.prototype.__parent__the __parent__ property used to point to an object's context, but it has been removed.object.prototype.eval()the object.eval() method used to evaluate a string of javascript code in the context of an object, however, this method has been removed.object.prototype.un
watch()the un
watch() method removes a
watchpoint set with the
watch() method.object.prototype.
watch()the
watch() method
watches for a property to be assigned a value and runs a function when that occurs.object.unobserve()the object.unobserve() method was used to remove observers set by object.observe(), but has been deprecated and removed from browsers.
Game distribution - Game development
this can range from low-end smartphones or tablets, through laptops and desktop computers, to smart tvs,
watches or even a fridge if it can handle a modern enough browser.
Game over - Game development
it's fun to
watch the ball bouncing off the walls and be able to move the paddle around, but other than that the game does nothing and doesn't have any progression or end goal.
Creating hyperlinks - Learn web development
let's look at some examples, to see what kind of text can be used here: <p><a href="http://www.example.com/large-report.pdf"> download the sales report (pdf, 10mb) </a></p> <p><a href="http://www.example.com/video-stream/" target="_blank">
watch the video (stream opens in separate tab, hd quality) </a></p> <p><a href="http://www.example.com/car-game"> play the car game (requires flash) </a></p> use the download attribute when linking to a download when you are linking to a resource that's to be downloaded rather than opened in the browser, you can use the download attribute to provide a default save filename.
Document and website structure - Learn web development
main content: a big area in the center that contains most of the unique content of a given webpage, for example, the video you want to
watch, or the main story you're reading, or the map you want to view, or the news headlines, etc.
Mozilla splash page - Learn web development
adding a video to the main article content just inside the <article> element (right below the opening tag), embed the youtube video found at https://www.youtube.com/
watch?v=ojcncvb1olg, using the appropriate youtube tools to generate the code.
Video and audio content - Learn web development
for example, you can
watch for the addtrack event being fired on the associated audiotracklist object (retrieved via htmlmediaelement.audiotracks) to be informed when audio tracks are added to the media: const mediaelem = document.queryselector("video"); mediaelem.audiotracks.onaddtrack = function(event) { audiotrackadded(event.track); } you'll find more information about this in our trackevent documentation.
Gecko info for Windows accessibility vendors
avoiding memory leaks it is the assistive technology's responsibility to
watch for system events that indicate when windows are being destroyed, and to release all iaccessibles related to that window.
Links and Resources
webxact™ from
watchfire® corporation webxact™ is a free and complete online accessibility validation service that can test single pages for quality, accessibility and privacy issues.
Adding a new CSS property
some common mistakes to
watch out for when writing custom parsing code (which might go away if we redesign the parser along the lines described in css3-syntax): make sure to call skipuntil() to look for the matching close parentheses, braces, or brackets whenever you hit an error inside of them.
Error codes returned by Mozilla APIs
cant_get_method_info (0x80570007) ns_error_xpc_unexpected (0x80570008) ns_error_xpc_bad_convert_js (0x80570009) ns_error_xpc_bad_convert_native (0x8057000a) ns_error_xpc_bad_convert_js_null_ref (0x8057000b) ns_error_xpc_bad_op_on_wn_proto (0x8057000c) ns_error_xpc_cant_convert_wn_to_fun (0x8057000d) ns_error_xpc_cant_define_prop_on_wn (0x8057000e) ns_error_xpc_cant_
watch_wn_static (0x8057000f) ns_error_xpc_cant_export_wn_static (0x80570010) ns_error_xpc_scriptable_call_failed (0x80570011) ns_error_xpc_scriptable_ctor_failed (0x80570012) ns_error_xpc_cant_call_wo_scriptable (0x80570013) ns_error_xpc_cant_ctor_wo_scriptable (0x80570014) ns_error_xpc_ci_returned_failure (0x80570015) ns_error_xpc_gs_returned_failure (0x80570016) ns_err...
Limitations of chrome scripts
however, these shims are not a substitute for migrating extensions: they are only a temporary measure, and will be removed eventually they can have a bad effect on responsiveness there are likely to be edge cases in which they don't work properly you can see all the places where your add-on uses compatibility shims by setting the dom.ipc.shims.enabledwarnings preference and
watching the browser console as you use the add-on.
Site Identity Button
if the site identity button on your site shows something you do not expect (for example, an orange warning triangle when you expect a green padlock) you can find out the cause of the problem by looking in the web console in the firefox developer tools: ensure your web console is displaying messages in the 'security' category force-refresh the page on your site that is causing problems
watch for any security messages that may appear a downgraded security ui will be due to one of these three problems: mixed content - while your page has been served over tls, but subresources loaded for your page have not.
MozScrolledAreaChanged
note: while you can poll the values of document.scrollwidth and document.scrollheight to
watch for changes to the document size, reading these properties can trigger document reflow, which can make them computationally expensive.
Getting from Content to Layout
changes to a document originate in the content tree (from dom modification by scripting, insertion of elements from the parser, etc.) and are propogated to the layout tree through magic that primarily resides in //github.com/realityripple/uxp/blob/master/layout/base/nscssframeconstructor.cpp the frame constructor implements nsimutationobserver which allows it to "
watch" the content tree.
HTTP Cache
immediately); there is currently no way to opt out of this feature (
watch bug 938186).
CustomizableUI.jsm
the other way is to
watch for when your widget is dropped into an area, and give an appropriate icon.
Services.jsm
em info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service urlformatter nsiurlformatter url formatter service vc nsiversioncomparator version comparator service wm nsiwindowmediator window mediator service ww nsiwindow
watcher window
watcher service 1 mobile only 2 windows only 3 main process only 4 child process only ...
What every Mozilla translator should know
bugzilla, the bug-tracking system you do need an account in bugzilla you should configure the account to
watch the following addresses: firefoxl10n@hotmail.com calendar-l10n@mozilla.bugs (specific for calendar related bugs) this way you will receive mail for bugs affecting many or even all locales.
Various MathML Tests
testing mathml <merror>, <mtext>: this is a text in mtext this is a text in merror testing <maction>: click to toggle between expressions, and
watch the status line onmouseover/onmouseout: statusline#first expression first expression statusline#second expression second expression statusline#and so on...
JS::PerfMeasurement
it is a stop
watch profiler -- that is, it counts events that occur while code of interest is running; it does not do call traces or sampling.
Profiling with the Firefox Profiler
you can then select corresponding call tree entries and
watch the timeline for entries in the content process main thread that get darker as you select call tree entries.
Reporting a Performance Problem
visit https://profiler.firefox.com/ click on "enable profiler menu button" the profiler toolbar button will show up in the top right of the url bar as a small stop
watch icon you can right-click on the button and remove it from the toolbar when you're done with it.
GC Rooting Guide
one rare but especially tricky case to
watch out for is where an raii destructor could gc in a function that is returning a bare pointer.
Index
the monitor
watches the executing spidermonkey interpreter.
Property cache
sometimes the new property can be created simply by calling jsscope::extend, but there are many special cases and pitfalls to
watch out for.
Tracing JIT
the monitor
watches the executing spidermonkey interpreter.
SpiderMonkey Internals
watchpoints, for intercepting set operations on properties and running a debugger-supplied function that receives the old value and a pointer to the new one, which it can use to modify the new value being set.
JSObjectPrincipalsFinder
for example, when a
watchpoint triggers, the engine calls the callback, passing the
watchpoint handler, to ensure that
watchpoint handlers are invoked only when the
watcher is permitted to
watch the currently executing script.
JS_CheckAccess
jsacc_
watch check for permission to place a
watchpoint on the property.
JSDBGAPI
breakpoints js_settrap js_gettrapopcode js_cleartrap js_clearscripttraps js_clearalltraps js_handletrap js_setinterrupt js_clearinterrupt
watchpoints js_set
watchpoint js_clear
watchpoint js_clear
watchpointsforobject js_clearall
watchpoints inspecting the stack js_pctolinenumber js_linenumbertopc js_getfunctionscript js_getfunctionnative js_getfunctionfastnative js_getscriptprincipals typedef jsstackframe js_frameiterator js_getframescript js_getframepc js_getscriptedcaller js_stackframeprincipals js_evalframeprincipals js_getframeannotation js_setframeannotation js_getframeprincipalarray js_isnativeframe js_getframeobject js_getframescopechain js_getframecallobjec...
SpiderMonkey 1.8.5
the primary change in this interface is that it no longer counts operations; embedders are expected find another mechanism (such as a
watchdog thread) to trigger regular callbacks, via js_triggeroperationcallback.
SpiderMonkey 1.8.7
the primary change in this interface is that it no longer counts operations; embedders are expected find another mechanism (such as a
watchdog thread) to trigger regular callbacks, via js_triggeroperationcallback.
SpiderMonkey 45
getsavedframecolumn (bug 1216819) js::getsavedframefunctiondisplayname (bug 1216819) js::getsavedframeasynccause (bug 1216819) js::getsavedframeasyncparent (bug 1216819) js::getsavedframeparent (bug 1216819) js::buildstackstring (bug 1133191) js::flushperformancemonitoring (bug 1181175) js::resetperformancemonitoring (bug 1181175) js::disposeperformancemonitoring (bug 1208747) js::setstop
watchismonitoringcpow (bug 1156264) js::getstop
watchismonitoringcpow (bug 1156264) js::setstop
watchismonitoringjank (bug 1156264) js::getstop
watchismonitoringjank (bug 1156264) js::isstop
watchactive (bug 674779) js::getperfmonitoringtestcpurescheduling (bug 1181175) js::addcpowperformancedelta (bug 1181175) js::setstop
watchstartcallback (bug 1208747) js::setstop
watchcommitcallback (bug 1208747)...
The Rust programming language
to learn more about rust, you can:
watch the videos below for a closer look at the power and benefits rust provides.
Using the Places annotation service
annotationservice.setpageannotation(uri, "my_extension/some_annotation", "this is the annotation value", 0, annotationservice.expire_never); annotation observers observers can also be added to the service to
watch for changes to annotations.
Component Internals
sometimes, applications use the nsicomponentregistrar interface and create their own code for
watching a particular directory and registering new components that are added there, which is what's often referred to as autoregistration.
nsIAuthPromptWrapper
embedding/components/window
watcher/public/nsiauthpromptwrapper.idlscriptable please add a summary to this article.
nsIContentPrefObserver
dom/interfaces/base/nsicontentprefservice.idlscriptable this interface allows code to easily
watch for changes to the values of content preferences.
nsIDOMGeoPositionCallback
you need to implement this interface to accept callbacks after using nsidomgeolocation.
watchposition().
nsIDialogParamBlock
embedding/components/window
watcher/public/nsidialogparamblock.idlscriptable an interface to pass strings, integers and nsisupports to a dialog.
nsIMemory
if you need to monitor low memory conditions, you should
watch for the low memory notifications "memory-pressure" notifications instead.
nsIMicrosummaryObserver
since an observer might
watch multiple microsummaries at the same time, the microsummary whose content has been updated gets passed to this handler.
nsIMsgDBView
available in the mozilla codebase are types "quicksearch", "threadswithunread", "
watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" each with their own implementation of nsimsgdbview that provides a different sorting/view of the data.
nsIObserverService
example this notifies all nsiobservers
watching the "mytopicid" topic with an additional data parameter.
nsIPrompt
to get an instance, call the nsiwindow
watcher.getnewprompter().
nsIWebProgressListener
methods onlocationchange() called when the location of the window being
watched changes.
nsMsgRuleActionType
date filter.properties, look for filteractionx */ /* these longs are all actually of type nsmsgfilteractiontype */ const long custom=-1; /* see nsmsgfilteraction */ const long none=0; /* uninitialized state */ const long movetofolder=1; const long changepriority=2; const long delete=3; const long markread=4; const long killthread=5; const long
watchthread=6; const long markflagged=7; const long label=8; const long reply=9; const long forward=10; const long stopexecution=11; const long deletefrompop3server=12; const long leaveonpop3server=13; const long junkscore=14; const long fetchbodyfrompop3server=15; const long copytofolder=16; const long addtag=17; const long killsubthread=18; const lo...
nsPIPromptService
embedding/components/window
watcher/public/nspipromptservice.idlscriptable this interface is for the dialog implementers, not for other developers.
XPCOM Interface Reference
focusnsiwebbrowserfindnsiwebbrowserfindinframesnsiwebbrowserpersistnsiwebcontenthandlerregistrarnsiwebnavigationnsiwebnavigationinfonsiwebpagedescriptornsiwebprogressnsiwebprogresslistenernsiwebprogresslistener2nsiwebsocketchannelnsiwebsocketlistenernsiwebappssupportnsiwifiaccesspointnsiwifilistenernsiwifimonitornsiwinaccessnodensiwinapphelpernsiwintaskbarnsiwindowcreatornsiwindowmediatornsiwindow
watchernsiwindowsregkeynsiwindowsshellservicensiworkernsiworkerfactorynsiworkerglobalscopensiworkermessageeventnsiworkermessageportnsiworkerscopensiwritablepropertybagnsiwritablepropertybag2nsixformsmodelelementnsixformsnsinstanceelementnsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessorns...
XPCOM Interface Reference by grouping
descriptor nsicacheentryinfo nsicachelistener nsicachemetadatavisitor nsicacheservice nsicachesession nsicachevisitor nsicachingchannel nsiselectionimageservice chrome nsisearchengine nsisearchsubmission nsiwebbrowserchrome nsiwindowcreator nsiwindowmediator nsiwindow
watcher clipboard nsiclipboard nsiclipboardcommands nsiclipboarddragdrophooklist nsiclipboarddragdrophooks nsiclipboardhelper nsiclipboardowner core action nsitransactionmanager process nsiprocess nsiprocess2 ...
nsMsgMessageFlags
watched 0x00000100 indicates whether or not this thread is being
watched.
nsMsgViewType
for example, to request the 'show all threads' view use the constant: components.interfaces.nsmsgviewtype.eshowallthreads constants name value description eshowallthreads 0 eshowthreadswithunread 2 eshow
watchedthreadswithunread 3 eshowquicksearchresults 4 eshowvirtualfolderresults 5 eshowsearch 6 ...
Break on DOM mutation - Firefox Developer Tools
the panel on the right shows that execution is "paused on dom mutation" and you, as with any other breakpoint, you can see the call stack and view any
watch expressions you may have set up.
Access debugging in add-ons - Firefox Developer Tools
window.addeventlistener("debugger:editorunloaded") relevant files: chrome://browser/content/devtools/debugger-controller.js chrome://browser/content/devtools/debugger-toolbar.js chrome://browser/content/devtools/debugger-view.js chrome://browser/content/devtools/debugger-panes.js unfortunately there is not yet any api to evaluate
watches/expressions within the debugged scope, or highlight elements on the page that are referenced as variables in the debugged scope.
How to - Firefox Developer Tools
access debugging in add-onsbreaking on exceptionsdebug eval sourcesdisable breakpointsexamine, modify, and
watch variableshighlight and inspect dom nodesignore a sourceopen the debuggerpretty-print a minified filesearchset a breakpointset a conditional breakpointset
watch expressionsstep through codeuse a source mapuse
watchpoints ...
Edit CSS filters - Firefox Developer Tools
css filter properties in the rules view have a circular gray and white s
watch next to them: clicking the s
watch opens a filter editor: the filter editor lists each of the effects performed by that filter on a separate line.
How to - Firefox Developer Tools
open the performance tools to open the performance tools: press shift + f5 select "performance" from the web developer submenu in the firefox menu (or tools menu if you display the menu bar or are on os x) select "performance" from tools button, in the toolbar, if you have one: record a profile to start a new recording, press the stop
watch icon in the recordings pane.
AudioTrack.language - Web APIs
this could then be used to build a user interface for selecting the language the user would like to listen to while
watching a movie, for example.
Battery Status API - Web APIs
example in this example, we
watch for changes both to the charging status (whether or not we're plugged in and charging) and for changes to the battery level and timing.
Bluetooth.getDevices() - Web APIs
the program can detect when a device comes online or into range by
watching for bluetooth advertisements by calling bluetoothdevice.
watchadvertisements() on that device.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
this may change in the future, so it would be wise to plan ahead and
watch for exceptions such as securityerror (although the specific error that might be thrown is not mentioned in the spec, this is a likely candidate).
Element - Web APIs
this can be used to
watch both for successful expected transitions, but also to
watch for unexpected changes, such as when your app is running in the background.
Event - Web APIs
(for example, a webpage with an advertising-module and statistics-module both monitoring video-
watching.) when there are many nested elements, each with its own handler(s), event processing can become very complicated—especially where a parent element receives the very same event as its child elements because "spatially" they overlap so the event technically occurs in both, and the processing order of such events depends on the event bubbling and capture settings of each handler triggered.
Introduction to the File and Directory Entries API - Web APIs
the app can access partially downloaded files (so that you can
watch the first chapter of your dvd, even if the app is still downloading the rest of the content or if the app didn't complete the download because you had to run to catch a train).
Fullscreen API - Web APIs
view live examples
watching for the enter key when the page is loaded, this code is run to set up an event listener to
watch for the enter key.
GlobalEventHandlers.onblur - Web APIs
html <input type="text" value="click here"> javascript let input = document.queryselector('input'); input.onblur = inputblur; input.onfocus = inputfocus; function inputblur() { input.value = 'focus has been lost'; } function inputfocus() { input.value = 'focus is here'; } result try clicking in and out of the form field, and
watch its contents change accordingly.
GlobalEventHandlers.onfocus - Web APIs
html <input type="text" value="click here"> javascript let input = document.queryselector('input'); input.onblur = inputblur; input.onfocus = inputfocus; function inputblur() { input.value = 'focus has been lost'; } function inputfocus() { input.value = 'focus is here'; } result try clicking in and out of the form field, and
watch its contents change accordingly.
HTMLMediaElement.play() - Web APIs
this ensures that the play button matches the actual state of playback by
watching for the resolution or rejection of the promise returned by play().
HTMLSelectElement - Web APIs
<option>first</option> <option selected>second</option> <option>third</option> </select> */ var select = document.getelementbyid('s'); // return the index of the selected option console.log(select.selectedindex); // 1 // return the value of the selected option console.log(select.options[select.selectedindex].value) // second a better way to track changes to the user's selection is to
watch for the change event to occur on the <select>.
KeyboardEvent.code - Web APIs
most real games would
watch for keydown events, start motion when that happens, and stop the motion when the corresponding keyup occurs, instead of relying on key repeats.
Key Values - Web APIs
vk_user "ondemand" opens the user interface for selecting on demand content or programs to
watch.
MediaQueryList - Web APIs
this method exists primarily for backward compatibility; if possible, you should instead use addeventlistener() to
watch for the change event.
Media Source API - Web APIs
the two most common use cases for dash involve
watching content “on demand” or “live.” on demand allows a developer to take their time transcoding the assets into multiple resolutions of various quality.
Capabilities, constraints, and settings - Web APIs
we also need to set up an event listener to
watch for the "start video" button to be clicked: document.getelementbyid("startbutton").addeventlistener("click", function() { startvideo(); }, false); applying constraint set updates next, we set up an event listener for the "apply constraints" button.
MutationObserverInit.attributeOldValue - Web APIs
example in this example, a mutation observer is set up to
watch for changes to the status and username attributes in any elements contained within a subtree that displays the names of users in a chat room.
MutationObserverInit.subtree - Web APIs
for example, to
watch the target node only for attribute changes, the mutationobserverinit passed into mutationobserver() can be: var options = { attributes: true, subtree: false }; since the default value of subtree is false, line 3 is optional.
PaymentMethodChangeEvent.methodDetails - Web APIs
example this example uses the paymentmethodchange event to
watch for changes to the payment method selected for apple pay, in order to compute a discount if the user chooses to use a visa card as their payment method.
PaymentMethodChangeEvent.methodName - Web APIs
example this example uses the paymentmethodchange event to
watch for changes to the payment method selected for apple pay, in order to compute a discount if the user chooses to use a visa card as their payment method.
PositionOptions - Web APIs
the positionoptions dictionary describes an object containing option properties to pass as a parameter of geolocation.getcurrentposition() and geolocation.
watchposition().
RTCDataChannel.close() - Web APIs
most of the process of closing the connection is handled asynchronously; you can detect when the channel has finished closing by
watching for a close event on the data channel.
RTCIceTransport - Web APIs
it's possible that a better pair will be found and selected later; if you need to keep up with this,
watch for the selectedcandidatepairchange event.
RTCOfferOptions.iceRestart - Web APIs
it
watches for the ice connection state to transition to "failed", which indicates that an ice restart should be tried in order to attempt to bring the connection back up.
RTCPeerConnection.createOffer() - Web APIs
voiceactivitydetection optional some codecs and hardware are able to detect when audio begins and ends by
watching for "silence" (or relatively low sound levels) to occur.
RTCPeerConnection: icegatheringstatechange event - Web APIs
bubbles no cancelable no interface event event handler onicegatheringstatechange note: while you can determine that ice candidate gathering is complete by
watching for icegatheringstatechange events and checking for the value of icegatheringstate to become complete, you can also simply have your handler for the icecandidate event look to see if its candidate property is null.
RTCPeerConnection: icecandidate event - Web APIs
if you need to perform any special actions when there are no further candidates expected, you're much better off
watching the ice gathering state by
watching for icegatheringstatechange events: pc.addeventlistener("icegatheringstatechange", ev => { switch(pc.icegatheringstate) { case "new": /* gathering is either just starting or has been reset */ break; case "gathering": /* gathering has begun or is ongoing */ break; case "complete": /* gathering has ended */ br...
RTCPeerConnection.onicecandidate - Web APIs
you don't need to
watch for this explicitly; instead, if you need to sense the end of signaling, you should
watch for a icegatheringstatechange event indicating that the ice negotiation has transitioned to the complete state.
WebRTC connectivity - Web APIs
it's a legacy notification of a state which can be detected instead by
watching for the icegatheringstate to change to complete, by
watching for the icegatheringstatechange event.
Using WebRTC data channels - Web APIs
the rtcdatachannel object is returned immediately by createdatachannel(); you can tell when the connection has been made successfully by
watching for the open event to be sent to the rtcdatachannel.
Using bounded reference spaces - Web APIs
although the user's xr system may provide automated detection and protection against exiting the safe area, it is always good practice to handle this yourself,
watching for collisions between the user's position and the boundary of the world, and providing guidance to move back toward the origin point, or at least to stay inside the safe zone.
Lighting a WebXR setting - Web APIs
another scenario in which lighting estimation can be used to obtain information about the user without permission: if the light sensor is close enough to the user's display to detect lighting changes caused by the contents of the display, an algorithm could be used to determine whether or not the user is
watching a particular video—or even to potentially identify which of a number of videos the user is
watching.
Window.matchMedia() - Web APIs
if you need to be kept aware of whether or not the document matches the media query at all times, you can instead
watch for the change event to be delivered to the object.
Window: pagehide event - Web APIs
bubbles no cancelable no interface pagetransitionevent event handler property onpagehide examples in this example, an event handler is established to
watch for pagehide events and to perform special handling if the page is being persisted for possible reuse.
Window: pageshow event - Web APIs
"persisted" : "not persisted"; console.log('event:', event.type, '-', ispersisted); break; default: console.log('event:', event.type); break; } }; events.foreach(eventname => window.addeventlistener(eventname, eventlogger) ); html <p>open the console and
watch the output as you navigate to and from this page.
XRSessionEvent - Web APIs
examples this example creates a listiener that
watches for the visibility state of the session to change.
XRView - Web APIs
there might also be views representing observers
watching the action, or other viewspoints not direclty associated with a player's eye.
ARIA: timer role - Accessibility
examples some prominent web timers include clocks, stop
watches and countdowns, such as ticketing websites, e-commerce sites, and event countdowns (see https://countingdownto.com/).
Perceivable - Accessibility
1.2.8 provide an alternative for prerecorded media (aaa) for all content that features video, a descriptive text transcript should be provided, for example a script of the movie you are
watching.
height - CSS: Cascading Style Sheets
examples html <div>
watch this element as you resize your viewport's height.</div> css /* exact height */ @media (height: 360px) { div { color: red; } } /* minimum height */ @media (min-height: 25rem) { div { background: yellow; } } /* maximum height */ @media (max-height: 40rem) { div { border: 2px solid blue; } } result specifications specification status comment ...
width - CSS: Cascading Style Sheets
examples html <div>
watch this element as you resize your viewport's width.</div> css /* exact width */ @media (width: 360px) { div { color: red; } } /* minimum width */ @media (min-width: 35rem) { div { background: yellow; } } /* maximum width */ @media (max-width: 50rem) { div { border: 2px solid blue; } } result specifications specification status comment media queries level 4the d...
CSS Animations tips and tricks - CSS: Cascading Style Sheets
the following demo shows how you'd achieve the aforementioned javascript technique: .slidein { animation-duration: 5s; animation-name: slidein; animation-iteration-count: infinite; } .stopped { animation-name: none; } @keyframes slidein { 0% { margin-left: 0%; } 50% { margin-left: 50%; } 100% { margin-left: 0%; } } <h1 id="
watchme">click me to stop</h1> let
watchme = document.getelementbyid('
watchme')
watchme.classname = 'slidein' const listener = (e) => {
watchme.classname = 'slidein stopped' }
watchme.addeventlistener('click', () =>
watchme.addeventlistener('animationiteration', listener, false) ) demo https://jsfiddle.net/morenoh149/5ty5a4oy/ ...
Spanning and Balancing Columns - CSS: Cascading Style Sheets
things to
watch out for if the spanning element is inside another element which has margins, padding and a border or a background color, it is possible to end up with the top of the box appearing above the spanner and the rest displaying below, as shown in the next example.
Mozilla CSS extensions - CSS: Cascading Style Sheets
r-decoration -moz-user-select -moz-all -moz-none width, min-width, and max-width -moz-min-content -moz-fit-content -moz-max-content -moz-available pseudo-elements and pseudo-classes a – d ::-moz-anonymous-block eg@:- bug 331432 ::-moz-anonymous-positioned-block :-moz-any :-moz-any-link [matches :link and :visited] :-moz-broken ::-moz-canvas ::-moz-color-s
watch ::-moz-cell-content :-moz-drag-over f – i :-moz-first-node ::-moz-focus-inner ::-moz-focus-outer :-moz-focusring :-moz-full-screen :-moz-full-screen-ancestor :-moz-handler-blocked :-moz-handler-crashed :-moz-handler-disabled ::-moz-inline-table l :-moz-last-node :-moz-list-bullet :-moz-list-number :-moz-loading :-moz-locale-dir(ltr) :-moz-locale-dir(rtl) :-moz-lwt...
env() - CSS: Cascading Style Sheets
for non-rectangular displays — like a round
watch face — the four values set by the user agent form a rectangle such that all content inside the rectangle is visible.
<image> - CSS: Cascading Style Sheets
ferenced with the element() function, if "realid" is an existing id on the page */ image(ltr 'arrow.png#xywh=0,0,16,16', red) /* a section 16x16 section of <url>, starting from the top, left of the original image as long as arrow.png is a supported image, otherwise a solid red s
watch.
Event reference
broadcast xul an observer noticed a change to the attributes of a
watched broadcaster.
Media events - Developer guides
you can easily
watch for these events, using code such as the following: var v = document.getelementsbytagname("video")[0]; v.addeventlistener("seeked", function() { v.play(); }, true); v.currenttime = 10.0; this example fetches the first video element in the document and attaches an event listener to it,
watching for the seeked event, which is sent whenever a seek operation completes.
A hybrid approach - Developer guides
so far there is not much to see for mobile, since things are still in the formative stages of development, but you can always
watch the new mozilla.org grow up on github.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
for example: <link href="print.css" rel="stylesheet" media="print"> <link href="mobile.css" rel="stylesheet" media="all"> <link href="desktop.css" rel="stylesheet" media="screen and (min-width: 600px)"> <link href="highres.css" rel="stylesheet" media="screen and (min-resolution: 300dpi)"> stylesheet load events you can determine when a style sheet has been loaded by
watching for a load event to fire on it; similarly, you can detect if an error has occurred while processing a style sheet by
watching for an error event: <script> var mystylesheet = document.queryselector('#my-stylesheet'); mystylesheet.onload = function() { // do something interesting; the sheet has been loaded } mystylesheet.onerror = function() { console.log("an error occurred loading the st...
Content-Security-Policy-Report-Only - HTTP
you observe how your site behaves,
watching for violation reports, or malware redirects, then choose the desired policy enforced by the content-security-policy header.
Feature-Policy: geolocation - HTTP
when this policy is enabled, calls to getcurrentposition() and
watchposition() will cause those functions' callbacks to be invoked with a positionerror code of permission_denied.
Feature-Policy - HTTP
when this policy is disabled, calls to getcurrentposition() and
watchposition() will cause those functions' callbacks to be invoked with a positionerror code of permission_denied.
Index - HTTP
when this policy is enabled, calls to getcurrentposition() and
watchposition() will cause those functions' callbacks to be invoked with a positionerror code of permission_denied.
HTTP Index - HTTP
when this policy is enabled, calls to getcurrentposition() and
watchposition() will cause those functions' callbacks to be invoked with a positionerror code of permission_denied.
A re-introduction to JavaScript (JS tutorial) - JavaScript
also,
watch out for stuff like: 0.1 + 0.2 == 0.30000000000000004; in practice, integer values are treated as 32-bit ints, and some implementations even store it that way until they are asked to perform an instruction that's valid on a number but not on a 32-bit integer.
Functions - JavaScript
return function() { return apicode; }; })(); getcode(); // returns the apicode caution: there are a number of pitfalls to
watch out for when using closures!
Introduction - JavaScript
hello world to get started with writing javascript, open the web console in multi-line mode, and write your first "hello world" javascript code: (function(){ "use strict"; /* start of your code */ function greetme(yourname) { alert('hello ' + yourname); } greetme('world'); /* end of your code */ })(); press cmd+enter or ctrl+enter (or click the run button) to
watch it unfold in your browser!
Date.prototype.setMonth() - JavaScript
examples using setmonth() var thebigday = new date(); thebigday.setmonth(6); //
watch out for end of month transitions var endofmonth = new date(2016, 7, 31); endofmonth.setmonth(1); console.log(endofmonth); //wed mar 02 2016 00:00:00 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setmonth' in that specification.
Performance fundamentals - Web Performance
css animations give you very granular control over your effects using keyframes, and you can even
watch events fired during the animation process in order to handle other tasks that need to be performed at set points in the animation process.