Search completed in 1.66 seconds.
927 results for "clear":
Your results are loading. Please wait...
clear - CSS: Cascading Style Sheets
WebCSSclear
the clear css property sets whether an element must be moved below (cleared) floating elements that precede it.
... the clear property applies to floating and non-floating elements.
... the floats that are relevant to be cleared are the earlier floats within the same block formatting context.
...And 15 more matches
Clearing with colors - Web APIs
« previousnext » an example showing how to clear a webgl rendering context to a solid color.
... clearing the webgl context with a solid color the simplest graphical webgl program.
... set up the rendering context and then just clear it solid green.
...And 12 more matches
Clear-Site-Data - HTTP
the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... header type response header forbidden header name no syntax the clear-site-data header accepts one or more directives.
... if all types of data should be cleared, the wildcard directive ("*") can be used.
...And 8 more matches
CanvasRenderingContext2D.clearRect() - Web APIs
the canvasrenderingcontext2d.clearrect() method of the canvas 2d api erases the pixels in a rectangular area by setting them to transparent black.
... note: be aware that clearrect() may cause unintended side effects if you're not using paths properly.
... make sure to call beginpath() before starting to draw new items after calling clearrect().
...And 7 more matches
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
the webgl2renderingcontext.clearbuffer[fiuv]() methods of the webgl 2 api clear buffers from the currently bound framebuffer.
... syntax void gl.clearbufferfv(buffer, drawbuffer, values, optional srcoffset); void gl.clearbufferiv(buffer, drawbuffer, values, optional srcoffset); void gl.clearbufferuiv(buffer, drawbuffer, values, optional srcoffset); void gl.clearbufferfi(buffer, drawbuffer, depth, stencil); parameters buffer a glenum specifying the buffer to clear.
... gl.depth_stencil: clears depth and stencil buffers (used with clearbufferfi).
...And 6 more matches
WebGLRenderingContext.clearColor() - Web APIs
the webglrenderingcontext.clearcolor() method of the webgl api specifies the color values used when clearing color buffers.
... this specifies what color values to use when calling the clear() method.
... syntax void gl.clearcolor(red, green, blue, alpha); parameters red a glclampf specifying the red color value used when the color buffers are cleared.
...And 6 more matches
JS_ClearContextThread
syntax jsword js_clearcontextthread(jscontext *cx); jsword js_setcontextthread(jscontext *cx); name type description cx jscontext * the context to transfer from one thread to another.
... description an application that creates or uses a jscontext in one thread, then uses or destroys it in another thread, must use js_clearcontextthread and js_setcontextthread to transfer the jscontext safely from one thread to the other.
... before transferring a jscontext from thread a to thread b, thread a must call js_clearcontextthread.
...And 5 more matches
IDBObjectStore.clear() - Web APIs
the clear() method of the idbobjectstore interface creates and immediately returns an idbrequest object, and clears this object store in a separate thread.
... clearing an object store consists of removing all records from the object store and removing all records in indexes that reference the object store.
... syntax var request = objectstore.clear(); returns an idbrequest object on which subsequent events related to this operation are fired.
...And 5 more matches
WebGLRenderingContext.clear() - Web APIs
the webglrenderingcontext.clear() method of the webgl api clears buffers to preset values.
... the preset values can be set by clearcolor(), cleardepth() or clearstencil().
... the scissor box, dithering, and buffer writemasks can affect the clear() method.
...And 5 more matches
DataTransfer.clearData() - Web APIs
the datatransfer.cleardata() method removes the drag operation's drag data for the given type.
... syntax datatransfer.cleardata([format]); parameters format optional a string which specifies the type of data to remove.
... example this example shows the use of the datatransfer object's getdata(), setdata() and cleardata() methods.
...And 4 more matches
performance.clearMarks() - Web APIs
the clearmarks() method removes the named mark from the browser's performance entry buffer.
... syntax performance.clearmarks(); performance.clearmarks(name); arguments name optional a domstring representing the name of the timestamp.
... return value void example the following example shows both uses of the clearmarks() method.
...And 4 more matches
performance.clearMeasures() - Web APIs
the clearmeasures() method removes the named measure from the browser's performance entry buffer.
... syntax performance.clearmeasures(); performance.clearmeasures(name); arguments name optional a domstring representing the name of the timestamp.
... return value void example the following example shows both uses of the clearmeasures() method.
...And 4 more matches
USBDevice.clearHalt() - Web APIs
the clearhalt() method of the usbdevice interface returns a promise that resolves when a halt condition is cleared.
... a halt condition is when a data tranfer to or from the device has a status of 'stall', which requires the web page (the host system, in usb terminology) to clear that condition.
... syntax var promise = usbdevice.clearhalt(direction, endpointnumber) parameters direction indicates whether the devices input or output should be cleared.
...And 3 more matches
WebGLRenderingContext.clearDepth() - Web APIs
the webglrenderingcontext.cleardepth() method of the webgl api specifies the clear value for the depth buffer.
... this specifies what depth value to use when calling the clear() method.
... syntax void gl.cleardepth(depth); parameters depth a glclampf specifying the depth value used when the depth buffer is cleared.
...And 3 more matches
WebGLRenderingContext.clearStencil() - Web APIs
the webglrenderingcontext.clearstencil() method of the webgl api specifies the clear value for the stencil buffer.
... this specifies what stencil value to use when calling the clear() method.
... syntax void gl.clearstencil(s); parameters s a glint specifying the index used when the stencil buffer is cleared.
...And 3 more matches
Clearing by clicking - Web APIs
« previousnext » this example demonstrates how to combine user interaction with webgl graphics operations by clearing the rendering context with a random color when the user clicks.
... clearing the rendering context with random colors this example provides a simple illustration of how to combine webgl and user interaction.
... every time the user clicks the canvas or the button, the canvas is cleared with a new randomly chosen color.
...And 3 more matches
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
the cleartimeout() method of the windoworworkerglobalscope mixin cancels a timeout previously established by calling settimeout().
... syntax scope.cleartimeout(timeoutid) parameters timeoutid the identifier of the timeout you want to cancel.
... it's worth noting that the pool of ids used by settimeout() and setinterval() are shared, which means you can technically use cleartimeout() and clearinterval() interchangeably.
...And 3 more matches
JS_ClearPendingException
clear the currently pending exception in a context.
... syntax void js_clearpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown.
... description js_clearpendingexception cancels the currently pending exception in cx, if any.
...And 2 more matches
JS_ClearRegExpStatics
clear the pending regexp input and flags.
... syntax bool js_clearregexpstatics(jscontext *cx, handleobject obj); name type description cx jscontext * the context.
... description js_clearregexpstatics clears the pending input string and flags of the built-in regexp object.
...And 2 more matches
DataTransferItemList.clear() - Web APIs
the datatransferitemlist method clear() removes all datatransferitem objects from the drag data items list, leaving the list empty.
... syntax datatransferitemlist.clear(); parameters none.
... return value undefined example this example shows the use of the clear() method.
...And 2 more matches
performance.clearResourceTimings() - Web APIs
the clearresourcetimings() method removes all performance entries with an entrytype of "resource" from the browser's performance data buffer and sets the size of the performance data buffer to zero.
... syntax performance.clearresourcetimings(); arguments void return value none this method has no return value.
... example function load_resource() { var image = new image(); image.src = "https://developer.mozilla.org/static/img/opengraph-logo.png"; } function clear_performance_timings() { if (performance === undefined) { log("browser does not support web performance"); return; } // create a resource timing performance entry by loading an image load_resource(); var supported = typeof performance.clearresourcetimings == "function"; if (supported) { console.log("run: performance.clearresourcetimings()"); performance.clearresourcetimings(); } else { console.log("performance.clearresourcetimings() not supported"); return; } // getentries should now return zero var p = performance.getentriesbytype("resource"); if (p.length == 0) console.log("...
...And 2 more matches
Storage.clear() - Web APIs
WebAPIStorageclear
the clear() method of the storage interface clears all keys stored in a given storage object.
... syntax storage.clear(); return value undefined.
... examples the following function creates three data entries in local storage, and then deletes them by using clear().
...And 2 more matches
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
the clearinterval() method of the windoworworkerglobalscope mixin cancels a timed, repeating action which was previously established by a call to setinterval().
... syntax scope.clearinterval(intervalid) parameters intervalid the identifier of the repeated action you want to cancel.
... it's worth noting that the pool of ids used by setinterval() and settimeout() are shared, which means you can technically use clearinterval() and cleartimeout() interchangeably.
...And 2 more matches
::-ms-clear - Archive of obsolete content
the ::-ms-clear css pseudo-element creates a clear button at the edge of an <input type="text"> text control that clears the current value.
... the clear button is only shown on focused, non-empty text controls.
...such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its selector.
...r-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-clear example html <form> <label for="firstname">first name:</label> <input type="text" id="firstname" name="firstname" placeholder="first name"> <br> <label for="lastname">last name:</label> <input type="text" id="lastname" name="lastname" placeholder="second name"> </form> css input, label { display: block; } input[type=text]::-ms-clear { color: red; /* this sets the cross color ...
HTMLIFrameElement.clearMatch()
the clearmatch() method of the htmliframeelement clears any content highlighted by findall() or findnext().
... syntax instanceofhtmliframeelement.clearmatch(); returns void.
... examples the following function is taken from our browser api demo, and (amongst other things) clears the search results when the search bar is hidden, if an existing search is active.
... searchtoggle.addeventlistener('touchend',function() { if(search.getattribute('class') === 'search') { search.setattribute('class', 'search shifted'); } else if(search.getattribute('class') === 'search shifted') { search.setattribute('class', 'search'); if(searchactive) { browser.clearmatch(); searchactive = false; prev.disabled = true; next.disabled = true; searchbar.value = ''; } } }); specification not part of any specification.
PR_ClearInterrupt
clears the interrupt request for the calling thread.
... syntax #include <prthread.h> void pr_clearinterrupt(void); description interrupting is a cooperative process, so it's possible that the thread passed to pr_interrupt may never respond to the interrupt request.
...therefore it is sometimes necessary to call pr_clearinterrupt to clear a previous interrupt request.
... if no interrupt request is pending, pr_clearinterrupt is a no-op.
JS_ClearDateCaches
this article covers features introduced in spidermonkey 17 clear the cache of calculated local time from each date object.
... syntax void js_cleardatecaches(jscontext *cx); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
... description js_cleardatecaches clears the cache of calculated local time from each date object.
... see also mxr id search for js_cleardatecaches js_newdateobject js_newdateobjectmsec js_objectisdate bug 285615 replaced by js::resettimezone ...
DataTransfer.mozClearDataAt() - Web APIs
the datatransfer.mozcleardataat() method removes the data associated with the given format for an item at the specified index.
... syntax void datatransfer.mozcleardataat([type], index); arguments type a string representing the type of the drag data to remove from the drag data object.
... return value void example this example shows the use of the mozcleardataat() method in a dragend event handler.
... function dragend_handler(event) { var dt = event.datatransfer; // remove a text/html item dt.mozcleardataat("text/html", 1); } specifications this method is not defined in any web standard.
JS_ClearNewbornRoots
clear a context's newborn roots, which temporarily protect newly allocated values from garbage collection.
... syntax void js_clearnewbornroots(jscontext *cx); name type description cx jscontext * the context to clear.
...however, the newborn roots can also entrain great gobs of garbage, so the js_gc entry point clears them for the context on which gc is being forced.
JS_ClearScope
syntax void js_clearscope(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object.
... description js_clearscope removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation.
...see also js_deleteproperty js_deleteelement js_clearnonglobalobject js_setallnonreservedslotstoundefined bug 749371 ...
CanvasRenderingContext2D.clearHitRegions() - Web APIs
the canvasrenderingcontext2d method clearhitregions() removes all hit regions from the canvas.
... syntax void ctx.clearhitregions(); examples using the clearhitregions method this example demonstrates the clearhitregions() method.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // set some hit regions ctx.addhitregion({id: 'eyes'}); ctx.addhitregion({id: 'nose'}); ctx.addhitregion({id: 'mouth'}); // remove them altogether from the canvas ctx.clearhitregions(); specifications canvas hit regions have been removed from the whatwg living standard, although discussions about future standardization are ongoing.
Geolocation.clearWatch() - Web APIs
the geolocation.clearwatch() method is used to unregister location/error monitoring handlers previously installed using geolocation.watchposition().
... syntax navigator.geolocation.clearwatch(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.clearwatch(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.
msClearEffects - Web APIs
the mscleareffects method of the htmlmediaelement, is a proprietary method specific to internet explorer and microsoft edge.
... mscleareffects clears all effects from the media pipeline.
... syntax htmlmediaelement.mscleareffects(); parameters this method has no parameters.
MediaSource.clearLiveSeekableRange() - Web APIs
the clearliveseekablerange() method of the mediasource interface clears a seekable range previously set with a call to setliveseekablerange().
... syntax mediasource.clearliveseekablerange() parameters none.
... return value undefined specifications specification status comment media source extensionsthe definition of 'clearliveseekablerange()' in that specification.
StylePropertyMap.clear() - Web APIs
the clear() method of the stylepropertymap interface removes all declarations in the stylepropertymap.
... syntax stylepropertmap.clear() parameters none.
... return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'clear()' in that specification.
Window.clearImmediate() - Web APIs
this method clears the action specified by window.setimmediate.
... syntax window.clearimmediate( immediateid ) where immediateid is a id returned by window.setimmediate.
... examples let immediateid = setimmediate(() => { // run some code } document.getelementbyid("button") .addeventlistener(() => { clearimmediate(immediateid); }); specifications specification status comment efficient script yielding the definition of 'setimmediate' in that specification.
Map.prototype.clear() - JavaScript
the clear() method removes all elements from a map object.
... syntax mymap.clear(); return value undefined.
... examples using clear() var mymap = new map(); mymap.set('bar', 'baz'); mymap.set(1, 'foo'); mymap.size; // 2 mymap.has('bar'); // true mymap.clear(); mymap.size; // 0 mymap.has('bar') // false specifications specification ecmascript (ecma-262)the definition of 'map.prototype.clear' in that specification.
Set.prototype.clear() - JavaScript
the clear() method removes all elements from a set object.
... syntax myset.clear(); return value undefined.
... examples using the clear method var myset = new set(); myset.add(1); myset.add('foo'); myset.size; // 2 myset.has('foo'); // true myset.clear(); myset.size; // 0 myset.has('bar') // false specifications specification ecmascript (ecma-262)the definition of 'set.prototype.clear' in that specification.
clearResults - Archive of obsolete content
« xul reference home clearresults() return type: ???
... clears the results list.
JS_ClearNonGlobalObject
syntax void js_clearnonglobalobject(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object.
... description js_clearnonglobalobject removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation.
console.clear() - Web APIs
WebAPIConsoleclear
the console.clear() method clears the console if the environment allows it.
... syntax console.clear(); specifications specification status comment console apithe definition of 'console.clear()' in that specification.
Document.clear() - Web APIs
WebAPIDocumentclear
the document.clear() method clears the whole specified document in early (pre-1.0) versions of mozilla.
... syntax document.clear(); specification html5 ...
WeakMap.prototype.clear() - JavaScript
the clear() method used to remove all elements from a weakmap object, but is no longer part of ecmascript and its implementations.
... syntax wm.clear(); examples using the clear method var wm = new weakmap(); var obj = {}; wm.set(obj, 'foo'); wm.set(window, 'bar'); wm.has(obj); // true wm.has(window); // true wm.clear(); wm.has(obj) // false wm.has(window) // false specifications not part of any standard.
WeakSet.prototype.clear() - JavaScript
the clear() method used to remove all elements from a weakset object, but is no longer part of ecmascript and its implementations.
... syntax ws.clear(); examples using the clear method var ws = new weakset(); ws.add(window); ws.has(window); // true ws.clear(); ws.has(window); // false specifications not part of any standard.
clearSelection - Archive of obsolete content
« xul reference home clearselection() return type: no return value deselects all of the items.
Index - Web APIs
WebAPIIndex
64 animation.cancel() api, animation, method, reference, web animations, cancel, waapi, web animations api the web animations api's cancel() method of the animation interface clears all keyframeeffects caused by this animation and aborts its playback.
...the examples provided should give you some clear ideas what you can do with canvas, and will provide code snippets that may get you started in building your own content.
... 522 basic usage of canvas canvas, graphics, html, intermediate, tutorial at first sight a <canvas> looks like the <img> element, with the only clear difference being that it doesn't have the src and alt attributes.
...And 40 more matches
Floats - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to learn how to create floated features on webpages, and to use the clear property and other methods of clearing floats.
... clearing floats we have seen that the float is removed from normal flow and that other elements will display beside it, therefore if we want to stop the following element from moving up we need to clear it; this is achieved with the clear property.
... in your html from the previous example, add a class of cleared to the second paragraph below the floated item.
...And 21 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
see clearing timeouts (below) to learn how to do that.
...universe'); clearing timeouts finally, if a timeout has been created, you can cancel it before the specified time has elapsed by calling cleartimeout(), passing it the identifier of the settimeout() call as a parameter.
... so to cancel our above timeout, you'd do this: cleartimeout(mygreeting); note: see greeter-app.html for a slightly more involved demo that allows you to set the name of the person to say hello to in a form, and cancel the greeting using a separate button (see the source code also).
...And 12 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
function clear() { sure = confirm("are you sure?"); first, you have to find or create a myextension.properties file in your locale folder (notice: always stick to utf-8).
...ts.interfaces.nsistringbundleservice); var _bundle = gmyextensionbundle.createbundle("chrome://myextension/locale/myextension.properties") you can now use your string substitutes in the .js where they are needed: see examples below if ( password == userpassword ) { oprefs.setboolpref("access.authenticated", true); } else { alert (_bundle.getstringfromname("wrongpassmessage")); function clear() { sure = confirm(_bundle.getstringfromname("areyousuremessage")); } operations check this brings us to the operations check.
...under the tool menu, the session store submenu contains two items—save session and clear sessions; in between them is a list of previously saved sessions that you can restore, most recent first.
...And 8 more matches
WebIDL bindings
the generated c++ api will look as follows: namespace stringtolongmapbinding { namespace maplikehelpers { void clear(mozilla::dom::stringtolongmap* self, errorresult& arv); bool delete(mozilla::dom::stringtolongmap* self, const nsastring& akey, errorresult& arv); bool has(mozilla::dom::stringtolongmap* self, const nsastring& akey, errorresult& arv); void set(mozilla::dom::stringtolongmap* self, const nsastring& akey, int32_t avalue, errorresult& arv); } // namespace maplikehelpers } // namespace stringtolongmap...
...the generated c++ api will look as follows: namespace stringsetbinding { namespace setlikehelpers { void clear(mozilla::dom::stringset* self, errorresult& arv); bool delete(mozilla::dom::stringset* self, const nsastring& akey, errorresult& arv); bool has(mozilla::dom::stringset* self, const nsastring& akey, errorresult& arv); void add(mozilla::dom::stringset* self, const nsastring& akey, errorresult& arv); } // namespace setlikehelpers } iterable unlike maplike and setlike, iterable does not have any c++ helpers, as the structure backing the iterable data f...
...if the value returned by the attribute needs to change, the c++ code should call the clearcachedfoovalue method in the namespace of the relevant binding, where foo is the name of the attribute.
...And 8 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
it returns an interval id which uniquely identifies the interval, so you can remove it later by calling clearinterval().
... return value the returned intervalid is a numeric, non-zero value which identifies the timer created by the call to setinterval(); this value can be passed to windoworworkerglobalscope.clearinterval() to cancel the timeout.
... it may be helpful to be aware that setinterval() and settimeout() share the same pool of ids, and that clearinterval() and cleartimeout() can technically be used interchangeably.
...And 8 more matches
sslfnc.html
nss_init nss_initreadwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ssl_configmpserversidcache ssl_inheritmpserversidcache nss_init sets up configuration files and performs other tasks required to run network security services.
... ssl_clearsessioncache empties the ssl client session id cache.
... syntax #include "ssl.h" void ssl_clearsessioncache(void); description you must call ssl_clearsessioncache after you use one of the ssl export policy functions to change cipher suite policy settings or use ssl_cipherprefsetdefault to enable or disable any cipher suite.
...And 7 more matches
Index
198 js_clearcontextthread jsapi reference, spidermonkey transfer a jscontext from one thread to another.
... 199 js_cleardatecaches date, jsapi reference, javascript, reference, référence(2), spidermonkey js_cleardatecaches clears the cache of calculated local time from each date object.
... 200 js_clearnewbornroots jsapi reference, spidermonkey the last gc thing of each type (object, string, double, external string types) created on a given context is kept alive until another thing of the same type is created, using a newborn root in the context.
...And 7 more matches
Scissor animation - Web APIs
« previousnext » a simple webgl example in which we have some animation fun using scissoring and clearing operations.
... animation with scissoring in this example, we are animating squares using scissor() and clear().
... in contrast, the color of the square (set with clearcolor) is only updated when a new square is created.
...And 7 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
you're still going to have to manually clear the chrome cache on add-on shutdown to work around this, but that doesn't seem to be enough with an internal jar.
...utdown(data,reason) { if (reason == app_shutdown) return; foreachopenwindow(unloadfromwindow); services.wm.removelistener(windowlistener); mymodule.shutdown(); // do whatever shutdown stuff you need to do on addon disable components.utils.unload("chrome://myaddon/content/mymodule.jsm"); // same url as above // hack warning: the addon manager does not properly clear all addon related caches on update; // in order to fully update images and locales, their caches need clearing here services.obs.notifyobservers(null, "chrome-flush-caches", null); } function install(data,reason) { } function uninstall(data,reason) { } function loadintowindow(window) { /* call/move your ui construction function here */ } function unloadfromwindow(window) { /...
...as mentioned in the previous section, you'll need to clear the chrome caches on add-on shutdown, namely for chrome images and properties files.
...And 6 more matches
Fundamental text and font styling - Learn web development
in this example we'll apply some different css properties to the same html sample, which looks like this: <h1>tommy the cat</h1> <p>well i remember it as though it were a meal ago...</p> <p>said tommy the cat as he reeled back to clear whatever foreign matter may have nestled its way into his mighty throat.
... color can accept any css color unit, for example: p { color: red; } this will cause the paragraphs to become red, rather than the standard browser default black, like so: <h1>tommy the cat</h1> <p>well i remember it as though it were a meal ago...</p> <p>said tommy the cat as he reeled back to clear whatever foreign matter may have nestled its way into his mighty throat.
... a font-family example let's add to our previous example, giving the paragraphs a sans-serif font: p { color: red; font-family: helvetica, arial, sans-serif; } this gives us the following result: <h1>tommy the cat</h1> <p>well i remember it as though it were a meal ago...</p> <p>said tommy the cat as he reeled back to clear whatever foreign matter may have nestled its way into his mighty throat.
...And 6 more matches
Key Values - Web APIs
vk_back (0x08) kvk_delete (0x33) gdk_key_backspace (0xff08) qt::key_backspace (0x01000003) keycode_del (67) "clear" the clear key.
... vk_clear (0x0c) vk_oem_clear (0xfe) kvk_ansi_keypadclear (0x47) gdk_key_clear (0xff0b) qt::key_clear (0x0100000b) keycode_clear (28) "copy" the copy key (on certain extended keyboards).
... vk_exit qt::key_exit (0x0102000a) "favoriteclear0" clears the program or content stored in the first favorites list slot.
...And 6 more matches
Index - Archive of obsolete content
107 system/environment access, set and clear environment variables.
... 212 stringview as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
...the difference will be clearly flagged.
...And 5 more matches
Video and Audio APIs - Learn web development
first of all, add the following two addeventlistener() lines below the previous ones: rwd.addeventlistener('click', mediabackward); fwd.addeventlistener('click', mediaforward); now on to the event handler functions — add the following code below your previous functions to define mediabackward() and mediaforward(): let intervalfwd; let intervalrwd; function mediabackward() { clearinterval(intervalfwd); fwd.classlist.remove('active'); if(rwd.classlist.contains('active')) { rwd.classlist.remove('active'); clearinterval(intervalrwd); media.play(); } else { rwd.classlist.add('active'); media.pause(); intervalrwd = setinterval(windbackward, 200); } } function mediaforward() { clearinterval(intervalrwd); rwd.classlist.remove('active'); if...
...(fwd.classlist.contains('active')) { fwd.classlist.remove('active'); clearinterval(intervalfwd); media.play(); } else { fwd.classlist.add('active'); media.pause(); intervalfwd = setinterval(windforward, 200); } } you'll notice that first we initialize two variables — intervalfwd and intervalrwd — you'll find out what they are for later on.
... let's step through mediabackward() (the functionality for mediaforward() is exactly the same, but in reverse): we clear any classes and intervals that are set on the fast forward functionality — we do this because if we press the rwd button after pressing the fwd button, we want to cancel any fast forward functionality and replace it with the rewind functionality.
...And 5 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
we'll also wire up our "clear completed" button.
... a button to clear the completed todos.
...ate it to the following: import component from '@glimmer/component'; import { inject as service } from '@ember/service'; export default class footercomponent extends component { @service('todo-data') todos; } now we need to go back to our todo-data.js file and add some functionality that will allow us to return the number of incomplete todos (useful for showing how many are left), and clear the completed todos out of the list (which is what the “clear completed” functionality needs).
...And 5 more matches
nsITreeSelection
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void adjustselection(in long index, in long count); void clearrange(in long startindex, in long endindex); void clearselection(); void getrangeat(in long i, out long min, out long max); long getrangecount(); void invalidateselection(); void invertselection(); boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in ...
... clearrange() clears the range.
... void clearrange( in long startindex, in long endindex ); parameters startindex index to clearing at.
...And 5 more matches
Using the User Timing API - Web APIs
" + entries[i].name, 0); } } removing performance marks the performance.clearmarks() method is used to remove one or more marks from the browser's performance timeline.
... function clear_marks(obj) { if (performance.clearmarks === undefined) { log("clear marks: performance.clearmarks not supported", 0); return; } log("clear marks", 0); if (typeof obj == "string") { log("...
... cleared '" + obj + "' mark(s)", 0); performance.clearmarks(obj); } else { // no argument specified so clear all marks log("...
...And 5 more matches
Simple color animation - Web APIs
« previousnext » a very basic color animation created using webgl, performed by clearing the drawing buffer with a different random color every second.
... color animation with clear this example provides a simple illustration of color animation with webgl, as well as user interaction.
... drawanimation(); } function stopanimation(evt) { button.removeeventlistener(evt.type, stopanimation, false); button.addeventlistener("click", startanimation, false); verb.innerhtml="start"; // stop animation by clearing the timer.
...And 5 more matches
New Skin Notes - Archive of obsolete content
==dria you've got to be kidding me, the colors are clearly different (rgb(0,51,153) vs rgb(51,102,187)).
...the major problem it caused in cavendish skin - that they were out of the screen - is solved by making the sidebar smaller, which is not the right thing to do, imo (see my comment 1).--nickolay 02:11, 25 aug 2005 (pdt) yeah this is actually a problem with mw, rather than the skin -- they use a <br style="clear:both" /> in some pretty annoying places.
...--dria well, with mediawiki skin, you can have the clear:both's in content area without a problem.
...And 4 more matches
Move the ball - Game development
technically, we will be painting the ball on the screen, clearing it and then painting it again in a slightly different position every frame to make the impression of movement — just like how movement works with the movies.
...this works ok, although it appears that the ball is leaving a trail behind it: clearing the canvas before each frame the ball is leaving a trail because we're painting a new circle on every frame without removing the previous one.
... don't worry, because there's a method to clear canvas content: clearrect().
...And 4 more matches
JSAPI reference
tinterruptcallback added in spidermonkey 31 js_requestinterruptcallback added in spidermonkey 31 js_checkforinterrupt added in jsapi 45 js_destroycontextmaybegc obsolete since jsapi 14 js_setbranchcallback obsolete since javascript 1.9.1 js_setoperationcallback obsolete since jsapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since javascript 1.9.1 js_getoperationlimit obsolete since javascript 1.9.1 js_setoperationlimit obsolete since javascript 1.9.1 js_max_operation_limit obsolete since javascript 1.9.1 js_operation_weight_base obsolete since javascript 1.9.1 js_setthreadstacklimit obsolete since jsapi 13 js_setscriptstackquota obsolete since javascript 1.8.6 js_setoptions obsole...
...porter js_seterrorreporterobsolete since jsapi 52 js_errorfromexception js_geterrorprototype jsreport_is_exception jsreport_is_strict jsreport_is_warning jsreport_is_strict_mode_error the following functions allow c/c++ functions to throw and catch javascript exceptions: js::createerror added in spidermonkey 38 js_isexceptionpending js_getpendingexception js_setpendingexception js_clearpendingexception js_throwstopiteration added in spidermonkey 1.8 js_isstopiteration added in spidermonkey 31 typedef jsexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate these functions translate errors into exceptions and vice versa: js_reportpendingexception js_errorfromexception js_throwreportederror obsolete since jsapi 29 values and types ...
...ermonkey 17 js_removefinalizecallback added in spidermonkey 38 js_setgczeal added in spidermonkey 1.8 js_schedulegc added in spidermonkey 17 js_dumpheap added in spidermonkey 1.8 js_setgccallbackrt obsolete since jsapi 13 js_setfinalizecallback added in spidermonkey 17 obsolete since jsapi 32 js_markgcthing obsolete since jsapi 5 js_isabouttobefinalized obsolete since jsapi 35 js_clearnewbornroots obsolete since jsapi 5 the rest of these apis help protect objects from being destroyed by the garbage collector before the application is done using them.
...And 4 more matches
Advanced animations - Web APIs
for each frame, we also clear the canvas to remove old circles from prior frames.
... var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var raf; var ball = { x: 100, y: 100, vx: 5, vy: 2, radius: 25, color: 'blue', draw: function() { ctx.beginpath(); ctx.arc(this.x, this.y, this.radius, 0, math.pi * 2, true); ctx.closepath(); ctx.fillstyle = this.color; ctx.fill(); } }; function draw() { ctx.clearrect(0,0, canvas.width, canvas.height); ball.draw(); ball.x += ball.vx; ball.y += ball.vy; raf = window.requestanimationframe(draw); } canvas.addeventlistener('mouseover', function(e) { raf = window.requestanimationframe(draw); }); canvas.addeventlistener('mouseout', function(e) { window.cancelanimationframe(raf); }); ball.draw(); boundaries without any boundary collision testing our ball runs o...
...="300"></canvas> var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var raf; var ball = { x: 100, y: 100, vx: 5, vy: 2, radius: 25, color: 'blue', draw: function() { ctx.beginpath(); ctx.arc(this.x, this.y, this.radius, 0, math.pi * 2, true); ctx.closepath(); ctx.fillstyle = this.color; ctx.fill(); } }; function draw() { ctx.clearrect(0,0, canvas.width, canvas.height); ball.draw(); ball.x += ball.vx; ball.y += ball.vy; if (ball.y + ball.vy > canvas.height || ball.y + ball.vy < 0) { ball.vy = -ball.vy; } if (ball.x + ball.vx > canvas.width || ball.x + ball.vx < 0) { ball.vx = -ball.vx; } raf = window.requestanimationframe(draw); } canvas.addeventlistener('mouseover', function(e) { ra...
...And 4 more matches
Using IndexedDB - Web APIs
therefore deleting a record or even clearing all records from an object store never affects the object store's key generator.
...you save the list after the edit by clearing the object store and then writing out the new list.
... if you clear the object store in one transaction and write the new list in another transaction, there is a danger that the browser will close after the clear but before the write, leaving you with an empty database.
...And 4 more matches
Storage API - Web APIs
there are two modes: "best-effort" the user agent will try to retain the data contained in the box for as long as it can, but will not warn users if storage space runs low and it becomes necessary to clear the box in order to relieve the storage pressure.
... "persistent" the user agent will retain the data as long as possible, clearing all "best-effort" boxes before considering clearing a box marked "persistent".
... if it becomes necessary to consider clearing persistent boxes, the user agent will notify the user and provide a way to clear one or more persistent boxes as needed.
...And 4 more matches
WebGLRenderingContext - Web APIs
webglrenderingcontext.clearcolor() specifies the color values used when clearing color buffers.
... webglrenderingcontext.cleardepth() specifies the depth value used when clearing the depth buffer.
... webglrenderingcontext.clearstencil() specifies the stencil value used when clearing the stencil buffer.
...And 4 more matches
WebGL constants - Web APIs
clearing buffers constants passed to webglrenderingcontext.clear() to clear buffer masks.
... constant name value description depth_buffer_bit 0x00000100 passed to clear to clear the current depth buffer.
... stencil_buffer_bit 0x00000400 passed to clear to clear the current stencil buffer.
...And 4 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
return value the returned timeoutid is a positive integer value which identifies the timer created by the call to settimeout(); this value can be passed to cleartimeout() to cancel the timeout.
... it may be helpful to be aware that settimeout() and setinterval() share the same pool of ids, and that cleartimeout() and clearinterval() can technically be used interchangeably.
... example the following example sets up two simple buttons in a web page and hooks them to the settimeout() and cleartimeout() routines.
...And 4 more matches
-webkit-mask-composite - CSS: Cascading Style Sheets
/* keyword values */ -webkit-mask-composite: clear; -webkit-mask-composite: copy; -webkit-mask-composite: source-over; -webkit-mask-composite: source-in; -webkit-mask-composite: source-out; -webkit-mask-composite: source-atop; -webkit-mask-composite: destination-over; -webkit-mask-composite: destination-in; -webkit-mask-composite: destination-out; -webkit-mask-composite: destination-atop; -webkit-mask-composite: xor; /* global values */ -webkit-mask-composite: inherit; -webkit-mask-composite: initial; -webkit-mask-composite: uns...
... syntax values clear overlapping pixels in the source mask image and the destination mask image are cleared.
... source-in overlapping pixels in the source mask image and the destination mask image are replaced by the pixels of the source mask image; all other pixels are cleared.
...And 4 more matches
Gecko info for Windows accessibility vendors
when the document has finished loading the busy flag will be cleared.
...this makes it clear that the description is truly intended to be read.
...next, another event_state_change is fired for the new root role_document object for the window, with its state_busy flag cleared.
...And 3 more matches
Rhino Debugger
the rhino javascript debugger can debug scripts running in multiple threads and provides facilities to set and clear breakpoints, control execution, view variables, and evaluate arbitrary javascript code in the current scope of an executing script.
... setting and clearing breakpoints the main desktop of the debugger contains file windows which display the contents of each script you are debugging.
... you may clear breakpoint in a script by doing one of the following: place the cursor on the line at which you want to clear a breakpoint and right-click with the mouse.
...And 3 more matches
nsIMsgFolder
n nsimsgwindow msgwindow); void renamesubfolders( in nsimsgwindow msgwindow, in nsimsgfolder oldfolder); astring generateuniquesubfoldername(in astring prefix,in nsimsgfolder otherfolder); void updatesummarytotals(in boolean force); void summarychanged(); long getnumunread(in boolean deep); long gettotalmessages(in boolean deep); void clearnewmessages(); void clearrequirescleanup(); void setflag(in unsigned long flag); void clearflag(in unsigned long flag); boolean getflag(in unsigned long flag); void toggleflag(in unsigned long flag); void onflagchange(in unsigned long flag); void setprefflag(); nsimsgfolder getfolderswithflag(in unsigned long flags, in unsigne...
... long gettotalmessages(in boolean deep); clearnewmessages() clear new status flag of all of the new messages.
... void clearnewmessages(); clearrequirescleanup() void clearrequirescleanup(); setflag() sets a flag on the folder.
...And 3 more matches
Basic animations - Web APIs
basic animation steps these are the steps you need to take to draw a frame: clear the canvas unless the shapes you'll be drawing fill the complete canvas (for instance a backdrop image), you need to clear any shapes that have been drawn previously.
... the easiest way to do this is using the clearrect() method.
... sun.src = 'https://mdn.mozillademos.org/files/1456/canvas_sun.png'; moon.src = 'https://mdn.mozillademos.org/files/1443/canvas_moon.png'; earth.src = 'https://mdn.mozillademos.org/files/1429/canvas_earth.png'; window.requestanimationframe(draw); } function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); ctx.globalcompositeoperation = 'destination-over'; ctx.clearrect(0, 0, 300, 300); // clear canvas ctx.fillstyle = 'rgba(0, 0, 0, 0.4)'; ctx.strokestyle = 'rgba(0, 153, 255, 0.4)'; ctx.save(); ctx.translate(150, 150); // earth var time = new date(); ctx.rotate(((2 * math.pi) / 60) * time.getseconds() + ((2 * math.pi) / 60000) * time.getmilliseconds()); ctx.translate(105, 0); ctx.fillrect(0, -12, 40, 24); // shadow ctx.drawimage(earth, ...
...And 3 more matches
Performance - Web APIs
performance.clearmarks() removes the given mark from the browser's performance entry buffer.
... performance.clearmeasures() removes the given measure from the browser's performance entry buffer.
... performance.clearresourcetimings() removes all performance entries with a entrytype of "resource" from the browser's performance data buffer.
...And 3 more matches
Using the Resource Timing API - Web APIs
the clearresourcetimings() method removes all "resource" type performance entries from the browser's resource performance entry buffer.
... function clear_resource_timings() { if (performance === undefined) { console.log("= performance.clearresourcetimings(): peformance not supported"); return; } // check if performance.clearresourcetiming() is supported console.log ("= print performance.clearresourcetimings()"); var supported = typeof performance.clearresourcetimings == "function"; if (supported) { console.log("...
... performance.clearresourcetimings() = supported"); performance.clearresourcetimings(); } else { console.log("...
...And 3 more matches
Basic scissoring - Web APIs
clearing the drawing buffer when scissoring applies this is a simple demonstration of a rendering with scissor().
... although the clear() drawing command writes the clear color (set by clearcolor()) to all pixels in the drawing buffer, scissor() defines a mask that only allows pixels inside the specified rectangular area to be updated.
...scissoring is a distinct stage in the webgl/opengl graphics pipeline (it occurs after color clearing, but before color masking).
...And 3 more matches
WebGL by example - Web APIs
clearing with colors how to clear the rendering context with a solid color.
... clearing by clicking how to combine user interaction with graphics operations.
... clearing the rendering context with a random color when the user clicks.
...And 3 more matches
Cognitive accessibility - Accessibility
tent or advertisements; providing consistent web page layout and navigation; incorporating familiar elements, such as underlined links that are blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; making website authentication as easy as possible without compromising security; and making forms easy to complete, such as with clear error messages and simple error recovery.
... heading and labels include clear and descriptive headings so users can easily find information and understand relationships between different content sections.
... link text conveys meaning the link's text should clearly and concisely communicate what the user should expect to be navigated to next if they choose to activate it.
...And 3 more matches
Style System Overview - Archive of obsolete content
the data format of the structs and selectors is mostly clear from the code and not worth going into (although the implementation of :not() is confusing).
... as for other style changes, we have to “walk” the rule tree and clear all the style data coming from the old inline style nsistylerule, since there could be an !important rule that overrides it, which would allow dynamic changes to put the style attribute in multiple places in the rule tree.
... when rebuilding rule tree, we have to clear cached style contexts from xul menus and trees.
...And 2 more matches
jspage - Archive of obsolete content
h.alias("foreach","each");array.implement({foreach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this);}}});array.alias("foreach","each"); function $a(b){if(b.item){var a=b.length,c=new array(a);while(a--){c[a]=b[a];}return c;}return array.prototype.slice.call(b);}function $arguments(a){return function(){return arguments[a]; };}function $chk(a){return !!(a||a===0);}function $clear(a){cleartimeout(a);clearinterval(a);return null;}function $defined(a){return(a!=undefined);}function $each(c,b,d){var a=$type(c); ((a=="arguments"||a=="collection"||a=="array")?array:hash).each(c,b,d);}function $empty(){}function $extend(c,a){for(var b in (a||{})){c[b]=a[b];}return c; }function $h(a){return new hash(a);}function $lambda(a){return($type(a)=="function")?a:function(){return a;};}fun...
...as no parent.'); }return c.apply(this,arguments);}.protect());},implements:function(a){$splat(a).each(function(b){if(b instanceof function){b=class.instantiate(b);}this.implement(b); },this);}};var chain=new class({$chain:[],chain:function(){this.$chain.extend(array.flatten(arguments));return this;},callchain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false; },clearchain:function(){this.$chain.empty();return this;}});var events=new class({$events:{},addevent:function(c,b,a){c=events.removeon(c);if(b!=$empty){this.$events[c]=this.$events[c]||[]; this.$events[c].include(b);if(a){b.internal=true;}}return this;},addevents:function(a){for(var b in a){this.addevent(b,a[b]);}return this;},fireevent:function(c,b,a){c=events.removeon(c); if(!this.$events||!this.$even...
...function(e){var f=this.getelementsbytagname(e.trim());(b)?c.extend(f):c=f; },this);return new elements(c,{ddup:b,cash:!d});}});(function(){var h={},f={};var i={input:"checked",option:"selected",textarea:(browser.engine.webkit&&browser.engine.version<420)?"innerhtml":"value"}; var c=function(l){return(f[l]||(f[l]={}));};var g=function(n,l){if(!n){return;}var m=n.uid;if(browser.engine.trident){if(n.clearattributes){var q=l&&n.clonenode(false); n.clearattributes();if(q){n.mergeattributes(q);}}else{if(n.removeevents){n.removeevents();}}if((/object/i).test(n.tagname)){for(var o in n){if(typeof n[o]=="function"){n[o]=$empty; }}element.dispose(n);}}if(!m){return;}h[m]=f[m]=null;};var d=function(){hash.each(h,g);if(browser.engine.trident){$a(document.getelementsbytagname("object")).each(g); }if(window.
...And 2 more matches
Space Manager Detailed Design - Archive of obsolete content
* * returns ns_ok if successful and ns_error_invalid_arg if there is no region * tagged with aframe */ nsresult removeregion(nsiframe* aframe); /** * clears the list of regions representing the unavailable space.
... */ void clearregions(); /** * methods for dealing with the propagation of float damage during * reflow.
...(); // accessors prbool isempty() const {return pr_clist_is_empty((prcliststr*)this);} bandrect* head() const {return (bandrect*)pr_list_head(this);} bandrect* tail() const {return (bandrect*)pr_list_tail(this);} // operations void append(bandrect* abandrect) {pr_append_link(abandrect, this);} // remove and delete all the band rects in the list void clear(); }; frameinfo* getframeinfofor(nsiframe* aframe); frameinfo* createframeinfo(nsiframe* aframe, const nsrect& arect); void destroyframeinfo(frameinfo*); void clearframeinfo(); void clearbandrects(); bandrect* getnextband(const bandrect* abandrect) const; void divideband(bandrect* aband, nscoord abottom); prbool canjoinbands(bandrect* aband, band...
...And 2 more matches
Browser Feature Detection - Archive of obsolete content
it is clear from these test results that netscape 7.0x and mozilla firefox have the greatest dom support although internet explorer, safari, and opera have sufficient dom css 1 and dom level 1 & 2 document property and method support to enable cross browser web development.
...true true borderright true true true borderbottom true true true borderleft true true true bordertopwidth true true true borderrightwidth true true true borderbottomwidth true true true borderleftwidth true true true borderwidth true true true clear true true true color true true true display true true true cssfloat true false true font true true true fontfamily true true true fontsize true true true fontstyle true true true fontvariant true true true fontweight true true t...
... true borderbottomcolor true true true borderleftcolor true true true bordertopstyle true true true borderrightstyle true true true borderbottomstyle true true true borderleftstyle true true true bottom true true true captionside true false true clear true true true clip true true true content true false true counterincrement true false true counterreset true false true cue true false false cueafter true false false cuebefore true false false cursor true true true direction true ...
...And 2 more matches
HTML: A good basis for accessibility - Learn web development
using clear language the language you use can also affect accessibility.
... in general, you should use clear language that is not overly complex and doesn't use unnecessary jargon or slang terms.
...apart from this, you should try to avoid using language and characters that don't get read out clearly by the screen reader.
...And 2 more matches
HTML: A good basis for accessibility - Learn web development
using clear language the language you use can also affect accessibility.
... in general, you should use clear language that is not overly complex and doesn't use unnecessary jargon or slang terms.
...apart from this, you should try to avoid using language and characters that don't get read out clearly by the screen reader.
...And 2 more matches
Index - Learn web development
143 floats article, beginner, css, clearing, codingscripting, floats, guide, layout, columns, multi-column you now know all there is to know about floats in modern web development.
... 158 test your skills: floats beginner, css, example, guide the aim of this task is to get you working with the css float and clear properties covered in our lesson on floats.
...at this point, not only can we mark todos as complete, but we can clear them as well.
...And 2 more matches
Drawing graphics - Learn web development
note that on each frame we are completely clearing the canvas and redrawing everything.
... in general, the process of doing a canvas animation involves the following steps: clear the canvas contents (e.g.
... with fillrect() or clearrect()).
...And 2 more matches
Working with Svelte stores - Learn web development
we'll specify a prop with the milliseconds to wait before clearing the notification, and we'll define a timeout to remove the alert.
... we'll also take care of clearing the timeout when the alert component is unmounted to prevent memory leaks.
... update the <script> section of your alert.svelte component like so: <script> import { ondestroy } from 'svelte' import { alert } from '../stores.js' export let ms = 3000 let visible let timeout const onmessagechange = (message, ms) => { cleartimeout(timeout) if (!message) { // hide alert if message is empty visible = false } else { visible = true // show alert if (ms > 0) timeout = settimeout(() => visible = false, ms) // and hide it after ms milliseconds } } $: onmessagechange($alert, ms) // whenever the alert store or the ms props changes run onmessagechange ondestroy(()=> cleartimeout(timeout)) // make sure we clean-up the timeout </script> and upd...
...And 2 more matches
JS_IsExceptionPending
description js_isexceptionpending returns true if an exception has been thrown in the context cx and the exception has not yet been caught or cleared.
...example /* jsapi */ bool pending; js::rootedvalue exception(cx); /* if an exception is pending, save and clear it.
... */ pending = js_isexceptionpending(cx); if (pending) { if (!js_getpendingexception(cx, &exception)) return false; js_clearpendingexception(cx); } /* ...
...And 2 more matches
Observer Notifications
cookies these topics indicate whenever a cookie has been changed (added, changed, cleared, or deleted) or its setting rejected by the browser.
... topic description cookie-changed called upon a cookie change (added, changed, cleared, or deleted) cookie-rejected called when the setting of a cookie was rejected by the browser (per the user's preferences) http-on-response-set-cookie this is fired only when a cookie is created due to the presence of set-cookie header in the response header of any network request.
... download-manager-remove-download called when a download of the list is removed or all the list is cleared.
...And 2 more matches
imgIContainer
obsolete since gecko 2.0 void clear(); obsolete since gecko 1.9.2 gfximagesurface copycurrentframe(); native code only!
... kdontanimmode 1 klooponceanimmode 2 kdisposeclearall -1 "disposal" method indicates how the image should be handled before the subsequent image is displayed.
... clear() the whole image, revealing.
...And 2 more matches
nsIDOMGeoGeolocation
olocation = 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 clearwatch(in unsigned short watchid); void getcurrentposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback errorcallback, [optional] in nsidomgeopositionoptions options); unsigned short watchposition(in nsidomgeopositioncallback successcallback, [optio...
... methods clearwatch() when the clearwatch() method is called, the watch() process stops calling for new position identifiers and cease invoking callbacks.
... void clearwatch( in unsigned short watchid ); parameters none.
...And 2 more matches
nsIDOMMozNetworkStatsManager
/* networkstatsgetoptions */); nsidomdomrequest addalarm(in nsisupports network, in long threshold, [optional] in jsval options /* networkstatsalarmoptions */); nsidomdomrequest getallalarms([optional] in nsisupports network); nsidomdomrequest removealarms([optional] in long alarmid); nsidomdomrequest clearstats(in nsisupports network); nsidomdomrequest clearallstats(); nsidomdomrequest getavailablenetworks(); nsidomdomrequest getavailableservicetypes(); attributes attribute type description samplerate long minimum time in milliseconds between samples stored in the database.
... clearstats() remove all stats related with the provided network from db.
... nsidomdomrequest clearstats(in nsisupports network); parameters network the origin of the data.
...And 2 more matches
nsIMsgIncomingServer
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void clearallvalues(); void cleartemporaryreturnreceiptsfilter(); void closecachedconnections(); void configuretemporaryfilters(in nsimsgfilterlist filterlist); void configuretemporaryreturnreceiptsfilter(in nsimsgfilterlist filterlist); obsolete since gecko 1.8 void displayofflinemsg(in nsimsgwindow awindow); boolean equals(in nsimsgincomingserver server); void forgetpassword(); void forgetsessionpassword(); astring generateprettynameformigration(); boolean getboolattribute(in string name); boolean getboolvalue(in stri...
... usesecauth boolean valid boolean constants constant value description defaultsocket 0 trytls 1 alwaysusetls 2 usessl 3 keepdups 0 deletedups 1 movedupstotrash 2 markdupsread 3 methods clearallvalues() this is really dangerous.
...void clearallvalues(); parameters none.
...And 2 more matches
nsIMsgWindow
method overview void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to send commands to the ui, such as clearmsgpane.
...if you are checking this flag, you need to clear it before you start your operation since there's no convenient place to clear it.
...void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); parameters title not used.
...And 2 more matches
nsINavBookmarksService
pass in a reference to a tarray; it will get cleared and filled with the resulting list of folder ids.
...pass in a reference to a tarray; it will get cleared and filled with the resulting list of folder ids.
... use an empty keyword to clear the keyword associated with the uri.
...And 2 more matches
Console messages - Firefox Developer Tools
by default, the console is cleared each time you navigate to a new page or reload the current page.
... the web console supports the following console api messages: assert() clear() count() dir() dirxml() error() exception() group() groupend() info() log() table() time() timeend() trace() warn() the console prints a stack trace for all error messages, like this: function foo() { console.error("it explodes"); } function bar() { foo(); } function dostuff() { bar(); } dostuff(); server server-side log messages was introduced in firefox 43, but re...
...click the "x" icon to clear the filter and show the entire list again.
...And 2 more matches
Drawing shapes with canvas - Web APIs
clearrect(x, y, width, height) clears the specified rectangular area, making it fully transparent.
... rectangular shape example <html> <body onload="draw();"> <canvas id="canvas" width="150" height="150"></canvas> </body> </html> function draw() { var canvas = document.getelementbyid('canvas'); if (canvas.getcontext) { var ctx = canvas.getcontext('2d'); ctx.fillrect(25, 25, 100, 100); ctx.clearrect(45, 45, 60, 60); ctx.strokerect(50, 50, 50, 50); } } this example's output is shown below.
...the clearrect() function then erases a 60x60 pixel square from the center, and then strokerect() is called to create a rectangular outline 50x50 pixels within the cleared square.
...And 2 more matches
Dragging and Dropping Multiple Items - Web APIs
these are methods that mirror the types property as well as the getdata(), setdata() and cleardata() methods, however, they take an additional argument that specifies the index of the item to retrieve, modify or remove.
... you can clear an item using the mozcleardataat() method.
... event.datatransfer.mozcleardataat("text/plain", 1); caution: removing the last format for a particular index will remove that item entirely, shifting the remaining items down, so the later items will have different indices.
...And 2 more matches
Raining rectangles - Web APIs
« previousnext » a simple webgl game that demonstrates clearing with solid colors, scissoring, animation, and user interaction.
... this example combines clearing the drawing buffer with solid colors and scissoring operations.
...awanimation, 17); document.queryselector("canvas") .addeventlistener("click", playerclick, false); var displays = document.queryselectorall("strong"); scoredisplay = displays[0]; missesdisplay = displays[1]; } var score = 0, misses = 0; function drawanimation () { gl.scissor(rainingrect.position[0], rainingrect.position[1], rainingrect.size[0] , rainingrect.size[1]); gl.clear(gl.color_buffer_bit); rainingrect.position[1] -= rainingrect.velocity; if (rainingrect.position[1] < 0) { misses += 1; missesdisplay.innerhtml = misses; rainingrect = new rectangle(); } // we are using settimeout for animation.
...And 2 more matches
Taking still photos with WebRTC - Web APIs
wrapping up the startup() method there are only two more lines of code in the startup() method: clearphoto(); } this is where we call the clearphoto() method we'll describe below in the section clearing the photo box.
... clearing the photo box clearing the photo box involves creating an image, then converting it into a format usable by the <img> element that displays the most recently captured frame.
... that code looks like this: function clearphoto() { var context = canvas.getcontext('2d'); context.fillstyle = "#aaa"; context.fillrect(0, 0, canvas.width, canvas.height); var data = canvas.todataurl('image/png'); photo.setattribute('src', data); } we start by getting a reference to the hidden <canvas> element that we use for offscreen rendering.
...And 2 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
see multiplying two matrices in the article matrix math for the web for a clear but readable function that does this or use your preferred matrix math library such as glmatrix to do the work.
...ame) { let adjustedrefspace = applypositionoffsets(xrreferencespace); let pose = frame.getviewerpose(adjustedrefspace); animationframerequestid = frame.session.requestanimationframe(myanimationframecallback); if (pose) { let gllayer = frame.session.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); checkglerror("binding the framebuffer"); gl.clearcolor(0, 0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit | gl.depth_buffer_bit); checkglerror("clearing the framebuffer"); const deltatime = (time - lastframetime) * 0.001; lastframetime = time; for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); check...
... then we clear the framebuffer to ensure we're starting with a known state, since our renderer will not be touching every pixel.
...And 2 more matches
Rendering and the WebXR frame animation callback - Web APIs
renderer performance concerns clearly, you have very little time to render your scene each frame.
... gl.clearcolor(0, 0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit | gl.depth_buffer_bit); // compute the time elapsed since the last frame was rendered.
...while you can in theory skip this step—if and only if your rendering code is guaranteed to write every single pixel in the framebuffer—it's generally safest to just go ahead and clear it before you begin to draw, unless you need to eke out every ounce of performance you can and know you're touching all the pixels anyway.
...And 2 more matches
timers - Archive of obsolete content
example var { settimeout } = require("sdk/timers"); settimeout(function() { // do something in 0 ms }, 0) cleartimeout(id) given an id returned from settimeout(), prevents the callback with the id from being called (if it hasn't yet been called).
... example var { settimeout, cleartimeout } = require("sdk/timers"); var id = settimeout(function() { // do something in 1 sec }, 1000); // to stop/cancel this timeout cleartimeout(id); setinterval(callback, ms) schedules callback to be called repeatedly every ms milliseconds.
... example var { setinterval } = require("sdk/timers"); setinterval(function() { // do something every 1 sec }, 1000) clearinterval(id) given an id returned from setinterval(), prevents the callback with the id from being called again.
... example var { setinterval, clearinterval } = require("sdk/timers"); var id = setinterval(function() { // do something every 1 sec // to stop/cancel this interval clearinterval(id); }, 1000); ...
JavaScript timers - Archive of obsolete content
cleartimeout() clears the delay set by settimeout().
... clearinterval() cancels repeated action which was set up using setinterval().
... clearimmediate() cancels the immediate actions, just like cleartimeout() for settimeout().
... timer.jsm the timer.jsm javascript code module contains pure-javascript implementations of settimeout and cleartimeout that are compatible with the dom window functions, but that can be used by code that does not have access to a dom window (for example, javascript code modules or content frame scripts).
MMgc - Archive of obsolete content
in the mark phase, all of the mark bits are cleared.
...the following flash animation illustrates the working of a mark/sweep collector: (temporarily not working) <gflash>600 300 gc.swf</gflash> one pass the mark sweep algorithm described above decomposes into clearmarks/mark/finalize/sweep.
... in our original implementation clearmarks/finalize/sweep visited every gc page and every object on that page.
...now we have one pass where marks are cleared during sweep so clear marks isn't needed at the start.
JavaScript Client API - Archive of obsolete content
all you have to do is write an object that extends cryptowrapper and maintains a property called cleartext.
... cleartext must be a json-able object.
... the skeleton of a sample record implementation: function foorecord(collection, id) { cryptowrapper.call(this, collection, id); } foorecord.prototype = { __proto__: cryptowrapper.prototype, _logname: "record.foo", ttl: foo_ttl, // optional get bar() this.cleartext.bar, set bar(value) { this.cleartext.bar = value; }, get baz() this.cleartext.baz, set baz(value) { this.cleartext.baz = value; } }; to save all that typing for declaring the getters and setters, you can also use utils.defergetset: function foorecord(collection, id) { cryptowrapper.call(this, collection, id); } foorecord.prototype = { __proto__: cryptowrapper.prototyp...
...e, _logname: "record.foo", ttl: foo_ttl // optional }; utils.defergetset(foorec, "cleartext", ["bar", "baz"]); the store object the store object (which extends store, as defined in services/sync/modules/engines.js) has the job of creating and maintaining a set of record objects from the underlying data.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
methods add(items) clear() contexton(node) hide() insertbefore(newitems, target) item(target) popupon(node) remove(target) replace(target, newitems) reset() set(items) show(anchornode) add(items) adds items to the menu.
... clear() removes all items from the menu, even items not added by the feature.
...for menus that the feature creates, this is equivalent to clear().
...they are: add(items) clear() insertbefore(newitems, target) remove(target) replace(target, newitems) reset() set(items) the following jetpack.menu properties can also be defined on a contextmenuset: beforehide beforeshow note that a jetpack.menu object is passed to beforehide and beforeshow, since they are called during a context menu's invocation.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
75 cipher cryptography, glossary, privacy, security in cryptography, a cipher is an algorithm that can encode cleartext to make it unreadable, and to decode it back.
... 77 ciphertext cryptography, glossary, privacy, security in cryptography, a ciphertext is a scrambled message that conveys information but is not legible unless decrypted with the right cipher and the right secret (usually a key), reproducing the original cleartext.
... 106 decryption cryptography, glossary, privacy, security in cryptography, decryption is the conversion of ciphertext into cleartext.
... 130 encryption cryptography, glossary, privacy, security in cryptography, encryption is the conversion of cleartext into a coded text or ciphertext.
What to do and what not to do in Bugzilla
resolving bugs as duplicate in general newer bugs should be marked as duplicates of older bugs, except when the newer bug contains more information (bug description clearer, patch already attached, lots of people already cc'ed, etc.).
... resolving bugs as invalid you should resolve a bug as invalid if the issue described in the bug is clearly not a mozilla bug or if the issue is intended behavior.
... there are no clear rules for verifying worksforme.
... changing the bug information fields summary you should change the summary if the current one is unclear or does not correctly describe the issue covered by the bug.
Memory reporting
and the names make it clear exactly what is being measured.
...try to make the names descriptive enough that it's clear what's being measured.
...in this case it's often clearer to increment the numbers rather than assigning to them, especially if you're measuring multiple entities and summing their measurements.
...eout += ...; } alternatively, you could create a struct: struct foobarsizes { size_t mfoo; size_t mbar; foobarsizes() { mozilla::podzero(this); } } void foobar::addsizeofexcludingthis(nsmallocsizeoffun amallocsizeof, foobarsizes* asizes) const { asizes->mfoo += ...; asizes->mbar += ...; } note the add prefix that makes this incrementing behaviour clear.
NSS functions
.2 and later ssl_canbypass mxr 3.11.7 and later ssl_cipherpolicyget mxr 3.2 and later ssl_cipherpolicyset mxr 3.2 and later ssl_cipherprefget mxr 3.2 and later ssl_cipherprefgetdefault mxr 3.2 and later ssl_cipherprefset mxr 3.2 and later ssl_cipherprefsetdefault mxr 3.2 and later ssl_clearsessioncache mxr 3.2 and later ssl_configmpserversidcache mxr 3.2 and later ssl_configsecureserver mxr 3.2 and later ssl_configserversessionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_get...
... nss versions cert_addcerttolisttail mxr 3.2 and later cert_addextension mxr 3.5 and later cert_addocspacceptableresponses mxr 3.6 and later cert_addokdomainname mxr 3.4 and later cert_addrdn mxr 3.2.1 and later cert_asciitoname mxr 3.2 and later cert_cachecrl mxr 3.10 and later cert_clearocspcache mxr 3.11.7 and later cert_certchainfromcert mxr 3.2 and later cert_certlistfromcert mxr 3.2 and later cert_certtimesvalid mxr 3.2 and later cert_changecerttrust mxr 3.2 and later cert_checkcertvalidtimes mxr 3.2 and later cert_checknamespace mxr 3.12 and later cert_checkcertusage m...
... port_zfree mxr 3.2 and later rsa_formatblock mxr 3.2 and later sec_asn1decode mxr 3.4 and later sec_asn1decodeinteger mxr 3.2 and later sec_asn1decodeitem mxr 3.2 and later sec_asn1decoderabort mxr 3.9 and later sec_asn1decoderclearfilterproc mxr 3.2 and later sec_asn1decoderclearnotifyproc mxr 3.2 and later sec_asn1decoderfinish mxr 3.2 and later sec_asn1decodersetfilterproc mxr 3.2 and later sec_asn1decodersetnotifyproc mxr 3.2 and later sec_asn1decoderstart mxr 3.2 and lat...
...er sec_asn1decoderupdate mxr 3.2 and later sec_asn1encode mxr 3.2 and later sec_asn1encodeinteger mxr 3.2 and later sec_asn1encodeitem mxr 3.2 and later sec_asn1encoderabort mxr 3.9 and later sec_asn1encoderclearnotifyproc mxr 3.2 and later sec_asn1encoderclearstreaming mxr 3.2 and later sec_asn1encodercleartakefrombuf mxr 3.2 and later sec_asn1encoderfinish mxr 3.2 and later sec_asn1encodersetnotifyproc mxr 3.2 and later sec_asn1encodersetstreaming mxr 3.2 and later sec_asn1e...
Animated PNG graphics
MozillaTechAPNG
1 apng_dispose_op_background the frame's region of the output buffer is to be cleared to fully transparent black before rendering the next frame.
... note that for the first frame the two blend modes are functionally equivalent due to the clearing of the output buffer at the beginning of each play.
...decoders are free to avoid an explicit clear step as long as the result is guaranteed to be identical.
... for example, if the default image is included in the animation, and uses a blend_op of apng_blend_op_source, clearing is not necessary because the entire output buffer will be overwritten.
nsIContentViewer
to create an instance, use: var contentviewer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsicontentviewer); method overview void clearhistoryentry(); void close(in nsishentry historyentry); void destroy(); [noscript,notxpcom,nostdcall] nsiviewptr findcontainerview(); void getbounds(in nsintrectref abounds); native code only!
... sticky boolean methods clearhistoryentry() clears the current history entry.
... this is used to clear out the saved presentation state.
... void clearhistoryentry(); parameters none.
nsIFocusManager
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) implemented by: @mozilla.org/focus-manager;1 as a service: var focusmanager = components.classes["@mozilla.org/focus-manager;1"] .getservice(components.interfaces.nsifocusmanager); method overview void clearfocus(in nsidomwindow awindow); void contentremoved(in nsidocument adocument, in nsicontent aelement); native code only!
... methods clearfocus() clears the focused element within awindow.
...void clearfocus( in nsidomwindow awindow ); parameters awindow exceptions thrown ns_error_invalid_arg if awindow is null.
...if no element is found, and atype is either movefocus_root or movefocus_caret, then the focus is cleared.
nsIMsgDatabase
last changed in gecko 1.9 (firefox 3) inherits from: nsidbchangeannouncer method overview void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void resethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrformessageid(in string messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey key); void addnewhdrtodb(in nsimsgdbhdr newhdr, in boolean notify); nsimsgdbhdr copyhdrfromexistinghdr(in nsmsgkey key, in nsimsgdbhdr existinghdr, in...
...gelistener instigator); void setlabel(in nsmsgkey key, in nsmsglabelvalue label); void setstringproperty(in nsmsgkey akey, in string aproperty, in string avalue); void markimapdeleted(in nsmsgkey key, in boolean deleted, in nsidbchangelistener instigator); void applyretentionsettings(in nsimsgretentionsettings amsgretentionsettings, in boolean adeleteviafolder); boolean hasnew(); void clearnewlist(in boolean notify); void addtonewlist(in nsmsgkey key); void startbatch(); void endbatch(); nsimsgofflineimapoperation getofflineopforkey(in nsmsgkey messagekey, in boolean create); void removeofflineop(in nsimsgofflineimapoperation op); nsisimpleenumerator enumerateofflineops(); void listallofflineopids(in nsmsgkeyarrayptr offlineopids); native code only!
... void forceclosed(); clearcachedhdrs() void clearcachedhdrs(); resethdrcachesize() void resethdrcachesize(in unsigned long size); getmsghdrforkey() nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); parameters key getmsghdrformessageid() nsimsgdbhdr getmsghdrformessageid(in string messageid); parameters messageid containskey() returns whether or not this database contains the given key.
... void applyretentionsettings(in nsimsgretentionsettings amsgretentionsettings, in boolean adeleteviafolder); hasnew() boolean hasnew(); clearnewlist() void clearnewlist(in boolean notify); addtonewlist() void addtonewlist(in nsmsgkey key); startbatch() batching - can be used to cache file stream for local mail, and perhaps to use the mdb batching mechanism as well.
nsINavHistoryObserver
method overview void onbeforedeleteuri(in nsiuri auri, in acstring aguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onclearhistory(); void ondeleteuri(in nsiuri auri, in acstring aguid); void ondeletevisits(in nsiuri auri, in prtime avisittime, in acstring aguid); void onendupdatebatch(); void onpagechanged(in nsiuri auri, in unsigned long awhat, in astring avalue); void onpageexpired(in nsiuri auri, in prtime avisittime, in boolean awholeentry); obsolete since gecko 2.0 ...
...onclearhistory() called just prior to all of history being cleared.
... void onclearhistory(); parameters none.
...notes the removepagesbyhost() and removepagesbytimeframe() functions call beginupdatebatch() and endupdatebatch() rather than onclearhistory() or ondeleteuri().
nsISHEntry
to create an instance, use: var shentry = components.classes["@mozilla.org/browser/session-history-entry;1"] .createinstance(components.interfaces.nsishentry); method overview void addchildshell(in nsidocshelltreeitem shell); nsidocshelltreeitem childshellat(in long index); void clearchildshells(); nsishentry clone(); void create(in nsiuri uri, in astring title, in nsiinputstream inputstream, in nsilayouthistorystate layouthistorystate, in nsisupports cachekey, in acstring contenttype, in nsisupports owner, in unsigned long long docshellid, in boolean dynamiccreation); native code only!
... return value clearchildshells() clear the child shell list.
... void clearchildshells(); parameters none.
...if either contentviewer or windowstate are null, then all of the following members are cleared/reset: contentviewer, sticky, windowstate, viewerbounds, childshells, refreshurilist.
nsITelemetry
fox 7.0 / thunderbird 7.0 / seamonkey 2.4) implemented by: @mozilla.org/base/telemetry;1 as a service: let telemetry = components.classes["@mozilla.org/base/telemetry;1"] .getservice(components.interfaces.nsitelemetry); method overview jsval gethistogrambyid(in acstring id); jsval snapshothistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); jsval getkeyedhistogrambyid(in acstring id); void capturestack(in acstring name); jsval snapshotcapturedstacks([optional] in boolean clear); nsisupports getloadedmodules(); jsval snapshotkeyedhistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); void sethistogramrecordingenabled(in acstring id, in boolean enabled); ...
... void asyncfetchtelemetrydata(in nsifetchtelemetrydatacallback acallback); double mssinceprocessstart(); void scalaradd(in acstring aname, in jsval avalue); void scalarset(in acstring aname, in jsval avalue); void scalarsetmaximum(in acstring aname, in jsval avalue); jsval snapshotscalars(in uint32_t adataset, [optional] in boolean aclear); void keyedscalaradd(in acstring aname, in astring akey, in jsval avalue); void keyedscalarset(in acstring aname, in astring akey, in jsval avalue); void keyedscalarsetmaximum(in acstring aname, in astring akey, in jsval avalue); jsval snapshotkeyedscalars(in uint32_t adataset, [optional] in boolean aclear); void clearscalars(); test only void flushbatch...
...edchildtelemetry(); void recordevent(in acstring acategory, in acstring amethod, in acstring aobject, [optional] in jsval avalue, [optional] in jsval extra); void seteventrecordingenabled(in acstring acategory, in boolean aenabled); jsval snapshotevents(in uint32_t adataset, [optional] in boolean aclear); void registerevents(in acstring acategory, in jsval aeventdata); void registerscalars(in acstring acategoryname, in jsval ascalardata); void clearevents(); test only attributes attribute type description canrecordbase boolean a flag indicating if telemetry can record base data (fhr data).
... clear() - clear out the registered histograms and keys.
nsIXPConnect
void clearallwrappednativesecuritypolicies(); nsixpconnectjsobjectholder createsandbox(in jscontextptr cx, in nsiprincipal principal); native code only!
... deferreleasesuntilaftergarbagecollection prbool obsolete since gecko 1.9 pendingexception nsiexception constants constant value description init_js_standard_classes 1 << 0 flag_system_global_object 1 << 1 omit_components_object 1 << 2 xpc_xow_clearscope 1 tells updatexows() to clear the scope of all of the xows it finds.
... atracer missing description exceptions thrown missing exception missing description clearallwrappednativesecuritypolicies() void clearallwrappednativesecuritypolicies(); parameters none.
... performs an operation over all of |object|'s xows such as clearing their scopes or updating their concept of the current principal.
The JavaScript input interpreter - Firefox Developer Tools
to clear the history, use the clearhistory() helper function.
... clear() clears the console output area.
... clearhistory() new in firefox 39.
...use this function to clear the console's command history.
Multi-touch interaction - Web APIs
in this application, a pointer move is represented by the target's border being set to dashed to provide a clear visual indication that the element has received this event.
... function pointerup_handler(ev) { if (logevents) log(ev.type, ev); // remove this touch point from the cache and reset the target's // background and border remove_event(ev); update_background(ev); ev.target.style.border = "1px solid black"; } application ui the application uses <div> elements for the touch areas and provides buttons to enable logging and to clear the log.
... <body onload="init();" style="touch-action:none"> <div id="target1"> tap, hold or swipe me 1</div> <div id="target2"> tap, hold or swipe me 2</div> <div id="target3"> tap, hold or swipe me 3</div> <!-- ui for logging/debugging --> <button id="log" onclick="enablelog(event);">start/stop event logging</button> <button id="clearlog" onclick="clearlog(event);">clear the log</button> <p></p> <output></output> </body> miscellaneous functions these functions support the application but aren't directly involved with the event flow.
...false : true; } function log(name, ev) { var o = document.getelementsbytagname('output')[0]; var s = name + ": pointerid = " + ev.pointerid + " ; pointertype = " + ev.pointertype + " ; isprimary = " + ev.isprimary; o.innerhtml += s + " "; } function clearlog(event) { var o = document.getelementsbytagname('output')[0]; o.innerhtml = ""; } ...
Pinch zoom gestures - Web APIs
when this event is processed, the target's border is set to dashed to provide a clear visual indication the element has received a move event.
...set the target's // background and border remove_event(ev); ev.target.style.background = "white"; ev.target.style.border = "1px solid black"; // if the number of pointers down is less than two then reset diff tracker if (evcache.length < 2) { prevdiff = -1; } } application ui the application uses a <div> element for the touch area and provides buttons to enable logging and to clear the log.
...y onload="init();" style="touch-action:none"> <div id="target">touch and hold with 2 pointers, then pinch in or out.<br/> the background color will change to pink if the pinch is opening (zoom in) or changes to lightblue if the pinch is closing (zoom out).</div> <!-- ui for logging/debugging --> <button id="log" onclick="enablelog(event);">start/stop event logging</button> <button id="clearlog" onclick="clearlog(event);">clear the log</button> <p></p> <output></output> </body> miscellaneous functions these functions support the application but aren't directly involved in the event flow.
...false : true; } function log(prefix, ev) { if (!logevents) return; var o = document.getelementsbytagname('output')[0]; var s = prefix + ": pointerid = " + ev.pointerid + " ; pointertype = " + ev.pointertype + " ; isprimary = " + ev.isprimary; o.innerhtml += s + " "; } function clearlog(event) { var o = document.getelementsbytagname('output')[0]; o.innerhtml = ""; } ...
Multi-touch interaction - Web APIs
// ev.preventdefault(); if (logevents) log("touchmove", ev, false); // to avoid too much color flashing many touchmove events are started, // don't update the background if two touch points are active if (!(ev.touches.length == 2 && ev.targettouches.length == 2)) update_background(ev); // set the target element's border to dashed to give a clear visual // indication the element received a move event.
... function end_handler(ev) { ev.preventdefault(); if (logevents) log(ev.type, ev, false); if (ev.targettouches.length == 0) { // restore background and border to original values ev.target.style.background = "white"; ev.target.style.border = "1px solid black"; } } application ui the application uses <div> elements for the touch areas and provides buttons to enable logging and clear the log.
... <div id="target1"> tap, hold or swipe me 1</div> <div id="target2"> tap, hold or swipe me 2</div> <div id="target3"> tap, hold or swipe me 3</div> <div id="target4"> tap, hold or swipe me 4</div> <!-- ui for logging/bebugging --> <button id="log" onclick="enablelog(event);">start/stop event logging</button> <button id="clearlog" onclick="clearlog(event);">clear the log</button> <p></p> <output></output> miscellaneous functions these functions support the application but aren't directly involved with the event flow.
...id = " + ev.targettouches[i].identifier + " "; } o.innerhtml += s; } } function clearlog(event) { var o = document.getelementsbytagname('output')[0]; o.innerhtml = ""; } related topics and resources pointer events ...
Color masking - Web APIs
so, clearly masking both blue and red, would give us shades of green.
...so, for example, clearing operation sets the value of each pixel to the chosen clear color.
... masking occurs later in the pipeline, and modifies the pixel color value, so the final result on the screen is that of the clear color, tinted by the color mask.
...evt) { var index = evt.target === greentoggle && 1 || evt.target === bluetoggle && 2 || 0; mask[index] = !mask[index]; if (mask[index] === true) evt.target.innerhtml="on"; else evt.target.innerhtml="off"; gl.colormask(mask[0], mask[1], mask[2], true); drawanimation(); }; function drawanimation () { var color = getrandomcolor(); gl.clearcolor(color[0], color[1], color[2], 1.0); gl.clear(gl.color_buffer_bit); } function getrandomcolor() { return [math.random(), math.random(), math.random()]; } }, false); the source code of this example is also available on github.
float - CSS: Cascading Style Sheets
WebCSSfloat
we gave the parent width: 100% and floated it to ensure it is tall enough to encompass it's floated children, and to make sure it takes up the width of the parent so we don't have to clear it's adjacent sibling.
...phasellus feugiat est vel leo finibus congue.</p> </section> css section { border: 1px solid blue; width: 100%; float: left; } div { margin: 5px; width: 50px; height: 150px; } .left { float: left; background: pink; } .right { float: right; background: cyan; } result clearing floats sometimes you may want to force an item to move below any floated elements.
...see clear for examples.
... specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification.
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
the button, when clicked, invokes a function that clears the canvas.
... <div class="toolbar"> <input type="color" aria-label="select pen color"> <input type="range" min="2" max="50" value="30" aria-label="select pen size"><span class="output">30</span> <input type="button" value="clear canvas"> </div> <canvas class="mycanvas"> <p>add suitable fallback here.</p> </canvas> body { background: #ccc; margin: 0; overflow: hidden; } .toolbar { background: #ccc; width: 150px; height: 75px; padding: 5px; } input[type="color"], input[type="button"] { width: 90%; margin: 0 auto; display: block; } input[type="range"] { width: 70%; } span { position: relative; bottom: 5px; } var canvas = document.queryselector('.mycanvas'); var width = canvas.width = window.innerwidth; var height = canvas.height = window.innerheight-85; var ctx = can...
...vas.getcontext('2d'); ctx.fillstyle = 'rgb(0,0,0)'; ctx.fillrect(0,0,width,height); var colorpicker = document.queryselector('input[type="color"]'); var sizepicker = document.queryselector('input[type="range"]'); var output = document.queryselector('.output'); var clearbtn = document.queryselector('input[type="button"]'); // covert degrees to radians function degtorad(degrees) { return degrees * math.pi / 180; }; // update sizepicker output value sizepicker.oninput = function() { output.textcontent = sizepicker.value; } // store mouse pointer coordinates, and whether the button is pressed var curx; var cury; var pressed = false; // update mouse pointer coordinates document.onmousemove = function(e) { curx = (window.event) ?
...document.documentelement.scrolltop : document.body.scrolltop); } canvas.onmousedown = function() { pressed = true; }; canvas.onmouseup = function() { pressed = false; } clearbtn.onclick = function() { ctx.fillstyle = 'rgb(0,0,0)'; ctx.fillrect(0,0,width,height); } function draw() { if(pressed) { ctx.fillstyle = colorpicker.value; ctx.beginpath(); ctx.arc(curx, cury-85, sizepicker.value, degtorad(0), degtorad(360), false); ctx.fill(); } requestanimationframe(draw); } draw(); specifications specification status comments ...
Using the application cache - HTML: Hypertext Markup Language
storage location and clearing the offline cache in chrome you can clear the offline cache by selecting "clear browsing data..." in the preferences or by visiting chrome://appcache-internals/.
...the offline cache can be cleared for each site separately using the "remove..." button in tools -> options -> advanced -> network -> offline data.
... prior to firefox 11, neither tools -> clear recent history nor tools -> options -> advanced -> network -> offline data -> clear now cleared the offline cache.
... on linux, you can find the setting at edit > preferences > advanced > network > offline web content and user data see also clearing the dom storage data.
JavaScript modules - JavaScript
these are fairly trivial, but have been kept deliberately simple to demonstrate modules clearly.
...it makes it clear which files are modules, and which are regular javascript.
... last but not least, let's make this clear — module features are imported into the scope of a single script — they aren't available in the global scope.
... instead we need to rename the imports so that they are unique: import { name as squarename, draw as drawsquare, reportarea as reportsquarearea, reportperimeter as reportsquareperimeter } from './modules/square.js'; import { name as circlename, draw as drawcircle, reportarea as reportcirclearea, reportperimeter as reportcircleperimeter } from './modules/circle.js'; import { name as trianglename, draw as drawtriangle, reportarea as reporttrianglearea, reportperimeter as reporttriangleperimeter } from './modules/triangle.js'; note that you could solve the problem in the module files instead, e.g.
Canvas code snippets - Archive of obsolete content
= 'string') { canvas = document.getelementbyid(canvas); } if (!(this instanceof canvas2dcontext)) { return new canvas2dcontext(canvas); } this.context = this.ctx = canvas.getcontext('2d'); if (!canvas2dcontext.prototype.arc) { canvas2dcontext.setup.call(this, this.ctx); } } canvas2dcontext.setup = function() { var methods = ['arc', 'arcto', 'beginpath', 'beziercurveto', 'clearrect', 'clip', 'closepath', 'drawimage', 'fill', 'fillrect', 'filltext', 'lineto', 'moveto', 'quadraticcurveto', 'rect', 'restore', 'rotate', 'save', 'scale', 'settransform', 'stroke', 'strokerect', 'stroketext', 'transform', 'translate']; var gettermethods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', // drawfocusring not currently supported // the follow...
... var canvas = document.createelement('canvas'); canvas.style.width = remotecanvas.canvas_width + 'px'; canvas.style.height = remotecanvas.canvas_height + 'px'; canvas.width = remotecanvas.canvas_width; canvas.height = remotecanvas.canvas_height; var windowwidth = window.innerwidth - 25; var windowheight = window.innerheight; var ctx = canvas.getcontext('2d'); ctx.clearrect(0, 0, remotecanvas.canvas_width, remotecanvas.canvas_height); ctx.save(); ctx.scale(remotecanvas.canvas_width / windowwidth, remotecanvas.canvas_height / windowheight); ctx.drawwindow(remotewindow, 0, 0, windowwidth, windowheight, 'rgb(255, 255, 255)'); ctx.restore(); }; ...
... var canvas = document.createelement('canvas'); var ctxt = canvas.getcontext('2d'); function loadimagefile(url, callback) { var image = new image(); image.src = url; return new promise((accept, reject) => { image.onload = accept; image.onerror = reject; }).then(accept => { canvas.width = this.width; canvas.height = this.height; ctxt.clearrect(0, 0, this.width, this.height); ctxt.drawimage(this, 0, 0); accept(canvas.todataurl()); }); } usage: loadimagefile('myimage.jpg').then(string64 => { alert(string64); }); if you want to get instead the base64 content of a local file using the file <input> element, you must use the filereader object.
JavaScript Daemons Management - Archive of obsolete content
in such a condition it is difficult and unnatural to keep track of all events started and then to stop them when appropriate through the cleartimeout() function.
...isfinite(this.length) && this.index < 1 : this.index + 1 > this.length; }; daemon.prototype.synchronize = function () { if (this.paused) { return; } clearinterval(this.session); this.session = setinterval(daemon.forcecall, this.rate, this); }; daemon.prototype.pause = function () { clearinterval(this.session); this.paused = true; }; /* system not required daemon instances methods */ /** * basic user interface.
... /* warning: this method requires the global daemon.buildaround() method */ daemon.safe.buildaround = daemon.buildaround; /* warning: this method requires the global daemon.incorporate() method */ daemon.safe.incorporate = daemon.incorporate; /* system required daemon.safe instances methods */ daemon.safe.prototype.synchronize = function () { if (this.paused) { return; } cleartimeout(this.session); this.session = settimeout(daemon.safe.forcecall, this.rate, this); }; daemon.safe.prototype.pause = function () { cleartimeout(this.session); this.paused = true; }; /* system not required daemon.safe instances methods */ /* [inherited from daemon.prototype] */ /**************************************** * the safe-daemon is now ready!
XUL user interfaces - Archive of obsolete content
esday" disabled="true"/> <label class="day" value="wednesday" disabled="true"/> <label class="day" value="thursday" disabled="true"/> <label class="day" value="friday" disabled="true"/> <label class="day" value="saturday" disabled="true"/> </hbox> </row> </rows> </grid> <hbox class="buttons"> <button id="clear" label="clear" accesskey="c" oncommand="cleardate();"/> <button id="today" label="today" accesskey="t" oncommand="settoday();"/> </hbox> </groupbox> <statusbar> <statusbarpanel id="status"/> </statusbar> </vbox> </window> make a new css file, style7.css.
...copy and paste the content from here, making sure that you scroll to get all of it: // xul demonstration var datebox, daybox, currentday, status; // elements // called by window onload function init() { datebox = document.getelementbyid("date-text") daybox = document.getelementbyid("day-box") status = document.getelementbyid("status") settoday(); } // called by clear button function cleardate() { datebox.value = "" refresh() } // called by today button function settoday() { var d = new date() datebox.value = (d.getmonth() + 1) + "/" + d.getdate() + "/" + d.getfullyear() refresh() } // called by date textbox function refresh() { var d = datebox.value var thedate = null showstatus(null) if (d != "") { try { var a = d.s...
...it looks something like this: xul demonstration day of week calculator date: 6/27/2005 day: sunday monday tuesday wednesday thurdsay friday saturday clear today june 27, 2005 notes about this demonstration: the xul document links the stylesheet as usual, and it also links the script.
Code snippets - Archive of obsolete content
rl + "bookmarks").get()); for each (let id in ids.sort()) { console.log(" " + id); } get a count of the number of members of a collection on the server let collection = "passwords"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); json.parse(new resource(weave.service.storageurl + collection).get()).length; dump the cleartext of each record in a collection to the console.
... = "forms"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); console.log(item.cleartext); }; coll.get(); print an individual record let collection = "history"; let id = "guid_goes_here"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.ids = [id...
...]; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); console.log(item.cleartext); }; coll.get(); count types of bookmark records components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let deleted = 0; let items = {}; let collection = "bookmarks"; let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.limit = null; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); if (item.deleted) { deleted++; } else { items[item.type] = 1 + (items[item.type] || 0); } }; coll.get(); console.log("deleted...
Venkman Internals - Archive of obsolete content
as with any complex application, aspects of the design may not be clear for new readers of the source.
...from here, you can set and clear breakpoints by line number (instead of by program counter), locate a scriptwrapper for a given line number, and do a few other useful things.
...from here, you can set and clear breakpoints in all instances.
Textbox (XPFE autocomplete) - Archive of obsolete content
ches, ignoreblurwhilesearching, inputfield, issearching, iswaiting, label, maxlength, maxrows, minresultsforpopup, nomatch, open, popup, popupopen, resultspopup, searchcount, searchparam, searchsessions, selectionend, selectionstart, sessioncount, showcommentcolumn, showpopup, size, tabindex, tabscrolling, textlength, textvalue, timeout, type, useraction, value methods addsession, clearresults, getdefaultsession, getresultat, getresultcount, getresultvalueat, getsession, getsessionbyname, getsessionresultat, getsessionstatusat, getsessionvalueat, removesession, select, setselectionrange, syncsessions examples (example needed) attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... clearresults() return type: ???
... clears the results list.
Tree Selection - Archive of obsolete content
there is also a clearselection() function to clear the selection, and an invertselection function to reverse the selection, that is, deselect all selected rows and select all unselected rows.
...finally, the clearrange() function may be used to deselect a range of rows, leaving rows outside the range unaffected.
... tree.view.selection.clearrange(2,7); next, we'll find out how to create a custom view for a tree.
XUL Questions and Answers - Archive of obsolete content
return to mozilla-dev-tech-xul summaries the frequently asked questions should be moved to xul faq (make sure they have a clear answer.) where can i get more information about creating mozsearch plugins?
...possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network.
... too specific questions or unclear answers how do i remove the file location header included in the default printing setting?
listbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, rows, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <listbox id="thelist"> <listitem label="ru...
... clearselection() return type: no return value deselects all of the items.
...if isselectingrange is false, any existing selection is cleared.
richlistbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <descriptio...
... clearselection() return type: no return value deselects all of the items.
...if isselectingrange is false, any existing selection is cleared.
-ms-wrap-flow - Archive of obsolete content
clear inline flow content can only wrap on top and bottom of the exclusion and must leave empty the areas to the start and end edges of the exclusion box.
... formal syntax auto | both | start | end | maximum | clear specifications not part of any specification.
...in that case, the element contributes its border box to its containing block's wrapping context and content flows around it according to the clear property.
Desktop gamepad controls - Game development
next, in the draw() function we do two things — execute the gamepadupdatehandler() function to get the current state of pressed buttons on every frame, and use the gamepadbuttonpressedhandler() function to check the buttons we are interested to see whether they are pressed, and do something if they are: function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); // ...
...uttons) { for(var b=0,t=c.buttons.length; b<t; b++) { if(c.buttons[b].pressed) { pressed.push(gamepadapi.buttons.layout[b]); } } } var axes = []; if(c.axes) { for(var a=0,x=c.axes.length; a<x; a++) { axes.push(c.axes[a].tofixed(2)); } } gamepadapi.axes.status = axes; gamepadapi.buttons.status = pressed; return pressed; }, the function above clears the buttons cache, and copies their status from the previous frame to the cache.
... next, the button status is cleared and the new information is added.
Legacy layout methods - Learn web development
working through the process of creating a grid with floats shows you how this works and also introduces some more advanced concepts to build on the things you learned in the lesson on floats and clearing.
... * { box-sizing: border-box; } body { width: 980px; margin: 0 auto; } .wrapper { padding-right: 20px; } now use the row container that is wrapped around each row of the grid to clear one row from another.
... add the following rule below your previous one: .row { clear: both; } applying this clearing means that we don’t need to completely fill each row with elements making the full twelve columns.
Functions — reusable blocks of code - Learn web development
for now, we just wanted to clear up any possible confusion of method versus function — you are likely to meet both terms as you look at the available related resources across the web.
...in our random-canvas-circles.html example (see also the full source code) from our loops article, we included a custom draw() function that looked like this: function draw() { ctx.clearrect(0,0,width,height); for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fillstyle = 'rgba(255,0,0,0.5)'; ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); ctx.fill(); } } this function draws 100 random circles inside a <canvas> element.
... invoking functions you are probably clear on this by now, but just in case ...
Looping code - Learn web development
eryselector('button'); const canvas = document.queryselector('canvas'); const ctx = canvas.getcontext('2d'); let width = document.documentelement.clientwidth; let height = document.documentelement.clientheight; canvas.width = width; canvas.height = height; function random(number) { return math.floor(math.random()*number); } function draw() { ctx.clearrect(0,0,width,height); for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fillstyle = 'rgba(255,0,0,0.5)'; ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); ctx.fill(); } } btn.addeventlistener('click',draw); </script> </body> </html> you don't have to understand all the code for now, but let's look at the part o...
... let's look at a real example so we can visualize what these do more clearly.
...you should now be clear on why loops are a good mechanism for dealing with repetitive code and are raring to use them in your own examples!
Client-side storage - Learn web development
the css provides some simple styling to make it clearer what is going on.
...open a read/write db transaction, ready for adding the data let transaction = db.transaction(['notes_os'], 'readwrite'); // call an object store that's already been added to the database let objectstore = transaction.objectstore('notes_os'); // make a request to add our newitem object to the object store let request = objectstore.add(newitem); request.onsuccess = function() { // clear the form, ready for adding the next entry titleinput.value = ''; bodyinput.value = ''; }; // report on the success of the transaction completing, when everything is done transaction.oncomplete = function() { console.log('transaction completed: database modification finished.'); // update the display of data to show the newly added item, by running displaydata() again.
...once the request has succeeded, we clear the form inputs ready for entering the next note.
Third-party APIs - Learn web development
ection.appendchild(para); } else { for(var i = 0; i < articles.length; i++) { const article = document.createelement('article'); const heading = document.createelement('h2'); const link = document.createelement('a'); const img = document.createelement('img'); const para1 = document.createelement('p'); const para2 = document.createelement('p'); const clearfix = document.createelement('div'); let current = articles[i]; console.log(current); link.href = current.web_url; link.textcontent = current.headline.main; para1.textcontent = current.snippet; para2.textcontent = 'keywords: '; for(let j = 0; j < current.keywords.length; j++) { const span = document.createelement('span'); span.textcontent...
... += current.keywords[j].value + ' '; para2.appendchild(span); } if(current.multimedia.length > 0) { img.src = 'http://www.nytimes.com/' + current.multimedia[0].url; img.alt = current.headline.main; } clearfix.setattribute('class','clearfix'); article.appendchild(heading); heading.appendchild(link); article.appendchild(img); article.appendchild(para1); article.appendchild(para2); article.appendchild(clearfix); section.appendchild(article); } } } there's a lot of code here; let's explain it step by step: the while loop is a common pattern used to delete all of the contents of a dom element, in this case, the <section> element.
... we gave our <div> element a class of "clearfix", so we can easily apply clearing to it.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
whenever the escape key is pressed we run oncancel(), which just clears up the name variable.
...it just takes an import and a short directive like use:selectonfocus that clearly depicts its purpose.
...in this case, the element that had the focus has been deleted, so there's not a clear candidate to receive focus.
HTTP Cache
this document only contains what cannot be found or may not be clear directly from the idl files comments.
...a particular app cache version in a group) in hands, this storage will provide read and write access to entries in that application cache; when the app cache is not specified, this storage will operate over all existing app caches the service also provides methods to clear the whole disk and memory cache content or purge any intermediate memory structures: clear – after it returns, all entries are no longer accessible through the cache apis; the method is fast to execute and non-blocking in any way; the actual erase happens in background purgefrommemory – removes (schedules to remove) any intermediate cache data held in memory for faster...
...clearing of the internal io state - is then put to the end of the open_priority level.
Implementing QueryInterface
it's clear and simple.
...it has more than one return, but the primary return is at the end of the function as expected; and the additional return is clear and alone at the top of the function.
... it clears the result, *ainstanceptr, when returning an error.
Power profiling overview
strictly speaking, such a computation gives the average power but this is often referred to as just the power when context makes it clear.
...the combinations are semi-arbitrary, they amplify the unreliability of proxy measurements, and unlike non-hybrid proxy measurements, they don't have a clear physical meaning.
...with stack traces that clearly pinpoint specific parts of the code as being responsible.
Index
clearing the default provider has the same format: modutil -undefault "nss internal pkcs #11 module" -dbdir -mechanisms md2:md5 enabling and disabling modules and slots modules, and specific slots on modules, can be selectively enabled or disabled using modutil.
...note that versions 1.1 and later of netscape signing tool correctly recognizes the codebase attribute, allows paths to be expressed for the class and src attributes instead of filenames only, processes link tags and parses html correctly, and offers clearer error messages.
...if you wish to capture a full ssl handshake, restart the browser to clear the session id cache.
NSS API Guidelines
the areas which need the most work (both here and throughout the code) is: the relationship of the certificate library with just about every other component (most noticeably pkcs #12, pkcs #7, and pkcs #11) splitting low key and high key components more clearly the crypto wrappers (pkcs #11 wrappers) and high key pkcs #12 and pkcs #5 libraries nss compiles into the libraries described below.
... the usual semantic is that public routines clear the stack first, private routines don't.
... usually, every public routine has a private counterpart, and the implementation of the public routine looks like this: nssimplement rv * nsstype_method ( nsstype *t, nssfoo *arg1, nssbar *arg2 ) { nss_clearerrorstack(); #ifdef debug if( !nssfoo_verifypointer(arg1) ) return (rv *)null; if( !nssbar_verifypointer(arg2) ) return (rv *)null; #endif /* debug */ return nsstype_method(t, arg1, arg2); } aside from error cases, all documented entry points should check pointers in a debug, wherever possible.
sslintro.html
you can initialize the client cache with the function ssl_clearsessioncache.
... ssl_clearsessioncache.
... clears all sessions from the client session cache.
JSAPI User Guide
but if nothing is on the javascript stack, then the uncaught exception is passed to the error reporter and the pending exception is cleared.
...an application can disable automatic uncaught-exception handling using the jsoption_dont_report_uncaught option, but it must then deal with uncaught exceptions explicitly by calling js_isexceptionpending, js_getpendingexception, js_reportpendingexception, and/or js_clearpendingexception whenever a jsapi function returns false or nullptr.
...*/ js_clearpendingexception(cx); return false; more sample code the following examples illustrate how to achieve a few different effects using the jsapi.
Places Developer Guide
the api signature and context usually make clear which is required.
...en = true; for (var i=0; i < resultcontainernode.childcount; ++i) { var childnode = resultcontainernode.getchild(i); // accessing properties of matching bookmarks var title = childnode.title; var uri = childnode.uri; } observing history the nsinavhistoryobserver interface allows observation of history events such as new visits, page title changes, page expiration and when all history is cleared.
... getservice(ci.nsinavhistoryservice); let observer = { onbeginupdatebatch: function() { }, onendupdatebatch: function() { }, onvisit: function(auri, avisitid, atime, asessionid, areferringid, atransitiontype) { }, ontitlechanged: function(auri, apagetitle) { }, ondeleteuri: function(auri) { }, onclearhistory: function() { }, onpagechanged: function(auri, awhat, avalue) { }, onpageexpired: function(auri, avisittime, awholeentry) { }, queryinterface: function(iid) { if (iid.equals(components.interfaces.nsinavhistoryobserver) || iid.equals(components.interfaces.nsisupports)) { return this; } throw cr.ns_error_no_interface; } }; history.addobserver(observer, f...
RefPtr
xxx it's not clear that the details in the following paragraph are correct.
...it's unclear to me when the compiler will reject an attempt to use nscomptr to hold a concrete class pointer and when it will not (will it only rejecte it if a qi is involved in the construction or or assignment to the nscomptr (common in implementation details of nscomptr) but not when an instance of the concrete class is assigned directly?).
... and it's not clear what happens when the compiler does accept this pattern.
inIDOMUtils
nged in gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) implemented by: @mozilla.org/inspector/dom-utils;1 as a service: var inidomutils = components.classes["@mozilla.org/inspector/dom-utils;1"] .getservice(components.interfaces.inidomutils); method overview void addpseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); void clearpseudoclasslocks(in nsidomelement aelement); [implicit_jscontext] jsval colornametorgb(in domstring acolorname); nsiarray getbindingurls(in nsidomelement aelement); nsidomnodelist getchildrenfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long long getcontentstate(in nsidomelement aelement); void getcsspropertynames([optiona...
... return value true if lock exists, false otherwise clearpseudoclasslocks() removes any pseudo-class locks from the element.
... void clearpseudoclasslocks( in nsidomelement aelement ); parameters aelement the element to remove the pseudo-class locks from.
nsIAccessibleSelectable
inherits from: nsisupports last changed in gecko 1.7 method overview void addchildtoselection(in long index); void clearselection(); nsiarray getselectedchildren(); boolean ischildselected(in long index); nsiaccessible refselection(in long index); void removechildfromselection(in long index); boolean selectallselection(); attributes attribute type description selectioncount long the number of accessible children currently selected.
... clearselection() clears the selection in the object so that no children in the object are selected.
... void clearselection(); parameters none.
nsICollection
inherits from: nsiserializable last changed in gecko 1.7 method overview void appendelement(in nsisupports item); void clear(); pruint32 count(); nsienumerator enumerate(); nsisupports getelementat(in pruint32 index); void queryelementat(in pruint32 index, in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); void removeelement(in nsisupports item); void setelementat(in pruint32 index, in nsisupports item); methods appendelement() appends a new item to the collection.
... clear() removes all items from the collection.
... void clear(); parameters none.
nsIDOMNSHTMLDocument
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void captureevents(in long eventflags); void clear(); boolean execcommand(in domstring commandid, in boolean doshowui, in domstring value); boolean execcommandshowhelp(in domstring commandid); obsolete since gecko 14.0 domstring getselection(); nsidomdocument open(in acstring acontenttype, in boolean areplace); boolean querycommandenabled(in domstring commandid); boolean querycommandindeterm(in domstring commandid); ...
...void captureevents( in long eventflags ); parameters eventflags clear() used to reset a document to blank, but deprecated since gecko 1.0 and provided for compatibility with netscape 4.x; use open() and close() instead.
... void clear(); parameters none.
nsIDOMStorage
method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the number of keys stored in the session store.
... methods clear() clear the content of this storage bound to a domain or an origin.
... void clear(); parameters none.
nsIDOMStorage2
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the number of keys stored in local storage.
... methods clear() clears the contents of this storage context; this removes all values bound to the domain or origin.
... void clear(); parameters none.
nsIDictionary
method overview boolean haskey(in string key); void getkeys(out pruint32 count, [retval, array, size_is(count)] out string keys); nsisupports getvalue(in string key); void setvalue(in string key, in nsisupports value); nsisupports deletevalue(in string key); void clear(); methods haskey() check if a given key is present in the dictionary.
...clear() delete all key-value pairs from the dictionary.
... void clear(); parameters none.
nsIFaviconService
you must specify the mime type unless you're clearing the data.
...you should always set this param unless you are clearing an icon.
...however, any favicons not associated with a visited web page, a bookmark, or a "place:" uri will be expired when history cleanup is done * (typically at app shutdown, but also possibly if the user clears their * cache or history).
nsIMsgAccount
inherits from: nsisupports last changed in gecko 1.7 method overview void addidentity(in nsimsgidentity identity); void clearallvalues(); void init(); void removeidentity(in nsimsgidentity identity); astring tostring(); attributes attribute type description defaultidentity nsimsgidentity identities nsisupportsarray read only.
... clearallvalues() clear all user preferences associated with an account.
... void clearallvalues(); parameters none.
nsIMsgIdentity
inherits from: nsisupports method overview void clearallvalues(); void copy(in nsimsgidentity identity); astring getunicharattribute(in string name); void setunicharattribute(in string name, in astring value); acstring getcharattribute(in string name); void setcharattribute(in string name, in acstring value); boolean getboolattribute(in string name); void setboolattribute(in string name, in boolean value); long getintattribute(in string name); void setintattribute(in st...
... methods clearallvalues() note: this is really dangerous!
... void clearallvalues(); parameters none.
nsIMsgWindowCommands
method overview void selectfolder(in acstring folderuri); void selectmessage(in acstring messageuri); void clearmsgpane(); methods selectfolder() this method is called by the backend to change the folder displayed in the message window.
... clearmsgpane() this method is called by the backend when it wants to clear the message pane, for instance if you select the group header .
... void clearmsgpane(); paramters none.
nsIMutableArray
method overview void appendelement(in nsisupports element, in boolean weak); void clear(); void insertelementat(in nsisupports element, in unsigned long index, in boolean weak); void removeelementat(in unsigned long index); void replaceelementat(in nsisupports element, in unsigned long index, in boolean weak); methods appendelement() append an element at the end of the array.
... clear() clear the entire array, releasing all stored objects.
... void clear(); parameters none.
Component; nsIPrefBranch
method overview void addobserver(in string adomain, in nsiobserver aobserver, in boolean aholdweak); void clearuserpref(in string aprefname); void deletebranch(in string astartingat); boolean getboolpref(in string aprefname, requires gecko 54 [optional] in boolean adefaultvalue); string getcharpref(in string aprefname,requires gecko 54 [optional] in string adefaultvalue); requires gecko 58 utf8tring getstringpref(in string aprefname, [optional] in utf8string adefaultvalu...
... clearuserpref() called to clear a user set value from a specific preference.
... void clearuserpref( in string aprefname ); parameters aprefname the preference to be cleared.
nsITransactionManager
inherits from: nsisupports last changed in gecko 1.7 method overview void addlistener(in nsitransactionlistener alistener); void beginbatch(); void clear(); void dotransaction(in nsitransaction atransaction); void endbatch(); nsitransactionlist getredolist(); nsitransactionlist getundolist(); nsitransaction peekredostack(); nsitransaction peekundostack(); void redotransaction(); void removelistener(in nsitransactionlistener alistener); void undotransaction(); attributes attribute type description maxtransactioncount long sets the maximum number of transaction items the transaction manager will maintain at any t...
...clear() clears the undo and redo stacks.
... void clear(); parameters none.
nsITreeBoxObject
nsitreecolumn col, out acstring childelt); void getcoordsforcellitem(in long row, in nsitreecolumn col, in acstring element, out long x, out long y, out long width, out long height); boolean iscellcropped(in long row, in nsitreecolumn col); void rowcountchanged(in long index, in long count); void beginupdatebatch(); void endupdatebatch(); void clearstyleandimagecaches(); attributes attribute type description columns nsitreecolumns readonly: obtain the columns.
... void endupdatebatch(); clearstyleandimagecaches() called on a theme switch to flush out the tree's style and image caches.
... void clearstyleandimagecaches(); other references tree widget changes (applies to gecko 1.8.0 and later) xul tutorial:tree box sorting and filtering a custom tree view xul tutorial:tree view details nsitreeview ...
nsIXSLTProcessor
to create an instance, use: var xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); method overview void clearparameters(); nsivariant getparameter(in domstring namespaceuri, in domstring localname); void importstylesheet(in nsidomnode style); void removeparameter(in domstring namespaceuri, in domstring localname); void reset(); void setparameter(in domstring namespaceuri, in domstring localname, in nsivariant value); nsidomdocument transformtodocument(in nsidomnode source); nsidomdocumentfr...
...agment transformtofragment(in nsidomnode source, in nsidomdocument output); methods clearparameters() removes all set parameters from this nsixsltprocessor.
...void clearparameters(); parameters none.
Browser Console - Firefox Developer Tools
the messages from scripts in all the opened pages) by setting or clearing the checkbox labeled show content messages.
... here is an example on how to clear the contents of the browser console: components.utils.import("resource://devtools/shared/loader.jsm"); var hudservice = devtools.require("devtools/client/webconsole/hudservice"); var hud = hudservice.getbrowserconsole(); hud.jsterm.clearoutput(true); if you would like to access the content document of the browser console this can be done with the hudservice.
... this example here makes it so that when you mouse over the "clear" button it will clear the browser console: components.utils.import("resource://devtools/shared/loader.jsm"); var hudservice = devtools.require("devtools/client/webconsole/hudservice"); var hud = hudservice.getbrowserconsole(); var clearbtn = hud.chromewindow.document.queryselector('.webconsole-clear-console-button'); clearbtn.addeventlistener('mouseover', function() { hud.jsterm.clearoutput(true); }, false); bonus features available for add-on sdk add-ons, the console api is available automatically.
Debugger.Script - Firefox Developer Tools
disabling the debugger instance disables this breakpoint; and removing a global from the debugger instance’s set of debuggees clears all the breakpoints belonging to that debugger instance in that global’s scripts.
... clearbreakpoint(handler, [offset]) if the instance refers to a jsscript, remove all breakpoints set in this debugger instance that usehandler as their handler.
... clearallbreakpoints([offset]) if the instance refers to a jsscript, remove all breakpoints set in this script.
Debugger - Firefox Developer Tools
removing a global as a debuggee from this debugger clears all breakpoints that belong to that debugger in that global.
... clearbreakpoint(handler) remove all breakpoints set in this debugger instance that usehandler as their handler.
... clearallbreakpoints() remove all breakpoints set using this debugger instance.
Network monitor toolbar - Firefox Developer Tools
(prior to firefox 77, this toolbar was arranged somewhat differently.) it provides: an icon to clear the network request list.
... throttling menu, to simulate various connection types a menu of other actions: persist logs: by default, the network monitor is cleared each time you navigate to a new page or reload the current page.
... when you select persist logs, the log is not cleared on page load.
Web Console Helpers - Firefox Developer Tools
clear() clears the console output area.
... clearhistory() just like a normal command line, the console command line remembers the commands you've typed.
... use this function to clear the console's command history.
Web Console UI Tour - Firefox Developer Tools
toolbar the toolbar across the top contains a number of features: garbage can: click this icon to clear the contents of the console.
... settings ("gear" menu): new in firefox 71, you can click the gear icon to access the new settings menu, where you can toggle the following features on and off: persist logs: when enabled, the console doesn't clear on page reload, or new page load.
... note: you can clear the contents of the console by entering the keyboard command ctrl + shift + l (windows, macos, and linux) or cmd + k on macos.
Web Console remoting - Firefox Developer Tools
private messages are cleared whenever the last private window is closed.
...te request packet: { "to": "conn0.console9", "type": "autocomplete", "text": "d", "cursor": 1 } the response packet: { "from": "conn0.console9", "matches": [ "decodeuri", "decodeuricomponent", "defaultstatus", "devicepixelratio", "disableexternalcapture", "dispatchevent", "domyxhr", "document", "dump" ], "matchprop": "d" } there's also the clearmessagescache request packet that has no response.
... this clears the console api calls cache and should clear the page errors cache - see bug 717611.
CanvasRenderingContext2D - Web APIs
canvasrenderingcontext2d.clearrect() sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.
... canvasrenderingcontext2d.clearhitregions() removes all hit regions from the canvas.
... canvasrenderingcontext2d.clearshadow() removes all shadow settings like canvasrenderingcontext2d.shadowcolor and canvasrenderingcontext2d.shadowblur.
Constraint validation API - Web APIs
however, you may want to impose more complex constraints, or to provide clearer reporting of validation failures than the defaults.
...to clear this state, invoke the function with an empty string passed as its argument.
... in this case the custom error message is cleared, the element is considered valid, and no message is shown.
DataTransfer.setData() - Web APIs
return value void example this example shows the use of the datatransfer object's getdata(), setdata() and cleardata() methods.
... <!doctype html> <html lang=en> <title>examples of datatransfer's setdata(), getdata() and cleardata()</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; // set the drag's format and data.
...event target's id for the data ev.datatransfer.setdata("text/plain", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); // get the data, which is the id of the drop target var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // clear the drag data cache (for all formats/types) ev.datatransfer.cleardata(); } </script> <body> <h1>examples of <code>datatransfer</code>: <code>setdata()</code>, <code>getdata()</code>, <code>cleardata()</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.
DataTransfer - Web APIs
methods standard methods datatransfer.cleardata() remove the data associated with a given type.
... deprecated methods datatransfer.mozcleardataat() removes the data associated with the given format for an item at the specified index.
... living standard mozcursor, mozitemcount, mozsourcenode, mozusercancelled, addelement(), mozcleardataat(), mozgetdataat(), mozsetdataat() and moztypesat are gecko specific.
Event.eventPhase - Web APIs
WebAPIEventeventPhase
eckbox" id="chcapture" /> <label for="chcapture">use capturing</label> <div id="d1">d1 <div id="d2">d2 <div id="d3">d3 <div id="d4">d4</div> </div> </div> </div> <div id="divinfo"></div> css div { margin: 20px; padding: 4px; border: thin black solid; } #divinfo { margin: 18px; padding: 8px; background-color:white; font-size:80%; } javascript let clear = false, divinfo = null, divs = null, usecapture = false; window.onload = function () { divinfo = document.getelementbyid('divinfo') divs = document.getelementsbytagname('div') chcapture = document.getelementbyid('chcapture') chcapture.onclick = function () { removelisteners() addlisteners() } clear() addlisteners() } function removelisteners() { for (let i =...
... d.removeeventlistener("click", ondivclick, false) } } } function addlisteners() { for (let i = 0; i < divs.length; i++) { let d = divs[i] if (d.id != "divinfo") { if (chcapture.checked) { d.addeventlistener("click", ondivclick, true) } else { d.addeventlistener("click", ondivclick, false) d.onmousemove = function () { clear = true } } } } } function ondivclick(e) { if (clear) { clear() clear = false } if (e.eventphase == 2) e.currenttarget.style.backgroundcolor = 'red'; let level = e.eventphase == 0 ?
..."bubbling" : "error"; divinfo.innerhtml += e.currenttarget.id + "; eventphase: " + level + "<br/>"; } function clear() { for (let i = 0; i < divs.length; i++) { if (divs[i].id != "divinfo") { divs[i].style.backgroundcolor = (i & 1) ?
Drag Operations - Web APIs
you can clear the data using the cleardata() method, which takes one argument: the type of the data to remove.
... event.datatransfer.cleardata("text/uri-list"); the type argument to the cleardata() method is optional.
...if the drag contains no drag data items, or all of the items have been subsequently cleared, then no drag will occur.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
html <div class="fx"> <div> <textarea rows="5" name="test-target" id="test-target"></textarea> <button type="button" name="btn-clear-console" id="btn-clear-console">clear console</button> </div> <div class="flex"> <pre id="console-log"></pre> </div> </div> css .fx { -webkit-display: flex; display: flex; margin-left: -20px; margin-right: -20px; } .fx > div { padding-left: 20px; padding-right: 20px; } .fx > div:first-child { width: 30%; } .flex { -webkit-flex: 1; flex: 1; } #test-target { di...
...splay: block; width: 100%; margin-bottom: 10px; } javascript let textarea = document.getelementbyid('test-target'), consolelog = document.getelementbyid('console-log'), btnclearconsole = document.getelementbyid('btn-clear-console'); function logmessage(message) { document.getelementbyid("console-log").innerhtml += message + "<br>"; } textarea.addeventlistener('keydown', (e) => { if (!e.repeat) logmessage(`key "${e.key}" pressed [event: keydown]`); else logmessage(`key "${e.key}" repeating [event: keydown]`); }); textarea.addeventlistener('beforeinput', (e) => { logmessage(`key "${e.data}" about to be input [event: beforeinput]`); }); textarea.addeventlistener('input', (e) => { logmessage(`key "${e.data}" input [event: input]`); }); textarea.addeventlistener('ke...
...yup', (e) => { logmessage(`key "${e.key}" released [event: keyup]`); }); btnclearconsole.addeventlistener('click', (e) => { let child = consolelog.firstchild; while (child) { consolelog.removechild(child); child = consolelog.firstchild; } }); result note: on browsers that don't fully implement the inputevent interface which is used for the beforeinput and input events, you may get incorrect output on those lines of the log output.
MediaSession.setPositionState() - Web APIs
if the object is empty, the existing playback state information is cleared.
... if the media is not playing, clearinterval() is used to remove the interval handler.
... let positioninterval = window.setinterval(() => { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediasession.setpositionstate()' in that specification.
Using the Notifications API - Web APIs
var n = new notification('my great song'); document.addeventlistener('visibilitychange', function() { if (document.visibilitystate === 'visible') { // the tab has become visible so clear the now-stale notification.
..." + i, {tag: 'somanynotification'}); if (i++ == 9) { window.clearinterval(interval); } }, 200); } // if the user hasn't told if he wants to be notified or not // note: because of chrome, we are not sure the permission property // is set, therefore it's unsafe to check for the "default" value.
..." + i, {tag: 'somanynotification'}); if (i++ == 9) { window.clearinterval(interval); } }, 200); } // otherwise, we can fallback to a regular modal alert else { alert("hi!"); } }); } // if the user refuses to get notified else { // we can fallback to a regular modal alert alert("hi!"); } }); }); see the live result below: specifications specificati...
SVGLengthList - Web APIs
note: starting in gecko 5.0,the svglengthlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svglength initialize(in svglength newitem) svglength getitem(in unsigned long index) svglength insertitembefore(in svglength newitem, in unsigned long index) svglength replaceitem(in svglength newitem, in unsigned long index) svglength removeitem(in unsigned long index) svglength appenditem(in svglength newitem) properties readonly unsigned l...
... methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svglength newitem) svglength clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGNumberList - Web APIs
interface overview also implement none methods void clear() svgnumber initialize(in svgnumber newitem) svgnumber getitem(in unsigned long index) svgnumber insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber replaceitem(in svgnumber newitem, in unsigned long index) svgnumber removeitem(in unsigned long index) svgnumber appenditem(in svgnumber newitem) properties readonly u...
... methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgnumber newitem) svgnumber clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem.
SVGPathSegList - Web APIs
interface overview also implement none methods void clear() svgpathseg initialize(in svgpathseg newitem) svgpathseg getitem(in unsigned long index) svgpathseg insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg replaceitem(in svgpathseg newitem, in unsigned long index) svgpathseg removeitem(in unsigned long index) svgpathseg appenditem(in svgpathseg newitem) properties readonly unsigned long numbe...
... methods clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgpathseg newitem) svgpathseg clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem.
SVGPointList - Web APIs
interface overview also implement none methods void clear() svgpoint initialize(in svgpoint newitem) svgpoint getitem(in unsigned long index) svgpoint insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint replaceitem(in svgpoint newitem, in unsigned long index) svgpoint removeitem(in unsigned long index) svgpoint appenditem(in svgpoint newitem) ...
... methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgpoint newitem) svgpoint clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGStringList - Web APIs
interface overview also implement none methods void clear() domstring initialize(in domstring newitem) domstring getitem(in unsigned long index) domstring insertitembefore(in domstring newitem, in unsigned long index) domstring replaceitem(in domstring newitem, in unsigned long index) domstring removeitem(in unsigned long index) domstring appenditem(in domstring newitem) properties readonly unsigned long numberofitems readonly unsigned long length ...
... methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in domstring newitem) domstring clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGTransformList - Web APIs
note: starting in gecko 9.0,the svgtransformlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svgtransform initialize(in svgtransform newitem) svgtransform getitem(in unsigned long index) svgtransform insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform creat...
... methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgtransform newitem) svgtransform clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
WebGLRenderingContext.getParameter() - Web APIs
l.blend_color float32array (with 4 values) gl.blend_dst_alpha glenum gl.blend_dst_rgb glenum gl.blend_equation glenum gl.blend_equation_alpha glenum gl.blend_equation_rgb glenum gl.blend_src_alpha glenum gl.blend_src_rgb glenum gl.blue_bits glint gl.color_clear_value float32array (with 4 values) gl.color_writemask sequence<glboolean> (with 4 values) gl.compressed_texture_formats uint32array returns the compressed texture formats.
... gl.depth_bits glint gl.depth_clear_value glfloat gl.depth_func glenum gl.depth_range float32array (with 2 elements) gl.depth_test glboolean gl.depth_writemask glboolean gl.dither glboolean gl.element_array_buffer_binding webglbuffer gl.framebuffer_binding webglframebuffer or null null corresponds to a binding to th...
... gl.stencil_back_fail glenum gl.stencil_back_func glenum gl.stencil_back_pass_depth_fail glenum gl.stencil_back_pass_depth_pass glenum gl.stencil_back_ref glint gl.stencil_back_value_mask gluint gl.stencil_back_writemask gluint gl.stencil_bits glint gl.stencil_clear_value glint gl.stencil_fail glenum gl.stencil_func glenum gl.stencil_pass_depth_fail glenum gl.stencil_pass_depth_pass glenum gl.stencil_ref glint gl.stencil_test glboolean gl.stencil_value_mask gluint gl.stencil_writemask gluint gl.subpixel_bits glint...
A basic 2D WebGL animation example - Web APIs
function animatescene() { gl.viewport(0, 0, glcanvas.width, glcanvas.height); gl.clearcolor(0.8, 0.9, 1.0, 1.0); gl.clear(gl.color_buffer_bit); let radians = currentangle * math.pi / 180.0; currentrotation[0] = math.sin(radians); currentrotation[1] = math.cos(radians); gl.useprogram(shaderprogram); uscalingfactor = gl.getuniformlocation(shaderprogram, "uscalingfactor"); uglobalcolor = gl.getuniformlocation(shaderprogram, "uglobalcolor"); urotationvect...
...; gl.drawarrays(gl.triangles, 0, vertexcount); window.requestanimationframe(function(currenttime) { let deltaangle = ((currenttime - previoustime) / 1000.0) * degreespersecond; currentangle = (currentangle + deltaangle) % 360; previoustime = currenttime; animatescene(); }); } the first thing that needs to be done in order to draw a frame of the animation is to clear the background to the desired color.
... in this case, we set the viewport based on the size of the <canvas>, call clearcolor() to set the color to use when clearing content, then we clear the buffer with clear().
Canvas size and WebGL - Web APIs
effect of canvas size on rendering with webgl with scissor() and clear() we can demonstrate how the webgl drawing buffer is affected by the size of the canvas.
... the effect is clearly visible when using scissor() and clear() to draw a square in the center of the canvas, by specifying its position and size in pixels.
..." + "your browser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.enable(gl.scissor_test); gl.scissor(30, 10, 60, 60); gl.clearcolor(1.0, 1.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); }); }, false); the source code of this example is also available on github.
Adding 2D content to a WebGL context - Web APIs
function drawscene(gl, programinfo, buffers) { gl.clearcolor(0.0, 0.0, 0.0, 1.0); // clear to black, fully opaque gl.cleardepth(1.0); // clear everything gl.enable(gl.depth_test); // enable depth testing gl.depthfunc(gl.lequal); // near things obscure far things // clear the canvas before we start drawing on it.
... gl.clear(gl.color_buffer_bit | gl.depth_buffer_bit); // create a perspective matrix, a special matrix that is // used to simulate the distortion of perspective in a camera.
... // set the shader uniforms gl.uniformmatrix4fv( programinfo.uniformlocations.projectionmatrix, false, projectionmatrix); gl.uniformmatrix4fv( programinfo.uniformlocations.modelviewmatrix, false, modelviewmatrix); { const offset = 0; const vertexcount = 4; gl.drawarrays(gl.triangle_strip, offset, vertexcount); } } the first step is to clear the canvas to our background color; then we establish the camera's perspective.
Visualizations with Web Audio API - Web APIs
creating a waveform/oscilloscope to create the oscilloscope visualisation (hat tip to soledad penadés for the original code in voice-change-o-matic), we first follow the standard pattern described in the previous section to set up the buffer: analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep looping the drawing function once it has been started: var drawvisual = requestanimationframe(draw); next, we grab the time domain data and copy it into ou...
... first, we again set up our analyser and data array, then clear the current canvas display with clearrect().
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); next, we start our draw() function off, again setting up a loop with requestanimationframe() so that the displayed data keeps updating, and clearing the display with each animation frame.
Window.localStorage - Web APIs
localstorage is similar to sessionstorage, except that while data stored in localstorage has no expiration time, data stored in sessionstorage gets cleared when the page session ends — that is, when the page is closed.
... (data in a localstorage object created in a "private browsing" or "incognito" session is cleared when the last "private" tab is closed.) data stored in either localstorage is specific to the protocol of the page.
... localstorage.setitem('mycat', 'tom'); the syntax for reading the localstorage item is as follows: const cat = localstorage.getitem('mycat'); the syntax for removing the localstorage item is as follows: localstorage.removeitem('mycat'); the syntax for removing all the localstorage items is as follows: localstorage.clear(); note: please refer to the using the web storage api article for a full example.
Window - Web APIs
WebAPIWindow
window.clearimmediate() cancels the repeated execution set using setimmediate.
... windoworworkerglobalscope.clearinterval() cancels the repeated execution set using windoworworkerglobalscope.setinterval().
... windoworworkerglobalscope.cleartimeout() cancels the delayed execution set using windoworworkerglobalscope.settimeout().
XRWebGLLayer.framebuffer - Web APIs
attempting to clear, draw to, or read from the framebuffer results in a webgl invalid_framebuffer_operation error (0x0506).
... the default configuration of a new framebuffer upon creating a new xrwebgllayer, its new framebuffer is initialized just like the default framebuffer for any webgl interface: the color buffer is configured with its clear value set to the color (0, 0, 0, 0) (meaning transparent black).
... the depth buffer's clear value is the number 1.0.
ARIA Screen Reader Implementors Guide - Accessibility
busy regions: any changes in a region marked with aria-busy="true" should not be added to the queue until that attribute is cleared.
...alternatively, implementations may choose to have a policy of clearing more polite items, e.g.
... assertive items clear any polite items from the queue.
Perceivable - Accessibility
content images should have text available that clearly describes the image's contents, which can be programmatically associated with it (e.g., alt text), or otherwise is easy to associate (e.g., describes it and is sat right next to it).
...so, for example: "click the round button to continue" the button should be clearly labelled so that it is obvious that it is the button you need to press.
... if there are multiple buttons, make sure they are all clearly labelled to distinguish their function.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
the logical properties and values specification contains logical mappings for the physical values of float and clear, and also for the positioning properties used with positioned layout.
... logical property or value physical property or value float: inline-start float: left float: inline-end float: right clear: inline-start clear: left clear: inline-end clear: right inset-inline-start left inset-inline-end right inset-block-start top inset-block-end bottom text-align: start text-align: left text-align: end text-align: right in addition to these mapped properties there are some additional shorthand properties m...
... float and clear example the physical values used with the float and clear properties are left, right and both.
Recipe: Media objects - CSS: Cascading Style Sheets
the media object should clear the contents no matter which side is tallest.
...a good catch-all would be to float the image left, and to add a clearfix to the box to ensure that it contained the floats.
... download this example once floated elements become grid items the float no longer applies so you don’t need to do anything special to clear the float.
outline-style - CSS: Cascading Style Sheets
html <div> <p class="auto">outline demo</p> </div> css .auto { outline-style: auto; /* same result as "outline: auto" */ } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result setting outline style to dashed and dotted html <div> <div class="dotted"> <p class="dashed">outline demo</p> </div> </div> css .dotted { outline-style: dotted; /* same result as "outline: dotted" */ } .dashed { outline-style: dashed; } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result ...
...setting outline style to solid and double html <div> <div class="solid"> <p class="double">outline demo</p> </div> </div> css .solid { outline-style: solid; } .double { outline-style: double; } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result setting outline style to groove and ridge html <div> <div class="groove"> <p class="ridge">outline demo</p> </div> </div> css .groove { outline-style: groove; } .ridge { outline-style: ridge; } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result setting outline style to inset and outset html <div> <div class="inset"> <p class="outset">outline demo</p> </div> </div> css .inset { outline-style: inset; } .outset { outline-style: outset; } /*...
... to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-style' in that specification.
HTML attribute reference - HTML: Hypertext Markup Language
unfortunately, there are no clear rules and the way idl attributes behave in conjunction with their corresponding content attributes depends on the attribute.
...</div> to be clear, the values "true" and "false" are not allowed on boolean attributes.
...this restriction clears up some common misunderstandings: with checked="false" for example, the element’s checked attribute would be interpreted as true because the attribute is present.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
in some versions, an "x" button is provided to clear the control's value.
...an "x" button is provided to clear the control's value.
... at this time, it's unclear what a value of any means for step when used with time inputs.
Caching compiled WebAssembly modules - WebAssembly
any subsequent call to instantiatecachedurl() will then clear out the entire cache, allowing you to avoid using out-of-date modules.
... the function starts off by defining some necessary constants: function instantiatecachedurl(dbversion, url, importobject) { const dbname = 'wasm-cache'; const storename = 'wasm-cache'; setting up the database the first helper function contained inside instantiatecachedurl() — opendatabase() — creates an object store for storing wasm modules, and also handles clearing out the database if the dbversion is updated; it returns a promise resolving to the new database.
...{ return new promise((resolve, reject) => { var request = indexeddb.open(dbname, dbversion); request.onerror = reject.bind(null, 'error opening wasm cache database'); request.onsuccess = () => { resolve(request.result) }; request.onupgradeneeded = event => { var db = request.result; if (db.objectstorenames.contains(storename)) { console.log(`clearing out version ${event.oldversion} wasm cache`); db.deleteobjectstore(storename); } console.log(`creating version ${event.newversion} wasm cache`); db.createobjectstore(storename) }; }); } looking up modules in the database our next function — lookupindatabase() — provides a simple promise-based operation for looking up the given url in the ob...
Examples and demos from articles - Archive of obsolete content
in such a condition is difficult and unnatural to keep track of all events started and then to stop them when appropriate through the cleartimeout() function.
...in such a condition is difficult and unnatural to keep track of all events started and then to stop them when appropriate through the cleartimeout() function.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
« previousnext » this document was authored by hiroshi shimoda of clear code inc.
... figure 8: a button with an image icon attribute value icon attribute value accept close cancel print help add open remove save refresh find go-forward clear go-back yes properties no select-font apply select-color table 2: values for the icon attribute toolbar buttons the toolbarbutton element is the element used to define toolbar buttons.
JavaScript Object Management - Archive of obsolete content
there are a few workarounds for this, and we use the ones we have found to be the most elegant and clear to read.
...a clear example of this is the fact that there are no private or public keywords that allow you to protect object members.
XPCOM Objects - Archive of obsolete content
in most cases it is very clear which one to call, but in case of doubt, look for documentation on it.
... we included a constant, an attribute and a method to display examples of the 3, but this is clearly an overly elaborate way to keep a simple counter.
Security best practices in extensions - Archive of obsolete content
the difference will be clearly flagged.
...when users clear logins using the "clear recent history" option, it will include your extension's data.
Search Extension Tutorial (Draft) - Archive of obsolete content
savedprefs[name] = [defaultprefs.getcharpref(name), value]; // change the default defaultprefs.setcharpref(name, value); // clear the user value if this is the first run, or the // new default is the same as the user value.
... if (firstrun || userprefs.getcharpref(name) == value) userprefs.clearuserpref(name); } function startup(data, reason) { firstrun = reason == addon_install; // change the default engine name.
Block and Line Layout Cheat Sheet - Archive of obsolete content
ns_frame_first_reflow this flag is set on a newly created frame, and later cleared by the frame's reflow() method when the frame has had its initial reflow.
...it is cleared, otherwise.
Layout System Overview - Archive of obsolete content
(note: it is unclear if this is really a benefit - it may have been better to use a copy of the content model for each presentation, and to remove the complexity of managing separate presentations - analysis is needed here).
...it is unclear if this is really possible, however, and in general it is assumed that there is a one-to-one correspondence between a presentation shell and a presentation context.
New Security Model for Web Services - Archive of obsolete content
soap services which have not been cleared for access by untrusted scripts will reject the requests.
... adjustments as this new model is applied to soap, and potentially document.load or xml-request, it may be desirable to eliminate the same source security bypass, because it is not clear that this is always secure.
Space Manager High Level Design - Archive of obsolete content
data model class/component diagram nsspacemanager: the central point of management of the space taken up by floats in a block nsbanddata: provides information about the frames occupying a band of occupied or available space nsblockbanddata: a specialization of nsbanddata that is used by nsblockreflowstate to determine the available space, float impacts, and where floats are cleared.
...should be private (compiles fine) nsblockframe::paint is mucking with nsblockbanddata in and #if 0 block - remove that and the include (compiles fine) nsspacemanger has no way of clearing the float damage interval set - this might be needed if the spacemanager persists beyond a reflow original document information author(s): marc attinasi other contributors: alex savulov, chris waterson, david baron, josh soref last updated date: november 20, 2005 ...
Supporting per-window private browsing - Archive of obsolete content
clearing any temporarily-stored private data it is permissable to store private data in non-persistent ways for the duration of a private browsing session.
...function pbobserver() { /* clear private data */ } var os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); os.addobserver(pbobserver, "last-pb-context-exited", false); preventing a private session from ending if there are unfinished transactions involving private data, where the transactions will be terminated by the ending of a private session, an add-on can vote to prevent the session from ending (prompting the user is recommended).
Venkman Introduction - Archive of obsolete content
the breakpoint can be cleared by clicking in the margin again (on the letter "b").
... breakpoints can also be set and cleared from the interactive session view, with the break and fbreak commands.
Using Breakpoints in Venkman - Archive of obsolete content
clearing breakpoints to clear the breakpoint, click on the margin twice.
... the first click will clear the hard breakpoint and leave you with only a future breakpoint, which is represented by a yellow letter "f".
Example Sticky Notes - Archive of obsolete content
fax - respond today.</p></div> <div class="sticker"><p>don't forget the eggs!</p></div> <div class="sticker"><p>the new project - who's on charge?</p></div> <div class="sticker"><p>learn more about xbl.</p></div> <p style="clear: left"><a href="http://validator.w3.org/check?uri=referer"><img src="https://udn.realityripple.com/samples/e2/dd625ef1cd.png" width="88" height="31" alt="valid html 4.01" style="border: 1px none"></a></p> </body> </html> notes.xml <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg...
...window.alert(str); ]]></handler> <handler event="mouseover"><![cdata[ this.$bg = this.style.backgroundcolor || '#ffff00'; this.style.backgroundcolor = '#ffcc00'; ]]></handler> <handler event="mouseout"><![cdata[ this.style.backgroundcolor = this.$bg; ]]></handler> </handlers> </binding> </bindings> notes.css .sticker { position: relative; left: 0px; right: 0px; float: left; clear: none; width: 10em; height: 10em; overflow: visible; margin: 1em 1em; padding: 0.5em 0.5em; border: 2px solid blue; background-color: yellow; font: 1em normal "times new roman",serif; font-style: italic; cursor: default; } view this example ...
Index - Archive of obsolete content
ArchiveMozillaXULIndex
460 clearresults needscontent, needshelp, xul methods, xul reference no summary!
... 461 clearselection xul methods, xul reference no summary!
Sorting and filtering a custom tree view - Archive of obsolete content
xt/css"?> <!doctype window> <window title="sorting a custom tree view example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="init()"> <script type="application/javascript" src="sort.js"/> <hbox align="center" id="search-box"> <label accesskey="f" control="filter">filter</label> <textbox id="filter" oninput="inputfilter(event)" flex="1"/> <button id="clearfilter" oncommand="clearfilter()" label="clear" accesskey="c" disabled="true"/> </hbox> <tree id="tree" flex="1" persist="sortdirection sortresource" sortdirection="ascending" sortresource="description"> <treecols> <treecol id="name" label="name" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator" sortdirection="ascending"/> <splitter class="tree-...
...lowercase(); } return o; } function gettopvisiblerow() { return tree.treeboxobject.getfirstvisiblerow(); } function settopvisiblerow(topvisiblerow) { return tree.treeboxobject.scrolltorow(topvisiblerow); } function inputfilter(event) { //do this now rather than doing it at every comparison var value = prepareforcomparison(event.target.value); setfilter(value); document.getelementbyid("clearfilter").disabled = value.length == 0; } function clearfilter() { document.getelementbyid("clearfilter").disabled = true; var filterelement = document.getelementbyid("filter"); filterelement.focus(); filterelement.value = ""; setfilter(""); } function setfilter(text) { filtertext = text; loadtable(); } ...
Additional Template Attributes - Archive of obsolete content
you might also use these attributes just to make the code clearer when using very complex queries.
...this may make the code clearer as to its function.
Tree Widget Changes - Archive of obsolete content
the nsitreeboxobject.getpagecount() method has been renamed to make it clearer what it does.
... <treecol type="checkbox"> you can then set or clear the checkbox for a particular cell in that column by setting the value attribute to true, or leaving out the attribute.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
this effectively clears the text in the textbox.
... a copy operation is similar but does not clear the text afterwards.
Tabboxes - Archive of obsolete content
tabbox example example 1 : source view <tabbox> <tabs> <tab label="mail"/> <tab label="news"/> </tabs> <tabpanels> <tabpanel id="mailtab"> <checkbox label="automatically check for mail"/> </tabpanel> <tabpanel id="newstab"> <button label="clear news buffer"/> </tabpanel> </tabpanels> </tabbox> here, two tabs have been added, the first labeled 'mail' and the other 'news'.
...when the second tab is clicked, the page containing the button labeled 'clear news buffer' will appear instead.
XUL accessibility guidelines - Archive of obsolete content
it is hoped that these guidelines will be sufficiently clear and detailed that everyone—even someone with no previous background in accessibility—can understand them.
...provide users with clear instruction and feedback, and allow users to correct errors.
calICalendarViewController - Archive of obsolete content
implementations of calicalendarviewcontroller should be careful to provide clearly defined behavior to the user regarding the modification of recurring caliitems.
...implementations of calicalendarviewcontroller should be careful to provide clearly defined behavior to the user regarding the deleting of recurring caliitems, in the case where aoccurrence is a single occurrence of a recurring caliitem.
Extentsions FAQ - Archive of obsolete content
it would be nice to give the option of clearing extension's data, but it should be implemented at application level, not by each extension individually.
... to provide those default preferences to your extension see: http://kb.mozillazine.org/dev_:_usin...lt_preferences btw: resetting prefences to default will clear them in case no default prefence is (still) available.
Sunbird Theme Tutorial - Archive of obsolete content
if you want to make it clear that your made-up name is not a real domain, add <tt>.invalid</tt> to the end.
...you might prefer to do some design work in an image editor first, so that you have a clear design concept to implement.
Index - Game development
2 anatomy of a video game games, javascript, main loop, requestanimationframe i want to be clear that any of the above, or none of them, could be best for your game.
...technically, we will be painting the ball on the screen, clearing it and then painting it again in a slightly different position every frame to make the impression of movement — just like how movement works with the movies.
Building up a basic demo with Babylon.js - Game development
let's create a scene by adding the following lines just below our previous code: var scene = new babylon.scene(engine); scene.clearcolor = new babylon.color3(0.8, 0.8, 0.8); thus, the scene is created and the second line sets the background color to light gray.
...let's start with the camera — add this line to your code below the scene creation and the line where we defined the clearcolor.
Building up a basic demo with the PlayCanvas engine - Game development
var camera = new pc.entity(); camera.addcomponent("camera", { clearcolor: new pc.color(0.8, 0.8, 0.8) }); app.root.addchild(camera); camera.setposition(0, 0, 7); the code above will create a new entity.
... then it adds a camera component to it with the light gray clearcolor — the color will be visible as the background.
Building up a basic demo with Three.js - Game development
var renderer = new three.webglrenderer({antialias:true}); renderer.setsize(width, height); renderer.setclearcolor(0xdddddd, 1); document.body.appendchild(renderer.domelement); we are creating a new webgl renderer, setting its size to fit the whole available space on the screen, and appending the dom structure to the page.
...the setclearcolor() method sets our background to a light gray colour, instead of the default black one.
GLSL Shaders - Game development
we've used three.js here to make the background code a lot simpler and clearer to understand, so you can just focus on the shader code.
...+10.0, position.y, position.z+5.0, 1.0); } </script> <script id="fragmentshader" type="x-shader/x-fragment"> void main() { gl_fragcolor = vec4(0.0, 0.58, 0.86, 1.0); } </script> javascript var width = window.innerwidth; var height = window.innerheight; var renderer = new three.webglrenderer({antialias:true}); renderer.setsize(width, height); renderer.setclearcolor(0xdddddd, 1); document.body.appendchild(renderer.domelement); var scene = new three.scene(); var camera = new three.perspectivecamera(70, width/height); camera.position.z = 50; scene.add(camera); var boxgeometry = new three.boxgeometry(10, 10, 10); var shadermaterial = new three.shadermaterial( { vertexshader: document.getelementbyid( 'vertexshader' ).
asm.js - Game development
it pushes js engines to optimize this kind of code, and gives compilers like emscripten a clear definition of what kind of code to generate.
...the idea is that this kind of code should run very fast in each engine, and if it doesn't, it's a bug and there's a clear spec that engines should optimize for.
Finishing up - Game development
so, in the draw() function replace the following three lines: alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game with this, we can add slightly more complex logic to it as given below: lives--; if(!lives) { alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } else { x = canvas.width/2; y = canvas.height-30; dx = 2; dy = -2; paddlex = (canvas.width-paddlewidth)/2; ...
...replace the following line: var interval = setinterval(draw, 10); with simply: draw(); and remove each instance of: clearinterval(interval); // needed for chrome to end game then, at the very bottom of the draw() function (just before the closing curly brace), add in the following line, which causes the draw() function to call itself over and over again: requestanimationframe(draw); the draw() function is now getting executed again and again within a requestanimationframe() loop, but instead of the fixed 10 mill...
Game over - Game development
first, replace where you initially called setinterval() setinterval(draw, 10); with: var interval = setinterval(draw, 10); then replace the second if statement with the following: if(y + dy < ballradius) { dy = -dy; } else if(y + dy > canvas.height-ballradius) { alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } letting the paddle hit the ball the last thing to do in this lesson is to create some kind of collision detection between the ball and the paddle, so it can bounce off it and get back into the play area.
...update the last bit of code you modified again, to the following: if(y + dy < ballradius) { dy = -dy; } else if(y + dy > canvas.height-ballradius) { if(x > paddlex && x < paddlex + paddlewidth) { dy = -dy; } else { alert("game over"); document.location.reload(); clearinterval(interval); } } if the ball hits the bottom edge of the canvas we need to check whether it hits the paddle .
Accessible multimedia - Learn web development
depending on how clear the spoken audio is, the resulting transcript quality will vary greatly.
... you can however make sure that such an app has good enough color contrast and clear presentation so it is perceivable to those with low vision/color blindness, and also make it keyboard accessible.
Introduction to CSS layout - Learn web development
by understanding the nature of each layout task, you will soon find that when you look at a particular component of your design the type of layout best suited to it will often be clear.
...ut id ornare felis, eget fermentum sapien.</p> .box { float: left; width: 150px; height: 150px; margin-right: 30px; } note: floats are fully explained in our lesson on the float and clear properties.
Practical positioning examples - Learn web development
here we simply set a fixed height to make sure the panels fit snugly inside the info-box, position relative to set the <div> as the positioning context, so you can then place positioned child elements relative to it and not the <html> element, and finally we clear the float set in the css above so that it doesn't interfere with the remainder of the layout.
... .info-box .panels { height: 352px; position: relative; clear: both; } finally for this section, we will style the individual <article> elements that comprise our panels.
Supporting older browsers - Learn web development
.wrapper { background-color: rgb(79,185,227); padding: 10px; max-width: 400px; display: grid; grid-template-columns: 1fr 1fr 1fr; } .item { float: left; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } <div class="wrapper"> <div class="item">item one</div> <div class="item">item two</div> <div class="item">item three</div> </div> note: the clear property also has no effect once the cleared item becomes a grid item, so you could have a layout with a cleared footer, which is then turned into a grid layout.
... float and clear as shown above, the float and clear properties cease to affect the layout if floated or cleared items become flex or grid items.
Styling links - Learn web development
the third rule uses the a selector to get rid of the default text underline and focus outline (which varies across browsers anyway), and adds a tiny amount of padding to each link — all of this will become clear later on.
... finally, a:active is used to give the links an inverted color scheme while they are being activated, to make it clear something important is happening!
How do I start to design my website? - Learn web development
you must sit down and structure your ideas to get a clear view of what path you must take to make your ideas a reality.
...once you have that clear vision, you need to decide how and when to do it.
Client-side form validation - Learn web development
this is clearly a ui matter.
...you should offer up-front suggestions so they know what's expected, as well as clear error messages.
The HTML5 input types - Learn web development
often, search fields are rendered with rounded corners; they also sometimes display an "Ⓧ", which clears the field of any value when clicked).
...note that the clear icon only appears if the field has a value, and, apart from safari, it is only displayed when the field is focused.
Add a hitmap on top of an image - Learn web development
the image must make it clear what happens when people follow image links.
... the image must clearly indicate where hotspots begin and end.
Creating hyperlinks - Learn web development
use clear link wording it's easy to throw links up on your page.
... linking to non-html resources — leave clear signposts when linking to a resource that will be downloaded (like a pdf or word document), streamed (like video or audio), or has another potentially unexpected effect (opens a popup window, or loads a flash movie), you should add clear wording to reduce any confusion.
Introduction to events - Learn web development
for example, in an airport, when the runway is clear for take off, a signal is communicated to the pilot.
... you don't need to understand anything about other such environments at this stage in your learning; we just wanted to make it clear that events can differ in different programming environments.
Introduction to web APIs - Learn web development
image source: overloaded plug socket by the clear communication people, on flickr.
...let's recap this to make it clearer, and also mention where other javascript tools fit in: javascript — a high-level scripting language built into browsers that allows you to implement functionality on web pages/apps.
Ember interactivity: Events, classes and state - Learn web development
ember calls these constructs services, and they live for the entire lifetime of the page (a page refresh will clear them; persisting the data for longer is beyond the scope of this tutorial).
...we'll also wire up our "clear completed" button.
Ember app structure and componentization - Learn web development
</div> <input autofocus class="edit" value="todo text"> </li> </ul> </section> <footer class="footer"> <span class="todo-count"> <strong>0</strong> todos left </span> <ul class="filters"> <li> <a href="#">all</a> <a href="#">active</a> <a href="#">completed</a> </li> </ul> <button type="button" class="clear-completed"> clear completed </button> </footer> </section> the rendered output should now be as follows: this looks pretty complete, but remember that this is only a static prototype.
...n> </div> <input autofocus class="edit" value="todo text"> </li> footer.hbs should be updated to contain the following: <footer class="footer"> <span class="todo-count"> <strong>0</strong> todos left </span> <ul class="filters"> <li> <a href="#">all</a> <a href="#">active</a> <a href="#">completed</a> </li> </ul> <button type="button" class="clear-completed"> clear completed </button> </footer> finally, the contents of application.hbs should be updated so that they call the appropriate components, like so: <section class="todoapp"> <h1>todos</h1> <header /> <todolist /> <footer /> </section> with these changes made, run npm start in your terminal again, then head over to http://localhost:4200 to ensure that t...
Getting started with React - Learn web development
these parts can be big or small, but they are usually clearly defined: they serve a single, obvious purpose.
...whereas most of the javascript community prefers camel-case names like helloworld, react components use pascal-case variable names, like helloworld, to make it clear that a given jsx element is a react component, and not a regular html tag.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
if searchactive is true, meaning that a search has been done, we want to disable the search as we hide the search options — we disable the buttons, make searchactive false, clear the entered search value, and run htmliframeelement.clearmatch(), which gets rid of any stored/highlighted search results from the browser.
... searchtoggle.addeventlistener('touchend',function() { if(search.getattribute('class') === 'search') { search.setattribute('class', 'search shifted'); } else if(search.getattribute('class') === 'search shifted') { search.setattribute('class', 'search'); if(searchactive) { browser.clearmatch(); searchactive = false; prev.disabled = true; next.disabled = true; searchbar.value = ''; } } }); note that whenever one of the search-related methods is invoked, a mozbrowserfindchange event is fired to allow you to react to search changes in a more precise way if desired: //browser.addeventlistener('mozbrowserfindchange', function(e) { // can react to find changes if required //}) reporting errors we've got one more piece of code to mention from ou...
HTMLIFrameElement.purgeHistory()
the purgehistory() method of the htmliframeelement interface is used to clear the browsing history associated with the browser <iframe>.
... note: to delete cookies for a firefox os app, you could call clearbrowserdata() on the actual app itself.
Browser API
htmliframeelement.clearmatch() clears any content highlighted by findall() or findnext().
... htmliframeelement.purgehistory() clears all the resources (cookies, localstorage, cache, etc.) associated with the browser <iframe>.
Timer.jsm
the timer.jsm javascript code module contains pure-javascript implementations of settimeout, cleartimeout, setinterval, and clearinterval that are compatible with the dom window functions, but that can be used by code that does not have access to a dom window (for example, javascript code modules or content frame scripts).
... to use timer.jsm, first import it: components.utils.import("resource://gre/modules/timer.jsm"); then call settimeout and cleartimeout just as you would in a dom window, for example: let timeoutid = settimeout(function() { console.log("hello!"); }, 500); cleartimeout(timeoutid); similarly, you can use setinterval and clearinterval like so: let intervalid = setinterval(function() { console.log("happening every 500ms!"); }, 500); clearinterval(intervalid); ...
Activity Monitor, Battery Status Menu and top
in both cases "energy impact" often correlates poorly with actual power consumption and should be avoided in favour of direct measurements that have clear physical meanings.
...it is clear, however, that the window used by the battery status menu is measured in seconds or minutes, which is much less than the 8 hour window used for “average energy impact” in activity monitor.
Threads
once the target thread has been notified of the request, the request stays with the thread until the notification either has been delivered exactly once or is cleared.
... pr_clearinterrupt clears a previous interrupt request.
NSS Sample Code sample2
* note: iv is only needed if cipher blocking chaining (cbc) mode of encryption * is used * * the recommended approach is to store and transport wrapped (encrypted) * des keys (ivs can be in the clear).
...meter in pk11_paramfromiv func */ ivitem.type = sibuffer; ivitem.data = giv; ivitem.len = sizeof(giv); secparam = pk11_paramfromiv(ciphermech, &ivitem); if (secparam == null) { fprintf(stderr, "failure to set up pkcs11 param (err %d)\n", pr_geterror()); goto out; } /* sample data we'll encrypt and decrypt */ strcpy(data, "encrypt me!"); fprintf(stderr, "clear data: %s\n", data); /* ========================= start section ============================= */ /* if using the the same key and iv over and over, stuff before this */ /* section and after this section needs to be done only once */ /* encrypt data into buf1.
Python binding for NSS
nd_certs_from_email_addr nss.find_certs_from_nickname nss.nss_get_version nss.nss_version_check nss.set_shutdown_callback nss.get_use_pkix_for_validation nss.set_use_pkix_for_validation nss.enable_ocsp_checking nss.disable_ocsp_checking nss.set_ocsp_cache_settings nss.set_ocsp_failure_mode nss.set_ocsp_timeout nss.clear_ocsp_cache nss.set_ocsp_default_responder nss.enable_ocsp_default_responder nss.disable_ocsp_default_responder the following files were added: src/py_traceback.h doc/examples/verify_cert.py test/test_misc.py the following constants were added: nss.ku_digital_signature nss.ku_non_repudiation ...
... review all ref counting, numerous ref counting fixes implement cyclic garbage collection support by adding object traversal and clear methods identify static variables, move to thread local storage remove python-nss specific httplib.py, no longer needed python-nss now compatible with standard library rewrite httplib_example.py to use standard library and illustrate ssl, non-ssl, connection class, http class usage the following classes were added: authkeyid basicconstraints crldistri...
FC_InitToken
specifically, fc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
... note: resetting the password clears all permanent secret and private keys.
NSC_InitToken
specifically, nsc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
... note: resetting the password clears all permanent secret and private keys.
Utility functions
port_zfree mxr 3.2 and later rsa_formatblock mxr 3.2 and later sec_asn1decode mxr 3.4 and later sec_asn1decodeinteger mxr 3.2 and later sec_asn1decodeitem mxr 3.2 and later sec_asn1decoderabort mxr 3.9 and later sec_asn1decoderclearfilterproc mxr 3.2 and later sec_asn1decoderclearnotifyproc mxr 3.2 and later sec_asn1decoderfinish mxr 3.2 and later sec_asn1decodersetfilterproc mxr 3.2 and later sec_asn1decodersetnotifyproc mxr 3.2 and later sec_asn1decoderstart mxr 3.2 and lat...
...er sec_asn1decoderupdate mxr 3.2 and later sec_asn1encode mxr 3.2 and later sec_asn1encodeinteger mxr 3.2 and later sec_asn1encodeitem mxr 3.2 and later sec_asn1encoderabort mxr 3.9 and later sec_asn1encoderclearnotifyproc mxr 3.2 and later sec_asn1encoderclearstreaming mxr 3.2 and later sec_asn1encodercleartakefrombuf mxr 3.2 and later sec_asn1encoderfinish mxr 3.2 and later sec_asn1encodersetnotifyproc mxr 3.2 and later sec_asn1encodersetstreaming mxr 3.2 and later sec_asn1e...
Bytecode Descriptions
exception stack: ⇒ exception push and clear the pending exception.
...if a function clearly doesn't use arguments, we optimize it away when emitting bytecode.
SpiderMonkey Internals
when a script (jsscript) is destroyed, all traps set in its bytecode are cleared.
... jsutil.cpp, jsutil.h the js_assert macro is used throughout the source as a proof device to make invariants and preconditions clear to the reader, and to hold the line during maintenance and evolution against regressions or violations of assumptions that it would be too expensive to test unconditionally at run-time.
JSAPI Cookbook
f here; for example: */ if (!js_callfunctionname(cx, global, "foo", 0, null, &r)) goto catch_block; /* instead of returning false */ if (!js_callfunctionname(cx, global, "bar", 0, null, &r)) goto catch_block; /* instead of returning false */ return true; catch_block: js::rootedvalue exc(cx); if (!js_getpendingexception(cx, &exc)) return false; js_clearpendingexception(cx); /* do error-handling stuff here */ return true; finally // javascript try { foo(); bar(); } finally { cleanup(); } if your c/c++ cleanup code doesn't call back into the jsapi, this is straightforward: /* jsapi */ bool success = false; if (!js_callfunctionname(cx, global, "foo", 0, null, &r)) goto finally_block; /* instead of returning ...
...to avoid this, your jsapi code implementing the finally block must: save the old exception, if any clear the pending exception so that your cleanup code can run do your cleanup restore the old exception, if any return false if an exception occurred, so that the exception is propagated up.
JS_GetPendingException
description if an exception has been thrown in the context cx, and it has not yet been caught or cleared, js_getpendingexception stores the exception object in *vp and returns true.
...see also mxr id search for js_getpendingexception js_isexceptionpending js_clearpendingexception js_reportpendingexception js_setpendingexception ...
SpiderMonkey 1.8.5
jsautorequest jsautosuspendrequest jsautocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_addnamedroot – use js_add*root js_addnamedrootrt – use js_add*root js_addroot – use js_add*root js_clearnewbornroots – no longer needed js_clearoperationcallback js_clearregexproots js_decompilescript js_destroyscript js_enterlo...
...regexp apis js_clearregexpstatics, js_newregexpobject, js_newregucexpobject, and js_setregexpinput now receive a pointer to the global object.
SpiderMonkey 1.8.7
jsautorequest jsautosuspendrequest jsautocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_getscopechain use js_getglobalforscopechain api changes operation callback js_setoperationcallback was introduced in js 1.8.0, replacing the branch callback, in anticipation of the addition of the tracing jit (tracemonkey).
...regexp apis js_clearregexpstatics, js_newregexpobject, js_newregucexpobject, and js_setregexpinput now receive a pointer to the global object.
SpiderMonkey 45
7) js_hasownproperty (bug 1211607) js_deleteucproperty (bug 1211607) js::newfunctionfromspec (bug 1054756) js::compilefornonsyntacticscope (bug 1165486) js_checkforinterrupt (bug 1058695) js::mapdelete (bug 1159469) js::mapforeach (bug 1159469) js::newsetobject (bug 1159469) js::setsize (bug 1159469) js::sethas (bug 1159469) js::setdelete (bug 1159469) js::setadd (bug 1159469) js::setclear (bug 1159469) js::setkeys (bug 1159469) js::setvalues (bug 1159469) js::setentries (bug 1159469) js::setforeach (bug 1159469) js::exceptionstackornull (bug 814497) js::copyasyncstack (bug 1160307) js::getsavedframesource (bug 1216819) js::getsavedframeline (bug 1216819) js::getsavedframecolumn (bug 1216819) js::getsavedframefunctiondisplayname (bug 1216819) js::getsavedframeasynccause ...
...ngtracer js_ismarkinggray js_idarraylength js_idarrayget js_destroyidarray js_defaultvalue js_getparent js_setparent js::parsepropertydescriptorobject js_deleteproperty2 js_deletepropertybyid2 js_deleteucproperty2 js_deleteelement2 js_newfunctionbyid js_bindcallable js_decompilefunctionbody js_getlatin1internedstringchars js_gettwobyteinternedstringchars js_newdateobjectmsec js_cleardatecaches changed apis js_init has moved from jsapi.h to js/initialization.h js_shutdown has moved from jsapi.h to js/initialization.h js_initreflect is now implicit js_addweakpointercallback is replaced with js_addweakpointerzonegroupcallback and js_addweakpointercompartmentcallback js_removeweakpointercallback is replaced with js_removeweakpointerzonegroupcallback and js_removeweakpoin...
Shell global objects
clearlastwarning() clear the last warning.
... reportoutofmemory() report oom, then clear the exception and return undefined.
Mozilla Projects
it will pop-up an alert when a window is closed and javascript still links to that window (for example, an observer that is not cleared when the window closes).
...mozilla calls mccoy a "simple system" which is a clear sign that something probably is not working, and indeed, is not.
Places Expiration
apart this periodic expiration, there are other steps on idle, on shutdown on clear history.
...in some cases, like when a clear history is executed just before shutdown, a larger step is executed instead.
How to build a binary XPCOM component using Visual Studio
test component in a xulrunner application in order to test your component in a xulrunner application, you need to “install” the component, “clear” the component registry, and use the component from javascript.
... clear registry: increment the buildid in your {app}/application.ini.
XPCShell Reference
the following are some useful functions that can be invoked from the command line: clear(object) clear() removes all properties from an object.
... for example, if you created anobject with a property named value and then called clear(anobject), the property value would no longer exist.
imgICache
method overview void clearcache(in boolean chrome); nsiproperties findentryproperties(in nsiuri uri); void removeentry(in nsiuri uri); methods clearcache() evict images from the cache.
... void clearcache( in boolean chrome ); parameters chrome if true, evict only chrome images.
nsIAnnotationService
otherwise, uris can exist in history as annotations but the user has no way of knowing it, potentially violating their privacy expectations about actions such as clear history.
...otherwise, uris can exist in history as annotations but the user has no way of knowing it, potentially violating their privacy expectations about actions such as clear history.
nsICompositionStringSynthesizer
the composing string information is cleared by a call of .dispatchevent().
... after a call of this, all stored composition string information is cleared.
nsIConsoleService
reset() to clear the message buffer (for example, for privacy reasons): void reset(); parameters none.
... note: console listeners expect you to log an empty string message before calling reset, so they too can clear their message buffers.
nsIDOMStorageManager
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by @mozilla.org/dom/storagemanager;1 as a service: var domstoragemanager = components.classes["@mozilla.org/dom/storagemanager;1"] .getservice(components.interfaces.nsidomstoragemanager); method overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications.
...void clearofflineapps(); parameters none.
nsIDOMWindowUtils
to get this interface, use: var domwindowutils = window.windowutils; method overview void activatenativemenuitemat(in astring indexstring); void clearmozafterpaintevents(); pruint32 comparecanvases(in nsidomhtmlcanvaselement acanvas1, in nsidomhtmlcanvaselement acanvas2, out unsigned long amaxdifference); double computeanimationdistance(in nsidomelement element, in astring property, in astring value1, in astring value2); nsicompositionstringsynthesizer createcompositionstringsynthesizer(); obsolete since gecko 38.
... void activatenativemenuitemat( in astring indexstring ); parameters indexstring clearmozafterpaintevents() void clearmozafterpaintevents(); parameters none.
nsIDocumentLoader
to create an instance, use: var documentloader = components.classes["@mozilla.org/docloaderservice;1"] .createinstance(components.interfaces.nsidocumentloader); method overview void clearparentdocloader(); obsolete since gecko 1.8 void createdocumentloader(out nsidocumentloader aninstance); obsolete since gecko 1.8 void destroy(); obsolete since gecko 1.8 void fireonlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri); obsolete since gecko 1.8 void fireonstatuschange(in nsiwebprogress awebprogress, in nsirequest...
... methods clearparentdocloader() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void clearparentdocloader(); parameters none.
nsIEditorSpellCheck
note: this does not clear any suggestions left over from previous calls to checkcurrentword(), so there may be suggestions, but they will be invalid.
...if you have called canspellcheck() but not initspellchecker(), you can still call this function to clear the cached spell check object, and no preferences are saved.
nsIHttpChannel
if avalue is empty and amerge is false, the header will be cleared.
...if value is empty and merge is false, the header will be cleared.
nsIMsgDBHdr
in clear, if you want to do a persistent change to a message header, such as marking it as read, or replied to, or whatever, you must do it through its corresponding nsimsgfolder (msghdr.folder) or nsimsgdatabase (msghdr.folder.msgdatabase).
...all other flags are cleared.
nsIMsgSearchSession
in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value); long countsearchscopes(); void getnthsearchscope(in long which,out nsmsgsearchscopevalue scopeid, out nsimsgfolder folder); void addscopeterm(in nsmsgsearchscopevalue scope, in nsimsgfolder folder); void adddirectoryscopeterm(in nsmsgsearchscopevalue scope); void clearscopes(); [noscript] boolean scopeusescustomheaders(in nsmsgsearchscopevalue scope, in voidptr selection, in boolean forfilters); boolean isstringattribute(in nsmsgsearchattribvalue attrib); void addallscopes(in nsmsgsearchscopevalue attrib); void search(in nsimsgwindow awindow); void interruptsearch(); void pausesearch(); void resumes...
... void addscopeterm(in nsmsgsearchscopevalue scope, in nsimsgfolder folder); parameters scope folder adddirectoryscopeterm() void adddirectoryscopeterm(in nsmsgsearchscopevalue scope); parameters scope clearscopes() void clearscopes(); scopeusescustomheaders() call this function everytime the scope changes!
nsINavBookmarkObserver
notes this table indicates what anewvalue should be depending on property specified by aproperty: property string value "cleartime" empty string; this property means the history was deleted, so there's no last visit date.
...see onitemchanged() method property = "cleartime" for when all visit dates are deleted for the uri.
nsIPromptService
you have now been alerted.", "and this is a checkbox", check); // check.value is now true if the box was checked and false if the box was cleared confirm example confirm displays a dialog with ok/cancel.
...ce;1"] .getservice(components.interfaces.nsipromptservice); var check = {value: true}; // default the checkbox to true var result = prompts.confirmcheck(null, "title of this dialog", "are you sure?", "don't ask again", check); // check.value is now true if the box was checked and ok was pressed, false if // the box was cleared and ok was pressed, and is the default of true if cancel was pressed.
nsISmsDatabaseService
tional] in unsigned long long processid); void deletemessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void createmessagelist(in nsidommozsmsfilter filter, in boolean reverse, in long requestid, [optional] in unsigned long long processid); void getnextmessageinlist(in long listid, in long requestid, [optional] in unsigned long long processid); void clearmessagelist(in long listid); void markmessageread(in long messageid, in boolean value, in long requestid, [optional] in unsigned long long processid) methods savereceivedmessage() void savereceivedmessage( in domstring asender, in domstring abody, in unsigned long long adate ); parameters asender a domstring with the sender of the text message.
... clearmessagelist() void getnextmessageinlist( in long listid, ); parameters listid a number representing the id of the message list.
nsITextInputProcessor
after a call of this, the pending composition string information is cleared.
...if this is null, the instance stops sharing modifier state with other instances and clears all modifier state.
nsIXmlRpcClient
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in string serverurl); void setauthentication(in string username, in string password); void clearauthentication(in string username, in string password); void setencoding(in string encoding); void setencoding(in unsigned long type, out nsiidref uuid, out nsqiresult result); void asynccall (in nsixmlrpcclientlistener listener, in nsisupports ctxt, in string methodname, in nsisupports arguments, in pruint32 count); attributes attribute type description serverurl readonly nsiurl the...
...both parameters must be specified for authentication to be enabled void setauthentication ( in string username, in string password ) ; parameters username username to be used if asked to authenticate password password to be used if asked to authenticate clearauthentication() clear authentication info void setauthentication ( in string username, in string password ) ; parameters username password setencoding() set character encoding.
Getting Started Guide
with nscomptr, you can write code that is shorter, cleaner, clearer, and safer, than you can with raw xpcom interface pointers.
...this takes a little getting used to on your part, but ends up with less typing, clearer, safer code, and less leaks.
Reference Manual
getter_addrefs releases the old value, if any, clears it out, and returns a pointer to it, allowing the getter to fill in your nscomptr with a new addrefed value.
...getter_addrefs releases and clears out p before you assign into it, i.e., before getnext is called.
Using the clipboard
this ensures that if the copied data comes from a window in private browsing mode, the clipboard will be cleared when private browsing mode ends.
...next we need to initialize it with a "privacy context", which will ensure that source data from inside private browsing mode will be cleared when the mode is exited.
wrappedJSObject
this also makes the public interface of the component clearer and provides protection for the component's internal data.
... while this behavior is nice for production code as it forces you to clearly define the interfaces that should be used to access the component, it's inconvenient to write the interfaces (and recompile each time you change them) when working on a prototype of the component.
Address book sync client design
since the communication was successful, // clear the ret (retry) flag on all records.
... save the changes to // the local database, clear the sync mapping table flags and save the new sync // mapping table.
Debugger.Object - Firefox Developer Tools
clearobjectwatchpoint()(future plan) remove any object watchpoint set on the referent.
... clearpropertywatchpoint(name)(future plan) remove any watchpoint set on the referent's property namedname.
All keyboard shortcuts - Firefox Developer Tools
command windows macos linux focus on the search box in the css pane ctrl + f cmd + f ctrl + f clear search box content (only when the search box is focused, and content has been entered) esc esc esc step forward through properties and values tab tab tab step backward through properties and values shift + tab shift + tab shift + tab start editing property or value (rules view only, when a property or value is selected, but not already being e...
... web console command windows macos linux open the web console ctrl + shift + k cmd + opt + k ctrl + shift + k search in the message display pane ctrl + f cmd + f ctrl + f open the object inspector pane ctrl + click ctrl + click ctrl + click clear the object inspector pane esc esc esc focus on the command line ctrl + shift + k cmd + opt + k ctrl + shift + k clear output ctrl + shift + l ctrl + l from firefox 67: cmd + k ctrl + shift + l command line interpreter these shortcuts apply when you're in the command line interpreter.
Network request list - Firefox Developer Tools
each request is displayed in its own row: by default, the network monitor is cleared each time you navigate to a new page or reload the current page.
... other ways to use the search panel: to clear the search string: click the x icon in the search field.
Settings - Firefox Developer Tools
there's just one of these: enable persistent logs a setting to control whether or not the web console and network monitor clear their output when you navigate to a new page.
... note that this option was called "disable cache" in firefox versions previous to 49, but it was renamed to make it clearer that this affects the http cache, and not service workers/the cache api.
Background Tasks API - Web APIs
the implementation of our shim for cancelidlecallback() is much simpler: window.cancelidlecallback = window.cancelidlecallback || function(id) { cleartimeout(id); } if cancelidlecallback() isn't defined, this creates one which simply passes the specified callback id through to cleartimeout().
... window.requestidlecallback = window.requestidlecallback || function(handler) { let starttime = date.now(); return settimeout(function() { handler({ didtimeout: false, timeremaining: function() { return math.max(0, 50.0 - (date.now() - starttime)); } }); }, 1); }; window.cancelidlecallback = window.cancelidlecallback || function(id) { cleartimeout(id); }; managing the task queue next, let's look at the way we manage the tasks that need to be performed.
Applying styles and colors - Web APIs
function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); // clear canvas ctx.clearrect(0, 0, 150, 150); // draw guides ctx.strokestyle = '#09f'; ctx.linewidth = 2; ctx.strokerect(-5, 50, 160, 50); // set line styles ctx.strokestyle = '#000'; ctx.linewidth = 10; // check input if (document.getelementbyid('miterlimit').value.match(/\d+(\.\d+)?/)) { ctx.miterlimit = parsefloat(document.getelementbyid('miterlimit').value); } else { ...
... <canvas id="canvas" width="110" height="110"></canvas> var ctx = document.getelementbyid('canvas').getcontext('2d'); var offset = 0; function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.setlinedash([4, 2]); ctx.linedashoffset = -offset; ctx.strokerect(10, 10, 100, 100); } function march() { offset++; if (offset > 16) { offset = 0; } draw(); settimeout(march, 20); } march(); screenshotlive sample gradients just like any normal drawing program, we can fill and stroke shapes using linear and radial gradients.
Compositing example - Web APIs
op; dl.appendchild(dt); var dd = document.createelement("dd"); var p = document.createelement("p"); p.textcontent = gcotext.pop(); dd.appendchild(p); var canvastodrawon = createcanvas(); var canvastodrawfrom = createcanvas(); var canvastodrawresult = createcanvas(); var ctx = canvastodrawresult.getcontext('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas1, 0, 0, width/2, height/2); ctx.globalcompositeoperation = pop; ctx.drawimage(canvas2, 0, 0, width/2, height/2); ctx.globalcompositeoperation = "source-over"; ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.fo...
...nt = "14px arial"; ctx.filltext(pop, 5, height/2 - 5); ctx.restore(); var ctx = canvastodrawon.getcontext('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas1, 0, 0, width/2, height/2); ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.filltext('existing content', 5, height/2 - 5); ctx.restore(); var ctx = canvastodrawfrom.getcontext('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas2, 0, 0, width/2, height/2); ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ...
Compositing and clipping - Web APIs
globalcompositeoperation we can not only draw new shapes behind existing shapes but we can also use it to mask off certain areas, clear sections from the canvas (not limited to rectangles like the clearrect() method does) and more.
...you can see this clearly in the linear gradient that's drawn next.
console - Web APIs
WebAPIConsole
console.clear() clear the console.
... border and its longhand equivalents border-radius box-decoration-break box-shadow clear and float color cursor display font and its longhand equivalents line-height margin outline and its longhand equivalents padding text-* properties such as text-transform white-space word-spacing and word-break writing-mode note: the console message behaves like an inline element by default.
DedicatedWorkerGlobalScope - Web APIs
windowtimers.clearinterval() cancels the repeated execution set using windowtimers.setinterval().
... windowtimers.cleartimeout() cancels the repeated execution set using windowtimers.settimeout().
Element: compositionend event - Web APIs
vent.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1px 2px 0; border: 1px solid black; } js cons...
...t inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event-log-contents'); const clearlog = document.queryselector('.clear-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionstart event - Web APIs
vent.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1px 2px 0; border: 1px solid black; } js cons...
...t inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event-log-contents'); const clearlog = document.queryselector('.clear-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionupdate event - Web APIs
vent.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1px 2px 0; border: 1px solid black; } js cons...
...t inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event-log-contents'); const clearlog = document.queryselector('.clear-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
EventTarget.addEventListener() - Web APIs
over time, it became clear that more options were needed.
...this lets you easily bypass problems where it's unclear what this will be, depending on the context from which your function was called.
Using the Gamepad API - Web APIs
we have done this below using window.setinterval(); once the object is available the gamepad info is outputted, the game loop is started, and the interval is cleared using window.clearinterval().
...it has " + gp.buttons.length + " buttons and " + gp.axes.length + " axes."; gameloop(); clearinterval(interval); } } } now on to the main game loop.
Geolocation.watchPosition() - Web APIs
the id can be passed to the geolocation.clearwatch() to unregister the handler.
... examples var id, target, options; function success(pos) { var crd = pos.coords; if (target.latitude === crd.latitude && target.longitude === crd.longitude) { console.log('congratulations, you reached the target'); navigator.geolocation.clearwatch(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 apithe definition of 'watchposition()' in that specification.
Using the Geolocation API - Web APIs
const watchid = navigator.geolocation.watchposition((position) => { dosomething(position.coords.latitude, position.coords.longitude); }); the watchposition() method returns an id number that can be used to uniquely identify the requested position watcher; you use this value in tandem with the clearwatch() method to stop watching the user's location.
... navigator.geolocation.clearwatch(watchid); fine tuning the response both getcurrentposition() and watchposition() accept a success callback, an optional error callback, and an optional positionoptions object.
IDBObjectStore - Web APIs
idbobjectstore.clear() creates and immediately returns an idbrequest object, and clears this object store in a separate thread.
...pera android full support 14safari ios full support 8samsung internet android full support 1.5 full support 1.5 no support 1.5 — 7.0prefixed prefixed implemented with the vendor prefix: webkitclearchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support ...
MediaPositionState.position - Web APIs
if the media is not playing, clearinterval() is used to remove the interval handler.
... let positioninterval = window.setinterval(() => { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediapositionstate.position' in that specification.
PaymentRequest.abort() - Web APIs
parameters none examples the following example sets up a timeout to clear the payment request that might have been abandoned or neglected.
... var request = new paymentrequest(supportedinstruments, details, options); var paymenttimeout = window.settimeout(() => { window.cleartimeout(paymenttimeout); request.abort().then(() => { print('payment timed out after 20 minutes.'); }).catch(() => { print('unable to abort, because the user is currently in the process ' + 'of paying.'); }); }, 20 * 60 * 1000); /* 20 minutes */ specifications specification status comment payment request apithe definition of 'abort()' in that specification.
performance.mark() - Web APIs
WebAPIPerformancemark
const monkeyentries = performance.getentriesbyname("monkey"); console.log(monkeyentries.length); // 2 // clear out all of the marks.
... performance.clearmarks(); specifications specification status comment user timing level 2the definition of 'mark()' in that specification.
Performance API - Web APIs
adds the clearresourcetimings() method, the setresourcetimingbuffersize() method, and the onresourcetimingbufferfull event handler to the performance interface.
... resource timing level 3 editor's draft user timing recommendation adds mark(), clearmarks(), measure() and clearmeasures() methods to the performance interface.
Using the Screen Capture API - Web APIs
async function startcapture() { logelem.innerhtml = ""; try { videoelem.srcobject = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); dumpoptionsinfo(); } catch(err) { console.error("error: " + err); } } after clearing the contents of the log in order to get rid of any leftover text from the previous attempt to connect, startcapture() calls getdisplaymedia(), passing into it the constraints object defined by displaymediaoptions.
... for example, this line in the http headers will enable screen capture api for the document and any embedded <iframe> elements that are loaded from the same origin: feature-policy: display-capture 'self' if you're performing screen capture within an <iframe>, you can request permission just for that frame, which is clearly more secure than requesting a more general permission: <iframe src="https://mycode.example.net/etc" allow="display-capture"> </iframe> ...
SharedWorkerGlobalScope - Web APIs
windowtimers.clearinterval() cancels the repeated execution set using windowtimers.setinterval().
... windowtimers.cleartimeout() cancels the repeated execution set using windowtimers.settimeout().
StorageEvent - Web APIs
the key attribute is null when the change is caused by the storage clear() method.
...the newvalue is null when the change has been invoked by storage clear() method or the key has been removed from the storage.
SubtleCrypto - Web APIs
subtlecrypto.encrypt() returns a promise that fufills with the encrypted data corresponding to the clear text, algorithm, and key given as parameters.
... subtlecrypto.decrypt() returns a promise that fulfills with the clear data corresponding to the encrypted text, algorithm, and key given as parameters.
USBInTransferResult - Web APIs
a stall on the control endpoint does not need to be cleared.
... a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferin() can be called again.
User Timing API - Web APIs
removing performance marks to remove a specific mark from the performance timeline, call performance.clearmarks(name) where name is the name of the mark(s) you want removed.
... removing performance measures to remove a specific measure from the performance timeline, call performance.clearmeasures(name) where name is the name of the measure(s) you want removed.
Boilerplate 1 - Web APIs
basically, it gets the webgl rendering context from the canvas element, initializes the drawing buffer, clears it black, and returns the initialized context.
... canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } the source code of this example is also available on github.
Getting started with WebGL - Web APIs
your browser or machine may not support it."); return; } // set clear color to black, fully opaque gl.clearcolor(0.0, 0.0, 0.0, 1.0); // clear the color buffer with specified clear color gl.clear(gl.color_buffer_bit); } window.onload = main; the first thing we do here is obtain a reference to the canvas, assigning it to a variable named canvas.
...in this case, we set the clear color to black, and clear the context to that color (redrawing the canvas with the background color).
Fundamentals of WebXR - Web APIs
as browser developers built support for webvr and allowed developers to experiment, it became clear that in order to finish an api for virtual environments on the web, it would make more sense to start a new specification than to try to "fix" webvr.
...some platforms may provide previously-cleared frames to you, while others may optimize performance by not erasing the framebuffers in order to avoid having to touch each pixel twice per frame.
Movement, orientation, and motion: A WebXR example - Web APIs
stedrefspace = xrreferencespace; let pose = null; animationframerequestid = session.requestanimationframe(drawframe); adjustedrefspace = applyviewercontrols(xrreferencespace); pose = frame.getviewerpose(adjustedrefspace); if (pose) { let gllayer = session.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); logglerror("bindframebuffer"); gl.clearcolor(0, 0, 0, 1.0); gl.cleardepth(1.0); // clear everything gl.clear(gl.color_buffer_bit | gl.depth_buffer_bit); logglerror("glclear"); const deltatime = (time - lastframetime) * 0.001; // convert to seconds lastframetime = time; for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewp...
...with webgl now configured to render to the xr device, we clear the frame to black and are ready to begin rendering.
Using the Web Speech API - Web APIs
this can sometimes be useful, say if a result is not completely clear and you want to display a list if alternatives for the user to choose the correct one from.
...change voices using the dropdown menu.</p> <form> <input type="text" class="txt"> <div> <label for="rate">rate</label><input type="range" min="0.5" max="2" value="1" step="0.1" id="rate"> <div class="rate-value">1</div> <div class="clearfix"></div> </div> <div> <label for="pitch">pitch</label><input type="range" min="0" max="2" value="1" step="0.1" id="pitch"> <div class="pitch-value">1</div> <div class="clearfix"></div> </div> <select> </select> </form> javascript let's investigate the javascript that powers this app.
window.location - Web APIs
WebAPIWindowlocation
> </body> </html> …the same thing but with an animated page scroll: var showbookmark = (function () { var _usehash, _scrollx, _scrolly, _nodex, _nodey, _itframe, _scrollid = -1, _bookmark, /* * nduration: the duration in milliseconds of each frame * nframes: number of frames for each scroll */ nduration = 200, nframes = 10; function _next () { if (_itframe > nframes) { clearinterval(_scrollid); _scrollid = -1; return; } _isbot = true; document.documentelement.scrolltop = math.round(_scrolly + (_nodey - _scrolly) * _itframe / nframes); document.documentelement.scrollleft = math.round(_scrollx + (_nodex - _scrollx) * _itframe / nframes); if (_usehash && _itframe === nframes) { location.hash = _bookmark; } _itframe++; } function _chkowner () { if (_isbo...
...t) { _isbot = false; return; } if (_scrollid > -1) { clearinterval(_scrollid); _scrollid = -1; } } if (window.addeventlistener) { window.addeventlistener("scroll", _chkowner, false); } else if (window.attachevent) { window.attachevent("onscroll", _chkowner); } return function (sbookmark, busehash) { var onode = document.queryselector(sbookmark); _scrolly = document.documentelement.scrolltop; _scrollx = document.documentelement.scrollleft; _bookmark = sbookmark; _usehash = busehash === true; _nodex = onode.offsetleft; _nodey = onode.offsettop; _itframe = 1; if (_scrollid === -1) { _scrollid = setinterval(_next, math.round(nduration / nframes)); } }; })(); specifications specification status comment html living standardthe defin...
Window.sessionStorage - Web APIs
sessionstorage is similar to localstorage; the difference is that while data in localstorage doesn't expire, data in sessionstorage is cleared when the page session ends.
... closing a tab/window ends the session and clears objects in sessionstorage.
Window.setImmediate() - Web APIs
syntax var immediateid = setimmediate(func, [param1, param2, ...]); var immediateid = setimmediate(func); where immediateid is the id of the immediate which can be used later with window.clearimmediate.
... notes the clearimmediate method can be used to clear the immediate actions, just like cleartimeout for settimeout.
WindowOrWorkerGlobalScope - Web APIs
windoworworkerglobalscope.clearinterval() cancels the repeated execution set using windoworworkerglobalscope.setinterval().
... windoworworkerglobalscope.cleartimeout() cancels the delayed execution set using windoworworkerglobalscope.settimeout().
WorkerGlobalScope - Web APIs
windoworworkerglobalscope.clearinterval() cancels the repeated execution set using windoworworkerglobalscope.setinterval().
... windoworworkerglobalscope.cleartimeout() cancels the delayed execution set using windoworworkerglobalscope.settimeout().
XRViewerPose.views - Web APIs
if a valid pose is returned, the frame is rendered by clearing the backbuffer and then rendering each of the views in the pose; these are most likely the views for the left and right eyes.
... let pose = frame.getviewerpose(xrreferencespace); if (pose) { let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); gl.clearcolor(0, 0, 0, 1); gl.cleardepth(1); gl.clear(gl.color_buffer_bit, gl.depth_buffer_bit); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the scene for the eye view.eye */ } } passing each view to getviewport() returns the webgl viewport to apply in order to cause the rendered output to be positioned correctly in the framebuffer for renderijng to the corresponding eye on the output device.
XRViewerPose - Web APIs
if a valid pose is returned, the frame is rendered by clearing the backbuffer and then rendering each of the views in the pose; these are most likely the views for the left and right eyes.
... let pose = frame.getviewerpose(xrreferencespace); if (pose) { let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); gl.clearcolor(0, 0, 0, 1); gl.cleardepth(1); gl.clear(gl.color_buffer_bit, gl.depth_buffer_bit); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the scene for the eye view.eye */ } } passing each view to getviewport() returns the webgl viewport to apply in order to cause the rendered output to be positioned correctly in the framebuffer for renderijng to the corresponding eye on the output device.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
when the loading has finished, fire another event_object_statechange event and clear the state_busy flag.
...use role_text with the readonly flag cleared for editable text fields.
Understandable - Accessibility
success criteria how to conform to the criteria practical resource 3.3.1 error identification (a) when a user is filling out a form or choosing between options, any error that is detected should be clearly reported to the user, along with the form control that the error relates to.
... 3.3.2 labels or instructions (a) clear instructions should be provided when data input is required.
::-webkit-search-cancel-button - CSS: Cascading Style Sheets
the ::-webkit-search-cancel-button css pseudo-element represents a button (the "cancel button") at the edge of an <input> of type="search" which clears away the current value of the <input> element.
...the clear button is only shown on non-empty search <input> elements.
Mastering margin collapsing - CSS: Cascading Style Sheets
margin collapsing occurs in three basic cases: adjacent siblings the margins of adjacent siblings are collapsed (except when the latter sibling needs to be cleared past floats).
... no content separating parent and descendants if there is no border, padding, inline part, block formatting context created, or clearance to separate the margin-top of a block from the margin-top of one or more of its descendant blocks; or no border, padding, inline content, height, min-height, or max-height to separate the margin-bottom of a block from the margin-bottom of one or more of its descendant blocks, then those margins collapse.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
with regard to flex items, if an item was floated or cleared and then becomes a flex item due to the parent having display: flex applied, the floating and clearing will no longer happen, and the item will not be taken out of normal flow in the way that floats are.
...if you remove display: flex, you should see that the .box element collapses as we have no clearing applied.
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
the end of the container: * {box-sizing: border-box;} img { max-width: 100%; display: block; } .media { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 400px; display: grid; grid-template-columns: 1fr 2fr; grid-template-areas: "img content"; margin-bottom: 1em; } .media::after { content: ""; display: block; clear: both; } .media .image { float: left; width: 150px; margin-right: 20px; } .media .text { padding: 10px; align-self: end; } <div class="media"> <div class="image"><img src="https://udn.realityripple.com/samples/89/f993f273dd.png" alt="placeholder"></div> <div class="text">this is a media object example.
... floated elements as we have already seen, float and also clear have no effect on a grid item.
Block formatting context - Developer guides
formatting contexts affect layout, but typically, we create a new block formatting context for the positioning and clearing floats rather than changing the layout, because an element that establishes a new block formatting context will: contain internal floats.
... see also float, clear css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
in chrome/opera the week control provides slots to fill in week and year values, a pop-up calendar interface to select them more visually, and an "x" button to clear the control's value.
... at this time, it's unclear what a value of "any" means for step when used with week inputs.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
may include a delete icon in supporting browsers that can be used to clear the field.
...the diversity of people using the web—and by extension your web site—practically guarantees that some of your site's visitors will have some variation in thought processes and/or circumstances that leads them to interpret your forms very differently from you without clear and properly-presented labels.
Alt-Svc - HTTP
WebHTTPHeadersAlt-Svc
syntax alt-svc: clear alt-svc: <protocol-id>=<alt-authority>; ma=<max-age> alt-svc: <protocol-id>=<alt-authority>; ma=<max-age>; persist=1 clear the special value ''clear" indicates that the origin requests all alternatives for that origin to be invalidated.
... persist=1optional usually cached alternative service entries are cleared on network configuration changes.
HTTP Index - HTTP
WebHTTPIndex
68 clear-site-data http, http header, reference, header the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... 226 205 reset content http, http status code, reference, status code the http 205 reset content response status tells the client to reset the document view, so for example to clear the content of a form, reset a canvas state, or to refresh the ui.
WeakRef - JavaScript
if the target of a weakref is also in a finalizationregistry, the weakref's target is cleared at the same time or before any cleanup callback associated with the registry is called; if your cleanup callback calls deref on a weakref for the object, it will receive undefined.
...reference, if it still exists const element = this.ref.deref(); if (element) { element.textcontent = ++this.count; } else { // the element doesn't exist anymore console.log("the element is gone."); this.stop(); this.ref = null; } }; tick(); this.timer = setinterval(tick, 1000); } stop() { if (this.timer) { clearinterval(this.timer); this.timer = 0; } } } const counter = new counter(document.getelementbyid("counter")); counter.start(); settimeout(() => { document.getelementbyid("counter").remove(); }, 5000); specifications specification weakrefsthe definition of 'weakref' in that specification.
Image file type and format guide - Web media technologies
this is particularly important if there's any text in your screenshot, as text easily becomes fuzzy and unclear under lossy compression.
...if you do choose a lossy format, such as jpeg or lossy webp, carefully weigh the compression level to avoid causing text or other shapes to become fuzzy or unclear.
Web Performance
to understand how to improve performance and perceived performance, it helps to understand how the browser works.recommended web performance timings: how long is too long?there are no clear set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).the business case for web performanceyou know web performance is important, but how do you convince clients and management to invest in performance and make it a priority.
... in this article, we'll discuss creating a clear business case to convince decision-makers to make the investment.understanding latencylatency is the time it takes for a packet of data to travel from source to a destination.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
clearing the cache remember the activate event we skipped?
... it can be used to clear out the old cache we don't need anymore: self.addeventlistener('activate', (e) => { e.waituntil( caches.keys().then((keylist) => { return promise.all(keylist.map((key) => { if(key !== cachename) { return caches.delete(key); } })); }) ); }); this ensures we have only the files we need in the cache, so we don't leave any garbage behind; the available cache space in the browser is limited, so it is a good idea to clean up after ourselves.
Private Properties - Archive of obsolete content
property readable/writable from any function, it's common to define getter/setter functions for the property, respectively: point.prototype.getx = function () { return this._x; }; point.prototype.setx = function (x) { this._x = x; }; point.prototype.gety = function () { return this._y; }; point.prototype.sety = function (y) { this._y = y; }; the above technique is simple and clearly expresses intent.
preferences/service - Archive of obsolete content
} reset(name) clears a non-default, user-set value from the application preference name.
system/environment - Archive of obsolete content
access, set and clear environment variables.
Low-Level APIs - Archive of obsolete content
system/environment access, set and clear environment variables.
Chrome Authority - Archive of obsolete content
their statements must therefore be clear and easy to parse.
Creating Reusable Modules - Archive of obsolete content
you can split your code into separate modules with clearly defined interfaces between them.
HTML in XUL for rich tooltips - Archive of obsolete content
").setattribute("tooltiphtml", "<font color='green'>green foo</font>") }, onmousetooltip: function(event) { //get the html tooltip string assigned to the element that the mouse is over (which will soon launch the tooltip) var txt = event.target.getattribute("tooltiphtml"); // get the html div element that is inside the custom xul tooltip var div = document.getelementbyid("myhtmltipdiv"); //clear the html div element of any prior shown custom html while(div.firstchild) div.removechild(div.firstchild); //safely convert html string to a simple dom object, stripping it of javascript and more complex tags var injecthtml = components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscriptableunescapehtml) .parsefragment(txt, false, null, div); //attach the do...
JavaScript Debugger Service - Archive of obsolete content
jsd.clearfilters(); // clear the list of filters // we exclude the scripts with the following filenames from being tracked jsd.appendfilter(createfilter("*/firefox/components/*")); jsd.appendfilter(createfilter("*/firefox/modules/*")); jsd.appendfilter(createfilter("xstringbundle")); jsd.appendfilter(createfilter("chrome://*")); jsd.appendfilter(createfilter("x-jsd:ppbuffer*")); jsd.appendfilter(createfil...
StringView - Archive of obsolete content
objects (since now: stringviews) which work strictly on arrays of numbers rather than on creating new immutable javascript strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
Common Pitfalls - Archive of obsolete content
j)); if (ns_failed(rv)) { // may want to handle ns_error_malformed_uri for // some applications return rv; } or, if the code can include nsnetutil.h: nscomptr<nsiuri> uriobj; nsresult rv = ns_newuri(getter_addrefs(uriobj), uristring, uricharset, baseuri); in all cases the baseuri can be null if the uristring should be treated as an absolute uri and uricharset can be null if there is no clear origin charset for the string (e.g.
Extension Etiquette - Archive of obsolete content
preferences' internal names internal firefox preference names for extensions or to be clear, the name of the preference as it appears in the about:config, should start with "extensions.," then the name of the extension, with a dot, then the name of the preference.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
« previousnext » this document was authored by hiroshi shimoda of clear code inc.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
« previousnext » fixme: we should include a link to the mdc list of snippets fixme: we need to add a part about 'why and how to create your own component' c++/js this document was authored by hiroshi shimoda of clear code inc.
Adding sidebars - Archive of obsolete content
looking at the bookmarks and history sidebars should make it clear that trees are quite customizable with css.
Adding windows and dialogs - Archive of obsolete content
it's a box container with styling that is usually a visible border around its contents, so that it's clear what is being grouped together.
The Box Model - Archive of obsolete content
as their names should make clear, you can control the flexibility boundaries of elements, thus preventing them from growing or shrinking too much.
Tabbed browser - Archive of obsolete content
var url = "https://developer.mozilla.org"; var tab = gbrowser.addtab(null, {relatedtocurrent: true}); gsessionstore.settabstate(tab, json.stringify({ entries: [ { title: url } ], usertypedvalue: url, usertypedclear: 2, lastaccessed: tab.lastaccessed, index: 1, hidden: false, attributes: {}, image: null })); reusing tabs rather than open a new browser or new tab each and every time one is needed, it is good practice to try to re-use an existing tab which already displays the desired url--if one is already open.
Add-ons - Archive of obsolete content
the difference will be clearly flagged.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
the new design clearly shows what some experts have been saying: that standards-based design can be visually compelling and preserve the interface conventions we've come to expect from web pages.
Creating reusable content with CSS and XBL - Archive of obsolete content
ibute(this, "anonid", "square") ]]></field> <field name="button"><![cdata[ document.getanonymouselementbyattribute(this, "anonid", "button") ]]></field> <method name="dodemo"> <body><![cdata[ this.square.style.backgroundcolor = "#cf4" this.square.style.marginleft = "20em" this.button.setattribute("disabled", "true") settimeout(this.cleardemo, 2000, this) ]]></body> </method> <method name="cleardemo"> <parameter name="me"/> <body><![cdata[ me.square.style.backgroundcolor = "transparent" me.square.style.marginleft = "0" me.button.removeattribute("disabled") ]]></body> </method> </implementation> <handlers> <handler event="click" button="0"><![cdata[ ...
Defining Cross-Browser Tooltips - Archive of obsolete content
between these two passages, it is fairly clear that the proper method for defining a "tooltip" for an image (or, indeed, for any element) is to use the title attribute.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
recommendations absent support for css3, it is difficult to provide a clear set of steps for fixing every instance of these problems, because the best solution for a given document will greatly depend on its structure.
Monitoring WiFi access points - Archive of obsolete content
the onchange() method (lines 13 through 27) begins by enabling universalxpconnect privileges, then clearing out the div (d) that will receive the updated list of access points.
Visualizing an audio spectrum - Archive of obsolete content
* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } fft.forward(signal); // clear the canvas before drawing spectrum ctx.clearrect(0,0, canvas.width, canvas.height); for (var i = 0; i < fft.spectrum.length; i++ ) { // multiply spectrum by a zoom value magnitude = fft.spectrum[i] * 4000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } } var audio = d...
Locked config settings - Archive of obsolete content
} catch(e) { displayerror("test", e); } clear text configuration if you don't care about encoding the mozilla.cfg file, append this config to all.js instead : pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg"); ...
Developing New Mozilla Features - Archive of obsolete content
in some cases the developers may be in error and staff will work to make this clear and get you connected.
Editor Embedding Guide - Archive of obsolete content
getcommandstate "state_attribute" (cstring) docommand "state_attribute" (cstring) note there must be a clear undo stack or this will not work.
Layout FAQ - Archive of obsolete content
you can work around it by removing display:table in the style rule with the "#main" selector or adding clear:both to it.
JavaScript crypto - Archive of obsolete content
the ssl session cache is also cleared (from firefox 1.5 upward).
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
void clearparameters() removes all set parameters and sets them to defaults specified in the xslt stylesheet.
Table Cellmap - Archive of obsolete content
<table> <tr><td>cell 1</td><td colspan="2">cell 2</td></tr> <tr><td>cell 3</td><td>cell 4</td><td>cell 5</td></tr> </table> table cell map would be: row 0 : c0,0 c0,1 c row 1 : c1,0 c1,1 c1,2 while it is clear that in the cells that are the origin of a table cells one will find a address the more interesting question is, what will be the content in the upper right cell.
Table Layout Regression Tests - Archive of obsolete content
it is unclear whether or how well rtest continues to work and whether it is still used or not.
Tamarin Build System Documentation - Archive of obsolete content
to provide quick and accurate results of building and testing tamarin on supported platforms and configurations to represent the build results in a clear and concise manor please give use feedback if you have any comments or suggestions to improve the build system how to add tests to the smokes?
Venkman - Archive of obsolete content
related topics javascript, web development, developing mozilla original document information author(s): robert ginda other contributors: doctor unclear last updated date: july 13, 2007 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
registerChrome - Archive of obsolete content
it is unclear what, if anything, does this "chrome registration" accomplish.
norestorefocus - Archive of obsolete content
if true, the focus will not be reset, although it will be cleared if the focus is within the panel.
disableautoselect - Archive of obsolete content
if the text does not match any of the items in the list, the menu selection is cleared.
icon - Archive of obsolete content
ArchiveMozillaXULAttributeicon
possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network.
statustext - Archive of obsolete content
example <!-- sets the status message when mouse is over buttons --> <button label="connect" statustext="connect to remote server" onmouseover="setstatusmessage(this)" onmouseout="clearstatusmessage()"/> <button label="ping" statustext="ping the server" onmouseover="setstatusmessage(this)" onmouseout="clearstatusmessage()"/> <statusbar> <statusbarpanel id="mystatuspanel" label="" flex="1"/> <spacer flex="1"/> </statusbar> <script> function setstatusmessage(obj){ document.getelementbyid('mystatuspanel').label = obj.getattribute('statustext'); } function clearstatusm...
Building accessible custom components in XUL - Archive of obsolete content
this will become clearer with some concrete examples: the grid element is the container for the entire control; it gets a role of "wairole:spreadsheet".
moveByOffset - Archive of obsolete content
if isselectingrange is false, any existing selection is cleared.
reset - Archive of obsolete content
ArchiveMozillaXULMethodreset
for a textbox it also clears the undo transaction list (gecko 1.9).
Methods - Archive of obsolete content
« xul reference home acceptdialog additemtoselection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffirst...
MenuButtons - Archive of obsolete content
<toolbarbutton type="menu" image="cookies.png"> <menupopup> <menuitem label="block cookies" type="checkbox"/> <menuitem label="clear cookies"/> </menupopup> </toolbarbutton> the 'menu-button' button the 'menu-button' type of button is used when you want to attach a menu to a button but want to have a default action carried out when the button is pressed by itself.
MenuItems - Archive of obsolete content
when clearing the checked state, the checked attribute should be removed rather than just set to false.
MenuModification - Archive of obsolete content
otherwise, a new submenu would be added every time the menu is opened, which is clearly not desirable.
PopupEvents - Archive of obsolete content
in this example, the contents of a textbox are cleared whenever a popup is hidden.
Filtering - Archive of obsolete content
look at the resulting rdf triples above again if this is unclear.
RDF Modifications - Archive of obsolete content
at the very most, the change would cause a label to be filled in with a value, or cleared when removing an rdf triple.
RDF Query Syntax - Archive of obsolete content
you may find this a bit confusing, but this should become clearer later with more specific and practical examples.
Special Condition Tests - Archive of obsolete content
for the bookmarks toolbar, the outer content is inserted into an <hbox>, but at lower levels, the content will be inserted into a <menu> in case you aren't clear, the tag that must match for the outer iteration is the root element, the one with the datasources attribute on it.
Template Logging - Archive of obsolete content
either way, the member variable isn't known so it isn't clear what value to use for each generated result id.
XML Assignments - Archive of obsolete content
(in this case, the number of xml node siblings in the document, not the number of real siblings the people have, clearly the people in the datasource aren't actually siblings).
XML Templates - Archive of obsolete content
note the only change is that the addition of the xmlns attribute on the data; this is used to clear the namespace used for the elements in the data, otherwise they become xul elements.
The Joy of XUL - Archive of obsolete content
xul provides a clear separation among the client application definition and programmatic logic ("content" consisting of xul, xbl, and javascript), presentation ("skin" consisting of css and images), and language-specific text labels ("locale" consisting of dtds and string bundles in .properties files).
Custom toolbar button - Archive of obsolete content
if you want to make it clear that your made-up name is not a real domain, add .invalid to the end.
Adding HTML Elements - Archive of obsolete content
this may be clearer from the examples below.
Creating a Skin - Archive of obsolete content
we could add some icons to the buttons to make them clearer.
Document Object Model - Archive of obsolete content
note that we qualified the property with the 'window' identifier just to be clearer.
Keyboard Shortcuts - Archive of obsolete content
vk_cancel vk_back vk_tab vk_clear vk_return vk_enter vk_shift vk_control vk_alt vk_pause vk_caps_lock vk_escape vk_space vk_page_up vk_page_down vk_end vk_home vk_left vk_up vk_right vk_down vk_printscreen vk_insert vk_delete vk_0 vk_1 vk_2 vk_3 vk_4 vk_5 vk_6 vk_7 vk_8 vk_9 vk_semicolon ...
Manipulating Lists - Archive of obsolete content
for instance, the additemtoselection() function adds a new item to the set of selected items, without clearing the existing selection.
Modifying a XUL Interface - Archive of obsolete content
they set or clear the corresponding attribute as necessary.
XUL Structure - Archive of obsolete content
this naming scheme isn't necessary, but this is a common convention to make the parts of a package clearer.
XUL Changes for Firefox 1.5 - Archive of obsolete content
this is used typically on gnome systems where possible values are: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network.
button - Archive of obsolete content
possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network.
menulist - Archive of obsolete content
if the text does not match any of the items in the list, the menu selection is cleared.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
if true, the focus will not be reset, although it will be cleared if the focus is within the panel.
preference - Archive of obsolete content
for a textbox it also clears the undo transaction list (gecko 1.9).
preferences - Archive of obsolete content
note: it's not clear which of the following methods and properties are public.
textbox - Archive of obsolete content
for a textbox it also clears the undo transaction list (gecko 1.9).
Getting started with XULRunner - Archive of obsolete content
this will become clearer when we see how the “chrome://” uri is used.
application/http-index-format specification - Archive of obsolete content
this data is not intended for display to the end user and is only meant as a comment to make the file format clear to a human interpreter.
reftest opportunities files - Archive of obsolete content
it is not always clear why particular files were checked in, but one presumes that something needed to be checked.
2006-10-20 - Archive of obsolete content
however, detail info of the problem is not clear, no futher suggestion or solution is provided thus far.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
the rss 2.0 specification clearly states that “entity-encoded html is allowed“ and even provides examples showing exactly the syntax above (using cdata and unencoded html).
Introduction to Public-Key Cryptography - Archive of obsolete content
the client sends the name and password across the network, either in the clear or over an encrypted ssl connection.
Developing cross-browser and cross-platform pages - Archive of obsolete content
ment.getelementbyid(id_attribute_value).style.visibility = "hidden"; }; } // example: // <button type="button" onclick="hideelement('d1');">hide div</button> // <div id="d1">some text</div> these repeated calls to document.getelementbyid are not the most efficient way to check for the existence of particular objects or features in the browser's dom implementation, but they serve to illustrate clearly how object support detection works.
Using the W3C DOM - Archive of obsolete content
it should be clear that translating scripts to modify document content is not a trivial undertaking.
::-ms-expand - Archive of obsolete content
r-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-clear specifications not part of any specification.
CSS - Archive of obsolete content
ArchiveWebCSS
uto-generated because a user created a sub-page to this page.::-ms-browsethe ::-ms-browse css pseudo-element is a microsoft extension that represents the button that opens the file picker of <input type="file">.::-ms-checkthe ::-ms-check css pseudo-element is a microsoft extension that represents checkboxes and radio button groups created by <input type="checkbox"> and <input type="radio">.::-ms-clearthe ::-ms-clear css pseudo-element creates a clear button at the edge of an <input type="text"> text control that clears the current value.
E4X for templating - Archive of obsolete content
r b = <bar>{function () { var content = <></>; for each (var el in a) { el.@att = 'val'; content += el; } return content; }()}</bar>; giving: <bar> <b att="val"/> <c att="val"/> <d att="val"/> </bar> one may still wish to remove complex business logic and supply as variables to the e4x, but the above allows the shaping of resulting content to be made more clear (and sometimes design logic also calls for extra processing).
ECMAScript 2015 support in Mozilla - Archive of obsolete content
es] (firefox 41) set (firefox 13) set iteration with for...of (firefox 17) set.prototype.foreach() (firefox 25) set.prototype.entries(), set.prototype.keys(), set.prototype.values() (firefox 24) constructor argument: new set(null) (firefox 37) monkey-patched add() in constructor (firefox 37) get set[@@species] (firefox 41) weakmap (firefox 6) weakmap.clear() (firefox 20) optional iterable argument in weakmap constructor (firefox 36) constructor argument: new weakmap(null) (firefox 37) monkey-patched set() in constructor (firefox 37) weakset (firefox 34) constructor argument: new weakset(null) (firefox 37) monkey-patched add() in constructor (firefox 37) new math functions math.imul() (firefox 20) math.clz32() (fir...
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
it’s clear to see that with just a few lines of code, we can easily take advantage of sql data stores in javascript.
Reference - Archive of obsolete content
cstevens 10:23, 20 december 2006 (pst) we do plan to move the pages around, see core javascript 1.5 reference/reorg, but it's not clear when that will happen.
XForms Upload Element - Archive of obsolete content
representations the xforms upload element is represented by visually combining three widgets: a text field that shows the uri of the selected file, a button to open the file picker dialog which allows the user to select a file, and a button to clear the text field and the reference to the file from the bound node (xhtml only).
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
xerox was clearly ahead of their time in the early 1980’s when they designed and developed the star office system.
Describing microformats in JavaScript - Archive of obsolete content
the microformat is registered with the microformat api by calling microformats.add(), like this: microformats.add("adr", adr_definition); note: to be clear: since the adr microformat is included by default in firefox 3 and later, you don't need to add it yourself if you wish to make use of it.
Displaying a graphic with audio samples - Archive of obsolete content
t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0, canvas.width, canvas.height); ctx.fillstyle = "rgb(255,255,255)"; for (var i = 0; i < signal.length; i++ ) { // multiply spectrum by a zoom value magnitude = signal[i] * 1000; // draw rectangle bars for each frequency bin ctx.fillrect(i * ...
Archive of obsolete content
the new design clearly shows what some experts have been saying: that standards-based design can be visually compelling and preserve the interface conventions we've come to expect from web pages.
Anatomy of a video game - Game development
summary i want to be clear that any of the above, or none of them, could be best for your game.
Desktop mouse and keyboard controls - Game development
if the left arrow is pressed (⬅︎; key code 37), we can set the leftpressed variable to true and in the draw function perform the action assigned to it — move the ship left: function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); if(rightpressed) { playerx += 5; } else if(leftpressed) { playerx -= 5; } if(downpressed) { playery += 5; } else if(uppressed) { playery -= 5; } ctx.drawimage(img, playerx, playery); requestanimationframe(draw); } the draw function first clears the whole canvas — we draw everything f...
Unconventional controls - Game development
when those variables are up-to-date, we can use them in the draw() function to move the ship: function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); // ...
Implementing controls using the Gamepad API - Game development
update() is executed on every frame inside the game loop, to update the actual status of the gamepad object regularly: update: function() { // clear the buttons cache gamepadapi.buttonscache = []; // move the buttons status from the previous frame to the cache for(var k=0; k<gamepadapi.buttonsstatus.length; k++) { gamepadapi.buttonscache[k] = gamepadapi.buttonsstatus[k]; } // clear the buttons status gamepadapi.buttonsstatus = []; // get the gamepad object var c = gamepadapi.controller || {}; // loop through buttons and...
Efficient animation for web games - Game development
for example, it may make sense for animation setup to happen in a settimeout/cleartimeout callback rather than a requestanimationframe callback.
Build the brick field - Game development
ricks[c][r].y = bricky; ctx.beginpath(); ctx.rect(brickx, bricky, brickwidth, brickheight); ctx.fillstyle = "#0095dd"; ctx.fill(); ctx.closepath(); } } } actually drawing the bricks the last thing to do in this lesson is to add a call to drawbricks() somewhere in the draw() function, preferably at the beginning, between the clearing of the canvas and drawing the ball.
Track the score and win - Game development
f(b.status == 1) { if(x > b.x && x < b.x+brickwidth && y > b.y && y < b.y+brickheight) { dy = -dy; b.status = 0; score++; if(score == brickrowcount*brickcolumncount) { alert("you win, congratulations!"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } } } } } } thanks to this, your users can actually win the game when they destroy all the bricks, which is quite important when it comes to games.
Visual typescript game engine - Game development
�� email/ | | | ├── templates/ | | | | ├── confirmation.html.js | | | ├── nocommit.js (no commited for now) | | └── data/ (ignored - db system folder) | ├── rtc/ | | ├── server.ts | | ├── connector.ts | | ├── self-cert/ server part installed database: mongodb@3.1.8 -no typescript here, we need to keep state clear no.
Gecko FAQ - Gecko Redirect 1
orking library (necko) platform-specific graphics rendering and widget sets for win32, x, and mac user preferences library mozilla plug-in api (npapi) to support the navigator plug-in interface open java interface (oji), with sun java 1.2 jvm rdf back end font library security library (nss) original document information author(s): angus other contributors: ekrock, vidur, hidday, drunclear copyright information: portions of this content are © 1998–2006 by individual mozilla.org contributors; content available under a creative commons license ...
ALPN - MDN Web Docs Glossary: Definitions of Web-related terms
important protocol identifiers: protocol identification sequence http/1.1 0x68 0x74 0x74 0x70 0x2f 0x31 0x2e 0x31 ("http/1.1") http/2 0x68 0x32 ("h2") http/2 over cleartext tcp 0x68 0x32 0x63 ("h2c") specifications specification status notes rfc 7301 ietf rfc initial definition.
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
in cryptography, a cipher is an algorithm that can encode cleartext to make it unreadable, and to decode it back.
Ciphertext - MDN Web Docs Glossary: Definitions of Web-related terms
in cryptography, a ciphertext is a scrambled message that conveys information but is not legible unless decrypted with the right cipher and the right secret (usually a key), reproducing the original cleartext.
Decryption - MDN Web Docs Glossary: Definitions of Web-related terms
in cryptography, decryption is the conversion of ciphertext into cleartext.
Encryption - MDN Web Docs Glossary: Definitions of Web-related terms
in cryptography, encryption is the conversion of cleartext into a coded text or ciphertext.
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
unfortunately, there are no clear rules and the way idl attributes behave in conjunction with their corresponding content attributes depends on the attribute.
Object reference - MDN Web Docs Glossary: Definitions of Web-related terms
the concept of object references becomes clear when assigning the same object to more than one property.
Plaintext - MDN Web Docs Glossary: Definitions of Web-related terms
it is frequently used interchangeably with the term cleartext, which more loosely refers to any information, such as a text document, image, etc., that has not been encrypted and can be read by a human or computer without additional processing.
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
if it was not clearly marked which parts of the data were in which character set, other programs and computers would display the text incorrectly, or damage it during processing.
Assessment: Accessibility troubleshooting - Learn web development
the table the data table is not currently very accessible — it is hard for screenreader users to associate data rows and columns together, and the table also has no kind of summary to make it clear what it shows.
WAI-ARIA basics - Learn web development
we will clearly mention any exceptions to this.
What is accessibility? - Learn web development
ing distractions, such as unnecessary content or advertisements; consistent webpage layout and navigation; familiar elements, such as underlined links blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; website authentication as easy as possible without compromising security; and making forms easy to complete, such as with clear error messages and simple error recovery.
Cascade and inheritance - Learn web development
selector six clearly loses to five with a specificity of 23 vs.
Handling different text directions - Learn web development
if we look at an example this will become clearer.
Flexbox - Learn web development
to be clear, let's reiterate what is happening here.
Test your skills: floats - Learn web development
the aim of this task is to get you working with the css float and clear properties covered in our lesson on floats.
How do you make sure your website works properly? - Learn web development
open the console (tools ➤ web developer ➤ web console) and reload the page: in this example, we learn (quite clearly) what the error is, and we can go fix it (we will cover javascript in another series of articles).
How much does it cost to do something on the Web? - Learn web development
“packaged” hosting when you want to publish a website, you could do everything by yourself: set up a database (if needed), content management system, or cms (like wordpress, dotclear, spip, etc.), upload pre-made or your own templates.
What is the difference between webpage, website, web server, and search engine? - Learn web development
let's make it clear: a browser is a piece of software that retrieves and displays web pages; a search engine is a website that helps people find web pages from other websites.
What are browser developer tools? - Learn web development
in safari, the controls are not so clearly presented, but you should see the html if you haven't selected something else to appear in the window.
What are hyperlinks? - Learn web development
external links influence the search ranking both of source and target webpages, but it is unclear by how much.
What is a URL? - Learn web development
let's look at some examples to make this clearer.
What is a Domain Name? - Learn web development
the most generic tlds (.com, .org, .net) don't require web services to meet any particular criteria, but some tlds enforce stricter policies so it is clearer what their purpose is.
What is a web server? - Learn web development
(we'll cover that sort of technology in other articles.) http provides clear rules for how a client and server communicate.
How to build custom form controls - Learn web development
in particular, it's important to clearly define all the states of your control.
How to structure a web form - Learn web development
in the second example, things are a bit clearer — the label read out along with the input is "name star name edit text required", and the labels are still read out separately.
HTML basics - Learn web development
the following is incorrect: <p>my cat is <strong>very grumpy.</p></strong> the elements have to open and close correctly so that they are clearly inside or outside one another.
Define terms with HTML - Learn web development
the clear blue sky of a subtle sadness, melancholy.
Debugging HTML - Learn web development
it isn't clear where the first <strong> element should be closed, so the browser has wrapped each separate block of text with its own strong tag, right down to the bottom of the document!
Getting started with HTML - Learn web development
if you make a mistake, you can clear your work using the reset button.
HTML text fundamentals - Learn web development
the elements we've discussed so far have clearcut associated semantics.
Images in HTML - Learn web development
these are created for exactly this purpose: to provide a semantic container for figures, and to clearly link the figure to the caption.
From object to iframe — other embedding technologies - Learn web development
stay clear of additional security hazards.
Video and audio content - Learn web development
for example: many people have auditory impairments (such as being hard of hearing or deaf) so can't hear the audio clearly if at all.
HTML table advanced features and accessibility - Learn web development
one clear way to do this is by using <thead>, <tfoot>, and <tbody>, which allow you to mark up a header, footer, and body section for the table.
HTML table basics - Learn web development
LearnHTMLTablesBasics
we have already partially answered this question — it is easier to find the data you are looking for when the headers clearly stand out, and the design just generally looks better.
Graceful asynchronous programming with Promises - Learn web development
chaining the blocks together this is a very longhand way of writing this out; we've deliberately done this to help you understand what is going on clearly.
Function return values - Learn web development
our draw() function draws 100 random circles somewhere on an html <canvas>: function draw() { ctx.clearrect(0, 0, width, height); for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fillstyle = 'rgba(255,0,0,0.5)'; ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); ctx.fill(); } } inside each loop iteration, three calls are made to the random() function, to generate a random value for the current circle's x-coordinate, y-coordinate, and radius, respectively.
Test your skills: Functions - Learn web development
you'll want to clear the canvas before drawing, so that when the code is updated in the case of the live version, you don't get lots of rectangles drawn on top of one another.
A first splash into JavaScript - Learn web development
if it is, the player has guessed correctly and the game is won, so we show the player a congratulations message with a nice green color, clear the contents of the low/high guess information box, and run a function called setgameover(), which we'll discuss later.
JavaScript object basics - Learn web development
it will all become clearer later on.
Object-oriented JavaScript for beginners - Learn web development
i\'m ' + this.name + '.'); } }); using the create() method constructors can help you give your code order—you can create constructors in one place, then create instances as needed, and it is clear where they came from.
Object prototypes - Learn web development
let's look at an example to make this a bit clearer.
The business case for web performance - Learn web development
in this section, we discuss creating a clear business-case to convince decision-makers to make the investment.
Introduction to the server side - Learn web development
facebook's algorithm for highlighting content and advertising can be a bit of a mystery, but it is clear that it does depend on your likes and viewing habits!
Server-side web frameworks - Learn web development
are the documents clear?
Getting started with Ember - Learn web development
ember has clear conventions that are useful for enforcing consistency and helping team members get up to speed quickly.
Framework main features - Learn web development
in javascript, that function could be written like this: function add(a, b) { return a + b; } this code might be trivial for someone accustomed to javascript, but it could still be clearer.
React interactivity: Events and state - Learn web development
as a matter of good practice, you should clear the input after your form submits, so we'll call setname() again with an empty string to do so: function handlesubmit(e) { e.preventdefault(); props.addtask(name); setname(""); } at last, you can type something into the input field in your browser and click add — whatever you typed will appear in an alert dialog.
Beginning our React todo list - Learn web development
height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } .todo-text:focus { box-shadow: inset 0 0 0 2px; } /* checkbox styles */ .c-cb { box-sizing: border-box; font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; display: block; position: relative; min-height: 44px; padding-left: 40px; clear: left; } .c-cb > label::before, .c-cb > input[type="checkbox"] { box-sizing: border-box; top: -2px; left: -2px; width: 44px; height: 44px; } .c-cb > input[type="checkbox"] { -webkit-font-smoothing: antialiased; cursor: pointer; position: absolute; z-index: 1; margin: 0; opacity: 0; } .c-cb > label { font-size: inherit; font-family: inherit; line-height: inherit; disp...
Starting our Svelte Todo list app - Learn web development
height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } .todo-text:focus { box-shadow: inset 0 0 0 2px; } /* checkbox styles */ .c-cb { box-sizing: border-box; font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; display: block; position: relative; min-height: 44px; padding-left: 40px; clear: left; } .c-cb > label::before, .c-cb > input[type="checkbox"] { box-sizing: border-box; top: -2px; left: -2px; width: 44px; height: 44px; } .c-cb > input[type="checkbox"] { -webkit-font-smoothing: antialiased; cursor: pointer; position: absolute; z-index: 1; margin: 0; opacity: 0; } .c-cb > label { font-size: inherit; font-family: inherit; line-height: inherit; disp...
TypeScript support in Svelte - Learn web development
(ts) (message, ms) => { you can fix these by specifying the corresponding types, like so: export let ms = 3000 let visible: boolean let timeout: number const onmessagechange = (message: string, ms: number) => { cleartimeout(timeout) if (!message) { // hide alert if message is empty note: there's no need to specify the ms type with export let ms:number = 3000 because typescript is already inferring it from its default value.
Componentizing our Svelte app - Learn web development
components can be big or small, but they are usually clearly defined: the most effective components serve a single, obvious purpose.
Getting started with Svelte - Learn web development
it's main current disadvantages are that it is a young framework — its ecosystem is therefore more limited in terms of tooling, support, plugins, clear usage patterns, etc.
Dynamic behavior in Svelte: working with variables and props - Learn web development
besides, it's a good practice to make our code clear and explicit about what information it is using.
Vue conditional rendering: editing existing todos - Learn web development
result: onsubmit() method is invoked, which checks that the new label is not empty, then emits the todo-added event (which is then listened for inside app.vue, see above), and finally clears the new label <input>.
Getting started with Vue - Learn web development
a clearer vue vue is a modern javascript framework that provides useful facilities for progressive enhancement — unlike many other frameworks, you can use vue to enhance existing html.
Adding a new todo form: Vue events, methods, and models - Learn web development
update your todoform component’s onsubmit() method to this: onsubmit() { if(this.label === "") { return; } this.$emit('todo-added', this.label); this.label = ""; } now when you click the "add" button, the "new-todo-input" will clear itself.
Focus management with Vue refs - Learn web development
however, unlike with the edit form, we don’t have a clear location for focus to move to when an element is deleted.
Styling Vue components with CSS - Learn web development
; appearance: none; } .custom-checkbox > input:focus { outline: 3px dashed #fd0; outline-offset: 0; box-shadow: inset 0 0 0 2px; } .custom-checkbox { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; display: block; position: relative; min-height: 40px; margin-bottom: 10px; padding-left: 40px; clear: left; } .custom-checkbox > input[type="checkbox"] { -webkit-font-smoothing: antialiased; cursor: pointer; position: absolute; z-index: 1; top: -2px; left: -2px; width: 44px; height: 44px; margin: 0; opacity: 0; } .custom-checkbox > .checkbox-label { font-size: inherit; font-family: inherit; line-height: inherit; display: inline-block; margin-bottom: 0; padding: 8p...
Understanding client-side JavaScript frameworks - Learn web development
we'll also wire up our "clear completed" button.
Implementing feature detection - Learn web development
r browsers with modern flexbox */ .flexbox main { display: flex; } .flexbox main div { padding-right: 4%; flex: 1; } .flexbox main div:last-child { padding-right: 0; } /* fallbacks for browsers that don't support modern flexbox */ .no-flexbox main div { width: 22%; float: left; padding-right: 4%; } .no-flexbox main div:last-child { padding-right: 0; } .no-flexbox footer { clear: left; } so how does this work?
Handling common HTML and CSS problems - Learn web development
</div> <div> <label for="time">enter a time:</label> <input id="time" type="time"> </div> </form> the output of this code is as follows: hidden example label { float: left; width: 30%; text-align: right; } input { float: right; width: 65%; } label, input { margin-bottom: 20px; } div { clear: both; margin: 10px; } body { width: 400px; margin: 0 auto; } <form> <div> <label for="date">enter a date:</label> <input id="date" type="date"> </div> <div> <label for="time">enter a time:</label> <input id="time" type="time"> </div> </form> note: you can also see this running live as for...
Handling common JavaScript problems - Learn web development
we'd like to make it clear that we can't take credit for this code — it was originally written by philip walton.
Command line crash course - Learn web development
we’ve alluded to this before, but to be clear — you need to be careful with the terminal.
Deploying our app - Learn web development
keep them short, concise, and descriptive, so they clearly describe what the change does.
Introducing a complete toolchain - Learn web development
note: though it's not clear from the install process, installing npm also installs a complimentary tool called npx.
Accessibility information for UI designers and developers
for form elements, it should be clear what kind of input is expected.
Mozilla’s UAAG evaluation report
clearly identifying internal vs.
Choosing the right memory allocator
pr_alloc() (do not use, no users and only exists in /security/; use pr_malloc() instead) pr_malloc() == pr_malloc pr_calloc() == pr_calloc pr_realloc() == pr_realloc pr_free() pr_new (pass in a struct to allocate its size) pr_newzap (same as pr_new, but zeros memory) pr_delete (pr_free() and also clears the pointer) pr_freeif special cases pr_smprintf(), pr_sprintf_append(), pr_vsmprintf() and pr_vsprintf_append() must be freed with pr_smprintf_free() pl_strdup(), pl_strndup() must be freed with pl_strfree() nscrt::strdup/nscrt::strndup must be freed with nscrt::free allocating memory within plugins there are special memory allocation routines specifically intended for use from p...
Command line options
-purgecaches gecko (layout engine) has a javascript cache, which is not reset on startup, this clears it.
Debugging Frame Reflow
sometimes the log is clearer if only the main frames are shown.
Contributing to the Mozilla code base
the bug itself may contain a clear indication of the best person to ask for a review are there related bugs on similar topics?
Displaying Places information using views
for these objects to be freed during javascript garbage collection, you must clear this cycle by calling result.removeobserver(view).
Performance best practices for Firefox front-end engineers
sometimes, our graphics layer invalidates regions in ways that might not be clear to you, and a section outside of the thing that just repainted will also repaint.
mozbrowserfindchange
this includes htmliframeelement.findall(), htmliframeelement.findnext(), and htmliframeelement.clearmatch().
HTML parser threading
pending tree ops in the tree builder are cleared.
Hacking with Bonsai
when the tree is re-opened, the web page is updated and the hook is cleared.
How to implement a custom autocomplete search component
tips clear caches!
IME handling guide
when a composition is committed and it receives notify_ime_of_composition_event_handled, tsftextstore clears the cache of contents and notifying tsf of merged text changes and the last selection change if they are not caused by composition.
Extending a Protocol
} if the above additions are unclear, please see the final implementation of pecho as a diff in phabricator - search for "pwindowglobal.ipdl".
PBackground
these are not small files (actorsparent.cpp was over 27k lines of code as of this publication) but the logic that needs to run in the parent is very clearly separated from the dom code no matter what thread it's running on.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
as the internet has spread to non-english speaking people around the world, it has become increasingly clear that forcing them to use domain names written only in a subset of the latin alphabet is not ideal.
CustomizableUI.jsm
this is the nuclear option.
DownloadLastDir.jsm
when history is cleared when the user's browsing history is cleared, the value of the last download directory path is restored to the platform's default download directory path.
Sqlite.jsm
this is a glorified wrapper around the pragma shrink_memory statement, which tells sqlite to shrink its memory usage (by clearing caches, etc).
Webapps.jsm
getappbylocalid: function(alocalid) getmanifesturlbylocalid: function(alocalid) getapplocalidbymanifesturl: function(amanifesturl) getcoreappsbasepath: function() getwebappsbasepath: function() _islaunchable: function(aapp) _notifycategoryandobservers: function(subject, topic, data, msg) registerbrowserelementparentforapp: function(amsg, amn) receiveappmessage: function(appid, message) _clearprivatedata: function(appid, browseronly, msg) _sendprogressevent: function() updatestatechanged: function appobs_update(aupdate, astate) applicationcacheavailable: function appobs_cacheavail(aapplicationcache) ...
Mozilla Content Localized in Your Language
for example, "cancel", "clear history", "add email", "select all", etc.
Localization and Plurals
usage here are a couple terms used in this page to help keep things clear: plural rule: for a given language, there is a grammatical rule on how to change words, depending on the number qualifying the word.
Localization content best practices
note also the localization comments and make sure it is clear to the localizer which placeholder string will appear in lieu of the placeholder as this may affect translation and/or inflection.
Creating localizable web content
text content check that the text is factually correct for an international audience (e.g., mentions of en-us specific product pieces like specific search engines or dictionary should be adapted) look for strings that are likely hard to translate because they are unclear, use play on words or colloquialisms.
Using the viewport meta tag to control layout on mobile browsers
working draft non-normatively describes the viewport meta element there is clearly demand for the viewport meta tag, since it is supported by most popular mobile browsers and used by thousands of web sites.
Mozilla Development Strategies
you don't want to have one tree, update it every morning, and then be stuck waiting for blockers to clear.
Measuring performance using the PerfMeasurement.jsm code module
when you're done benchmarking, you can read out each of the counters you asked for as properties: let report = "cpu cycles: " + monitor.cpu_cycles + "\n" + "cache refs: " + monitor.cache_references + "\n" + "cache misses: " + monitor.cache_misses + "\n"; monitor.reset(); alert(report); the reset() method clears all of the enabled counters, as you might expect.
Memory Profiler
start - start profiling stop - stop profiling reset - clear profile data when profiler is stopped profile data is accumulated and resumed after start.
Refcount tracing and balancing
hints clearly, this is an iterative and analytical process.
Scroll-linked effects
ination - window.scrolly) < 3) { scrollto(window.scrollx, destination); } else if (math.abs(destination - window.scrolly) < 200) { scrollto(window.scrollx, window.scrolly + ((destination - window.scrolly) / 2)); settimeout(snap, 20, destination); } } var timeoutid = null; addeventlistener("scroll", function() { if (timeoutid) cleartimeout(timeoutid); timeoutid = settimeout(snap, 200, parseint(document.getelementbyid('snaptarget').style.top)); }, true); </script> <div id="snaptarget" class="snaptarget" style="position: relative; top: 200px; width: 100%; height: 200px; background-color: green"></div> </body> in this example, there is a scroll event listener which detects if the scroll position is within 200 pix...
about:memory
it's clear that the cnn.com tab is using more memory than the techcrunch.com tab, which is using more than the arstechnica.com tab.
dtrace
it's unclear how to improve upon this.
perf
performance counter stats for 'system wide': 51.58 joules power/energy-pkg/ [100.00%] 14.80 joules power/energy-cores/ [100.00%] 9.93 joules power/energy-gpu/ [100.00%] 27.38 joules power/energy-ram/ [100.00%] 5.003049064 seconds time elapsed it's not clear from the output, but the following relationship holds.
Phishing: a short definition
as most phishing attacks start with unsolicited email messages, a clear starting point is improving spam filters, thus reducing the number of fraudulent messages reaching users.
Leak Monitor
it will pop-up an alert when a window is closed and javascript still links to that window (for example, an observer that is not cleared when the window closes).
McCoy
mozilla calls mccoy a "simple system" which is a clear sign that something probably is not working, and indeed, is not.
NSPR Contributor Guide
it must be your own invention, free and clear of encumberment of anyone or anything else; pay close attention to the rights of your "day-job" employer.
Introduction to NSPR
however, because of the multiple strategies to provide execution vehicles for threads on various host platforms, priorities are not a clearly defined abstraction in nspr.
PLHashEnumerator
remark the meaning of ht_enumerate_unhash is not clear.
PR_Calloc
all bytes in the allocated memory are cleared.
PR_GetThreadPrivate
do not delete the object that the private data refers to without first clearing the thread's value.
PR_NEWZAP
allocates and clears memory from the heap for an instance of a given type.
Certificate functions
nss versions cert_addcerttolisttail mxr 3.2 and later cert_addextension mxr 3.5 and later cert_addocspacceptableresponses mxr 3.6 and later cert_addokdomainname mxr 3.4 and later cert_addrdn mxr 3.2.1 and later cert_asciitoname mxr 3.2 and later cert_cachecrl mxr 3.10 and later cert_clearocspcache mxr 3.11.7 and later cert_certchainfromcert mxr 3.2 and later cert_certlistfromcert mxr 3.2 and later cert_certtimesvalid mxr 3.2 and later cert_changecerttrust mxr 3.2 and later cert_checkcertvalidtimes mxr 3.2 and later cert_checknamespace mxr 3.12 and later cert_checkcertusage m...
NSS FAQ
MozillaProjectsNSSFAQ
exports (including those (a) on the bureau of industry and security denied parties list or entity list, (b) on the office of foreign assets control list of specially designated nationals and blocked persons, and (c) involved with missile technology or nuclear, chemical or biological weapons).
JSS Provider Notes
since these problems lie deep in the nss design and implementation, there is no clear timeframe for fixing them.
Mozilla-JSS JCA Provider notes
since these problems lie deep in the nss design and implementation, there is no clear timeframe for fixing them.
NSS 3.16.2 release notes
new macros in sslerr.h ssl_error_next_protocol_no_callback - an ssl error code that means the next protcol negotiation extension was enabled, but the callback was cleared prior to being needed.
NSS 3.35 release notes
this makes it clearer, that options can have values other than 0 or 1.
NSS 3.54 release notes
bug 1644774 - ssl gtests to use clearservercache when resetting self-encrypt keys.
NSS Sample Code Sample_2_Initialization of NSS
try again.\n"); } /* clear out the duplicate password string */ if (p1) { port_memset(p1, 0, port_strlen(p1)); port_free(p1); } fclose(input); fclose(output); return p0; } /* change the password */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; ch...
NSS Sample Code sample4
bencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != secsuccess) { fprintf(stderr, "encrypt with public key failed (err %d)\n", pr_geterror()); goto cleanup; } pvtkey = pk11_findkeybyanycert(cert, null); if (pvtkey == null) { fprintf(stderr, "couldn't find private key for cert testca (err %d)\n", pr_geterror()); goto cleanup; } /* clear buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= '\0'; } /* decrypt buf2, result will be in buf1 */ rv = pk11_pubdecryptraw(pvtkey, buf1, &outlen, modulus_len, buf2, modulus_len); if (rv != secsuccess) { fprintf(stderr, "decrypt with private key failed (err %d)\n", pr_geterror()); goto cleanup; } fprintf(stderr, "result of decryp...
NSS Sample Code sample5
ink it is even * ignored */ pk11_importderprivatekeyinfoandreturnkey(slot, &der, null, null, pr_false, pr_true, ku_all, &pvtkey, null); secitem_freeitem(&der, pr_false); if (pvtkey == null) { fprintf(stderr, "couldn't extract private key (err %d)\n", pr_geterror()); goto cleanup; } /* clear buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= '\0'; } /* decrypt buf2, result will be in buf1 */ rv = pk11_pubdecryptraw(pvtkey, buf1, &outlen, modulus_len, buf2, modulus_len); if (rv != secsuccess) { fprintf(stderr, "decrypt with private key failed (err %d)\n", pr_geterror()); goto cleanup; } fprintf(stderr, "result of decryp...
NSS Sample Code sample6
the symmetric keys can then be used * without ever exposing them in the clear.
Initialize NSS database - sample 2
try again.\n"); } /* clear out the duplicate password string */ if (p1) { port_memset(p1, 0, port_strlen(p1)); port_free(p1); } fclose(input); fclose(output); return p0; } /* * changepw */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; char *oldpw =...
FC_DigestFinal
description fc_digestfinal finishes a multi-part digest operation by returning the complete digest and clearing the operation context.
FC_FindObjectsFinal
description clears the object search criteria for a session.
FC_SignFinal
description fc_signfinal finishes a multi-part signing operation by returning the complete signature and clearing the operation context.
NSS tools : modutil
clearing the default provider has the same format: modutil -undefault "nss internal pkcs #11 module" -dbdir -mechanisms md2:md5 enabling and disabling modules and slots modules, and specific slots on modules, can be selectively enabled or disabled using modutil.
NSS tools : ssltab
if you wish to capture a full ssl handshake, restart the browser to clear the session id cache.
NSS tools : ssltap
if you wish to capture a full ssl handshake, restart the browser to clear the session id cache.
NSS reference
ssl_configserversessionidcache ssl_clearsessioncache s/mime based on the s/mime reference (which only has one written chapter) and "s/mime functions" in nss public functions.
OLD SSL Reference
ssl initialization functions nss_init nss_initreadwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache initializing multi-processing with a shared ssl server cache ssl_configmpserversidcache ssl_inheritmpserversidcache ssl export policy functions nss_setdomesticpolicy nss_setexportpolicy ...
ssltyp.html
syntax #include <seccomon.h> #include <prtypes.h> #include <secport.h> typedef enum { sibuffer, sicleardatabuffer, sicipherdatabuffer, sidercertbuffer, siencodedcertbuffer, sidernamebuffer, siencodednamebuffer, siasciinamestring, siasciistring, sideroid } secitemtype; typedef struct secitemstr secitem; struct secitemstr { secitemtype type; unsigned char *data; unsigned int len; }; description a secitem structure can be used to associate your own data ...
SSL functions
.2 and later ssl_canbypass mxr 3.11.7 and later ssl_cipherpolicyget mxr 3.2 and later ssl_cipherpolicyset mxr 3.2 and later ssl_cipherprefget mxr 3.2 and later ssl_cipherprefgetdefault mxr 3.2 and later ssl_cipherprefset mxr 3.2 and later ssl_cipherprefsetdefault mxr 3.2 and later ssl_clearsessioncache mxr 3.2 and later ssl_configmpserversidcache mxr 3.2 and later ssl_configsecureserver mxr 3.2 and later ssl_configserversessionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_get...
NSS Tools modutil
r temporary-directory] deleting a specific pkcs #11 module from a security module database: -delete modulename initializing or changing a token's password: -changepw tokenname [-pwfile old-password-file] [-newpwfile new-password-file] setting the default provider status of various security mechanisms in an existing pkcs #11 module: -default modulename -mechanisms mechanism-list clearing the default provider status of various security mechanisms in an existing pkcs #11 module: -undefault modulename -mechanisms mechanism-list enabling a specific slot or all slots within a module: -enable modulename [-slot slotname] disabling a specific slot or all slots within a module: -disable modulename [-slot slotname] enabling or disabling fips 140-2 compliance within the ne...
NSS Tools ssltap
if you wish to capture a full ssl handshake, restart the browser to clear the session id cache.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
clearing the default provider has the same format: modutil -undefault "nss internal pkcs #11 module" -dbdir -mechanisms md2:md5 enabling and disabling modules and slots modules, and specific slots on modules, can be selectively enabled or disabled using modutil.
NSS tools : signtool
note that versions 1.1 and later of netscape signing tool correctly recognizes the codebase attribute, allows paths to be expressed for the class and src attributes instead of filenames only, processes link tags and parses html correctly, and offers clearer error messages.
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
if you wish to capture a full ssl handshake, restart the browser to clear the session id cache.
SpiderMonkey Build Documentation
building your application while "how to build your complete application" is clearly out of scope for this document, here are some tips that will help get you on your way: the spidermonkey developers frequently and deliberately change the jsapi abi.
GCIntegration - SpiderMonkey Redirect 1
however, this search misses some cases like the wrapper cache, where clearwrapper() is called directly from a finalizer.
Hacking Tips
// but if a different bit changes (either set or cleared), you may still stop // execution if the $mask bit happened to already be set.
64-bit Compatibility
lir safety it is not immediately clear from reading lir which opcodes should be used for 64-bit safety.
Invariants
all jsshapes in property trees have it cleared.
SpiderMonkey Internals: Thread Safety
*/ js_endrequest(cx); js_clearcontextthread(cx); it isn't a bottleneck; multiple threads are allowed to be in requests on the same jsruntime at once.
Introduction to the JavaScript shell
note: clear() with no parameters really clears everything.
JS::AutoVectorRooter
void clear() clears all elements.
JSAutoByteString
void clear() free the owned string.
JSDeletePropertyOp
js_clearscope does not call this hook either.
JSRuntime
earlier versions allowed using js_clearcontextthread and other functions to move a jscontext from one thread to another.
JS_DeleteElement
to remove all elements and properties from an object, call js_clearscope.
JS_DeleteElement2
to remove all properties from an object, call js_clearscope.
JS_DeleteProperty
to remove all properties from an object, call js_clearscope.
JS_DeleteProperty2
there is no longer any way to get this behavior.) to remove all properties from an object, call js_clearscope.
JS_ReportPendingException
on success, it clears the exception as though by calling js_clearpendingexception and returns true.
JS_RestoreExceptionState
if no exceptions were pending when calling js_saveexceptionstate, any pending exception for the context will likewise be cleared.
JS_SaveExceptionState
description saves the current exception state (that is, any pending exception, or a cleared exception state) associated with the specified context cx, and returns a jsexceptionstate object holding this state.
JS_SetAllNonReservedSlotsToUndefined
syntax void js_setallnonreservedslotstoundefined(jscontext *cx, jsobject *objarg); name type description cx jscontext * the context in which to clear the object.
JS_SetOperationCallback
js_clearoperationcallback clears the current operation callback.
JS_SetPendingException
see also mxr id search for js_setpendingexception js_isexceptionpending js_getpendingexception js_clearpendingexception js_reportpendingexception ...
JS_SetRegExpInput
see also mxr id search for js_setregexpinput js_newregexpobject js_newucregexpobject jsreg_multiline js_clearregexpstatics regexp ...
JS_SetThreadStackLimit
(see also js_setcontextthread and js_clearcontextthread.) see also mxr id search for js_setthreadstacklimit js_setnativestackquota bug 723021 ...
JS_THREADSAFE
for such cases, use js_clearcontextthread and js_setcontextthread to transfer the context safely from one thread to another.
JSDBGAPI
breakpoints js_settrap js_gettrapopcode js_cleartrap js_clearscripttraps js_clearalltraps js_handletrap js_setinterrupt js_clearinterrupt watchpoints js_setwatchpoint js_clearwatchpoint js_clearwatchpointsforobject js_clearallwatchpoints 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 17
js_isscriptframe jsclass_new_resolve_gets_start flag js_newnumbervalue js_finalizestub js_clearnewbornroots jsclass_mark_is_trace flag js_setscriptstackquota api changes break out and discuss all api changes here...
SpiderMonkey 38
g 952650) jsval_is_int (bug 952650) jsval_is_null (bug 952650) jsval_is_number (bug 952650) jsval_is_primitive (bug 952650) jsval_is_string (bug 952650) jsval_is_void (bug 952650) jsval_to_boolean (bug 952650) jsval_to_double (bug 952650) jsval_to_gcthing (bug 952650) jsval_to_int (bug 952650) jsval_to_object (bug 952650) jsval_to_private (bug 952650) jsval_to_string (bug 952650) js_clearnonglobalobject (bug 1043281) js_clonefunctionobject (bug 1089026) js_compilefunction (bug 1089026) js_compileucfunction (bug 1089026) js_convertarguments (bug 1125784) js_convertargumentsva (bug 1125784) js_convertstub (bug 1103152) js_defineownproperty (bug 1017323) js_deletepropertystub (bug 1103152) js_doubletoint32 (bug 1112774) js_doubletouint32 (bug 1112774) js_enumeratestub (bug...
Redis Tips
keys: ptu:nextval an iterator ptu:mailq a queue (list) of incoming verification emails ptu:emails:staging a zset of emails being staged, sorted by creation date ptu:emails:valid a zset of email accounts ready for use, sorted by creation date ptu:email:<email>:passwd the password for an email account the ptu: prefix makes it extra clear what these keys are for.
Handling Mozilla Security Bugs
disclosure is done by clearing the bug's "security-sensitive" flag, after which the bug will revert to being an ordinary bug.
Using the Places history service
this is used by the "clear history" button to determine if there are any pages in history.
Avoiding leaks in JavaScript XPCOM components
mozilla's javascript engine uses one of the most common garbage collection algorithms, mark and sweep, in which the garbage collector clears the mark bit on each object, sets the mark bits on all roots and all objects reachable from them, and then finalizes all objects not marked and returns the memory they used to the heap.
An Overview of XPCOM
in addition to writing well-commented code that tells the client developer the rules about init(), the developer can take a couple steps to make this contract even clearer.
Finishing the Component
if you want to be protected against changes in gecko, you must only use interfaces and apis that are clearly marked as frozen.
Preface
the goal is to use as few formats as possible, but to distinguish the various different types of information clearly.
Starting WebLock
this becomes clear when when you see the implementation of setsites: ns_imethodimp weblock::setsites(nsisimpleenumerator * asites) { prbool more = pr_true; while (more) { nscomptr<nsisupports> supports; asites->getnext(getter_addrefs(supports)); nscomptr<nsisupportscstring> supportsstring = do_queryinterface(supports); if (supportsstring) { nsembedcstring url; supportsstrin...
Using XPCOM Components
services versus regular instances whether to have clients use your component as an instance or a service is a design question, really, and something you should be clear about in the documentation for your component.
Using XPCOM Utilities to Make Things Easier
clearly from a code maintenance point of view, this kind of reduction is outstanding.
XPCOM hashtable guide
all of these hashtable classes can be iterated over via the iterator class and cleared via the clear method.
Mozilla internal string guide
const nscstring&: ""_ns for 8-bit literals, converting implicitly to const nscstring& u""_ns for 16-bit literals, converting implicitly to const nsstring& the benefits of the user-defined literals may seem unclear, given that nsdependentcstring will also wrap a string value in an nscstring.
Components.utils.unload
example you can unload a module called mymodule.jsm using the following line of code: components.utils.unload("resource://myaddon/modules/mymodule.jsm"); note: currently components.utils.unload clears the global object of an unloaded module.
mozIAsyncFavicons
you should always set this param unless you are clearing an icon.
mozIPersonalDictionary
endsession() clears the ignore list.
nsIAsyncInputStream
this parameter may be null to clear an existing callback.
nsIAsyncOutputStream
this parameter may be null to clear an existing callback.
nsIAuthInformation
the password should not be shown in clear.
nsIBrowserHistory
single removals are not subject to individual notification; instead, nsinavhistoryobserver.onclearhistory() is called on the history observer.
nsIClipboard
it does not clear the native clipboard.
nsIClipboardCommands
selectnone() clear the current selection (if any).
nsIContentPrefService
useful for removing references to the sites the user has visited when the user clears their private data.
nsICookieService
cleared the entire cookie list was cleared.
nsIDNSService
any pending asynchronous requests will be canceled, and the local cache of dns records will be cleared.
nsIFrameLoader
this will clear the weak owner content reference.
nsIJumpListBuilder
methods abortlistbuild() aborts and clears the current jump list build.
nsILivemarkService
siteuri nsiuri object representing the site uri, or null to clear the site uri for this livemark container.
nsILoginManagerStorage
this is called by the browser sanitization feature when the user asks to clear all stored passwords.
nsIMsgFilter
g headersize, out boolean result ) logrulehit() void nsimsgfilter::logrulehit ( in nsimsgruleaction afilteraction, in nsimsgdbhdr aheader ) createaction() nsimsgruleaction nsimsgfilter::createaction ( ) getactionat() nsimsgruleaction nsimsgfilter::getactionat (in long aindex) appendaction() void nsimsgfilter::appendaction (in nsimsgruleaction action ) clearactionlist() void nsimsgfilter::clearactionlist() getsortedactionlist() void nsimsgfilter::getsortedactionlist (in nsisupportsarray actionlist) ...
nsIMsgFilterList
stream ) writewstrattr() void nsimsgfilterlist::writewstrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutputstream stream ) matchorchangefiltertarget() boolean nsimsgfilterlist::matchorchangefiltertarget ( in acstring olduri, in acstring newuri, in boolean caseinsensitive ) clearlog() void nsimsgfilterlist::clearlog () ensurelogfile() void nsimsgfilterlist::ensurelogfile () flushlogifnecessary () void nsimsgfilterlist::flushlogifnecessary () const const nsmsgfilterfileattribvalue nsimsgfilterlist::attribnone = 0 const nsmsgfilterfileattribvalue nsimsgfilterlist::attribversion = 1 const nsmsgfilterfileattribvalue nsimsgfilterlist::attriblogging = 2 const ns...
nsINavHistoryService
this can be used in ui to determine whether the "clear history" button should be enabled or not.
nsIPermissionManager
data : "cleared" the entire permission list was cleared.
nsIPrincipal
maybedowngradetocodebase) clearer.
nsITreeView
settree() called when setting or clearing the view on the tree to link the view to or disconnect the front end box object.
nsIURI
cloneignoringref() clones the current uri, clearing the 'ref' attribute in the clone.
nsIWebContentHandlerRegistrar
so lets restore it back to false, which is the default value services.prefs.clearuserpref('gecko.handlerservice.allowregisterfromdifferenthost'); } register a webmail service as mailto handler without contentwindow under construction.
nsIWindowWatcher
if this is null the callback will be cleared and window creation capabilities lost.
Weak reference
it's clear, therefore, that the weak reference can't be aggregated to the target object.
XPIDL
in other words, some changes made to idl interfaces require the author to modify the unique identifier (iid) in order to make it clear to plugins that utilize these interfaces that they have changed, and thus their plugin must be recompiled.
Xray vision
this also makes the semantics of xrays for dom objects clear: they are the same as the dom specification, since that is defined using the webidl, and the webidl also defines the c++ representation.
Folders and message lists
gfolderdisplay.clearselection(): clears the list of selected messages.
Accessibility Inspector - Firefox Developer Tools
select the item to view that type of issue; select the item again to clear the display of issues of that type.
Introduction to DOM Inspector - Firefox Developer Tools
the dom inspector not only presents all this information about pages in a clear and structured way, it gives you way to find and update those structures, and it's simple to access via shortcuts and menus already available in the mozilla browser.
Browser Toolbox - Firefox Developer Tools
when you close the browser toolbox, the setting will be cleared.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
(it is unclear why spanfactory allocated thirteen objects, despite being called only ten times.) source metadata generated from file: js/src/doc/debugger/tutorial-alloc-log-tree.md watermark: sha256:b56f6df61c39dbe19ca1f49752aea42207c804355513f4fea8249bdeb4cb056d changeset: 251fccc1f62b ...
Deprecated tools - Firefox Developer Tools
when evaluating, the input isn't cleared, which makes it possible to quickly iterrate over a snippet of code.
Basic operations - Firefox Developer Tools
on the left, you'll see an entry for the new snapshot, including its timestamp, size, and controls to save or clear this snapshot: clearing a snapshot to remove a snapshot, click the "x" icon: saving and loading snapshots if you close the memory tool, all unsaved snapshots will be discarded.
Examine and edit CSS - Firefox Developer Tools
you can clear the checkbox for a particular class name, to see how the element would appear without that class applied to it.
Animation inspector example: CSS transitions - Firefox Developer Tools
width: 0; transition: opacity 500ms 150ms, width 500ms 150ms; } .icon#selected { filter: grayscale(0%); transform: scale(1.5); } .icon#selected+span { opacity: 1; width: 300px; } javascript content function toggleselection(e) { if (e.button != 0) { return; } if (e.target.classlist.contains("icon")) { var wasselected = (e.target.getattribute("id") == "selected"); clearselection(); if (!wasselected) { e.target.setattribute("id", "selected"); } } } function clearselection() { var selected = document.getelementbyid("selected"); if (selected) { selected.removeattribute("id"); } } document.addeventlistener("click", toggleselection); ...
Page inspector keyboard shortcuts - Firefox Developer Tools
command windows macos linux focus on the search box in the css pane ctrl + f cmd + f ctrl + f clear search box content (only when the search box is focused, and content has been entered) esc esc esc step forward through properties and values tab tab tab step backward through properties and values shift + tab shift + tab shift + tab start editing property or value (rules view only, when a property or value is selected, but not already being e...
How to - Firefox Developer Tools
save a profile to save a profile, click the link labeled "save" in the recordings pane: load a profile to load a profile, click "import..." and choose the file: clear all loaded profiles to clear all loaded profiles, click "clear".
UI Tour - Firefox Developer Tools
the performance tool's ui consists of 4 main pieces: toolbar recordings pane recording overview details pane, which may contain any one of: waterfall call tree flame chart toolbar the toolbar contains buttons to: start and stop a recording import a recording you previously saved clear the recordings pane.
Web console keyboard shortcuts - Firefox Developer Tools
command windows macos linux open the web console ctrl + shift + k cmd + opt + k ctrl + shift + k search in the message display pane ctrl + f cmd + f ctrl + f open the object inspector pane ctrl + click ctrl + click ctrl + click clear the object inspector pane esc esc esc focus on the command line ctrl + shift + k cmd + opt + k ctrl + shift + k clear output ctrl + shift + l ctrl + l from firefox 67: cmd + k ctrl + shift + l command line interpreter these shortcuts apply when you're in the command line interpreter.
AesGcmParams - Web APIs
note that the iv does not have to be secret, just unique: so it is ok, for example, to transmit it in the clear alongside the encrypted message.
AnalyserNode.frequencyBinCount - Web APIs
analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5 - 1; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle =...
AnalyserNode.getByteFrequencyData() - Web APIs
analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rg...
AnalyserNode.getFloatFrequencyData() - Web APIs
network audiosourcenode.connect(analysernode); analysernode.connect(audioctx.destination); //create 2d canvas const canvas = document.createelement('canvas'); canvas.style.position = 'absolute'; canvas.style.top = 0; canvas.style.left = 0; canvas.width = window.innerwidth; canvas.height = window.innerheight; document.body.appendchild(canvas); const canvasctx = canvas.getcontext('2d'); canvasctx.clearrect(0, 0, canvas.width, canvas.height); function draw() { //schedule next redraw requestanimationframe(draw); //get spectrum data analysernode.getfloatfrequencydata(dataarray); //draw black background canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, canvas.width, canvas.height); //draw spectrum const barwidth = (canvas.width / bufferlength) * 2.5; let posx =...
AnalyserNode.getFloatTimeDomainData() - Web APIs
analyser.fftsize = 1024; var bufferlength = analyser.fftsize; console.log(bufferlength); var dataarray = new float32array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getfloattimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i...
AnalyserNode.maxDecibels - Web APIs
analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rg...
AnalyserNode.minDecibels - Web APIs
analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rg...
AnalyserNode.smoothingTimeConstant - Web APIs
analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rg...
Animation.cancel() - Web APIs
WebAPIAnimationcancel
the web animations api's cancel() method of the animation interface clears all keyframeeffects caused by this animation and aborts its playback.
Animation - Web APIs
WebAPIAnimation
methods animation.cancel() clears all keyframeeffects caused by this animation and aborts its playback.
AudioBuffer.getChannelData() - Web APIs
the comments should clearly explain what is going on.
AudioBufferSourceNode - Web APIs
the comments should clearly explain what is going on.
AudioListener - Web APIs
the behavior to adopt when an audiobuffersourcenode was connected to multiple pannernodes was unclear.
BaseAudioContext.createBuffer() - Web APIs
the comment should clearly explain what is going on.
BaseAudioContext.createBufferSource() - Web APIs
the comments should clearly explain what is going on.
BaseAudioContext.decodeAudioData() - Web APIs
when the stop() method is called on the source, the source is cleared out.
Using the CSS Painting API - Web APIs
maybe try float and clear on the headers?
CSS Typed Object Model API - Web APIs
stylepropertymap.clear() method that removes all declarations in the stylepropertymap.
CacheStorage.delete() - Web APIs
examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated.
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated.
CanvasPattern.setTransform() - Web APIs
lrect(0, 0, 400, 400); };</textarea> var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var edit = document.getelementbyid('edit'); var code = textarea.value; var svg1 = document.getelementbyid('svg1'); var matrix = svg1.createsvgmatrix(); function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener('click', function() { textarea.focus(); }) textarea.addeventlistener('input', drawcanvas); window.addeventlistener('load', drawcanvas); specifications specification status comment html l...
CanvasRenderingContext2D.addHitRegion() - Web APIs
hitregion({id: "eyes"}); // mouth ctx.beginpath(); ctx.arc(100, 110, 50, 0, math.pi, false); ctx.stroke();</textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); var textarea = document.getelementbyid("code"); var reset = document.getelementbyid("reset"); var edit = document.getelementbyid("edit"); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }); canvas.addeventlistener("mousemove", function(event){ if(event.region) { alert("ouch, my eye :("); } }); textarea.addeventlistener("input", drawcanvas); window.add...
CanvasRenderingContext2D.arcTo() - Web APIs
} // draw arc const drawarc = function ([p0, p1, p2], r) { ctx.beginpath(); ctx.moveto(p0.x, p0.y); ctx.arcto(p1.x, p1.y, p2.x, p2.y, r); ctx.lineto(p2.x, p2.y); ctx.stroke(); } let t0 = 0; let rr = 0; // the radius that changes over time let a = 0; // angle let pi2 = math.pi * 2; const loop = function (t) { t0 = t / 1000; a = t0 % pi2; rr = math.abs(math.cos(a) * r); ctx.clearrect(0, 0, canvas.width, canvas.height); drawarc([p1, p2, p3], rr); drawpoints([p1, p2, p3]); requestanimationframe(loop); } loop(0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.arcto' in that specification.
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
as> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const button1 = document.getelementbyid('button1'); const button2 = document.getelementbyid('button2'); document.addeventlistener('focus', redraw, true); document.addeventlistener('blur', redraw, true); canvas.addeventlistener('click', handleclick, false); redraw(); function redraw() { ctx.clearrect(0, 0, canvas.width, canvas.height); drawbutton(button1, 20, 20); drawbutton(button2, 20, 80); } function handleclick(e) { // calculate click coordinates const x = e.clientx - canvas.offsetleft; const y = e.clienty - canvas.offsettop; // focus button1, if appropriate drawbutton(button1, 20, 20); if (ctx.ispointinpath(x, y)) { button1.focus(); } // focus button2, if a...
CanvasRenderingContext2D.isPointInPath() - Web APIs
le const circle = new path2d(); circle.arc(150, 75, 50, 0, 2 * math.pi); ctx.fillstyle = 'red'; ctx.fill(circle); // listen for mouse moves canvas.addeventlistener('mousemove', function(event) { // check whether point is inside circle if (ctx.ispointinpath(circle, event.offsetx, event.offsety)) { ctx.fillstyle = 'green'; } else { ctx.fillstyle = 'red'; } // draw circle ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(circle); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinpath' in that specification.
CanvasRenderingContext2D.isPointInStroke() - Web APIs
math.pi); ctx.linewidth = 25; ctx.strokestyle = 'red'; ctx.fill(ellipse); ctx.stroke(ellipse); // listen for mouse moves canvas.addeventlistener('mousemove', function(event) { // check whether point is inside ellipse's stroke if (ctx.ispointinstroke(ellipse, event.offsetx, event.offsety)) { ctx.strokestyle = 'green'; } else { ctx.strokestyle = 'red'; } // draw ellipse ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(ellipse); ctx.stroke(ellipse); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinstroke' in that specification.
CanvasRenderingContext2D.lineDashOffset - Web APIs
html <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let offset = 0; function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.setlinedash([4, 2]); ctx.linedashoffset = -offset; ctx.strokerect(10, 10, 100, 100); } function march() { offset++; if (offset > 16) { offset = 0; } draw(); settimeout(march, 20); } march(); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.lineda...
CanvasRenderingContext2D.miterLimit - Web APIs
="playable-code"> ctx.beginpath(); ctx.moveto(0,0); ctx.linewidth = 15; ctx.lineto(100, 100); ctx.stroke();</textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); var textarea = document.getelementbyid("code"); var reset = document.getelementbyid("reset"); var edit = document.getelementbyid("edit"); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); screenshotlive sample specifications specification status co...
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
tarea id="code" class="playable-code"> ctx.beginpath(); ctx.rect(10, 10, 30, 30); ctx.scrollpathintoview();</textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); var textarea = document.getelementbyid("code"); var reset = document.getelementbyid("reset"); var edit = document.getelementbyid("edit"); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); specifications specification status comment html l...
CanvasRenderingContext2D.setLineDash() - Web APIs
if the array is empty, the line dash list is cleared and line strokes return to being solid.
A basic ray-caster - Web APIs
if you have, then the canvas is cleared, the ground and sky are drawn, the camera position and/or orientation are updated, and the rays are cast out.
Basic usage of canvas - Web APIs
the <canvas> element <canvas id="tutorial" width="150" height="150"></canvas> at first sight a <canvas> looks like the <img> element, with the only clear difference being that it doesn't have the src and alt attributes.
Drawing text - Web APIs
ayable-code"> ctx.font = "48px serif"; ctx.textbaseline = "hanging"; ctx.stroketext("hello world", 0, 100);</textarea> var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); var textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var edit = document.getelementbyid('edit'); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener('click', function() { textarea.focus(); }) textarea.addeventlistener('input', drawcanvas); window.addeventlistener('load', drawcanvas); advanced text measurements in the case you need to obtain more details abo...
Hit regions and accessibility - Web APIs
canvasrenderingcontext2d.clearhitregions() removes all hit regions from the canvas.
Optimizing canvas - Web APIs
try different ways to clear the canvas (clearrect() vs.
Pixel manipulation with canvas - Web APIs
zoomctx.drawimage(canvas, math.min(math.max(0, x - 5), img.width - 10), math.min(math.max(0, y - 5), img.height - 10), 10, 10, 0, 0, 200, 200); because anti-aliasing is enabled by default, we might want to disable the smoothing to see clear pixels.
Canvas tutorial - Web APIs
the examples provided should give you some clear ideas about what you can do with canvas, and will provide code snippets that may get you started in building your own content.
Content Index API - Web APIs
it's good practice to present an interface for clearing out entries, or periodically remove older entries.
Binary strings - Web APIs
WebAPIDOMStringBinary
the reason that brought to use utf-16 code units as placeholders for uint8 numbers is that as web applications become more and more powerful (adding features such as audio and video manipulation, access to raw data using websockets, and so forth) it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
DOMTokenList.value - Web APIs
the value property of the domtokenlist interface is a stringifier that returns the value of the list as a domstring, or clears and sets the list to the given value.
DataTransferItemList.DataTransferItem() - Web APIs
drop: uri = " + s); }); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; // clear any remaining drag data datalist.clear(); } html <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div {...
DataTransferItemList.add() - Web APIs
drop: uri = " + s); }); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'add()' in that specification.
DataTransferItemList.length - Web APIs
drop: uri = " + s); }); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; // clear any remaining drag data datalist.clear(); } html <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div {...
DataTransferItemList.remove() - Web APIs
drop: uri = " + s); }); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } html <h1>example uses of <code>datatransferitemlist</code> methods and property</h1> <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop...
DataTransferItemList - Web APIs
datatransferitemlist.clear() removes all of the drag items from the list.
Document.execCommand() - Web APIs
clearauthenticationcache clears all authentication credentials from the cache.
Document.write() - Web APIs
WebAPIDocumentwrite
note: because document.write() writes to the document stream, calling document.write() on a closed (loaded) document automatically calls document.open(), which will clear the document.
Document - Web APIs
WebAPIDocument
extension for html documents the document interface for html documents inherit from the htmldocument interface or, since html5, is extended for such documents: document.clear() in majority of modern browsers, including recent versions of firefox and internet explorer, this method does nothing.
Events and the DOM - Web APIs
there is an excellent diagram that clearly explains the three phases of event flow through the dom in the dom level 3 events draft.
Using the W3C DOM Level 1 Core - Web APIs
it's a reasonably clear spec, although it is formal.
Element.getClientRects() - Web APIs
when called on svg elements other than an outer-<svg>, the "viewport" that the resulting rectangles are relative to is the viewport that the element's outer-<svg> establishes (and to be clear, the rectangles are also transformed by the outer-<svg>'s viewbox transform, if any).
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
for example, you can erase the entire contents of a document by clearing the contents of the document's body attribute: document.body.innerhtml = ""; this example fetches the document's current html markup and replaces the "<" characters with the html entity "&lt;", thereby essentially converting the html into raw text.
Event.preventDefault() - Web APIs
it's not an elegant function but does the job for the purposes of this example: var warningtimeout; var warningbox = document.createelement("div"); warningbox.classname = "warning"; function displaywarning(msg) { warningbox.innerhtml = msg; if (document.body.contains(warningbox)) { window.cleartimeout(warningtimeout); } else { // insert warningbox after mytextbox mytextbox.parentnode.insertbefore(warningbox, mytextbox.nextsibling); } warningtimeout = window.settimeout(function() { warningbox.parentnode.removechild(warningbox); warningtimeout = -1; }, 2000); } result notes calling preventdefault() during any stage of event flow cancels the event, meani...
FontFaceSet - Web APIs
fontfaceset.clear() removes all manually-added fonts from the font set.
Geolocation - Web APIs
geolocation.clearwatch() secure context removes the particular handler previously installed using watchposition().
Geolocation API - Web APIs
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.
HTMLBRElement - Web APIs
htmlbrelement.clear is a domstring indicating the flow of text around floating objects.
HTMLCanvasElement.getContext() - Web APIs
preservedrawingbuffer: if the value is true the buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
HTMLCanvasElement.toDataURL() - Web APIs
npixlen = apix.length; for (npixel = 0; npixel < npixlen; npixel += 4) { apix[npixel + 2] = apix[npixel + 1] = apix[npixel] = (apix[npixel] + apix[npixel + 1] + apix[npixel + 2]) / 3; } octx.putimagedata(oimgdata, 0, 0); ograyimg = new image(); ograyimg.src = ocanvas.todataurl(); ograyimg.onmouseover = showcolorimg; ocolorimg.onmouseout = showgrayimg; octx.clearrect(0, 0, nwidth, nheight); ocolorimg.style.display = "none"; ocolorimg.parentnode.insertbefore(ograyimg, ocolorimg); } } specifications specification status comment html living standardthe definition of 'htmlcanvaselement.todataurl' in that specification.
HTMLInputElement: search event - Web APIs
current ua implementations of <input type="search"> have an additional control to clear the field.
HTMLMediaElement.play() - Web APIs
if playback fails to start, the playbutton element's class is cleared, restoring its default appearance.
HTML Drag and Drop API - Web APIs
the list object has methods to add a drag item to the list, remove a drag item from the list, and clear the list of all drag items.
Headers - Web APIs
WebAPIHeaders
note: to be clear, the difference between headers.set() and headers.append() is that if the specified header does already exist and does accept multiple values, headers.set() will overwrite the existing value with the new one, whereas headers.append() will append the new value onto the end of the set of values.
IDBDatabase: close event - Web APIs
this could happen, for example, if the underlying storage is removed or if the user clears the database in the browser's history preferences.
IDBObjectStore.delete() - Web APIs
to delete all records in a store, use idbobjectstore.clear.
IDBObjectStore.put() - Web APIs
doing so makes it clear that an existing record will be updated, instead of a new record being inserted.
ImageCapture - Web APIs
og(error)); } /* utils */ function drawcanvas(canvas, img) { canvas.width = getcomputedstyle(canvas).width.split('px')[0]; canvas.height = getcomputedstyle(canvas).height.split('px')[0]; let ratio = math.min(canvas.width / img.width, canvas.height / img.height); let x = (canvas.width - img.width * ratio) / 2; let y = (canvas.height - img.height * ratio) / 2; canvas.getcontext('2d').clearrect(0, 0, canvas.width, canvas.height); canvas.getcontext('2d').drawimage(img, 0, 0, img.width, img.height, x, y, img.width * ratio, img.height * ratio); } document.queryselector('video').addeventlistener('play', function() { document.queryselector('#grabframebutton').disabled = false; document.queryselector('#takephotobutton').disabled = false; }); specifications specific...
Browser storage limits and eviction criteria - Web APIs
lru policy when the available disk space is filled up, the quota manager will start clearing out data based on an lru policy — the least recently used origin will be deleted first, then the next one, until the browser is no longer over the limit.
IndexedDB API - Web APIs
the synchronous api was intended for use only with web workers but was removed from the spec because it was unclear whether it was needed.
IntersectionObserver.takeRecords() - Web APIs
calling this method clears the pending intersection list, so the callback will not be run.
KeyboardEvent: code values - Web APIs
controlright" kvk_function (0x3f) "fn" (no events fired actually) "" (no events fired actually) kvk_f17 (0x40) "f17" "f17" kvk_ansi_keypaddecimal (0x41) "numpaddecimal" "numpaddecimal" kvk_ansi_keypadmultiply (0x43) "numpadmultiply" "numpadmultiply" kvk_ansi_keypadplus (0x45) "numpadadd" "numpadadd" kvk_ansi_keypadclear (0x47) "numlock" "numlock" kvk_volumeup (0x48) "audiovolumeup" (was "volumeup" until firefox 48) "audiovolumeup" (was "volumeup" until chrome 50) kvk_volumedown (0x49) "audiovolumedown" (was "volumedown" until firefox 49) "audiovolumedown" (was "volumedown" until chrome 50) kvk_mute (0x4a) "audiovolumemute" (was "volumemute" until firefox 49) "au...
MIDIInputMap - Web APIs
though it works generally like a map, because it is read-only it does not contain clear(), delete(), or set() functions.
MIDIOutputMap - Web APIs
although it works like a map, because it is read-only, it does not contain clear(), delete(), or set() functions.
MediaDeviceInfo.deviceId - Web APIs
it is reset when the user clears cookies.
MediaDeviceInfo - Web APIs
it is reset when the user clears cookies (for private browsing, a different identifier is used that is not persisted across sessions).
MediaDevices.getUserMedia() - Web APIs
and any embedded <iframe> elements that are loaded from the same origin: feature-policy: camera 'self' this will request access to the microphone for the current origin and the specific origin https://developer.mozilla.org: feature-policy: microphone 'self' https://developer.mozilla.org if you're using getusermedia() within an <iframe>, you can request permission just for that frame, which is clearly more secure than requesting a more general permission.
MediaSource - Web APIs
mediasource.clearliveseekablerange() clears a seekable range previously set with a call to setliveseekablerange().
MediaStreamTrack.applyConstraints() - Web APIs
if this parameter is omitted, all currently set custom constraints are cleared.
Recording a media element - Web APIs
dth: 160px; border: 1px solid black; font-size: 16px; text-align: center; padding-top: 2px; padding-bottom: 4px; color: white; background-color: darkgreen; text-decoration: none; } h2 { margin-bottom: 4px; } .left { margin-right: 10px; float: left; width: 160px; padding: 0px; } .right { margin-left: 10px; float: left; width: 160px; padding: 0px; } .bottom { clear: both; padding-top: 10px; } javascript content now let's have a look at the javascript code; this is where the majority of the action happens, after all!
Microsoft API extensions - Web APIs
nevent msmanipulationstatechanged msmanipulationviewsenabled mspointerhover media apis htmlvideoelement.msframestep() htmlvideoelement.mshorizontalmirror htmlvideoelement.msinsertvideoeffect() htmlvideoelement.msislayoutoptimalforplayback htmlvideoelement.msisstereo3d htmlvideoelement.mszoom htmlaudioelement.msaudiocategory htmlaudioelement.msaudiodevicetype htmlmediaelement.mscleareffects() htmlmediaelement.msinsertaudioeffect() mediaerror.msextendedcode msgraphicstrust msgraphicstruststatus msisboxed msplaytodisabled msplaytopreferredsourceuri msplaytoprimary msplaytosource msrealtime mssetmediaprotectionmanager mssetvideorectangle msstereo3dpackingmode msstereo3drendermode onmsvideoformatchanged onmsvideoframestepcompleted onmsvideooptimallayoutchanged m...
Navigator.clipboard - Web APIs
if the clipboard is empty or doesn't contain text, the "cliptext" element's contents are cleared.
Navigator.requestMediaKeySystemAccess() - Web APIs
for example com.example.somesystem or org.w3.clearkey.
Notification.close() - Web APIs
function spawnnotification(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon }; var n = new notification(thetitle,options); document.addeventlistener('visibilitychange', function() { if (document.visibilitystate === 'visible') { // the tab has become visible so clear the now-stale notification.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
OffscreenCanvas.getContext() - Web APIs
preservedrawingbuffer: if the value is true the buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
PannerNode.coneInnerAngle - Web APIs
e sound volume decreases gradually // if coneouterangle == 45 and coneinnerangle == 30, it means that when the sound is rotated // by between 15 (30/2) and 22.5 (45/2) degrees either direction, // the volume will decrease gradually panner.coneouterangle = 45; // this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation...
PannerNode.coneOuterAngle - Web APIs
e sound volume decreases gradually // if coneouterangle == 45 and coneinnerangle == 30, it means that when the sound is rotated // by between 15 (30/2) and 22.5 (45/2) degrees either direction, // the volume will decrease gradually panner.coneouterangle = 45; // this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation...
PannerNode.coneOuterGain - Web APIs
e sound volume decreases gradually // if coneouterangle == 45 and coneinnerangle == 30, it means that when the sound is rotated // by between 15 (30/2) and 22.5 (45/2) degrees either direction, // the volume will decrease gradually panner.coneouterangle = 45; // this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation...
PannerNode.orientationX - Web APIs
e sound volume decreases gradually // if coneouterangle == 45 and coneinnerangle == 30, it means that when the sound is rotated // by between 15 (30/2) and 22.5 (45/2) degrees either direction, // the volume will decrease gradually panner.coneouterangle = 45; // this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation...
PannerNode.orientationY - Web APIs
e sound volume decreases gradually // if coneouterangle == 45 and coneinnerangle == 30, it means that when the sound is rotated // by between 15 (30/2) and 22.5 (45/2) degrees either direction, // the volume will decrease gradually panner.coneouterangle = 45; // this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation...
PannerNode.orientationZ - Web APIs
e sound volume decreases gradually // if coneouterangle == 45 and coneinnerangle == 30, it means that when the sound is rotated // by between 15 (30/2) and 22.5 (45/2) degrees either direction, // the volume will decrease gradually panner.coneouterangle = 45; // this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation...
PannerNode - Web APIs
this feature was not clearly specified and had a number of issues, so it was removed from the specification.
performance.measure() - Web APIs
performance.clearmarks(); performance.clearmeasures(); }, 1000); }, 1000); specifications specification status comment user timing level 2the definition of 'measure()' in that specification.
Using Pointer Events - Web APIs
convenience functions this example uses two convenience functions that should be looked at briefly to help make the rest of the code more clear.
Web Push API Notifications best practices - Web APIs
you can build trust by having a well-designed website that provides good content that shows respect for the user, and a clear value to accepting push notifications.
RTCDTMFSender.insertDTMF() - Web APIs
specifying an empty string as the tones parameter clears the tone buffer, aborting any currently queued tones.
Range.selectNodeContents() - Web APIs
elect or deselect the contents of this paragraph.</p> <button id="select-button">select paragraph</button> <button id="deselect-button">deselect paragraph</button> javascript const p = document.getelementbyid('p'); const selectbutton = document.getelementbyid('select-button'); const deselectbutton = document.getelementbyid('deselect-button'); selectbutton.addeventlistener('click', e => { // clear any current selection const selection = window.getselection(); selection.removeallranges(); // select paragraph const range = document.createrange(); range.selectnodecontents(p); selection.addrange(range); }); deselectbutton.addeventlistener('click', e => { const selection = window.getselection(); selection.removeallranges(); }); result specifications specification...
ReadableStream.ReadableStream() - Web APIs
estream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readables...
ReadableStreamDefaultController.close() - Web APIs
estream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'close()' ...
ReadableStreamDefaultController.enqueue() - Web APIs
estream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'enqueue()...
ReadableStreamDefaultController - Web APIs
estream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readables...
Resource Timing API - Web APIs
the clearresourcetimings() method removes all "resource" type performance entries from the browser's resource performance entry buffer.
Using Service Workers - Web APIs
the "forget" button, available in firefox's customization options, can be used to clear service workers and their caches (bug 1252998).
SourceBuffer.removeAsync() - Web APIs
example this example establishes an asynchronous function, emptysourcebuffer(), which simply clears the contents of the specified sourcebuffer.
SpeechSynthesisVoice.default - Web APIs
the spec is not very clear on which it should be, so some implementations may differ.
Storage - Web APIs
WebAPIStorage
storage.clear() when invoked, will empty all keys out of the storage.
StorageManager.persist() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification.
StorageManager.persisted() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persisted' in that specification.
Using readable streams - Web APIs
ablestream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); readstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); in the readstream() function itself, we lock a reader to the stream using readablestream.getreader(), the...
StylePropertyMap - Web APIs
stylepropertymap.clear() removes all declarations in the stylepropertymap.
Text.wholeText - Web APIs
WebAPITextwholeText
what we have now is this: <p>thru-hiking is great, but <a href="http://en.wikipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> some uses of the whole-text functionality may be better served by using node.textcontent, or the longstanding element.innerhtml; that’s fine and probably clearer in most circumstances.
Touch events - Web APIs
convenience functions this example uses two convenience functions that should be looked at briefly to help make the rest of the code more clear.
USBDevice - Web APIs
WebAPIUSBDevice
usbdevice.clearhalt() returns a promise that resolves when a halt condition is cleared.
USBIsochronousInTransferPacket - Web APIs
a stall on an isochronous endpoint does not need to be cleared.
USBIsochronousOutTransferPacket - Web APIs
a stall on an isochronous endpoint does not need to be cleared.
USBOutTransferResult - Web APIs
a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferout() can be called again.
Vibration API - Web APIs
continued vibrations some basic setinterval and clearinterval action will allow you to create persistent vibration: var vibrateinterval; // starts vibration at passed in level function startvibrate(duration) { navigator.vibrate(duration); } // stops vibration function stopvibrate() { // clear interval and stop persistent vibrating if(vibrateinterval) clearinterval(vibrateinterval); navigator.vibrate(0); } // start persistent vibr...
Visual Viewport API - Web APIs
one thing that may not be clear in this example is the use of the pendingupdate flag and the call to requestanimationframe().
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.clearbuffer[fiuv]() clears buffers from the currently bound framebuffer.
WebGLRenderingContext.bindFramebuffer() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
WebGLRenderingContext.disable() - Web APIs
gl.clear() commands are ignored.
WebGLRenderingContext.enable() - Web APIs
gl.clear() commands are ignored.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
WebGLRenderingContext.isEnabled() - Web APIs
gl.clear() commands are ignored.
WebGLRenderingContext.makeXRCompatible() - Web APIs
if the other button was clicked, we ensure that xrsession is null and clear usingxr to false.
WebGLRenderingContext.scissor() - Web APIs
clear) // turn off scissor test again gl.disable(gl.scissor_test); to get the current scissor box dimensions, query the scissor_box constant which returns an int32array.
Hello GLSL - Web APIs
canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
Hello vertex attributes - Web APIs
canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
Textures from code - Web APIs
canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); gl.clearcolor(0.0, 0.0, 0.0, 1.0); gl.clear(gl.color_buffer_bit); return gl; } })(); the source code of this example is also available on github.
Lighting in WebGL - Web APIs
« previousnext » as should be clear by now, webgl doesn't have much built-in knowledge.
WebGL tutorial - Web APIs
the examples provided should give you some clear ideas what you can do with webgl and will provide code snippets that may get you started in building your own content.
WebGL types - Web APIs
WebAPIWebGL APITypes
used for example in webglrenderingcontext.clear().
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
e; pc.onnegotiationneeded = async () => { try { makingoffer = true; await pc.setlocaldescription(); signaler.send({ description: pc.localdescription }); } catch(err) { console.error(err); } finally { makingoffer = false; } }; we set makingoffer immediately before calling setlocaldescription() in order to lock against interfering with sending this offer, and we don't clear it back to false until the offer has been sent to the signaling server (or an error has occurred, preventing the offer from being made).
Writing WebSocket servers - Web APIs
sometimes extensions and subprotocols very similar, but there is a clear distinction.
Lighting a WebXR setting - Web APIs
of course, many ar applications make it pretty clear where the user is located.
Advanced techniques: Creating and sequencing audio - Web APIs
this.dataset.playing = 'true'; } else { window.cleartimeout(timerid); this.dataset.playing = 'false'; } }) }); summary we've now got an instrument inside our browser!
Example and tutorial: Simple synth keyboard - Web APIs
finally, the osclist entry for the note is cleared and the data-pressed attribute is removed from the key element (as identified by event.target), to indicate that the note is not currently playing.
Using the Web Storage API - Web APIs
storage.clear() takes no arguments, and simply empties the entire storage object for that domain.
Web Storage API - Web APIs
stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data.
Functions and classes available to Web Workers - Web APIs
icated workers shared workers service workers chrome workers outside workers atob() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window btoa() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window clearinterval() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window cleartimeout() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window dump() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglob...
Using Web Workers - Web APIs
for example, when transferring an arraybuffer from your main app to a worker script, the original arraybuffer is cleared and no longer usable.
Window.history - Web APIs
WebAPIWindowhistory
there is no way to clear the session history or to disable the back/forward navigation from unprivileged code.
Window.onpaint - Web APIs
WebAPIWindowonpaint
this event occurs after the load event for a window, and reoccurs each time the window needs to be re-rendered, such as when another window obscures it and is then cleared away.
Window.prompt() - Web APIs
WebAPIWindowprompt
it is not clear whether this is a bug or intended behavior.
Window.updateCommands() - Web APIs
notes this enables or disables items (setting or clearing the "disabled" attribute on the command node as appropriate), or ensures that the command state reflects the state of the selection by setting current state information in the "state" attribute of the xul command nodes.
XRSession.onsqueeze - Web APIs
this also clears the value of heldobject so we know that there's no longer an object in hand.
XRSession.onsqueezeend - Web APIs
that's because (in this example, at least) the handler for the squeeze event has already dropped the object into its new location and then cleared the value of heldobject to indicate that the user is no longer holding anything.
XRView.eye - Web APIs
WebAPIXRVieweye
gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); gl.clearcolor(0,0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit, gl.depth_buffer_bit); for (let view of xrpose.views) { let skipview = false; if (view.eye == "left" && body.lefteye.injured) || skipview = updateinjury(body.lefteye); } else if (view.eye == "right" && body.righteye.injured) { skipview = updateinjury(body.righteye); } if (!skipview) { let viewport = gllay...
XRWebGLLayer.getViewport() - Web APIs
<<<--- add link to appropriate section in the cameras and views article --->>> function drawframe(time, frame) { let session = frame.session; let pose = frame.getviewerpose(mainreferencespace); if (pose) { let gllayer = session.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); gl.clearcolor(0, 0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit, gl.depth_color_bit); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the scene now */ } } specifications specification status comment webxr device apithe definitio...
XSLTProcessor - Web APIs
void xsltprocessor.clearparameters() removes all set parameters from the xsltprocessor.
mssitemodejumplistitemremoved - Web APIs
this event is not triggered if mssitemodeclearjumplist has been called.
msthumbnailclick - Web APIs
example function thumbnailclickhandler(evt) { alert ("clicked button: " + evt.buttonid); } document.addeventlistener('msthumbnailclick', thumbnailclickhandler); example 2 // adds an overlay icon on your app pinned to the taskbar window.external.mssitemodeseticonoverlay(iconuri, tooltip); // removes an overlay icon window.external.mssitemodecleariconoverlay(); // pinned icons on your taskbar can be instructed to trigger specific events on your site from the taskbar // add an event handlerdocument.addeventlistener('msthumbnailclick', onbuttonclicked, false); // add the buttons var btnplay = window.external.mssitemodeaddthumbbarbutton(iconuri, tooltip); // refresh the taskbar window.external.mssitemodeshowthumbbar(); // call a javascrip...
ARIA live regions - Accessibility
one way around this would be to first clear the contents of the live region, and then inject the new content.
ARIA annotations - Accessibility
as an example, let’s say you have a poll/voting ui widget that shows numbers of votes, but you want to summarize the purpose of the widget in a clear description because the ui does not make it clear: <section aria-description="choose your favourite fruit — the fruit with the highest number of votes will be added to the lunch options next week."> <p>pick your favourite fruit:</p> <form> <ul> <li><label>apple: <input type="radio" name="fruit" value="apple"></label></li> <li><label>orange: <input type="radio" name="fruit" ...
ARIA: timer role - Accessibility
one way around this would be to first clear the contents of the live region, and then inject the new content.
ARIA: button role - Accessibility
ton"]:active { background-color: white; color: navy; } ul { list-style: none; } javascript function handlecommand(event) { // handles both mouse clicks and keyboard // activate with enter or space // get the new name value from the input element let newnameinput = document.getelementbyid('newname'); let name = newnameinput.value; newnameinput.value = ''; // clear the text field newnameinput.focus(); // give the text field focus to enable entering and additional name.
ARIA: listbox role - Accessibility
(note: "labelled", with two l's, is the correct spelling based on the accessibility api conventions.) aria-roledescription a human-readable string value which more clearly identifies the role of the listbox.
Accessibility Information for Web Authors - Accessibility
the output data report is displayed in a clear and well structured table where each and all checkpoints are identified and described (along with an helpful clickable link to the related reference guideline) into logical groups and according to measurable results: passed, warning, failed for automated verification, warning for manual verification, not selected, not available, not related, etc.
Web accessibility for seizures and physical reactions - Accessibility
"a pattern with the potential for provoking seizures contains clearly discernible stripes, numbering more than five light-dark pairs of stripes in any orientation" in addition to stripes, checkered patterns have also been known to cause photosensitive seizures, according to cedars-sinai.
Web Accessibility: Understanding Colors and Luminance - Accessibility
webgl is usually in the rgba format; see an example of how it is used in "clearing with colors".
Operable - Accessibility
<h2>) and <label> elements clearly describe the purpose of the content and form elements they are supposed to be describing.
Text labels and names - Accessibility
use a legend to label a fieldset when grouping a set of form elements together with a <fieldset> element, you should include a nested <legend> element inside it, containing a clear description of the group.
:host-context() - CSS: Cascading Style Sheets
we've used it to make it clear that the custom element shouldn't appear inside the <h1> in our design.
:link - CSS: Cascading Style Sheets
WebCSS:link
(after that, you'll need to clear your browser history to see them again.) however, the background-color values are likely to remain, as most browsers do not set that property on visited links by default.
font-style - CSS: Cascading Style Sheets
on the other hand, if a true italicized version of the font family exists, we can include it in the src descriptor and specify the font style as italic, so that it is clear that the font is italicized.
CSS Animations tips and tricks - CSS: Cascading Style Sheets
use javascript and clear the animation being used when the animationiteration event fires.
Border-image generator - CSS: Cascading Style Sheets
%; } .span_10 { width: 83%; } .span_9 { width: 74.54%; } .span_8 { width: 66.08%; } .span_7 { width: 57.62%; } .span_6 { width: 49.16%; } .span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grouping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * =========================================================================...
Border-radius generator - CSS: Cascading Style Sheets
} .span_10 { width: 83%; } .span_9 { width: 74.54%; } .span_8 { width: 66.08%; } .span_7 { width: 57.62%; } .span_6 { width: 49.16%; } .span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grouping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * =========================================================================...
Box-shadow generator - CSS: Cascading Style Sheets
%; } .span_10 { width: 83%; } .span_9 { width: 74.54%; } .span_8 { width: 66.08%; } .span_7 { width: 57.62%; } .span_6 { width: 49.16%; } .span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grouping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * =========================================================================...
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
when margin collapsing occurs, the margin area is not clearly defined since margins are shared between boxes.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
floated items “float and clear do not create floating or clearance of flex item, and do not take it out-of-flow.” - 3.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
we can see this very clearly when considering a flex layout.
Flow Layout and Overflow - CSS: Cascading Style Sheets
an ellipsis indicates clearly the fact there is more content.
In Flow and Out of Flow - CSS: Cascading Style Sheets
whether that involves clearing floats, or ensuring that an element with position: absolute does not sit on top of some other content.
Introduction to formatting contexts - CSS: Cascading Style Sheets
a bfc contains everything inside it, float and clear only apply to items inside the same formatting context, and margins only collapse between elements in the same formatting context.
Layout using named grid lines - CSS: Cascading Style Sheets
once you work through some examples it should become clearer and easier to work with.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
it clearly demonstrates how our items are placed.
CSS Logical Properties and Values - CSS: Cascading Style Sheets
-radius border-style (logical keyword) border-width (logical keyword) margin (logical keyword) margin-block margin-block-end margin-block-start margin-inline margin-inline-end margin-inline-start padding (logical keyword) padding-block padding-block-end padding-block-start padding-inline padding-inline-end padding-inline-start properties for floating and positioning clear (inline-end and inline-start keywords) float (inline-end and inline-start keywords) inset inset-block inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start other properties caption-side (inline-end and inline-start keywords) overflow-block overflow-inline overscroll-behavior-block overscroll-behavior-inline resize (block and inline keywords) text-...
CSS Positioned Layout - CSS: Cascading Style Sheets
reference css properties bottom clear float left position right top z-index guides understanding css z-index presents the notion of stacking context and explains how z-ordering works, with several examples.
CSS Properties Reference - CSS: Cascading Style Sheets
erright border-right-color borderrightcolor border-right-style borderrightstyle border-right-width borderrightwidth border-style borderstyle border-top bordertop border-top-color bordertopcolor border-top-style bordertopstyle border-top-width bordertopwidth border-width borderwidth clear clear clip clip color color cursor cursor display display filter filter float cssfloat font font font-family fontfamily font-size fontsize font-variant fontvariant font-weight fontweight height height left left letter-spacing le...
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
all lets you opt to immediately restore all properties to any of their initial (default) state, the state inherited from the previous level of the cascade, a specific origin (the user-agent stylesheet, the author stylesheet, or the user stylesheet), or even to clear the values of the properties entirely.
Microsoft CSS extensions - CSS: Cascading Style Sheets
ing -ms-scroll-limit -ms-scroll-limit-x-max -ms-scroll-limit-x-min -ms-scroll-limit-y-max -ms-scroll-limit-y-min -ms-scroll-rails -ms-scroll-snap-points-x -ms-scroll-snap-points-y -ms-scroll-snap-x -ms-scroll-snap-y -ms-scroll-translation -ms-text-autospace -ms-touch-select -ms-wrap-flow -ms-wrap-margin -ms-wrap-through zoom pseudo-elements ::-ms-browse ::-ms-check ::-ms-clear ::-ms-expand ::-ms-fill ::-ms-fill-lower ::-ms-fill-upper ::-ms-reveal ::-ms-thumb ::-ms-ticks-after ::-ms-ticks-before ::-ms-tooltip ::-ms-track ::-ms-value media features -ms-high-contrast css-related dom apis mscontentzoomfactor msgetpropertyenabled msgetregioncontent msrangecollection msregionoverflow ...
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
idthborder-spacingborder-start-end-radiusborder-start-start-radiusborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottom@bottom-centerbox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counter>counter-incrementcounter-resetcounter-set@counter-stylecounters()cross-fade()cubic-bezier()::cue::cue-regioncursor<custom-ident>d:defaultdeg<dimension>:dirdirection:disableddisplay<displa...
Cubic Bezier Generator - CSS: Cascading Style Sheets
result + 0.5 : result; } function drawbeziercurve(x1, y1, x2, y2) { // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canvas for drawing var ctx = canvas.getcontext('2d'); // clear canvas ctx.clearrect(0, 0, canvas.width, canvas.height); // draw the rulers ctx.beginpath(); ctx.strokestyle = "black"; // draw the y axis ctx.moveto(cx(0), cy(0)); ctx.lineto(cx(1), cy(0)); ctx.textalign = "right"; for (var i = 0.1; i <= 1; i = i + 0.1) { ctx.moveto(-basic_scale_size + cx(0), ly(i)); ...
Linear-gradient Generator - CSS: Cascading Style Sheets
datecssgradient,="" updateoutputcsscode="function" updateoutputcsscode(gradient)="" updateoutputcsscode:="" updateoutputelem="function" updateoutputelem(0,="" updateoutputelem(index,="" updatepointcolor="function" updatepointcolor(color)="" updatepointcolor);="" updatepointposition="function" updatepointposition(color)="" updatepointposition);="" var="" window.addeventlistener('resize',="" window.cleartimeout(update_output);="" {="" }="" })();="" });="" },="" };=""></len;></len;> this tool can be used to create custom css3 linear-gradient() backgrounds.
Universal selectors - CSS: Cascading Style Sheets
examples css * [lang^=en] { color: green; } *.warning { color: red; } *#maincontent { border: 1px solid blue; } .floating { float: left } /* automatically clear the next sibling after a floating element */ .floating + * { clear: left; } html <p class="warning"> <span lang="en-us">a green span</span> in a red paragraph.
Visual formatting model - CSS: Cascading Style Sheets
developers sometimes clear floats by changing the value of the overflow property, as this creates a new block formatting context.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
the most obvious use-case for creating a new bfc is to contain floats, and avoid the need for clearfix hacks.
font-variant-numeric - CSS: Cascading Style Sheets
slashed-zero this keyword forces the use of a 0 with a slash; this is useful when a clear distinction between o and 0 is needed.
font - CSS: Cascading Style Sheets
WebCSSfont
ext-align: center; margin-right: 5px; width: 80px; } .setpropcont { float: left; margin-right: 5px; width: 120px; } .propinputs, .setpropcont { margin-bottom: 1em; } .curcss { border: none; border-bottom: 1px solid black; text-align: center; width: 80px; } .mandatory { border-bottom-color: red; } .cf:before, .cf:after { content: " "; display: table; } .cf:after { clear: both; } .tar { width: 40px; text-align: right; } .fontfamily { display: inline-block; } javascript var textareas = document.getelementsbyclassname("curcss"), shorttext = "", getcheckedvalue, setcss, getproperties, injectcss; getproperties = function () { shorttext = getcheckedvalue("font_style") + " " + getcheckedvalue("font_variant") + " " + get...
margin-bottom - CSS: Cascading Style Sheets
box 1</div> <div class="box2">box one's negative margin pulls me up</div> </div> css css for divs to set margin-bottom and height .box0 { margin-bottom:1em; height:3em; } .box1 { margin-bottom:-1.5em; height:4em; } .box2 { border:1px dashed black; border-width:1px 0; margin-bottom:2em; } some definitions for container and divs so margins' effects can be seen more clearly .container { background-color:orange; width:320px; border:1px solid black; } div { width:320px; background-color:gold; } result specifications specification status comment css basic box modelthe definition of 'margin-bottom' in that specification.
opacity - CSS: Cascading Style Sheets
WebCSSopacity
here <alpha-value> = <number> | <percentage> examples setting background opacity html <div class="light">you can barely see this.</div> <div class="medium">this is easier to see.</div> <div class="heavy">this is very easy to see.</div> css div { background-color: yellow; } .light { opacity: 0.2; /* barely see the text over the background */ } .medium { opacity: 0.5; /* see the text more clearly over the background */ } .heavy { opacity: 0.9; /* see the text very clearly over the background */ } result setting opacity on hover html <img src="//developer.mozilla.org/static/img/opengraph-logo.png" alt="mdn logo" width="128" height="146" class="opacity"> css img.opacity { opacity: 1; filter: alpha(opacity=100); /* ie8 and lower */ zoom: 1; /* triggers "haslayout" in i...
Audio and Video Delivery - Developer guides
the api supports use cases ranging from simple clear key decryption to high value video (given an appropriate user agent implementation).
Challenge solutions - Developer guides
the following script achieves the desired result: // javascript demonstration function dodemo (button) { var square = document.getelementbyid("square"); square.style.backgroundcolor = "#fa4"; square.style.marginleft = "20em"; button.setattribute("disabled", "true"); settimeout(cleardemo, 2000, button); } function cleardemo (button) { var square = document.getelementbyid("square"); square.style.backgroundcolor = "transparent"; square.style.marginleft = "0em"; button.removeattribute("disabled"); } svg and css change color of inner petals challenge change the stylesheet so that the inner petals all turn pink when the mouse pointer is over any one of them, wi...
Using HTML sections and outlines - Developer guides
by contrast, the <nav> sectioning element more clearly describes to browsers and other devices the content contained: links or other navigational structures to help users move through and understand where they are in a site's or page's content.
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
summary the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
the meaning and use is unclear and not part of the html standard.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
embedding the characters in <span dir="auto"> has the same effect as using <bdi>, but its semantics are less clear.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
deprecated attributes clear indicates where to begin the next line after the break.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
accessibility concerns authoring meaningful alternate descriptions an alt attribute's value should clearly and concisely describe the image's content.
<input type="datetime-local"> - HTML: Hypertext Markup Language
at this time, it's unclear what a value of any means for step when used with datetime-local inputs.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
the html and xhtml specifications define event handlers for the <link> element, but it is unclear how they would be used.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
the alternate description should clearly and concisely describe the image or diagram's content.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
d>green</td> <td>yellow</td> <td>orange</td> </tr> </table> <p>simple table with caption</p> <table> <caption>awesome caption</caption> <tr> <td>awesome data</td> </tr> </table> table { border-collapse: collapse; border-spacing: 0px; } table, th, td { padding: 5px; border: 1px solid black; } accessibility concerns captions by supplying a <caption> element whose value clearly and concisely describes the table's purpose, it helps the people decide if they need to read the rest of the table content or skip over it.
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
element description <acronym> the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
57 <acronym> element, html, html:flow content, obsolete, reference, web the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
this example is trivial, as the browser probably discovers the <link rel="stylesheet"> and <script> elements in the same chunk of html as the preloads, but the benefits can be seen much more clearly the later resources are discovered and the larger they are.
HTTP authentication - HTTP
security of basic authentication as the user id and password are passed over the network as clear text (it is base64 encoded, but base64 is a reversible encoding), the basic authentication scheme is not secure.
Choosing between www and non-www URLs - HTTP
but even so, you can still have the other domain working: http allows two techniques so that it is clear for your users, or search engines, which domain is the canonical one, while still allowing the non-canonical domain to work and provide the expected pages.
Basics of HTTP - HTTP
http messages http messages transmitted during requests or responses have a very clear structure.
HTTP conditional requests - HTTP
in both cases it's clear, conditional requests are a fundamental feature behind the web.
Connection management in HTTP/1.x - HTTP
a related topic is the concept of http connection upgrades, wherein an http/1.1 connection is upgraded to a different protocol, such as tls/1.0, websocket, or even http/2 in cleartext.
Authorization - HTTP
this method is equally secure as sending the credentials in clear text (base64 is a reversible encoding).
Index - HTTP
WebHTTPHeadersIndex
20 clear-site-data http, http header, reference, header the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
Proxy-Authorization - HTTP
this method is equally secure as sending the credentials in clear text (base64 is a reversible encoding).
SameSite cookies - HTTP
the warning appears because the samesite policy for a cookie has not specified explicitly: set-cookie: flavor=choco while you could rely on modern browsers to apply samesite=lax automatically, you should rather specify it explicitly to clearly communicate your intent which samesite policy applies to your cookie.
Vary - HTTP
WebHTTPHeadersVary
a better way to indicate this is to use cache-control: no-store, which is clearer to read and also signals that the object shouldn't be stored ever.
HTTP headers - HTTP
WebHTTPHeaders
clear-site-data clears browsing data (e.g.
An overview of HTTP - HTTP
WebHTTPOverview
the browser translates these directions in http requests, and further interprets the http responses to present the user with a clear response.
205 Reset Content - HTTP
WebHTTPStatus205
the http 205 reset content response status tells the client to reset the document view, so for example to clear the content of a form, reset a canvas state, or to refresh the ui.
431 Request Header Fields Too Large - HTTP
WebHTTPStatus431
this lets users attempt to fix the problem, such as by clearing their cookies.
Indexed collections - JavaScript
however, as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data in typed arrays.
Keyed collections - JavaScript
yings = new map(); sayings.set('dog', 'woof'); sayings.set('cat', 'meow'); sayings.set('elephant', 'toot'); sayings.size; // 3 sayings.get('dog'); // woof sayings.get('fox'); // undefined sayings.has('bird'); // false sayings.delete('dog'); sayings.has('dog'); // false for (let [key, value] of sayings) { console.log(key + ' goes ' + value); } // "cat goes meow" // "elephant goes toot" sayings.clear(); sayings.size; // 0 object and map compared traditionally, objects have been used to map strings to values.
Warning: unreachable code after return statement - JavaScript
in the case of semicolon-less return statements, it can be unclear whether the developer intended to return the statement on the following line, or to stop execution and return.
JavaScript error reference - JavaScript
these errors can be a helpful debugging aid, but the reported problem isn't always immediately clear.
Array.from() - JavaScript
more clearly, array.from(obj, mapfn, thisarg) has the same result as array.from(obj).map(mapfn, thisarg), except that it does not create an intermediate array.
Map - JavaScript
instance methods map.prototype.clear() removes all key-value pairs from the map object.
NaN - JavaScript
use number.isnan() or isnan() to most clearly determine whether a value is nan.
Object.prototype.constructor - JavaScript
*/ } createdconstructor.prototype = object.create(parent.prototype) createdconstructor.prototype.constructor = createdconstructor // sets the correct constructor for future use createdconstructor.prototype.create = function create() { return new this.constructor() } new createdconstructor().create().create() // it's pretty fine ok, now it's pretty clear why changing the constructor can be useful.
Object.create() - JavaScript
however, when attempting to actually use these objects, their differences quickly become apparent: > "oco is: " + oco // shows "oco is: [object object]" > "ocn is: " + ocn // throws error: cannot convert object to primitive value testing just a few of the many most basic built-in functions shows the magnitude of the problem more clearly: > alert(oco) // shows [object object] > alert(ocn) // throws error: cannot convert object to primitive value > oco.tostring() // shows [object object] > ocn.tostring() // throws error: ocn.tostring is not a function > oco.valueof() // shows {} > ocn.valueof() // throws error: ocn.valueof is not a function > oco.hasownproperty("p") // shows "true" > ocn.hasownproperty("p") // throws error: ...
Promise - JavaScript
therefore, an action for an already "settled" promise will occur only after the stack has cleared and a clock-tick has passed.
Set - JavaScript
set.prototype.clear() removes all elements from the set object.
WeakMap - JavaScript
wm1.get(o2); // "azerty" wm2.get(o2); // undefined, because there is no key for o2 on wm2 wm2.get(o3); // undefined, because that is the set value wm1.has(o2); // true wm2.has(o2); // false wm2.has(o3); // true (even if the value itself is 'undefined') wm3.set(o1, 37); wm3.get(o1); // 37 wm1.has(o1); // true wm1.delete(o1); wm1.has(o1); // false implementing a weakmap-like class with a .clear() method class clearableweakmap { constructor(init) { this._wm = new weakmap(init); } clear() { this._wm = new weakmap(); } delete(k) { return this._wm.delete(k); } get(k) { return this._wm.get(k); } has(k) { return this._wm.has(k); } set(k, v) { this._wm.set(k, v); return this; } } specifications specification ecmascri...
Operator precedence - JavaScript
adding parentheses makes things clear: (3 > 2) > 1.
if...else - JavaScript
for example: var b = new boolean(false); if (b) // this condition is truthy examples using if...else if (cipher_char === from_char) { result = result + to_char; x++; } else { result = result + clear_char; } using else if note that there is no elseif syntax in javascript.
var - JavaScript
bla = 2; var bla; // ...is implicitly understood as: var bla; bla = 2; for that reason, it is recommended to always declare variables at the top of their scope (the top of global code and the top of function code) so it's clear which variables are function scoped (local) and which are resolved on the scope chain.
JavaScript typed arrays - JavaScript
however, as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
Recommended Web Performance Timings: How long is too long? - Web Performance
there are no clear set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).
Introduction to progressive web apps - Progressive web apps (PWAs)
given their profit increase, and the relatively low amount of work required for the conversion of these apps to pwas, the advantage is clear.
The building blocks of responsive design - Progressive web apps (PWAs)
this is created by all of the css inside the first media query: @media all and (max-width: 1024px) { x-card:nth-child(1), x-card:nth-child(2) { width: 50%; } x-card:nth-child(3) { width: 100%; clear: left; } x-card:nth-child(3) img { width: 20%; } } so here we're altering the widths of the columns and removing the float of the third column (and adding clearing to guard against any float funny business).
stitchTiles - SVG: Scalable Vector Graphics
sometimes the result will show clear discontinuities at the tile borders.
systemLanguage - SVG: Scalable Vector Graphics
an example would be a beginner's language primer, such as "a first lesson in latin," which is clearly intended to be used by an english-literate audience.
<feComposite> - SVG: Scalable Vector Graphics
e svg <svg width="330" height="195" viewbox="0 0 1100 650" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>example fecomposite - examples of fecomposite operations</title> <desc>four rows of six pairs of overlapping triangles depicting the six different fecomposite operators under different opacity values and different clearing of the background.</desc> <defs> <desc>define two sets of six filters for each of the six compositing operators.
Example - SVG: Scalable Vector Graphics
view the example <?xml version='1.0'?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <title>a swarm of motes</title> <style type='text/css'> <![cdata[ label, input { width: 150px; display: block; float: left; margin-bottom: 10px; } label { text-align: right; width: 75px; padding-right: 20px; } br { clear: left; } ]]> </style> </head> <body onload='update()'> <svg:svg id='display' width='400' height='300'> <svg:circle id='cursor' cx='200' cy='150' r='7' fill='#0000ff' fill-opacity='0.5'/> </svg:svg> <p>a swarm of motes, governed by two simple principles.
Mixed content - Web security
an https page that includes content fetched using cleartext http is called a mixed content page.
Transport Layer Security - Web security
it was updated to ssl 3.0 not long after, and as its usage expanded, it became clear that a common, standard encryption technology needed to be specified to ensure interoperability among all web browsers and servers.
Web security
mixed content an https page that includes content fetched using cleartext http is called a mixed content page.
Using templates and slots - Web Components
in addition, even if it is not already rendered, the purpose of the container as a template should be more semantically clear when using the <template>.
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
// set the sorting parameter in the xsl file var sortval = xsltprocessor.getparameter(null, "myorder"); if (sortval == "" || sortval == "descending") xsltprocessor.setparameter(null, "myorder", "ascending"); else xsltprocessor.setparameter(null, "myorder", "descending"); // initiate the transformation var fragment = xsltprocessor.transformtofragment(xmlref, document); // clear the contents document.getelementbyid("example").innerhtml = ""; mydom = fragment; // add the new content from the transformation document.getelementbyid("example").appendchild(fragment) } // xsl stylesheet: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999...
Exported WebAssembly functions - WebAssembly
an example let's look at an example to clear things up (you can find this on github as table-set.html; see it running live also, and check out the wasm text representation): var othertable = new webassembly.table({ element: "anyfunc", initial: 2 }); webassembly.instantiatestreaming(fetch('table.wasm')) .then(obj => { var tbl = obj.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 othertable.
Using the WebAssembly JavaScript API - WebAssembly
more involved memory example let’s make the above assertions clearer by looking at a more involved memory example — a webassembly module that imports the memory instance we defined earlier, populates it with an array of integers, then sums them.