Search completed in 1.37 seconds.
1758 results for "pose":
Your results are loading. Please wait...
Cached compose window FAQ
seth spitzer (sspitzer@mozilla.org) what is the "cached" compose window?
... instead of destroying the mail compose window on send (or close) just to create a new one the next time, mozilla mail will "cache" the compose window on send (or close), and use that instead.
... back 0.9.7, we hit a wall with the compose window.
...And 17 more matches
XRViewerPose - Web APIs
the webxr device api interface xrviewerpose represents the pose (the position and orientation) of a viewer's point of view on the scene.
... each xrviewerpose can have multiple views to represent, for example, the slight separation between the left and right eye.
... properties in addition to the properties inherited from xrpose, xrviewerpose includes the following: views read only an array of xrview objects, one for each viewpoint on the scene which is needed to represent the scene to the user.
...And 12 more matches
Event.composed - Web APIs
WebAPIEventcomposed
the read-only composed property of the event interface returns a boolean which indicates whether or not the event will propagate across the shadow dom boundary into the standard dom.
... syntax const iscomposed = event.composed; value a boolean which is true if the event will cross from the shadow dom into the standard dom after reaching the shadow root.
... (that is, the first node in the shadow dom in which the event began to propagate.) all ua-dispatched ui events are composed (click/touch/mouseover/copy/paste, etc.).
...And 10 more matches
Event.composedPath() - Web APIs
the composedpath() method of the event interface returns the event’s path which is an array of the objects on which listeners will be invoked.
... syntax var composed = event.composedpath(); parameters none.
... examples in our composed-composed-path example (see it live), we define two trivial custom elements, <open-shadow> and <closed-shadow>, both of which take the contents of their text attribute and insert them into the element's shadow dom as the text content of a <p> element.
...And 5 more matches
XRFrame.getViewerPose() - Web APIs
the getviewerpose() method, a member of the xrframe interface, returns a xrviewerpose object which describes the viewer's pose (position and orientation) relative to the specified reference space.
... see the getpose() method for a way to calculate a pose that represents the difference between two spaces.
... syntax var xrviewerpose = xrframe.getviewerpose(referencespace); parameters referencespace an xrreferencespace object specifying the space to use as the reference point or base for the computation of the viewer's current pose.
...And 5 more matches
XRPose - Web APIs
WebAPIXRPose
xrpose is a webxr api interface representing a position and orientation in the 3d space, relative to the xrspace within which it resides.
... the xrspace—which is either an xrreferencespace or an xrboundedreferencespace—defines the coordinate system used for the pose and, in the case of an xrviewerpose, its underlying views.
... to obtain the xrpose for the xrspace used as the local coordinate system of an object, call xrframe.getpose(), specifying that local xrspace and the space to which you wish to convert: thepose = xrframe.getpose(localspace, basespace); the pose for a viewer (or camera) is represented by the xrviewerpose subclass of xrpose.
...And 4 more matches
XRViewerPose.views - Web APIs
the read-only xrviewerpose property views returns an array which contains every xrview which must be rendered in order to fully represent the scene from the viewpoint defined by the viewer pose.
... syntax let viewlist = xrviewerpose.views; value an array of xrview objects, one for each view available as part of the scene for the current viewer pose.
... examples in this example—part of the code to render an xrframe, getviewerpose() is called to get an xrviewerpose using the same reference space the code is using as its base reference space.
...And 3 more matches
Access-Control-Expose-Headers - HTTP
the access-control-expose-headers response header indicates which headers can be exposed as part of the response by listing their names.
... by default, only the 7 cors-safelisted response headers are exposed: cache-control content-language content-length content-type expires last-modified pragma if you want clients to be able to access other headers, you have to list them using the access-control-expose-headers header.
... header type response header forbidden header name no syntax access-control-expose-headers: <header-name>, <header-name>, ...
...And 3 more matches
XRFrame.getPose() - Web APIs
WebAPIXRFramegetPose
the xrframe method getpose() returns the relative position and orientation—the pose—of one xrspace to that of another space.
... syntax var xrpose = xrframe.getpose(space, basespace); parameters space an xrspace specifying the space for which to obtain an xrpose describing the item's position and orientation.
... basespace an xrspace to use as the base or origin for the purposes of computing the relative position and orientation.
...And 2 more matches
XRPose.transform - Web APIs
WebAPIXRPosetransform
the transform read-only attribute of the xrpose interface is a xrrigidtransform object providing the position and orientation of the pose relative to the base xrspace as specified when the pose was obtained by calling xrframe.getpose().
... syntax let posetransform = xrpose.transform; value an xrrigidtransform which provides the position and orientation of the xrpose relative to the xrframe to which this xrpose is aligned.
... this is the same pose that's returned by the frame's getpose() method.
...And 2 more matches
XRPose.emulatedPosition - Web APIs
the emulatedposition read-only attribute of the xrpose interface is a boolean value indicating whether or not both the the position component of the pose's transform is directly taken from the xr device, or it's simulated or computed based on other sources.
... syntax let emulated = xrpose.emulatedposition; value a boolean which is true if the pose's position is computed based on estimates or is derived from sources other than direct sensor data.
... specifications specification status comment webxr device apithe definition of 'xrpose.emulatedposition' in that specification.
Index - Web APIs
WebAPIIndex
a timeline is a source of time values for synchronization purposes, and is an animationtimeline-based object.
... 228 baseaudiocontext.createanalyser() api, audiocontext, baseaudiocontext, method, reference, web audio api, createanalyser the createanalyser() method of the baseaudiocontext interface creates an analysernode, which can be used to expose audio time and frequency data and create data visualisations.
... 357 body.body api, body, experimental, fetch, property, reference, streams the body read-only property of the body mixin is a simple getter used to expose a readablestream of the body contents.
...And 67 more matches
WebIDL bindings
adding webidl bindings to a class to add a webidl binding for interface myinterface to a class mozilla::dom::myinterface that's supposed to implement that interface, you need to do the following: if your interface doesn't inherit from any other interfaces, inherit from nswrappercache and hook up the class to the cycle collector so it will trace the wrapper cache properly.
...returning null from getparentobject is allowed in situations in which it's ok to associate the resulting object with a random global object for security purposes; this is not usually ok for things that are exposed to web content.
... expose whatever methods the interface needs on mozilla::dom::myinterface.
...And 25 more matches
Embedding the editor
note here that i use the term 'composer' to mean an html-savvy compose widget that does rich text editing, and 'editor' to mean a plain text editor (as well as the underlying technology for composer).
...composer embedded in a xul application developers need to embed composer widgets in their xul applications, by using the <editor> tag as we do today.
...composer embedded in a native application in this application, the <iframe> on which the editor lives is embedded directly in the native application; this is equivalent to embedding the browser via nsiwebbrowser, but instead having an editable document.
...And 24 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
poses once your reference space or spaces are established for the various key objects in the scene, you will have times when you need to describe another position relative to the origin of a particular reference space.
... this is done using poses.
... a pose, simply put, describes a position and orientation relative to the origin of the reference space from which it was created.
...And 22 more matches
Index - Archive of obsolete content
46 indexed-db add-on sdk exposes the indexeddb api to add-ons.
... 507 enabling the proposed method for accessing jetpack features that are still in development and may be added in the future is inspired by python's future module.
... in python, you can call 508 enabling experimental jetpack features the proposed method for accessing jetpack features that are still in development and may be added in the future is inspired by python's future module.
...And 19 more matches
PKCS #11 Netscape Trust Objects - Network Security Services
trust objects a trust object describes a level of trust in a certificate for a given usage or purpose.
... conceptually a trust object contains the following: certificate reference purpose + level of trust (multiple) purpose + level of trust a trust object ultimately denotes a level of trust in a certificate.
... the trust is expressed for a specific purpose (or usage).
...And 17 more matches
Architecture - Accessibility
mozilla exposes a document containment hierarchy with text and embedded objects.
...however in accessibility hierarchies such as atk and iaccessible2, text is not exposed in leaf nodes as it is in a w3c dom.
... the text is actually exposed via a special text interface in the parent of the text nodes.
...And 14 more matches
Key Values - Web APIs
gdk_key_codeinput (0xff37) qt::key_codeinput (0x01001137) "compose" the compose key.
...enables single candidate mode (as opposed to multi-candidate mode); in this mode, only one candidate is displayed at a time.
... gdk_key_singlecandidate (0xff3c) qt::key_singlecandidate (0x0100113c) [1] on the x window system, the compose key is called the multi key.
...And 13 more matches
Inputs and input sources - Web APIs
you can easily obtain the target ray corresponding to the targetrayspace from within the drawing handler for a given frame using xrframe's getpose() method.
... the returned xrpose's transform is the transform corresponding to the target ray.
... thus, for an input controller primaryinput: let targetraypose = frame.session.getpose(primaryinput.targetrayspace, viewerrefspace); let targetrayorigin = targetraypose.transform.position; let targetrayvector = targetraypose.transform.orientation; with this, you now have the point from which the targeting ray is emitted (targetrayorigin) and the direction in which it's pointing (targetrayvector), given in the viewer's reference space (viewerrefspace).
...And 13 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
5 api codingscripting, glossary, infrastructure an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
... 7 arpa glossary, infrastructure .arpa (address and routing parameter area) is a top-level domain used for internet infrastructure purposes, especially reverse dns lookup (i.e., find the domain name for a given ip address).
... 41 brotli brotli, glossary, reference, web performance, compression brotli is a general-purpose lossless compression algorithm.
...And 11 more matches
Gecko info for Windows accessibility vendors
dom: document object model this is the w3c's specification for how web content is exposed to javascript and other languages.
... anything that is focusable or conveys important information about the structure of the document is exposed in the msaa tree of iaccessibles.
... document structure exposed in msaa tree bstr roles are used for important roles that have not been defined by microsoft.
...And 11 more matches
Rendering and the WebXR frame animation callback - Web APIs
this is due to early displays using the ac electrical grid's current flow waveform, which cycles 60 times per second in the united states (50 in europe), for timing purposes.
...while this diagram exaggerates the effect in some respects for illustrative purposes, the concept is the same.
... frames, poses, views, and framebuffers once you have an xrframe representing the state of the scene at a moment in time, you need to determine the positions of objects within the scene relative to the viewer so that you can render them.
...And 11 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
msaa is supposed to be the "right way" for accessibility aids to get information, but sometimes the hacks are more effective.
... msaa provides information in several different ways: a com interface (iaccessible) that allows applications to expose the tree of data nodes that make up each window in the user interface currently being interacted with and custom interface extensions via interfaces via queryinterface and queryservice.
...you will have to expose interfaces that contain more info than msaa does.
...And 11 more matches
/loader - Archive of obsolete content
it can be loaded as a regular script tag in documents that have system principals (note: this does not appear to work as of 02.2016 due to "use strict" being added to the file): <script type='application/javascript' src='resource://gre/modules/commonjs/toolkit/loader.js'></script> this will expose a single loader object containing all of the api functions described in this document.
...this feature may be used in a few different ways: to expose an api that doesn't have a js file with an implementation or is written in an incompatible format such as jsm: let { loader } = require('toolkit/loader'); let loader = loader({ modules: { // require('net/utils') will get netutil.jsm 'net/utils': cu.import('resource:///modules/netutil.jsm', {}) } }); each loader instance comes with a set of built-in pseudo modules that are descri...
...for example in the sdk, the loader is loaded at bootstrap as a jsm module but is then exposed as a pseudo-module to avoid the overhead of subsequent loads: let loadermodule = cu.import('resource://gre/modules/commonjs/toolkit/loader.js'); let loader = loadermodule.loader({ modules: { // overlay `toolkit/loader` so that `require('toolkit/loader')` // will return our `loadermodule`.
...And 10 more matches
Gecko object attributes
object attributes list aria attributes all aria attributes used on dom element (i.e., any attribute prefixed by 'aria-') are exposed as object attributes; name is preserved except the 'aria-' prefix is cut.
... applied to: any role xml-roles if a dynamic content accessibility role string is used, it is exposed here.
... applied to: grid, heading, listitem, row, tablist exposed in aria: aria-level posinset if this item is in a group, what is the item number within the group, where the size is defined by the setsize attribute.
...And 10 more matches
Text labels and names - Accessibility
there are many situations in which a control, dialog, or other website feature should be given a descriptive name or label to allow users of assistive technologies to understand what its purpose is and to be able to understand and operate it correctly.
...failure to do so makes an image map hard to use for users of assistive technology — they need alternative text to be able to understand the purpose of an image.
... see also <area> h24: providing text alternatives for the area elements of image maps dialogs should be labeled for any container whose contents act as a dialog box (for example, a modal dialog asking the user to make a choice or respond to an action being taken), give it a descriptive label or name, so that assistive technology users can easily discover what its purpose is.
...And 10 more matches
JSAPI User Guide
it also makes it easy for each application to expose some of its own objects and functions to javascript code.
... browsers expose dom objects.
... your application will expose objects that are relevant for the kind of scripts you want to write.
...And 9 more matches
Animated PNG graphics
MozillaTechAPNG
for purposes of chunk descriptions, an unsigned int shall be a 32-bit unsigned integer in network byte order limited to the range 0 to (2^32)-1; an unsigned short shall be a 16-bit unsigned integer in network byte order with the range 0 to (2^16)-1; and a byte shall be an 8-bit unsigned integer with the range 0 to (2^8)-1.
...the purpose of this number is to detect (and optionally correct) sequence errors in an animated png, since the png specification does not impose ordering restrictions on ancillary chunks.
... 24 dispose_op byte type of frame area disposal to be done after rendering this frame.
...And 9 more matches
Mozilla accessibility architecture
accessibility apis on each operating system have built-in assumptions about what is the most important information, and how an accessibility server like mozilla should use the api's programmatic interfaces to expose this information to an accessibility client (the assistive technology).
...for example, they all expose an accessible name, or text representation, of each object, and they all use an enumerated integer value from a finite list, to expose the role of an object.
...the shared code makes itself available to the toolkit-specific code via generic xpcom interfaces that return information about objects we want to expose.
...And 8 more matches
Overview of Mozilla embedding APIs
the service manager exposes all of the available xpcom services - each service represents a global object which provides some piece of functionality.
...much of the gecko functionality is exposed through a component called the nswebbrowser.
...the webbrowser exposes a set of interfaces which allow the embedding application to control activity and respond to changes within this client area.
...And 8 more matches
Index
notes: 16 cached compose window faq seth spitzer (sspitzer@mozilla.org) what is the "cached" compose window?
... instead of destroying the mail compose window on send (or close) just to create a new one the next time, mozilla mail will "cache" the compose window on send (or close), and use that instead.
... back 0.9.7, we hit a wall with the compose window.
...And 8 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
the methods used to validate an identity vary depending on the policies of a given ca-just as the methods to validate other forms of identification vary depending on who is issuing the id and the purpose for which it will be used.
...for the purposes of this discussion, the digital signature associated with some data can be thought of as evidence provided by the client to the server.
... the client unlocks the private-key database, retrieves the private key for the user's certificate, and uses that private key to digitally sign some data that has been randomly generated for this purpose on the basis of input from both the client and the server.
...And 7 more matches
Mozilla DOM Hacking Guide
the array sclassinfodata, defined in nsdomclassinfo.cpp, maps each dom class to its helper class and to the interfaces that are exposed to javascript.
...the first argument passed to ns_define_classinfo_data_with_name, _class, is used for debug purposes.
...(bug 90757) static jsclass sdomconstructorprotoclass: xpconnect fu to expose the dom objects constructors to javascript.
...And 7 more matches
Starting WebLock
when a gecko application starts up, registered components are created and notified via the general-purpose observer interface nsiobserver.
... the next step is to expose additional functionality to gecko applications and other clients to query and control the weblock component.
...in this section, we enumerate the basic functionality the component should expose and create the single interface that organizes and provides this functionality.
...And 6 more matches
Mozilla internal string guide
for the purpose of this document, we will refer to the 16-bit string classes in class documentation.
...nsa[c]string is the base of the string classes (since it imposes fewer requirements) and ns[c]string is a class derived from it.
...nsliteral[c]string is trivially constructible and destructible, and therefore does not emit construction/destruction code when stored in statics, as opposed to the other string classes.
...And 6 more matches
Index
MozillaTechXPCOMIndex
this can be used for various diagnostic purposes.
... 36 components.utils.exportfunction api, add-ons, components, extensions, language bindings, method, mozilla, non-standard, reference, webextensions, xpcom this function provides a safe way to expose a function from a privileged scope to a less-privileged scope.
...startindex() and endindex() are indices with respect to the text exposed by iaccessibletext.
...And 6 more matches
nsIFile
filesizeoflink print64 this attribute exposes the size of the symbolic link referenced by this nsifile.
... lastmodifiedtime print64 this attribute exposes the time when the file referenced by this nsifile was last modified.
... lastmodifiedtimeoflink print64 this attribute exposes the time when the symbolic link referenced by this nsifile was last modified.
...And 6 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
then references are obtained to the four <div> blocks into which we'll output the current contents of each of the key matrices for informational purposes while our scene is running.
...its job is to obtain the viewer's reference space, compute how much movement needs to be applied to any animated objects given the amount of time that's elapsed since the last frame, and then to render each of the views specified by the viewer's xrpose.
... let lastframetime = 0; function drawframe(time, frame) { let session = frame.session; let adjustedrefspace = 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.vi...
...And 6 more matches
Accessibility documentation index - Accessibility
aria live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies.
...addition of aria semantics only exposes extra information to a browser's accessibility api, and does not affect a page's dom.
...the aria-hidden attribute can either expose or hide non-interactive content from the accessibility api.
...And 6 more matches
HTTP resources and specifications - HTTP
specification title status rfc 7230 hypertext transfer protocol (http/1.1): message syntax and routing proposed standard rfc 7231 hypertext transfer protocol (http/1.1): semantics and content proposed standard rfc 7232 hypertext transfer protocol (http/1.1): conditional requests proposed standard rfc 7233 hypertext transfer protocol (http/1.1): range requests proposed standard rfc 7234 hypertext transfer protocol (http/1.1): caching proposed stan...
...dard rfc 5861 http cache-control extensions for stale content informational rfc 8246 http immutable responses proposed standard rfc 7235 hypertext transfer protocol (http/1.1): authentication proposed standard rfc 6265 http state management mechanism defines cookies proposed standard draft spec cookie prefixes ietf draft draft spec same-site cookies ietf draft draft spec deprecate modification of 'secure' cookies from non-secure origins ietf draft rfc 2145 use and interpretation of http version numbers informational rfc 6585 additional http status codes proposed standard rfc 7538 the hypertext transfer protocol status code 308 (permanent redirec...
...t) proposed standard rfc 7725 an http status code to report legal obstacles on the standard track rfc 2397 the "data" url scheme proposed standard rfc 3986 uniform resource identifier (uri): generic syntax internet standard rfc 5988 web linking defines the link header proposed standard experimental spec hypertext transfer protocol (http) keep-alive header informational (expired) draft spec http client hints ietf draft rfc 7578 returning values from forms: multipart/form-data proposed standard rfc 6266 use of the content-disposition header field in the hypertext transfer protocol (http) proposed standard rfc 2183 communicating presentation information in int...
...And 6 more matches
Accessible Toolkit Checklist
expose your ui - a way for assistive technologies such as screen readers, screen magnifiers and voice dictation software to understand your software.
... msaa support: expose window with role_dialog, unless it's already the standard dialog window class #32770.
...expose status bars with role_statusbar, unless they already use the standard window class msctls_statusbar32.
...And 5 more matches
Introduction to the File and Directory Entries API - Web APIs
big concepts before you start using the file and directory entries api, you need to understand a few concepts: the file and directory entries api is a virtual representation of a file system the file and directory entries api can use different storage types browsers impose storage quota the file and directory entries api has asynchronous and synchronous versions when using the asynchronous api, always use the error callbacks the file and directory entries api interacts with other apis the file and directory entries api is case-sensitive the file and directory entries api is a virtual representation of a file system the api doesn't give you access to the loca...
... browsers impose storage quotas to prevent a web app from using up the entire disk, browsers might impose a quota for each app and allocate storage among web apps.
... restrictions for security reasons, browsers impose restrictions on file access.
...And 5 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
for example, if the object is facing an object located at (3, 1, -2)—that is, three meters to the right, one meter up, and two meters away from the origin point—the result is: [31-2]\left [ \begin{matrix} 3 \\ 1 \\ -2 \end{matrix} \right ] this can also be represented as an array: let directionvector = [3, 1, -2]; for the purposes of performing operations involving both the coordinates and the facing direction vector, the vector needs to include the w component.
... composing multiple transforms if your camera needs to be performing multiple transforms simultaneously, such as zooming and panning at the same time, you can multiply the transform matrices together to compose them into a single matrix that applies both changes at once.
... this information includes the xrviewerpose describing the position and facing direction of the viewer within the scene as well as a list of xrview objects, each representing one perspective on the scene.
...And 5 more matches
XRView - Web APIs
WebAPIXRView
transform read only an xrrigidtransform which describes the current position and orientation of the viewpoint in relation to the xrreferencespace specified when getviewerpose() was called on the xrframe being rendered.
... usage notes positions and number of xrviews per frame while rendering a scene, the set of views that are used to render the scene for the viewer as of the current frame are obtained by calling the xrframe object's getviewerpose() method to get the xrviewerpose representing (in essence) the position of the viewer's head.
... all positions and orientations within the views for a given xrviewerpose are specified in the reference space that was passed to xrframe.getviewerpose(); this is called the viewer reference space.
...And 5 more matches
ARIA annotations - Accessibility
aria annotations features the aria attributes providing these new abilities are as follows: aria-description="" — provides a detailed description of an html element, as opposed to the brief label provided by aria-label.
... role="mark" — semantically denotes html elements containing text that is marked/highlighted for reference purposes.
... role="suggestion" — semantically denotes a single proposed change to an editable document.
...And 5 more matches
Value definition syntax - CSS: Cascading Style Sheets
bold [ thin && <length> ] this example matches the following values: bold thin 2vh bold 0 thin bold thin 3.5em but not: thin bold 3em, as bold is juxtaposed with the component defined by the brackets, it must appear before it.
...all juxtaposed components are mandatory and should appear in the exact order.
... but not: smaller, as bold is juxtaposed, and must appear before any smaller keyword.
...And 5 more matches
Details of the object model - JavaScript
inheriting properties suppose you create the mark object as a workerbee with the following statement: var mark = new workerbee; when javascript sees the new operator, it creates a new generic object and implicitly sets the value of the internal property [[prototype]] to the value of workerbee.prototype and passes this new object as the value of the this keyword to the workerbee constructor function.
...here's the new definition for the engineer constructor: function engineer(name, projs, mach) { this.base = workerbee; this.base(name, 'engineering', projs); this.machine = mach || ''; } suppose you create a new engineer object as follows: var jane = new engineer('doe, jane', ['navigator', 'javascript'], 'belau'); javascript follows these steps: the new operator creates a generic object and sets its __proto__ property to engineer.prototype.
...you can use any legal property name; base is simply evocative of its purpose.
...And 5 more matches
Interacting with page scripts - Archive of obsolete content
this guide describes: how to share objects between content scripts and page scripts how to send messages between content scripts and page scripts sharing objects with page scripts there are two possible cases here: a content script might want to access an object defined by a page script a content script might want to expose an object to a page script access objects defined by page scripts to access page script objects from content scripts, you can use the global unsafewindow object.
... expose objects to page scripts until firefox 30, you could use unsafewindow to perform the reverse procedure, and make objects defined in content scripts available to page scripts: // content-script.js unsafewindow.contentscriptobject = {"greeting" : "hello from add-on"}; // page-script.js var button = document.getelementbyid("show-content-script-var"); button.addeventlistener("click", function()...
...clicking "i will not work" fails, and the following message is logged: permission denied to access property 'greeting' expose functions to page scripts the structured clone algorithm is a bit more powerful than simple json serialization, but not much: in particular, functions aren't cloned.
...And 4 more matches
JavaScript Daemons Management - Archive of obsolete content
for a fast overview on the code proposed here you can git clone https://github.com/madmurphy/daemon.js.git.
...t.length; nletter < nlen; nletter++) { ospan = document.createelement("span"); ospan.textcontent = stext[nletter]; oletter = { "elem": ospan, "parent": this }; aletters.push(oletter); oletter.pos = math.random() * 50; oletter.elem.style.position = "relative"; this.appendchild(ospan); } } var nmaxdist = 25, aletters = [], stext = "do you feel lucky, punk?", orecompose = new daemon(document.createelement("p"), perform, 33, 30, prepare); onload = function () { orecompose.owner.id = "perform-me"; document.body.appendchild(orecompose.owner); orecompose.play(); }; </script> <style type="text/css"> body { font-family: monospace, sans-serif; background: #dddddd; overflow: hidden; } #perform-me { margin: 50px; font-size: 20px; line-height: 20px; ...
...} </style> </head> <body> <h1>new daemon(<em>@thisobject</em>, <em>@callback</em>[, <em>@rate</em>, <em>@length</em>, <em>@init</em>, <em>@onstart</em>])</h1> <p><button onclick="orecompose.skipto(11);">skipto(11)</button> <button onclick="orecompose.makesteps(29);">makesteps(29)</button> <button onclick="orecompose.fixposition(-13);">fixposition(-13)</button> <button onclick="orecompose.play();">play</button> <button onclick="orecompose.turn();">turn</button> <button onclick="orecompose.pause();">pause</button> <button onclick="orecompose.reverseplay();">reverseplay</button> <button onclick="orecompose.reversals = 2;alert('changed');">two reversals</button> <button onclick="orecompose.makeloop();alert('changed');">makeloop</button> <button onclick="orecompose.unmakeloop();alert('changed');...
...And 4 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
the folder can be wherever you want, but for the purposes of this guide, we’ll assume it’s at c:\extensions\helloworld .
...the purpose of each file created during phase 1 is explained in table 2.
...the purpose of each of these files is explained in table 3.
...And 4 more matches
JXON - Archive of obsolete content
note: if you are interested to address only some parts of an xml document (and are not starting in javascript/json for templating purposes), use xpath instead of converting the whole document into json.
... the algorithms proposed here (see: #1, #2, #3, #4) will consider only the following types of nodes and their attributes: document (only as function argument), documentfragment (only as function argument), element, text (never as function argument), cdatasection (never as function argument), attr (never as function argument).
... reverse algorithms it is possible to reverse the algorithms proposed here in order to build a new xml document starting from a javascript objects tree.
...And 4 more matches
Building accessible custom components in XUL - Archive of obsolete content
if we inspect this with the msaa inspect32 tool, we see that each cell is exposed as role="text".
...again, they are exposed as role="text".
...each label, which was previously exposed as a text label, is now exposed as a cell.
...And 4 more matches
The Implementation of the Application Object Model - Archive of obsolete content
purpose - the purpose of this document is two-fold.
...when the remote file is subsequently downloaded, these local annotations are sucked in and superimposed on top of the structure described by the file.
...it does not make sense to confuse or obscure the purpose of html by adding in a whole slew of new functionality that hasnothing to do with the display of web pages.
...And 4 more matches
Handling common HTML and CSS problems - Learn web development
the trouble with html and css some of the trouble with html and css lies with the fact that both languages are fairly simple, and often developers don't take them seriously, in terms of making sure the code is well-crafted, efficient, and semantically describes the purpose of the features on the page.
...for example, you might use a css framework and find that one of the class names it uses clashes with one you've already used for a different purpose.
... or you might find that html generated by some kind of third party api (generating ad banners, for example) includes a class name or id that you are already using for a different purpose.
...And 4 more matches
Handling common JavaScript problems - Learn web development
so the code falls over as soon as we try to access a property of jsonobj (which as you might expect, is supposed to be a json object).
... this is supposed to be fetched from an external .json file using the following xmlhttprequest call: let requesturl = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json'; let request = new xmlhttprequest(); request.open('get', requesturl); request.send(); let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); but this fails.
...as a quick example, the geolocation api (which exposes available location data for the device the web browser is running on) has a main entry point for its use — a geolocation property available on the global navigator object.
...And 4 more matches
Index
softoken is an nss module that exposes most freebl functionality as a pkcs#11 module.
... most of the time certificates and keys are supposed to be stored in the nss database.
... when using hashing, encryption, and decryption functions, it is possible to stream data (as opposed to operating on a large buffer).
...And 4 more matches
Embedded Dialog API
gecko can use the latter to pose dialogs built from xul.
...advanced windowing api embedding applications concerned with ensuring that dialogs posed by gecko are consistent in appearance and behaviour with dialogs posed directly by the application itself face a choice.
...however, it's nearly accurate to claim that the majority of all dialogs and alerts posed by gecko do reside in a single generic component, nsipromptservice (nsipromptservice).
...And 4 more matches
nsIExternalProtocolService
method overview boolean externalprotocolhandlerexists(in string aprotocolscheme); astring getapplicationdescription(in autf8string ascheme); nsihandlerinfo getprotocolhandlerinfo(in acstring aprotocolscheme); nsihandlerinfo getprotocolhandlerinfofromos(in acstring aprotocolscheme, out boolean afound); boolean isexposedprotocol(in string aprotocolscheme); void loaduri(in nsiuri auri, [optional] in nsiinterfacerequestor awindowcontext); void loadurl(in nsiuri aurl); void setprotocolhandlerdefaults(in nsihandlerinfo ahandlerinfo, in boolean aoshandlerexists); methods externalprotocolhandlerexists() check whether a handler for a specific protocol exists.
...isexposedprotocol() check whether a handler for a specific protocol is "exposed" as a visible feature of the current application.
... an exposed protocol handler is one that can be used in all contexts.
...And 4 more matches
Cognitive accessibility - Accessibility
this provides access to people with cognitive disabilities by enabling them to focus on the main purpose of the content.
...people with cognitive disabilities, limited short-term memory, and reading disabilities all benefit from being able to identify the purpose of content this way.
...poorly phrased link text may confuse users as to its purpose or destination.
...And 4 more matches
String.prototype.normalize() - JavaScript
in the example below we normalize two representations of the character "ñ": let string1 = '\u00f1'; // ñ let string2 = '\u006e\u0303'; // ñ string1 = string1.normalize('nfd'); string2 = string2.normalize('nfd'); console.log(string1 === string2); // true console.log(string1.length); // 2 console.log(string2.length); // 2 composed and decomposed forms note that the length of the normalized form under "nfd" is 2.
... that's because "nfd" gives you the decomposed version of the canonical form, in which single code points are split into multiple combining ones.
... the decomposed canonical form for "ñ" is "\u006e\u0303".
...And 4 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
the purpose of this article is not to describe these items in any great detail but to define what they are in simple terms.
... 4 accessibility/xul accessibility reference accessibility, xul this table is designed to show how to expose text properly for various xul element types.
... 947 template and tree listeners xul, xul_template_guide there are several listeners (or observers) used during the template build process, each used for different purposes.
...And 3 more matches
Adobe Flash - Archive of obsolete content
in particular, the macromedia® flash™ plugin exposes certain plugin functionality for access via javascript.
... detecting the right flash plugin (and browser) adobe flash has exposed the scriptability feature in netscape gecko browsers since flash 6r49 and later.
...every plugin exposes a description string that typically includes the plugin's name and version number.
...And 3 more matches
LiveConnect Overview - Archive of obsolete content
for example, suppose the redwood corporation uses a java package called redwood to contain various java classes that it implements.
...(although this functionality (along with some others) had been broken in gecko 1.9 (see bug 391642) as the mozilla-specific liveconnect code had not been maintained inside mozilla, with java 6 update 11 and 12 building support for reliance on mozilla's implementation of the generic (and cross-browser) npapi plugin code, this has again been fixed.) for example, suppose you are using the java forname method to assign the name of a java class to a variable called theclass.
...accessing javascript with jsobject for example, suppose you are working with the java class called javadog.
...And 3 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
rhino is a java implementation of javascript which is commonly embedded in java applications to expose scripting capability.
... listing 4 - demonstration of server and client context <script runat="server"> function exposed() { return "exposed to the browser"; } function notexposed() { return "can't see me!"; } </script> <script runat="client"> alert( exposed() ); alert( notexposed() ); </script> there are two blocks of scripts defined, one with runat set to server and the other set to client.
... add a statement inside the server-side script block to expose a particular server-side function to the browser.
...And 3 more matches
Windows Media in Netscape - Archive of obsolete content
in a code snippet: if (window.activexobject && navigator.useragent.indexof('windows') != -1) { // ie for windows object instantiation -- use of activexobject } else if(window.geckoactivexobject) { // netscape 7.1 object instantiation --use of geckoactivexobject } else if(navigator.mimetypes) { // plugin architecture, such as in netscape 4x - 7.02 and opera browsers } since ie for mac also exposes window.activexobject it is wise to determine if the browser in question is on windows.
...while the progid cannot be used to create a windows media player object that exposes all its properties and methods, it is useful for rapid detections.
...unlike using the progid as an argument, using wmplayer.ocx.7 as an argument to both these apis creates a fully usable reference to the windows media player 7 or 9 control, with all the methods and properties exposed to javascript.
...And 3 more matches
What’s in the head? Metadata in HTML - Learn web development
objective: to learn about the html head, its purpose, the most important items it can contain, and what effect it can have on the html document.
...some content management systems have facilities to automatically extract page author information and make it available for such purposes.
...for example, the keyword <meta> element (<meta name="keywords" content="fill, in, your, keywords, here">) — which is supposed to provide keywords for search engines to determine relevance of that page for different search terms — is ignored by search engines, because spammers were just filling the keyword list with hundreds of keywords, biasing results.
...And 3 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
now we will see how components can also expose methods and variables.
...it just takes an import and a short directive like use:selectonfocus that clearly depicts its purpose.
...the child component could get a reference to the <h2> node using bind:this={dom_node} and expose it to the outside using two-way data binding.
...And 3 more matches
Mozilla's Section 508 Compliance
the following is provided for informational purposes only and is not a legally binding voluntary product accessibility template (vpat).
...the focus shall be programmatically exposed so that assistive technology can track focus and focus changes.
...we expose focus programmatically via msaa (windows) and atk (linux/unix).
...And 3 more matches
Python binding for NSS
python also provides an abstraction of common operating system services but because nss and nspr are tightly bound python-nss exposes elements of nspr.
... design goals nss and nspr are c language api's which python-nss "wraps" and exposes to python programs.
... every module, class, function, and method has associated documentation and is exposed via the standard python methodology.
...And 3 more matches
Index
230 js_definefunction jsapi reference, spidermonkey js_definefunction exposes a c/c++ function to scripts by defining a new method on an existing javascript object.
... 285 js_getcontextprivate jsapi reference, spidermonkey each jscontext has two fields of type void * which the application may use for any purpose.
...these fields are not directly exposed to scripts.
...And 3 more matches
Accessibility Inspector - Firefox Developer Tools
the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
... here we are mainly talking about exposing information to people with visual disabilities — this is done via the accessibility apis available inside web browsers, which expose information on what roles the different elements on your page play (e.g., are they just text, or are they buttons, links, form elements, etc.?).
... semantic dom elements have roles assigned to them by default that hint at what their purpose is.
...And 3 more matches
Working with the History API - Web APIs
example of pushstate() method suppose http://mozilla.org/foo.html executes the following javascript: let stateobj = { foo: "bar", } history.pushstate(stateobj, "page 2", "bar.html") this will cause the url bar to display http://mozilla.org/bar.html, but won't cause the browser to load bar.html or even check that bar.html exists.
... suppose now that the user navigates to http://google.com, then clicks the back button.
...because firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object.
...And 3 more matches
WebXR Device API - Web APIs
accessing the webxr api to gain access to the webxr api within the context of a given window, use the navigator.xr property, which returns an xrsystem object through which the entire webxr device api is then exposed.
... navigator.xr read only this property, added to the navigator interface, returns the xrsystem object through which the webxr api is exposed.
... xrpose describes a position and orientation in space relative to an xrspace.
...And 3 more matches
Using the aria-hidden attribute - Accessibility
the aria-hidden attribute can either expose or hide non-interactive content from the accessibility api.
... using aria-hidden="false" will not re-expose the element to assistive technology if any of its parents specify aria-hidden="true".
... values false (default) the element is exposed to the accessibility api.
...And 3 more matches
<isindex> - HTML: Hypertext Markup Language
WebHTMLElementisindex
in this thread, different type of solutions are proposed.
...the user fills in the fields, clicks ok, and the query results come up in the table of contents window." a thread about isindex in november 1992, kevin hoadley questioned the need for an isindex element and proposed to drop it.
... he proposed to have instead an input element (idea supported by steve putz).
...And 3 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
<nav> the html <nav> element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents.
...important for accessibility and seo, these elements identify the purpose or structure of that content.
... <mark> the html mark text element (<mark>) represents text which is marked or highlighted for reference or notation purposes, due to the marked passage's relevance or importance in the enclosing context.
...And 3 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with css).
...this attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes.
... 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.
...And 3 more matches
Content Processes - Archive of obsolete content
a content process was supposed to run all the code associated with a single tab.
... conversely, an add-on process was supposed to run all the code associated with a single add-on.
... suppose we have two event emitters in different processes, and we want them to be able to emit events to each other.
...And 2 more matches
content/symbiont - Archive of obsolete content
this trait is composed from the loader and worker traits.
... var { symbiont } = require('sdk/content/content'); var thing = symbiont.resolve({ constructor: '_init' }).compose({ constructor: function thing(options) { // `getmyframe` returns the host application frame in which // the page is loaded.
... contentscriptoptions object read-only value exposed to content scripts under self.options property.
...And 2 more matches
dev/panel - Archive of obsolete content
you can use the class utility function: const { panel } = require("dev/panel"); const { class } = require("sdk/core/heritage"); const mypanel = class({ extends: panel, label: "my panel", tooltip: "my new devtool", icon: "./my-devtool.png", url: "./my-devtool.html", setup: function(options) { // my setup goes here }, dispose: function() { // my teardown goes here }, onready: function() { // i can send messages to // the panel document here } }); alternatively, you can use the extend function: const { extend } = require("sdk/core/heritage"); function mypanel() {}; mypanel.prototype = extend(panel.prototype, { label: "my panel", tooltip: "...", ....
... optional dispose function a function that will be called when the panel is about to be destroyed.
...uire("dev/toolbox"); const { class } = require("sdk/core/heritage"); // define the panel constructor const mypanel = class({ extends: panel, label: "my panel", tooltip: "my new devtool's panel", icon: "./my-icon.png", url: "./my-panel.html", // when the panel is created, // take a reference to the debuggee setup: function(options) { this.debuggee = options.debuggee; }, dispose: function() { this.debuggee = null; }, onready: function() { // in this function you can communicate // with the panel document } }); // export the constructor exports.mypanel = mypanel; // create a new tool, initialized // with the new constructor const mytool = new tool({ panels: { mypanel: mypanel } }); panel document environment the panel document loaded from the url p...
...And 2 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
eference file that calls the centralized preference file is located in $install_dir_moz_app/defaults/pref, for example in thunderbird this would be repectively for windows/linux: c:\program files\mozilla thunderbird\defaults\pref /usr/lib/thunderbird/default/pref ( it used to be in /usr/lib/thunderbird-version#/default/pref as in /usr/lib/thunderbird-5/default/pref ) for the record/history purpose ...
...it was apparently supposed to increase the load of the binary for a feature not used by lots of individuals.
...although it was corrected in mozilla mainstream: mozilla/extensions/pref/autoconfig/src/nsldapsyncquery.cpp 1.7.2.1 by late 2004, it is still present in thunderbird 1.0.2 at least :-(, so i applied the workaround i proposed in that bug report (start_pos += 1;).
...And 2 more matches
Source code directories overview - Archive of obsolete content
it is a living document which is (supposed to be) updated monthly according to changes in the mozilla source tree.
...although not required, these common names are typically used for a common purpose.
... content was split off from layout and contains objects as they are exposed to the dom.
...And 2 more matches
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
no menuitem constructor is exposed, because jetpack automatically boxes simple javascript objects into menuitem objects.
... xulid string the id of the menuitem's backing xul element, exposed for the benefit of advanced developers.
... menu bar menus jetpack.menu when you need to expose functionality through a menu but no menu in particular, do the right thing by using jetpack.menu, the "jetpack menu." jetpack.menu is a jetpack.menu object corresponding to a menu or region within a menu that jetpack sets aside for features.
...And 2 more matches
Elements - Archive of obsolete content
button - the button attribute imposes a filter on the handler.
... modifiers - the modifiers attribute imposes a filter on key and mouse handlers.
... keycode - the keycode attribute imposes a filter on key handlers.
...And 2 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
you can use this page if all you really want is a button for some special purpose.
...> <rdf:seq about="chrome://messenger/content/addressbook/addressbook.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- message --> <rdf:li> <rdf:seq about="chrome://messenger/content/messagewindow.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- message compose --> <rdf:li> <rdf:seq about="chrome://messenger/content/messengercompose/messengercompose.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- mail --> <rdf:li> <rdf:seq about="chrome://messenger/content/messenger.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> ...
... <!-- composer --> <rdf:li> <rdf:seq about="chrome://editor/content/editor.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- chat --> <rdf:li> <rdf:seq about="chrome://chatzilla/content/chatzilla.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- calendar --> <rdf:li> <rdf:seq about="chrome://calendar/content/calendar.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> </rdf:seq> </rdf:rdf> optionally customize the file by changing the displayname, description and author attributes.
...And 2 more matches
Using the Editor from XUL - Archive of obsolete content
editor creation so let's trace through the process of editor creation when bringing up the composer window.
... something, somewhere, tells mozilla to open the composer window.
...we are currently only able to have one editor per composer window; in future, relaxing this restriction would allow us to edit all the subdocuments in a frameset at the same time.
...And 2 more matches
RFE to the XForms API - Archive of obsolete content
ArchiveWebXFormsRFEXForms API
these are xforms dom and xforms interfaces that are exposed by xforms dom.
...for example, every visual xforms element exposes the nsixformsdelegate interface.
... if you need some additional functionality that shouldn't be exposed from the xforms element directly, then you should think which interface of the xforms element is more appropriate to expose it.
...And 2 more matches
WAI-ARIA basics - Learn web development
an important point about wai-aria attributes is that they don't affect anything about the web page, except for the information exposed by the browser's accessibility apis (where screenreaders get their information from).
... this last point is key — to use a screenreader in the first place, your operating system needs to run browsers that have the necessary accessibility apis in place to expose the information screenreaders need to do their job.
... next, you need to worry about whether the browsers in question support aria features and expose them via their apis, but also whether screenreaders recognise that information and present it to their users in a useful way.
...And 2 more matches
Test your skills: Selectors - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
...And 2 more matches
Images in HTML - Learn web development
so for example, if your image is called dinosaur.jpg, and it sits in the same directory as your html page, you could embed the image like so: <img src="dinosaur.jpg"> if the image was in an images subdirectory, which was inside the same directory as the html page (which google recommends for seo/indexing purposes), then you'd embed it like this: <img src="images/dinosaur.jpg"> and so on.
...its value is supposed to be a textual description of the image, for use in situations where the image cannot be seen/displayed or takes a long time to render because of a slow internet connection.
... for example, our above code could be modified like so: <img src="images/dinosaur.jpg" alt="the head and torso of a dinosaur skeleton; it has a large head with long sharp teeth"> the easiest way to test your alt text is to purposely misspell your filename.
...And 2 more matches
Index - Learn web development
there are a large number of these, and they often serve quite specific purposes.
... 136 how css is structured beginner, css, html, learn, selectors, structure, comments, properties, shorthand, values, whitespace now that you are beginning to understanding the purpose and use of css, let's examine the structure of css.
...that's the whole purpose of the cheatsheet, to give you some quick accurate ready to use code snippets for common usages.
...And 2 more matches
Basic math in JavaScript — numbers and operators - Learn web development
but for the purposes of this course, we'll just worry about number values.
...you can test this by typing in the following: typeof mynumber; to fix the calculation, you can do this: number(mynumber) + 3; arithmetic operators arithmetic operators are the basic operators that we use to do sums in javascript: operator name purpose example + addition adds two numbers together.
... first try entering some simple examples of your own, such as 10 + 7 9 * 8 60 % 3 you can also try declaring and initializing some numbers inside variables, and try using those in the sums — the variables will behave exactly like the values they hold for the purposes of the sum.
...And 2 more matches
Accessibility API cross-reference
we find that it uses very similar naming conventions as java accessibility, and for those purposes the two to be nearly the same.
... checkbutton check_box check_box checkbox or switch <input type=checkbox> pretty obvious what this is for clock n/a n/a timer <time> column of cells in a table - how would the user specifically point to this, as opposed to the column header or cells?
... complementary <aside> n/a but <div> or even <p> have been suggested for this purpose a widget that may contain navigable descendants or owned children.
...And 2 more matches
Mozilla’s UAAG evaluation report
this evaluation does not cover mailnews or composer.
...(p1) p the following line can be added to a user's prefs.js file to control blinking: user_pref("browser.blink_allowed", false); bug 89144 has been filed to expose this pref in the ui.
...(p2) vg preferences, advanced, scripts & windows - allow scripts to "open unrequested windows" we do not have a strategy to "alert the user and allow the user to open it on demand" we do not have exposed prefs for all of our popup control options.
...And 2 more matches
MathML Accessibility in Mozilla
in bug 1175269 and bug 1001641, we relied on the webkit's nsaccessibility mathml tree to expose the main constructions.
...at the moment, it is recommended to use a nightly build to ensure that the accessible tree expected by orca is correctly exposed.
... abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz not exposed to orca.
...And 2 more matches
PKCS11 Implement
general-purpose functions c_initialize the nss calls c_initialize on startup or when it loads a new module.
... multipurpose tokens provide the full range of cryptographic services.
...future releases of nss will also support multipurpose tokens that are fips-140 compliant.
...And 2 more matches
An Overview of XPCOM
the http component in gecko doesn't expose private classes it uses as separate components.
... the "stuff" that's internal to the component stays internal, and isn't exposed to xpcom.
...in this "semi-encapsulated" situation, the only part of the class that is exposed is a well-defined list of callable methods (i.e., the interface).
...And 2 more matches
imgIContainer
kdontanimmode 1 klooponceanimmode 2 kdisposeclearall -1 "disposal" method indicates how the image should be handled before the subsequent image is displayed.
... obsolete since gecko 2.0 kdisposenotspecified 0 leave frame, let new frame draw() on top.
... obsolete since gecko 2.0 kdisposekeep 1 leave frame, let new frame draw() on top.
...And 2 more matches
CustomEvent - Web APIs
the customevent interface represents events initialized by an application for any purpose.
... event.composed read only a boolean indicating whether or not the event can bubble across the boundary between the shadow dom and the regular dom.
...some other browsers are starting to support it for web compatibility purposes.
...And 2 more matches
Event - Web APIs
WebAPIEvent
note: one element can have several such handlers, even for the exact same event—particularly if separate, independent code modules attach them, each for its own independent purposes.
... event.composed read only a boolean indicating whether or not the event can bubble across the boundary between the shadow dom and the regular dom.
...some other browsers are starting to support it for web compatibility purposes.
...And 2 more matches
Timing element visibility with the Intersection Observer API - Web APIs
it turns out that one of the most common uses of flash or other script in advertising on the web is to record how long each ad is visible, for the purpose of billing and payment of revenues.
...we have no margins to extend or contract the intersection root's rectangle; we want to match the boundaries of the document's viewport exactly for intersection purposes.
...we need a one second refresh since we're displaying timers in all visible ads for the purposes of this example.
...And 2 more matches
NavigatorID - Web APIs
this property is kept only for compatibility purposes.
...this property is kept only for compatibility purposes.
...this property is kept only for compatibility purposes.
...And 2 more matches
Window.open() - Web APIs
WebAPIWindowopen
an offset is universally implemented by browser manufacturers (it is 29 pixels in ie6 sp2 with the default theme) and its purpose is to help users to notice new windows opening.
...the purpose of the return false in the code is to cancel default action of the link: if the onclick event handler is executed, then there is no need to execute the default action of the link.
...since your users are the ones who are supposed to use such windows (and not you, being the web author), the best is to avoid interfering with their habits and preferences.
...And 2 more matches
XRInputSourceEvent.frame - Web APIs
instead, the xrframe specified by the frame property is simply a method to provide access to the getpose() method, which you can use to get the relative positions of the objects in the scene at the time the event occurred.
... however, since the event frame isn't an animation frame, there is no viewer pose available to represent the viewer's current point of view; the results of calling getviewerpose() will be an xrviewerpose with an empty views list.
... examples this code shows a handler for the selectstart event which gets the target ray's pose from the frame, mapping the pose representing the ray (event.inputsource.targetrayspace) to the overall reference space myrefspace.
...And 2 more matches
XRSession: selectend event - Web APIs
after checking to ensure that the received event is a tracked-pointer event (the only kind we handle here), the target ray's pose is obtained using getpose().
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for selectstart events, a mybegintracking() function is called with the target ray pose's matrix.
... upon receiving a select event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
...And 2 more matches
XRSession: selectstart event - Web APIs
after checking to ensure that the received event is a tracked-pointer event (the only kind we handle here), the target ray's pose is obtained using getpose().
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for selectstart events, a mybegintracking() function is called with the target ray pose's matrix.
... upon receiving a select event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
...And 2 more matches
XRSession: squeezeend event - Web APIs
after checking to ensure that the received event is a tracked-pointer event (the only kind we handle here), the target ray's pose is obtained using getpose().
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for squeezestart events, a mybegintracking() function is called with the target ray pose's matrix.
... upon receiving a squeeze event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
...And 2 more matches
XRSession: squeezestart event - Web APIs
after checking to ensure that the received event is a tracked-pointer event (the only kind we handle here), the target ray's pose is obtained using getpose().
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for squeezestart events, a mybegintracking() function is called with the target ray pose's matrix.
... upon receiving a squeeze event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
...And 2 more matches
Operable - Accessibility
2.4.2 include page title (a) each web page should include an informative <title>, the content of which describes the page's content/purpose.
... 2.4.4 link purpose (in context) (a) the purpose/destination of a link can be determined from the link text, or from its surroundings (e.g.
...exceptions are where the link purpose is ambiguous to all users (see ambiguous to users in general for a useful explanation of this).
...And 2 more matches
-moz-context-properties - CSS: Cascading Style Sheets
syntax /* keyword values */ -moz-context-properties: fill; -moz-context-properties: fill, stroke; /* global values */ -moz-context-properties: inherit; -moz-context-properties: initial; -moz-context-properties: unset; values fill expose the fill value set on the image to the embedded svg.
... stroke expose the stroke value set on the image to the embedded svg.
... fill-opacity expose the fill-opacity value set on the image to the embedded svg.
...And 2 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
for example, suppose web content at https://foo.example wishes to invoke content on domain https://bar.other.
... requests with credentials the most interesting capability exposed by both xmlhttprequest or fetch and cors is the ability to make "credentialed" requests that are aware of http cookies and http authentication information.
... access-control-expose-headers the access-control-expose-headers header lets a server whitelist headers that browsers are allowed to access.
...And 2 more matches
Web audio codec guide - Web media technologies
because the compression algorithm is specifically designed for audio, it gives better results than would be achieved using a general-purpose compression algorithm.
...it's a good general-purpose audio codec that can efficiently handle both low-complexity audio such as speech as well as music and other high-complexity sounds.
... if you need to minimize latency during music playback, you should strongly consider opus, which has the lowest range of latencies of the general-purpose codecs (5 ms to 66.5 ms, compared to at least 100 ms for the others).
...And 2 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
they let svg markup and its resulting dom share information that standard attributes can't, usually for scripting purposes.
... 213 tabindex svg, svg attribute the tabindex attribute allows you to control whether an element is focusable and to define the relative order of the element for the purposes of sequential focus navigation.
...actually, that's its only purpose.
...And 2 more matches
widget - Archive of obsolete content
for example, suppose we want to implement a media player as an add-on.
... contentscriptoptions object read-only value exposed to content scripts under self.options property.
...nt element for the widget is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the widget has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
... for the widget view is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the widget view has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
lang/functional - Archive of obsolete content
compose(fn...) returns the composition of a list of functions, where each function consumes the return value of the function that follows.
... let { compose } = require("sdk/lang/functional"); let welcome = compose(exclaim, greet); welcome('moe'); // "hi: moe!"; function greet (name) { return "hi: " + name; } function exclaim (statement) { return statement + "!"; } parameters fn...
... : function takes a variable number of functions as arguments and composes them from right to left.
... returns function : the composed function.
StringView - Archive of obsolete content
for custom cycles, look at the example proposed here.
...this function will recompose all these parts into a codepoint.
...this function will recompose all these parts into a codepoint.
... stringview has been proposed as strawman for es2015 on ecmascript bugs.
Adding sidebars - Archive of obsolete content
for this purpose we'll also look at some handy xul elements in this section.
...for instance, you could have a window that is used for two different purposes, and the only difference between the two cases is a label that has a value in one case and something else in another.
...the alternative is to use a deck with the two labels, and change the selected index depending on the purpose of the window.
...it allows you to decompose complex ui into individual layers, broadening the layout possibilities.
The Essentials of an Extension - Archive of obsolete content
as we saw in the directory structure of the unpacked extension, the chrome is composed of 3 sections: content, locale and skin.
... the chrome as mentioned earlier, the chrome is composed of 3 sections: content, locale and skin.
...that's the purpose of the attribute: insertafter="appmenu_addons" appmenu_addons is the id of the menu element that corresponds to the add-ons menu item in the main menu.
... we'll see later how we can find out things like the ids of browser elements, but for now let's look at the elements that compose the hello world menu.
XPCOM Objects - Archive of obsolete content
firefox can be seen as composed of two layers.
...most of the objects and functions in the lower layers are hidden from the chrome; those that need to be publicized are exposed through xpcom components and interfaces.
...the ";1" at the end of the string is supposed to indicate the version of the component, although it shouldn't change much.
...the purpose of this code is to register the component so that you can get references to it just like all other firefox components.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
obviously most designs are a touch more complicated than this, but we don't need anything more for our purposes.
...there isn't supposed to be, since it's an example of how browsers have traditionally behaved.
...there have been many proposals to fix the problem, but one of the most promising approaches is the property line-box-contain, which has been proposed for inclusion in css3.
... should this property be adopted, then any browser supporting it could emulate traditional "shrinkwrap" behavior without risking other layout upset with the following rule: td {line-box-contain: font replaced;} /* proposed for css3 */ there are other possible fixes contained within the current css3 working drafts, such as line-height-policy.
jspage - Archive of obsolete content
e.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.collectgarbage){collectgarbage();}h=f=null;};var j=function(n,l,s,m,p,r){var o=n[s||l];var q=[];while(o){if(o.nodetype==1&&(!m||element.match(o,m))){if(!p){return document.id(o,r); }q.push(o);}o=o[l];}return(p)?new elements(q,{ddup:false,c...
....mergeattributes(u);v.removeattribute("uid");if(v.options){var w=v.options,s=u.options;for(var t=w.length;t--;){w[t].selected=s[t].selected;}}}var x=i[u.tagname.tolowercase()]; if(x&&u[x]){v[x]=u[x];}};if(o){var p=r.getelementsbytagname("*"),q=this.getelementsbytagname("*");for(var m=p.length;m--;){n(p[m],q[m]);}}n(r,this);return document.id(r); },destroy:function(){element.empty(this);element.dispose(this);g(this,true);return null;},empty:function(){$a(this.childnodes).each(function(l){element.destroy(l); });return this;},dispose:function(){return(this.parentnode)?this.parentnode.removechild(this):this;},haschild:function(l){l=document.id(l,true);if(!l){return false; }if(browser.engine.webkit&&browser.engine.version<420){return $a(this.getelementsbytagname(l.tagname)).contains(l);}return(this...
...omready={onadd:function(a){if(browser.loaded){a.call(this);}}};(function(){var b=function(){if(browser.loaded){return;}browser.loaded=true; window.fireevent("domready");document.fireevent("domready");};window.addevent("load",b);if(browser.engine.trident){var a=document.createelement("div"); (function(){($try(function(){a.doscroll();return document.id(a).inject(document.body).set("html","temp").dispose();}))?b():arguments.callee.delay(50);})(); }else{if(browser.engine.webkit&&browser.engine.version<525){(function(){(["loaded","complete"].contains(document.readystate))?b():arguments.callee.delay(50); })();}else{document.addevent("domcontentloaded",b);}}})();var json=new hash(this.json&&{stringify:json.stringify,parse:json.parse}).extend({$specialchars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f"...
...ptions.path; }if(this.options.duration){var a=new date();a.settime(a.gettime()+this.options.duration*24*60*60*1000);b+="; expires="+a.togmtstring();}if(this.options.secure){b+="; secure"; }this.options.document.cookie=this.key+"="+b;return this;},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escaperegexp()+"=([^;]*)"); return(a)?decodeuricomponent(a[1]):null;},dispose:function(){new cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});cookie.write=function(b,c,a){return new cookie(b,a).write(c); };cookie.read=function(a){return new cookie(a).read();};cookie.dispose=function(b,a){return new cookie(b,a).dispose();};var swiff=new class({implements:[options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"hi...
A XUL Bestiary - Archive of obsolete content
the purpose of this article is not to describe these items in any great detail but to define what they are in simple terms.
...menus, toolbars, buttons, and scrollbars are widgets, and so are such general purpose pieces as boxes and springs.
...there are, unfortunately, different document object models corresponding to different types of documents and also to different proprietary notions about what in a document should be exposed programmatically.
... in briefest terms, xul is the xml-based language used for creating interfaces, xptoolkit is the set of xul widgets (menus, toolbar, etc.) actually assembed for this purpose -- the building blocks of the interface, as it were -- and xpfe, the cross platform front end, is the front end that has been created from xptoolkit.
Custom toolbar button - Archive of obsolete content
you can use this page if all you really want is a button for some special purpose.
...e following content, and paste it into the new file: content custombutton chrome/ style chrome://global/content/customizetoolbar.xul chrome://custombutton/content/button.css # firefox overlay chrome://browser/content/browser.xul chrome://custombutton/content/button.xul # thunderbird mail overlay chrome://messenger/content/messenger.xul chrome://custombutton/content/button.xul # thunderbird compose overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://custombutton/content/button.xul # thunderbird address book overlay chrome://messenger/content/addressbook/addressbook.xul chrome://custombutton/content/button.xul # sunbird overlay chrome://calendar/content/calendar.xul chrome://custombutton/content/button.xul optionally remove the sections for toolbars that you...
...eymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://custombutton/content/button.js"/> <!-- firefox --> <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- thunderbird mail --> <toolbarpalette id="mailtoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- thunderbird compose --> <toolbarpalette id="msgcomposetoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- thunderbird address book --> <toolbarpalette id="addressbooktoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- sunbird --> <toolbarpalette id="calendartoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- button details ...
... note: the preference setting javascript.options.strict imposes restrictions that are not appropriate for the simple scripts in this tutorial.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
however, the rss <description> element is only suppose to be used to includeplain text data.
...(even through you are not suppose to.) for example, if your blog post was: this is <b>bold</b>.
...however, the <description> is not suppose to be used for any of this.
... it is only suppose to be used to includeplain text.
TCP/IP Security - Archive of obsolete content
tcp/ip communications are composed of four layers that work together.
... at each layer, the logical units are typically composed of a header and a payload.
... one example is secure multipurpose internet mail extensions (s/mime), which is commonly used to encrypt email messages.
... an internet-based connection is typically composed of several physical links chained together; protecting such a connection with data link layer controls would require deploying a separate control to each link, which is not feasible.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
we leverage some of these ideas to help you make your netscape communicator 4.x plugins exposed to javascript in mozilla based browsers.
... *aclassidnoalloc) {return ns_error_not_implemented;} }; class nsscriptablepeer : public nsitestplugin, public nsclassinfomixin { public: nsscriptablepeer(); ~nsscriptablepeer(); ns_decl_isupports ns_decl_nsitestplugin }; nsscriptablepeer::nsscriptablepeer() { ns_init_isupports(); } nsscriptablepeer::~nsscriptablepeer() { } // notice that we expose our claim to implement nsiclassinfo.
...npp_getvalue implementation and possible scenario of scriptable object life cycle #include "nsitestplugin.h" nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char* argn[], char* argv[], npsaveddata* saved) { if(instance == null) return nperr_invalid_instance_error; // just prime instance->pdata with null for the purpose of this example // it will be assigned to the scriptable interface later to keep its // association with the specific plugin instance instance->pdata = null; return rv; } nperror npp_getvalue(npp instance, nppvariable variable, void *value) { if(instance == null) return nperr_invalid_instance_error; nperror rv = nperr_no_error; static nsiid scriptableiid = ns...
...for the purpose of this example to keep things simple // we just assign it to instance->pdata after we create it.
HTML: A good basis for accessibility - Learn web development
previous overview: accessibility next a great deal of web content can be made accessible just by making sure the correct hypertext markup language elements are used for the correct purpose at all times.
...this means using the correct html elements for their intended purpose as much as possible.
... html5 includes two new elements — <figure> and <figcaption> — which are supposed to associate a figure of some kind (it could be anything, not necessarily an image) with a figure caption: <figure> <img src="dinosaur.png" alt="the mozilla tyrannosaurus"> <figcaption>a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.</figcaption> </figure> unfortunately, most screen readers don't seem ...
... empty alt attributes <h3> <img src="article-icon.png" alt=""> tyrannosaurus rex: the king of the dinosaurs </h3> there may be times where an image is included in a page's design, but its primary purpose is for visual decoration.
HTML: A good basis for accessibility - Learn web development
previous overview: accessibility next a great deal of web content can be made accessible just by making sure the correct hypertext markup language elements are used for the correct purpose at all times.
...this means using the correct html elements for their intended purpose as much as possible.
... html5 includes two new elements — <figure> and <figcaption> — which are supposed to associate a figure of some kind (it could be anything, not necessarily an image) with a figure caption: <figure> <img src="dinosaur.png" alt="the mozilla tyrannosaurus"> <figcaption>a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.</figcaption> </figure> unfortunately, most screen readers don't seem ...
... empty alt attributes <h3> <img src="article-icon.png" alt=""> tyrannosaurus rex: the king of the dinosaurs </h3> there may be times where an image is included in a page's design, but its primary purpose is for visual decoration.
Test your skills: Flexbox - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Test your skills: Grid Layout - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the code below to create your example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
What is JavaScript? - Learn web development
in this article we will look at javascript from a high level, answering questions such as "what is it?" and "what can you do with it?", and making sure you are comfortable with javascript's purpose.
...we can mark it up using html to give it structure and purpose: <p>player 1: chris</p> then we can add some css into the mix to get it looking nice: p { font-family: 'helvetica neue', helvetica, sans-serif; letter-spacing: 1px; text-transform: uppercase; text-align: center; border: 2px solid rgba(0,0,200,0.6); background: rgba(0,0,200,0.3); color: rgba(0,0,200,0.6); box-shadow: 1px 1px 2px rgba(0,0,200,0.4); border-radius: 10px; padd...
... browser apis are built into your web browser, and are able to expose data from the surrounding computer environment, or do useful complex things.
...the code we used above to serve this purpose looks like this: const buttons = document.queryselectorall('button'); for(let i = 0; i < buttons.length ; i++) { buttons[i].addeventlistener('click', createparagraph); } this might be a bit longer than the onclick attribute, but it will work for all buttons — no matter how many are on the page, nor how many are added or removed.
Getting started with React - Learn web development
these components can be composed together to create a full ui, and react abstracts away much of the rendering work, leaving you to concentrate on the ui design.
... suppose we wanted to wrap our heading in a <header> tag, for semantic reasons?
...these parts can be big or small, but they are usually clearly defined: they serve a single, obvious purpose.
...this is the same as the class attribute in html, but because jsx is javascript, we can't use the word class — it's reserved, meaning javascript already uses it for a specific purpose and it would cause problems here in our code.
Multiprocess on Windows
one of the better pieces of documentation is a two-part series written by jeff prosise: understanding com apartments, part i understanding com apartments, part ii for the purposes of this document, "com" will refer to microsoft com (as opposed to xpcom).
...the windows message queue carries a lot of baggage for the purposes of maintaining backward compatibility.
...unfortunately, crossing apartment boundaries using com incurs the exact same problem as crossing process boundaries: if we directly use com's built in marshaling capabilities to forward an rpc from the mta to the main thread sta, com will still use the sta's message queue, thus defeating the purpose of using the mta in the first place!
... using the interceptor in a11y code unlike the built in com marshaling schemes, we must explicitly wrap any com objects that we want to expose, through the mta with interceptors.
Displaying Places information using views
this is useful when you need the id for another purpose or when a treecol is contained in anonymous content, as in xbl.
... the built-in tree view is provided as a general-purpose convenience.
...it's not so useful for our purposes here.
... fortunately you can commandeer parts of the built-in tree view to suit your purposes.
Firefox UI considerations for web developers
rich icons the high resolution icons—also known as rich icons—are specified by setting the rel attribute to one of: apple-touch-icon apple-touch-icon-precomposed fluid-icon the size of each icon is taken from the size attribute specified on the <link>, if it's provided.
... apple-touch-icon and apple-touch-icon-precomposed icons with no size attribute are assumed to be the standard classic iphone size of 57x57 pixels.
... hootsuite the html on hootsuite's site looks roughly like this: <link rel="shortcut icon" href="/dist/images/icons/favicon.ico"> <link rel="apple-touch-icon-precomposed" href="/dist/images/icons/apple-touch-icon.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/dist/images/icons/apple-touch-icon_72.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/dist/images/icons/apple-touch-icon@2x.png"> firefox starts by looking for an svg icon; there is none.
...here, there are three of them, each specified as apple-touch-icon-precomposed.
source-editor.jsm
the source-editor.jsm javascript code module implements an editor specifically tailored for editing source code; its primary purpose is to provide support for web developer tools to display and edit web site code.
...its functionality is all exposed through source-editor.jsm.
...the source editor code module loads a module by the name "source-editor-<component>.jsm" and exposes its api as part of the sourceeditor object.
...all changes made to the text between the two calls is considered to be a single edit for the purposes of undo operations.
Localization content best practices
for example, suppose this string needs to be changed from "event" to "add new event": new-event-header = event add-new-event-header is definitely a better choice for the new string than new-event-header1.
... don't forget to add a localization note when: part of the string is not supposed to be localized (for example, the name of an html attribute in a warning).
...if you already know that your strings are temporary, they shouldn't be exposed to the localization process.
... unless there are significant savings of translation volume involved, it is usually easier and quicker for translators to handle these as fixed strings rather than composed strings, especially considering the time needed for locating, checking and potentially fixing composed strings.
Intel Power Gadget
these are reasonably useful for power profiling purposes, but mozilla's rapl utility provides these along with gpu and ram estimates, and in a command-line format that is often easier to use.
...these measurements aren't particularly useful for power profiling purposes.
...this is interesting, but again not useful for power profiling purposes.
... (an energia dashboard can be seen here; please note that the data has not been updated since early 2014.) version 3.0 (available on mac and windows, but not on linux) also exposes an api from which the same measurements can be extracted programmatically.
NSPR Contributor Guide
new features for purposes of this paper, a "new feature" is defined as some api addition that goes into the core nspr library, for example: libnspr4.dll nspr is mostly complete.
...your proposed api should encapsulate a relatively low level capability as would be found in a system call or libc.
...when you consider a new api for nspr ask yourself if your proposed feature can implement it across all platforms supported by nspr.
...for purposes of this paper, a "new library" is defined as a libary under the mozilla/nsprpub/lib directory tree and built as a separate library.
NSS API Guidelines
cmmf no longer exists as a proposed standard; cmmf functions have been incorporated into the proposal for certificate management protocols (cmp).
... structure members for exposed data structures should have the form capitalizedenglishwords (the first letter uncapitalized).
...there seem to be three reasonable options: enum members have the same standard as exposed data structure members.
...so here are some guidelines to make them more manageable: all callback operating search functions should be in the low level of the api, if exposed at all.
Hacking Tips
to where you came from with the following set of gdb commands: (gdb) record full (gdb) si (gdb) record goto 0 (gdb) record stop if you have a core file, you can use the gdb unwinder the same way, or do everything from the command line as follow: $ gdb -ex 'enable unwinder .* spidermonkey' -ex 'bt 0' -ex 'thread apply all backtrace' -ex 'quit' out/dist/bin/js corefile the gdb unwinder is supposed to be loaded by dist/bin/js-gdb.py and load python scripts which are located in js/src/gdb/mozilla under gdb.
... (gdb) x /64a $sp […] 0x7fffffff9838: 0x7ffff7fad2da 0x141 0x7fffffff9848: 0x7fffef134d40 0x2 […] (gdb) p (*(jsfunction**) 0x7fffffff9848)->u.i.script_->lineno $1 = 1 (gdb) p (*(jsfunction**) 0x7fffffff9848)->u.i.script_->filename $2 = 0xff92d1 "typein" the stack is order as defined in js/src/ion/ionframes-x86-shared.h, it is composed of the return address, a descriptor (a small value), the jsfunction (if it is even) or a jsscript (if the it is odd, remove it to dereference the pointer) and the frame ends with the number of actual arguments (a small value too).
.../* open your png viewer with the result of iongraph */ this gdb instrumentation is supposed to work with debug builds, or with optimized build compiled with --enable-jitspew configure flag.
...gdb does not expose // enough information to restrict the watchpoint to just a single bit.
JS_DumpHeap
enum jsgctracekind { // these trace kinds have a publicly exposed, although opaque, c++ type.
... jstrace_object = 0x00, jstrace_string = 0x01, jstrace_symbol = 0x02, jstrace_script = 0x03, // shape details are exposed through js_traceshapecyclecollectorchildren.
... jstrace_outofline = 0x07, // the following kinds do not have an exposed c++ idiom.
...not all of the matching c++ types are exposed, and those that are, are opaque.
How to build an XPCOM component in JavaScript
implementation this example component will expose a single method, which returns the string "hello world!".
... defining the interface if you want to use your component in other xpcom components, you must define the interfaces that you want exposed.
...using the generateqi helper (remove argument if skipped steps above) queryinterface: xpcomutils.generateqi([components.interfaces.nsihelloworld]), // optional, but required if you want your component to be exposed to dom classinfo: xpcomutils.generateci({classid: components.id("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"), contractid: "@dietrich.ganx4.com/helloworld;1", interfaces: [ci.nsihelloworld], flags: ci.nsiclassinfo.dom_object}), // ...component implementation...
... // define the function we want to expose in our interface hello: function() { return "hello world!"; }, }; xpcomutils does the work of creating the module and factory for you after this.
Finishing the Component
the interfaces needed to block certain urls from loading are not frozen, and there is still some debate about how exactly this functionality should be exposed to embedders and component developers, so the apis are not ready to be published.
... the danger of using unfrozen interfaces suppose that you need to use the interface nsifoo that isn't frozen.
...moreover, since this interface was never supposed to be used by clients other than gecko or mozilla, the maintainers of the interface don't know that it's being used, and don't change the iid of the interface.
...an interface reaches this state when a group of module owners and peers are actively engaged in discussion about how best to expose it.
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
complex input stream types type purpose native class contract id interface how to bind to a primitive input stream multiplex concatenate multiple input streams into one.
... nsmimeinputstream @mozilla.org/network/mime-input-stream;1 nsimimeinputstream .setdata(stream) similarly, there are complex output streams which build from primitive output streams: complex output stream types type purpose native class contract id interface how to bind to a primitive output stream buffered store data in a buffer until the buffer is full or the stream closes.
... (xxx nsiunicharinputstream interface) (xxx nsiunicharlineinputstream interface) (xxx nsisearchableinputstream interface) stream converters (tbd: @mozilla.org/streamconverters;1) forcing an input stream to be read suppose you already have an input stream, and something to read from that input stream...but the reader doesn't do anything with the stream.
... suppose that reader also implements nsistreamlistener.
XUL Overlays
MozillaTechXULOverlays
since one of the main purposes of overlays is to provide ui for additions or components to the basic package, explicit loading can be somewhat problematic when the overlay defines optional ui elements.
...because an overlay is superimposed on the master document, there are no ambiguities relating to scoping of style sheets or scripts.
...since the purpose of an overlay is to define new ui elements for a package within the context of that package's skin, the overlay should add structure but not new style.
...in the base file, the html image element points to a netscape gif icon: <html:img id="foo" src="netscapeimage.gif"/> in the overlay, an element with the same id attribute specifies a different image, and that image is superimposed on top of the original netscape image as part of the merge process: <html:img id="foo" src="mozillaimage.gif"/> when the base file references an overlay file which contains the html image element above, the new src attribute is superimposed over the original, and the mozilla icon replaces the netscape icon.
Mozilla
a bird's-eye view of the mozilla framework the purpose of this article is to provide a high-level technical overview of the architecture of the extensible, object-based mozilla application framework.
... how test harnesses work mozilla test harnesses are typically composed of a python runner that invokes firefox, utilizes the browser to run tests, and reports the results.
... javascript tips javascript-dom prototypes in mozilla when a dom node is accessed from javascript in mozilla, the native c++ dom node is wrapped using xpconnect and the wrapper is exposed to javascript as the javascript representation of the dom node.
...all the methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
HTMLImageElement.alt - Web APIs
there are separate attributes and elements designed for those purposes.
...r; } .left-margin img { width: 6em; } .contents { background-color: rgb(241, 240, 235, 255); height: 100%; margin-left: 2em; padding-top: 1em; padding-left: 2em; padding-right: 1em; } result images used as buttons when using an image as a button (by using it as the only visible child of an <a> element representing a hyperlink), the alt attribute must be used to convey the purpose of the button.
... in other words, it should be the same text you would use in a textual button to serve the same purpose.
... in this example, a starburst image with the word "new!" is used to indicate that an article is about something new (and probably supposedly also exciting).
Using the Payment Request API - Web APIs
tions invoked inside the constructor simply return the required object parameters: function buildsupportedpaymentmethoddata() { // example supported payment methods: return [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard'], supportedtypes: ['debit', 'credit'] } }]; } function buildshoppingcartdetails() { // hardcoded for demo purposes: return { id: 'order-123', displayitems: [ { label: 'example item', amount: {currency: 'usd', value: '1.00'} } ], total: { label: 'total', amount: {currency: 'usd', value: '1.00'} } }; } starting the payment process once the paymentrequest object has been created, you call the paymentrequest.show() method on it to initiate the pay...
...for this demo, simulate immediate success: paymentresponse.complete('success') .then(function() { // for demo purposes: intropanel.style.display = 'none'; successpanel.style.display = 'block'; }); }) this object provides the developer with access to details they can use to complete the logical steps required after the payment completes, such as an email address to contact the customer, a shipping address for mailing goods out to them, etc.
...for this demo, simulate immediate success: paymentresponse.complete('success') .then(function() { // for demo purposes: intropanel.style.display = 'none'; successpanel.style.display = 'block'; }); }).catch(function(error) { if (error.code == domexception.not_supported_err) { window.location.href = 'https://bobpay.xyz/#download'; } else { // other kinds of errors; cancelled or failed payment.
... for demo purposes: intropanel.style.display = 'none'; legacypanel.style.display = 'block'; } }); }); note: see our recommending a payment app when user has no apps demo for the full code.
RTCIceCandidate.address - Web APIs
security notes it's important to note here that although webrtc does not require the two peers on an rtcpeerconnection to know one another's true ip addresses, the address property on rtcicecandidate can expose more information about the source of the remote peer than the user expects.
...it can also be used for fingerprinting purposes.
... the candidate ip addresses are always exposed to the application through address, and unsavory applications can in turn potentially reveal the address to the user.
...doing so prevents the remote user's address from being exposed, but reduces the pool of available candidates to choose from.
WebRTC connectivity - Web APIs
this description includes all the information about the caller's proposed configuration for the call.
...because during renegotiation, an offer might be rejected because it proposes an incompatible format, it's necessary that each endpoint have the ability to propose a new format but not actually switch to it until it's accepted by the other peer.
...once the proposed description has been agreed upon, the value of currentlocaldescription or currentremotedescription is changed to the pending description, and the pending description is set to null again, indicating that there isn't a pending description.
...typically, each peer will propose its best candidates first, making their way down the line toward their worse candidates.
Signaling and video calling - Web APIs
candidate the sdp candidate string, describing the proposed connection method.
... note: obviously, it would be more efficient to update the list by adding and removing individual users instead of rebuilding the whole list every time it changes, but this is good enough for the purposes of this example.
... once the rtcpeerconnection has been created, we request access to the user's camera and microphone by calling mediadevices.getusermedia(), which is exposed to us through the navigator.mediadevices.getusermedia property.
...our example doesn't use this for anything, but it can be useful to watch these events for debugging purposes, as well as to detect when candidate collection has finished.
Using bounded reference spaces - Web APIs
not only is it represented by a unique subclass, xrboundedreferencespace, but it's the only one which restricts movement based not upon virtual restrictions but upon limitations imposed by the real world.
... introduction a bounded reference space is one which represents an xr environment in which the user is able to move around physically in the real world while being tracked by the xr hardware, with their movements being then transposed into the simulation.
... requirements because a bounded reference space establishes a limited area in which the user can move, it naturally imposes a limit on how large the simulated environment can be.
....then(onrefspacecreated) .catch(() => { spacetype = "local-floor"; xrsession.requestreferencespace(spacetype) .then(onrefspacecreated) .catch(handleerror); }); } function onrefspacecreated(refspace) { xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); // now set up matrices, create a secondary reference space to // transform the viewer's pose, and so forth.
Geometry and reference spaces in WebXR - Web APIs
this two cubic meter space encompasses the entire universe for the purposes of your code.
... once created, an xrreferencespace guarantees a certain level of support for motion and orientation tracking, and provides a mechanism for obtaining an xrviewerpose from which you can get a matrix which represents the position and facing direction of the space relative to the world space, if the space represents a viewer such as the user's headset, an observer's headset, or a virtual camera.
... the primary reference space types the viewer reference space corresponds to the viewer's position in space; it's used by the xrviewerpose returned by the xrframe method getviewerpose().
...the reference space's configuration is then able to provide you with the view matrices and object poses needed to correctly render the contents of the space.
XRRigidTransform.inverse - Web APIs
applying the inverse of a transform to any object previously transformed by the parent xrrigidtransform always undoes the transformation, resulting in the object returning to its previous pose.
... examples in this example, the model view matrix for an object is computed by taking the view matrix and multiplying it by the object's pose matrix.
... let modelviewmatrix = mat4.create(); for (let view of pose.view) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* ...
...*/ } this outline of a renderer's core code shows how the pose's view gets represented by taking its transform's inverse's matrix as the model view matrix used to transform objects based on the viewer's position and orientation.
XRView.transform - Web APIs
WebAPIXRViewtransform
the read-only transform property of the xrview interface is an xrrigidtransform object which provides the position and orientation of the viewpoint relative to the xrreferencespace specified when the xrframe.getviewerpose() method was called to obtain the view object.
... const modelviewmatrix = mat4.create(); const normalmatrix = mat4.create(); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); for (let obj of world.objects) { mat4.multiply(modelviewmatrix, view.transform.inverse.matrix, obj.matrix); mat4.invert(normalmatrix, modelviewmatrix); mat4.transpose(normalmatrix, normalmatrix); obj.render(modelviewmatrix, normalmatrix); } } two mat...
... then we iterate over each xrview found in the xrviewerpose's list of views.
...currently, webxr doesn't support more than two views per pose, although room has been left to extend the specification to support that in the future with some additions to the api.
Perceivable - Accessibility
ui controls such as form elements and buttons should have text labels that describe their purpose.
... understanding orientation 1.3.5 identify input purpose (aa) added in 2.1 follow the list of 53 input fields to programmatically identify the purpose of a field.
... understanding identify input purpose 1.3.6 identify purpose (aaa) added in 2.1 in content implemented using markup languages, the purpose of user interface components, icons, and regions can be programmatically determined.
... understanding identify purpose note: also see the wcag description for guideline 1.3: adaptable: create content that can be presented in different ways without losing information or structure.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
headings use size to indicate their relative importance, but css is preferred for general-purpose resizing.
...it makes logical sense — <h1> is the most important heading, and tells you what the purpose of the overall page is.
... sectioning content can be labeled using a combination of the aria-labelledby and id attributes, with the label concisely describing the purpose of the section.
...if labels were not provided, the person using screen reading software may have to investigate each nav element's contents to determine their purpose.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
there are many other attributes to achieve various purposes: referrer/cors control for security and privacy: see crossorigin and referrerpolicy.
...for example, (max-height: 500px) 1000px proposes to use a source of 1000px width, if the viewport is not higher than 500px.
...each string is composed of: a url to an image optionally, whitespace followed by one of: a width descriptor (a positive integer directly followed by w).
...if the alt attribute is purposefully left off because the image has no textual equivalent, consider alternate methods to present what the image is trying to communicate.
HTTP Index - HTTP
WebHTTPIndex
it was designed for communication between web browsers and web servers, but it can also be used for other purposes.
... 9 mime types (iana media types) content-type, guide, http, mime types, meta, request header, response header, application/javascript, application/json, application/xml a media type (also known as a multipurpose internet mail extensions or mime type) is a standard that indicates the nature and format of a document, file, or assortment of bytes.
... 55 access-control-allow-credentials access-control-allow-credentials, cors, http, reference, credentials, header the access-control-allow-credentials response header tells browsers whether to expose the response to frontend javascript code when the request's credentials mode (request.credentials) is include.
... 59 access-control-expose-headers cors, http, reference, header the access-control-expose-headers response header indicates which headers can be exposed as part of the response by listing their names.
Indexed collections - JavaScript
suppose you define the following array: let myarray = ['wind', 'rain', 'fire'] you can refer to the first element of the array as myarray[0], the second element of the array as myarray[1], etc… the index of the elements begins with zero.
... reverse() transposes the elements of an array, in place: the first array element becomes the last and the last becomes the first.
... let myarray = new array('1', '2', '3') myarray.reverse() // transposes the array so that myarray = ["3", "2", "1"] sort() sorts the elements of an array in place, and returns a reference to the array.
... isnumber(value) { return typeof value === 'number' } let a1 = [1, 2, 3] console.log(a1.some(isnumber)) // logs true let a2 = [1, '2', 3] console.log(a2.some(isnumber)) // logs true let a3 = ['1', '2', '3'] console.log(a3.some(isnumber)) // logs false reduce(callback[, initialvalue]) applies callback(accumulator, currentvalue[, currentindex[, array]]) for each value in the array for the purpose of reducing the list of items down to a single value.
Working with objects - JavaScript
for example, suppose you want to create an object type for cars.
...for example, suppose you define an object called person as follows: function person(name, age, sex) { this.name = name; this.age = age; this.sex = sex; } and then instantiate two new person objects as follows: var rand = new person('rand mckinnon', 33, 'm'); var ken = new person('ken jones', 39, 'm'); then, you can rewrite the definition of car to include an owner property that takes a person object, as f...
...for example, suppose you have 2 objects, managerand intern.
...o.c = 50; // <-- at this point the set c(x) method is initiated console.log(o.a); // 25 the o object's properties are: o.a — a number o.b — a getter that returns o.a plus 1 o.c — a setter that sets the value of o.a to half of the value o.c is being set to please note that function names of getters and setters defined in an object literal using "[gs]et property()" (as opposed to __define[gs]etter__ ) are not the names of the getters themselves, even though the [gs]et propertyname(){ } syntax may mislead you to think otherwise.
Classes and Inheritance - Archive of obsolete content
however, to fully appreciate how class works, and the problem it is supposed to solve, it is recommended that you read the entire article.
...to illustrate this, let's add a member function to the class shape: shape.prototype.draw = function () { throw error("not yet implemented"); } let shape = shape(2, 3); shape.draw(); // => error: not yet implemented inheritance and constructors suppose we want to create a new class, circle, and inherit it from shape.
...the constructor property is supposed to be non-configurable, non-enumberable, and non-writable, so the correct way to define it is as follows: circle.prototype = object.create(shape.prototype, { constructor: { value: circle } }); overriding methods as a final example, we show how to override the stub implementation of the method draw in shape with a more specialized one in circle.
Private Properties - Archive of obsolete content
however, the use of an underscore prefix is just a coding convention and is not enforced by the language: there is nothing to prevent a user from directly accessing a property that is supposed to be private.
...before explaining how weakmaps work, the following looks at how ordinary objects can be used as hash maps, by creating a simple image cache: let images = {}; function getimage(name) { let image = images[name]; if (!image) { image = loadimage(name); images[name] = image; } return image; } now suppose there's a need to associate a thumbnail with each image.
...among other things, add-ons should not be able to access variables that are supposed to be private.
XUL Migration Guide - Archive of obsolete content
for example, action buttons appear by default in the main firefox toolbar (although users may relocate them by toolbar customization) because it makes for a better user experience for add-ons to expose their interfaces in a consistent way.
... similarly, the supported apis expose only a small fraction of the full range of xpcom functionality.
... using the low-level apis in addition to the high-level apis, the sdk includes a number of low-level apis some of which, such xhr and window/utils, expose powerful browser capabilities.
core/promise - Archive of obsolete content
}); consuming promises in general, the whole purpose of promises is to avoid the so-called callback spaghetti.
...module exports promised function to do exactly that: const { promised } = require('sdk/core/promise'); function sum(x, y) { return x + y }; var asyncsum = promised(sum); var c = sum(a, b); var casync = asyncsum(aasync(), basync()); promised takes normal function and composes new promise-aware version of it.
... the composed function may take both normal values and promises as arguments and returns promise.
ui/sidebar - Archive of obsolete content
once you've finished using the sidebar you can destroy it by calling its dispose() method.
...once a sidebar is no longer needed it can be destroyed using dispose().
... methods dispose() destroys the sidebar.
cfx to jpm - Archive of obsolete content
the id is used for a variety of purposes.
... requiring local modules suppose your add-on is structured into separate modules: my-addon lib main.js utils.js when you want to use the "utils" module in "main.js", you should use a path relative to "main.js", and prefix the path with "./" to indicate that it's a relative path: var utils = require("./utils"); however, with cfx you are also allowed to omit the "./": var utils = require(...
... requiring modules from test code similarly, suppose you've written some tests for your add-on: my-addon lib my-addon.js test test-my-addon-js with cfx, code inside "test-my-addon.js" can import "my-addon.js" using a statement like this: var my_addon = require("my-addon"); // this will not work with jpm!
Localization - Archive of obsolete content
s: use the .properties format are named "xx-yy.properties", where "xx-yy" is the name of the locale in question contain one entry for each string you want to localize, consisting of an identifier for the string and its translation in that locale, in the format identifier=translation need to use utf-8 without bom encoding lines starting with "#" (after optional whitespace) are comments suppose your add-on contains a single localizable string, represented in english as "hello!", and you want to supply us english and french french localizations.
... for example, suppose we want to include a localized string naming a person's home town.
... for example, suppose your "package.json" defines a single preference: { "preferences": [ { "type": "string", "name": "monster_name", "value": "gerald", "title": "name" } ], "name": "monster-builder", "license": "mpl 2.0", "author": "me", "version": "0.1", "title": "monster builder", "id": "monster-builder@me.org", "de...
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
use of mozilla interfaces that are not exposed via xpcom (e.g.
...personally i like placing these directly under the root directory of my module, but i don't suppose it makes any difference if you prefer putting them under a chrome/ subdirectory or whatever.
...by convention the "_s" suffix is used for this purpose.
Handling Preferences - Archive of obsolete content
firefox exposes its most common high-level preferences through the preferences window and other parts of its ui.
... note: the purpose of the defaults directory is to hold non-code files your extension needs.
...the element and its children are completely invisible, and their purpose is to list the preferences to be used in the window/pane.
CSS3 - Archive of obsolete content
detection of ecmascript support, using the script media features is also proposed.
... stable modules a few css modules are already fairly stable and have reached one of the three recommendation level of the csswg: candidate recommendation, proposed recommendation or recommendation.
... css writing modes module level 3 proposed recommendation defines the writing modes of both horizontal and vertical scripts and clarifies how the css direction and unicode-bidi properties interact with the new css text-orientation property, and extends them where needed.
MMgc - Archive of obsolete content
unmanaged memory mmgc is not only a garbage collector, but a general-purpose memory manager.
...gcweakref can be used for this purpose.
...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.
Dehydra Function Reference - Archive of obsolete content
it is not possible to define new warnings in dehydra, thus one has to figure out a warning code from an existing warning and hijack it for ulterior purposes.
...builtin objects sys this.sys is a container for miscellaneous properties exposes by dehydra sys.gcc_version is a gcc version string sys.include_path exposes the search path used by include().
... the default value is the following directories: the directory of the dehydra script being processed the libs directory next to the gcc_dehydra.so plugin user script may add additional directories sys.aux_base_name exposes the base filename part of the file being compiled sys.frontend exposes the compiler frontend (e.g.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
for all other purposes you should check for the feature you need rather than the browsers you think will support that feature.
...however, the issues usually lie in the apis that a browser exposes to javascript, such as the dom hooks.
...window.event : aevent; } </script> the properties and functions that the event object exposes are also often named differently in mozilla and internet explorer, as table 4 shows.
Prism - Archive of obsolete content
minimal user interface: a general-purpose browser ui is not necessary or appropriate for most web apps.
...we intend to propose these extensions for inclusion in future versions of xulrunner.
...some simple objects and utilities are exposed to webapp scripts.
The new nsString class implementation (1999) - Archive of obsolete content
these should typically not be exposed to objects in other modules.
...the i18n folks will tell you it's better to use a wide string and convert to 1-byte forms for this purpose even though there is a performance penalty for doing so.
...i'm wondering if this is sufficient, namely, that a string can return it's own (shared) allocator for this purpose.
Using XPInstall to Install Plugins - Archive of obsolete content
error conde: " + err); return err; } installing to a secondary location for the purposes of solving the first install problem, it is necessary to install to a secondary location to ensure discoverability of the plugin by other netscape gecko browser in addition to the current browser.
...this is accomplished with the winreg object that is exposed to xpinstall.
...additionally, via the installtrigger object which is exposed in web pages, they can find out what the last version of the xpi package was.
The Joy of XUL - Archive of obsolete content
this poses a significant problem in team environments because the skills required to develop these two parts are often satisfied by different people.
...but overlays can also be specified externally, enabling the designer to superimpose them upon an application without changing the original source.
...it uses simple xul components like boxes, grids, and stacks to compose views for the weeks, days, and months.
Skinning XUL Files by Hand - Archive of obsolete content
since the purpose of the global skin is to create a look for the entire application or chrome that can be changed dynamically, you should not create style information in a custom css file that controverts the global skin unless you really mean to.
... thinking skins sometimes you can become so involved in the details of xul and mozilla's other xp tools that you can lose sight of what the purpose and impact of these technologies are.
... the purpose of this split between xul and its skins -- and between the global skin and whatever custom styles you might create -- is to enable the dynamic skinning of applications such as the mozilla browser.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
this table is designed to show how to expose text properly for various xul element types.
... firefox exposes the position, cardinality, and depth of each tree item through the accessible description fixme: exact format?
... treecell see tree treechildren see tree treecol see tree treecols see tree treeitem see tree treerow see tree elements that do not expose anything to screen readers/have no discovered accessibility issues yet: arrowscrollbox bbox box grippy hbox menuseparator overlay page script spacer splitter stringbundle stringbundleset vbox window elements not processed yet: action binding bindings broadcaster broadcasterset conditions content dialog dialogheader editor listcell member observes preference preferences prefpane prefwindow resizer richlistbox richlistitem resizer rule scrollbar scrollbox scrollcorner separator template textn...
Using IO Timeout And Interrupt On NT - Archive of obsolete content
nt's <tt>cancelio()</tt> function would be ideal for this purpose.
...for example, suppose thread a and thread b call <tt>pr_accept()</tt> on the same socket, and they time out at the same time.
...suppose the file descriptor is intended to be used for the life time of the process, for example, the logging file, this is really not acceptable.
Array comprehensions - Archive of obsolete content
array comprehension was previously proposed to be standardized in ecmascript 2016, it provide a useful shortcut for constructing a new array based on the contents of another.
...here is a comprehension which selects only even numbers: var numbers = [1, 2, 3, 21, 22, 30]; var evens = [for (i of numbers) if (i % 2 === 0) i]; console.log(evens); // logs 2,22,30 filter() can be used for the same purpose: var evens = numbers.filter(i => i % 2 === 0); map() and filter() style operations can be combined into a single array comprehension.
... here is one that filters just the even numbers, then creates an array containing their doubles: var numbers = [1, 2, 3, 21, 22, 30]; var doubledevens = [for (i of numbers) if (i % 2 === 0) i * 2]; console.log(doubledevens); // logs 4,44,60 the square brackets of an array comprehension introduce an implicit block for scoping purposes.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
the purpose of this document is to discuss and emphasize the importance of conforming to open technology standards that are external to the organization.
...when projects are proposed, they are evaluated to ensure compatibility with the overall business strategy.
...for example, if an organization is developing a web-based client, they may have to adhere to standards imposed by these organizations: ansi (american national standards institute ) atsc (advanced television systems committee ) ieee (institute of electrical and electronics engineers ) ietf (internet engineering task force ) irtf (internet research task force ) iso (international standards organization ) itu (international telecommunication union ) oasis (organization for the advancement of struc...
The Business Benefits of Web Standards - Archive of obsolete content
strict html (as opposed to the often-used transitional html markup), forces the designer not to use presentation tags in the html documents, naturally enforcing the separation of content from presentation.
... search engine agents crawl the web to index it, but for ranking and indexing purposes they can only process text.
... using xhtml is a way to enter a set of standards composed of xml-based technologies, such as xml, xslt (transforming data), svg (animated graphics), mathml (describing mathematic expressions)...
Game monetization - Game development
the word itself acquired negative connotations after big companies focused on creating games, the main purpose of which was to get as much money from the players as possible instead of delivering a fun experience.
...google adsense is said to be the most effective one, but it's not designed for games and it's a pretty bad practice to use it for that purpose.
... selling resources if you're a graphic designer, you can sell the assets from the games you've created, or something brand new exclusively for that purpose at online shops like envato market.
UDP (User Datagram Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
it has no handshaking dialogues, and thus exposes the user's program to any unreliability of the underlying network; there is no guarantee of delivery, ordering, or duplicate protection.
... if error-correction facilities are needed at the network interface level, an application may use the transmission control protocol (tcp) or stream control transmission protocol (sctp) which are designed for this purpose.
... udp is suitable for purposes where error checking and correction are either not necessary or are performed in the application; udp avoids the overhead of such processing in the protocol stack.
Test your skills: The Box Model - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Test your skills: sizing - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Test your skills: values and units - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Test your skills: Writing Modes and Logical Properties - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Test your skills: floats - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Introduction to CSS layout - Learn web development
the two values most important for our purposes when discussing layout are display: flex and display: grid.
...each label/input pair is wrapped in a <div>, for layout purposes.
... you'll notice that the caption paragraph has been given display: table-caption; — which makes it act like a table <caption> — and caption-side: bottom; to tell the caption to sit on the bottom of the table for styling purposes, even though the markup is before the <input> elements in the source.
Test your skills: Multicol - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Practical positioning examples - Learn web development
</aside> to start with here we've got a <label> element and an <input> element — <label> elements are normally used to associate a text label with a form element for accessibility purposes (allowing a screen user to see what description goes with what form element).
... here we are going to use these elements for a slightly different purpose — another useful side effect of <label> elements is that you can click a checkbox's label to check the checkbox, as well as just the checkbox itself.
...this will work in ie9 and above (the smooth transition will work in ie10 and above.) this effect does have some concerns — this is a bit of an abuse of form elements, as they weren't intended for this purpose.
What is a Domain Name? - Learn web development
tlds tell users the general purpose of the service behind the domain name.
... 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.
... for example: local tlds such as .us, .fr, or .se can require the service to be provided in a given language or hosted in a certain country — they are supposed to indicate a resource in a particular language or country.
Debugging HTML - Learn web development
this demo is deliberately written with some built-in errors for us to explore (the html markup is said to be badly-formed, as opposed to well-formed).
...this is a bit more problematic, as it isn't easy to tell where the element is supposed to end.
... now let's look at the markup the browser has rendered, as opposed to the markup in the source code.
From object to iframe — other embedding technologies - Learn web development
unsandboxed content can do way too much (executing javascript, submitting forms, popup windows, etc.) by default, you should impose all available restrictions by using the sandbox attribute with no parameters, as shown in our previous example.
... the <embed> and <object> elements the <embed> and <object> elements serve a different function to <iframe> — these elements are general purpose embedding tools for embedding multiple types of external content, which include plugin technologies like java applets and flash, pdf (which can be shown in a browser with a pdf plugin), and even content like videos, svg and images!
... </a> </p> </object> pdfs were a necessary stepping stone between paper and digital, but they pose many accessibility challenges and can be hard to read on small screens.
Introduction to client-side frameworks - Learn web development
a brief history when javascript debuted in 1996, it added occasional interactivity and excitement to a web that was, up until then, composed of static documents.
...writing your whole application in javascript can make you lose sight of html and the purpose of its various tags, and lead you to produce an html document that is un-semantic and inaccessible.
...like frameworks, static site generators allow developers to write components that define common pieces of your web pages, and to compose those components together to create a final page.
Starting our Svelte Todo list app - Learn web development
further down, you can find the following <ul> element: <ul role="list" classname="todo-list stack-large" aria-labelledby="list-heading"> the role attribute helps assistive technology explain what kind of semantic value an element has — or what its purpose is.
... the aria-labelledby attribute tells assistive technologies that we're treating our <h2> with an id of list-heading as the label that describes the purpose of the list beneath it.
... making this association gives the list a more informative context, which could help screen reader users better understand the purpose of it.
Dynamic behavior in Svelte: working with variables and props - Learn web development
to turn our component into a general purpose to-do editor we should allow the parent of this component to pass in the list of todos to edit.
...this is how svelte 'extends' javascript by taking valid syntax and giving it a new purpose.
...this is another example in which svelte takes advantage of valid javascript syntax and gives it a new purpose — in this case to to mean "re-run this code whenever any of the referenced values change".
Deploying our app - Learn web development
deploying to hosting tends to be at the tail-end of the project life cycle, but with services such as netlify bringing down the cost of deployments (both in financial terms and also the time required to actually deploy) it's possible to deploy during development to either share work in progress or to have a pre-release for some other purpose.
...instead of running the server with npx parcel src/index.html, we can run it with npx parcel build src/index.html and parcel will build everything ready for production instead of just running it for development and testing purposes.
... integration testing, which basically says "does one block of code still work when connected to another block?" unit testing, where small and specific bits of functionality are tested to see if they do what they are supposed to do.
A bird's-eye view of the Mozilla framework
tiner last updated date: 11/23/05 statement of purpose the purpose of this article is to provide a high-level technical overview of the architecture of the extensible, object-based mozilla application framework.
...suppose the client already has an nsirdfdatasource object representing a sub-graph of an rdf graph and calls nsirdfdatasource.gettarget(resource, nc_link, true) to obtain an nsirdfnode representing a specific node in the graph, in this case a link to ahelp viewer document page.
... javascript client example suppose the javascript service in figure 2 is getlink() in help.js, which responds to the user clicking on a link in thecontents panel within thehelp viewer window by obtaining the link from thecontents panel elements stored in a dom tree.
Command line options
-compose message_options start with mail composer.
... thunderbird -compose "to=foo@nowhere.net" -mail start with the mail client.
... -editor url or -edit url start with editor (composer) for the given url (where url is optional).
Debugging on Mac OS X
if you are debugging firefox, thunderbird, or some other application that supports multiple profiles, using a separate profile for debugging purposes is recommended.
... see "having a profile for debugging purposes" below.
... having a profile for debugging purposes it is recommended to create a separate profile to debug with, whatever your task, so that you don't lose precious data like bookmarks, saved passwords, etc.
Multiple Firefox profiles
for example, you might want to have some extensions installed for web development, but not for general-purpose web browsing.
...this name is not exposed to the internet.
...this name is not exposed to the internet.
Communicating with frame scripts
the example below sends a message named "my-e10s-extension-message", with a data payload containing details and tag properties, and exposes the event.target object as a cpow: // frame script addeventlistener("click", function (event) { sendasyncmessage("my-addon@me.org:my-e10s-extension-message", { details : "they clicked", tag : event.target.tagname }, { target : event.target }); }, false); to receive messages from content, a chrome script needs to add a message listener using the message manager's addmessage...
... objects an object whose properties are any cpows exposed by the sender as the third argument to sendasyncmessage() in the example below the listener just logs all the messages details: // chrome script messagemanager.addmessagelistener("my-addon@me.org:my-e10s-extension-message", listener); function listener(message) { console.log(message.name); console.log(message.sync); console.log(message.data); console.log(message.target); conso...
... for example, suppose we load a script into the current <browser> on some event, and keep the browser message manager in an array, so we can send it messages: var messagemanagers = []; ...
Performance best practices for Firefox front-end engineers
if you want to queue up some javascript to run after the next "natural" style and layout flush, try: // suppose we want to get the computed "display" style of some node without // causing a style flush.
...it is, however, advantageous to strive for reflow to only occur in the one place (the layout step of the 16ms tick) as opposed to multiple times during the 16ms tick (which has a higher probability of running through the 16ms budget).
... also, the gecko profiler back-end is in the process of being modified to expose things like markers (from window.performance.mark()).
JavaScript-DOM Prototypes in Mozilla
prototype setup on an xpconnect wrapped dom node in mozilla when a dom node is accessed from javascript in mozilla, the native c++ dom node is wrapped using xpconnect and the wrapper is exposed to javascript as the javascript representation of the dom node.
...all the methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
... all those properties come from the interfaces that the c++ image object (nshtmlimageelement) implements and chooses to expose to xpconnect through the object's class info.
CustomizableUI.jsm
if you want to use it from a jsm or another context without a window reference, you need to import it yourself: components.utils.import("resource:///modules/customizableui.jsm"); introduction the module is intended for two primary purposes: allow adding, moving and removing customizable widgets.
...note that widget wrappers have a convenience getter property (areatype) for this purpose.
... properties for readability, the properties are split according to purpose: dynamic getters attribute type description areas array always returns an up to date array of all the area ids that are currently registered with customizableui.
Localizing with Koala
for the purposes of this tutorial, the locale code that we will use will be called "x-testing".
...we're starting by the second entity in this file on purpose, you'll see in a moment how koala nicely handles entity order.
...for the purposes of this tutorial, we will switch to the command line every now and then to see what koala does behind the scenes.
Mozilla Web Developer FAQ
in the quirks mode—for the purpose of backwards compatibility—gecko mimics some behaviors of legacy browsers in ways that are spec violations.
...the point of having a common api (the w3c dom) is interoperability, and checking for a particular browser defeats that purpose.
... authors are supposed to communicate their intentions using the web standards.
Mozilla Quirks Mode Behavior
proposed to apply in all modes: bug 747517.
... proposed to remove: bug 725646.
...[see nstableframe::getdeflationforbackground and figure out what really differs, and when it started differing.] gecko had bug 248239, where table cells acted as they had box-sizing:border-box applied for the purpose of the height property.
Introduction to NSPR
locks and monitors in general, a monitor is a conceptual entity composed of a mutex, one or more condition variables, and the monitored data.
...suppose an object has three values, v1, v2, and sum.
... for example, suppose the defined rule of a function is that it should wait until there is an object available and that it should return a reference to that object.
An overview of NSS Internals
softoken is an nss module that exposes most freebl functionality as a pkcs#11 module.
... most of the time certificates and keys are supposed to be stored in the nss database.
... when using hashing, encryption, and decryption functions, it is possible to stream data (as opposed to operating on a large buffer).
NSS 3.19 release notes
new in nss 3.19 new functionality for some certificates, such as root ca certificates that don't embed any constraints, nss might impose additional constraints such as name constraints.
... a new api (cert_getimposednameconstraints) has been added that allows one to lookup imposed constraints.
... new functions in cert.h cert_getimposednameconstraints - check if any imposed constraints exist for the given certificate, and if found, return the constraints as encoded certificate extensions.
nss tech note3
bolyard this week at least 5 different people came to me with variants of the same question: what certificate extensions do i have to put into my cert for nss to allow it to be used for purpose <x>??
... this message attempts to answer that question, and to document nss's approach to validating certificates for certain purposes.
... when nss is asked to verify the validity of a certificate chain, it verifies the validity of that cert chain for a particular purpose, known as a seccertusage, as of a specific date and time.
gtstd.html
the instructions that follow assume you are using the certificate database tool to set up both the server and client databases for testing purposes.
...following sections decribe how to the certificate database tool to perform these tasks: setting up the ca db and certificate setting up the server db and certificate setting up the client db and certificate verifying the server and client certificates warning: the instructions below illustrate the use of nss command line tools to operate a simple root certificate authority for test purposes only.
... the ca, ssl server and ssl client certificates produced by these instructions work correctly for short term testing purposes.
Tutorial: Embedding Rhino
with more effort on the part of the embedder, the objects exposed to scripts can be customized further.
... in this document: runscript: a simple embedding entering a context initializing standard objects collecting the arguments evaluating a script printing the result exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects counter example counter's constructors class name dynamic properties defining javascript "methods" adding counter to run...
... expose java apis using java apis no additional code in the embedding needed!
Bytecode Descriptions
however, the functionbody of the generator is not supposed to start running until the first .next() call, so after setup the script suspends itself: the "initial yield".
...this decomposed version is needed to implement the compound assignment and increment/decrement operators, which get and then set a variable.
...this optimization imposes no restrictions on bytecode.
JS_SetParent
this must be an object that has not yet been exposed to script.
...in fact, once an object is exposed to a script, the object's parent must not change.
...js_setparent has no way to check that this is the case, but nonetheless, applications must not call js_setparent on an object that has already been exposed to a script.
Split object
the window object split objects were introduced to resolve a problem posed by the window object.
...suppose a script in page a, in tab ta, has a reference to the window object of page b in another tab tb.
...more indirectly, suppose there's a javascript function defined in page b that refers to global variables in page b.
Handling Mozilla Security Bugs
background security vulnerabilities are different from other bugs, because their consequences are potentially so severe: users' private information (including financial information) could be exposed, users' data could be destroyed, and users' systems could be used as platforms for attacks on other systems.
... the applicant should have a legitimate purpose for wishing to join the group.
...ng, the module owner, a peer, or some other person they may designate will post this message to the known vulnerabilities page (which will be the authoritative source for this information) and will also send a copy of this message to an appropriate moderated mailing list and/or newsgroup (e.g., netscape.public.mozilla.announce and/or some other newsgroup/list established specifically for this purpose).
AT APIs Support
also we expose ms com interfaces isimpledom* to provide an access to dom tree.
... accessible web standards gecko exposes the number of xml languages including html to at.
... refer to accessible web specifications page to learn what and how markup languages are exposed.
XML Extras
the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users.
...normally your files should reside on a webserver so this shouldn't pose a problem (there you do not need that line either).
... additionally, "foo.com:80" and "foo.com:313" are considered different hosts for security purposes.
Introduction to XPCOM for the DOM
as opposed to a concreate class, an interface is supposed to be more stable through time.
... tutorial : how to add a new interface introduction the purpose of this tutorial is to describe the process of adding a new interface to the dom and then implementing it.
...for the purpose of this document, i have chosen to implement a new html interface called nsidomfabian.
Language bindings
exposes modules written in the bound language as xpcom objects, thereby enabling all other languages for which xpcom bindings exist to access these modules.
...this can be used for various diagnostic purposes.components.utilscomponents.utils is a collection of various useful xpconnect features.
... this is useful for privileged code, such as add-on code, to access variables and apis defined in web content.components.utils.exportfunctionthis function provides a safe way to expose a function from a privileged scope to a less-privileged scope.components.utils.forcegccomponents.utils.forcegc lets scripts force a garbage collection cycle.
mozIRegistry
which explains how this information came to be associated with the notion of a "registry." someday (i hope) this page will be properly titled so that everybody knows it is the place to come to in order to find out how they are supposed to link together the various xpcom components that together form the mozilla browser.
...some are for illustrative purposes (the lighter-colored boxes near the top of the picture).
... i think this might make it a little more flexible, thereby making xpcom more general-purpose.
nsIDOMGlobalPropertyInitializer
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) an xpcom component implementing this interface can be exposed to web content as a property on the window.
...an alternative way to expose an object to the web content is to add the property in response to the content-document-global-created notification.
... it is also recommended to use __exposedprops__ to control which members are exposed.
nsIMsgIdentity
johnnospam@doe.com organization astring optional organization composehtml boolean should we compose with html by default?
...if this is set, the return receipt menu item on the compose window will be checked.
...if this is set, the dsn menu item on the compose window will be checked.
nsISearchEngine
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void addparam(in astring name, in astring value, in astring responsetype); nsisearchsubmission getsubmission(in astring data, [optional] in astring responsetype, [optional] in astring purpose); boolean supportsresponsetype(in astring responsetype); attributes attribute type description alias astring an optional shortcut alias for the engine.
...nsisearchsubmission getsubmission( in astring data, [optional] in astring responsetype, [optional] in astring purpose ); parameters data data to add to the submission object.
... purpose [optional] a string meant to indicate the context of the search request.
nsIWebContentHandlerRegistrar
cu.import('resource://gre/modules/services.jsm'); var nsiwchr = cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"] .getservice(ci.nsiwebcontenthandlerregistrar); var htmlcontentwindow = undefined; var registeruri = 'http://mail.live.com/secure/start?action=compose&to=%s'; var myurihostname = services.io.newuri(registeruri, null, null).host; // this section here is long and daunting, but its just finding a suitable contentwindow var domwindows = services.wm.getenumerator(null); while (domwindows.hasmoreelements()) { var adomwindow = domwindows.getnext(); if (adomwindow.gbrowser) { if (adomwindow.gbrowser.tabcontainer) { //adomwi...
... permission denied to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler'permission denied to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler' when calling method: [nsiwebcontenthandlerregistrar::registerprotocolhandler] if the host names do match then a confirmation like this will be seen: this domain check can be bypassed by setting the preference of gecko.handlerservice.allowreg...
...andlerservice.allowregisterfromdifferenthost', true); } var htmlcontentwindow = services.wm.getmostrecentwindow('navigator:browser'); //because we set the preference to true above, we need any window that has a browser, just pass the domwindow and the registerprotocolhandler will get the contentwindow from it nsiwchr.registerprotocolhandler("mailto", "http://mail.live.com/secure/start?action=compose&to=%s", "outlook.com live mail", htmlcontentwindow); if (!allowregisterfromdifferenthost) { //it this variable is false, than we had set the pref to true obviously.
XPIDL
array<t> const nstarray<t>& nstarray<t>& array the c++-exposed type t will be an owned variant.
... interfaces specifying interfaces is the primary purpose of using xpidl.
...in javascript contexts, attributes are exposed as a regular property access, while native code sees attributes as a get and possibly a set method.
Mail composition back end
ns_imethod createandsendmessage( nsieditorshell *aeditor, - the editor object for the mail compose operation.
... ns_imethod quotemessage( const prunichar *msguri, - the uri of the message to be quoted nsioutputstream *outstream) = 0; - the consumer output stream for the quoted data sample programs the mozilla/mailnews/compose/tests/ directory contains sample test programs for all of the above described interfaces.
... compose - this program shows the use of the createandsendmessage interface (createandsendmessage) compose2 - this program shows the use of the createandsendmessage interface (sendmessagefile) sendlater - this program shows the use of the nsimsgsendlater interface sendpage - this program shows the use of the createandsendmessage interface (sendwebpage) last modified: wed nov 1, 2000 rhp@netscape.com ...
customDBHeaders Preference
as you follow along the step-by-step guide in creating a custom column, you may want to consider a preference setting that exposes custom header data for use in a custom column within thunderbird's main view.
...in addition to the preference outlined in setting up extension development environment, you'll want to add the following preferences: // this allows you to add extra headers while composing messages user_pref("mail.compose.other.header", "x-superfluous,x-other,x-whatever"); // this enables the preservation of custom headers as incoming mail is processed user_pref( "mailnews.customdbheaders", "x-superfluous,x-other"); important: please pay careful attention to the case of the mailnews.customdbheaders preference.
.../ chrome/content/superfluous.js chrome/content/superfluous_overlay.xul install.rdf adding: chrome/ (stored 0%) adding: chrome.manifest (deflated 44%) adding: chrome/content/ (stored 0%) adding: chrome/content/superfluous.js (deflated 57%) adding: chrome/content/superfluous_overlay.xul (deflated 44%) adding: install.rdf (deflated 50%) end result ultimately, you want to be able to compose a message like this: and see the superfluous column displayed in your inbox like this: thanks many thanks go out to the thunderbird developers for the fine product that it is.
Using the Multiple Accounts API
identities (nsimsgidentity): an identity contains all the information necessary to compose and outgoing mail message.
... identities identities are used in the compose window.
...(replyto: header in mail messages) preference: mail.identity.identity.organization - user's organization (organization: header in mail messages) preference: mail.identity.identity.compose_html - boolean, should we compose messages in html (true) or plain text (false)?
Drawing and Event Handling - Plugins
because windowless plug-ins can be layered or drawn to arbitrary drawables, the browser (as opposed to the native windowing system) is responsible for controlling both their drawing and their event handling.
... unix/x11 the plug-in receives a graphicsexpose event.
... the xgraphicsexposeevent structure contains the xlib drawable (which is an offscreen pixmap), its display, and the dirty rectangle (optional clip rectangle) specified relative to the top-left corner of the drawable.
Streams - Plugins
for instance, suppose the plug-in allocates, in npp_newstream, an 8k buffer to hold the data written from that stream.
...in the example above, suppose that the plug-in allocates an 8k buffer and returns 8192 from npp_writeready.
... as an example, suppose that a plug-in (and the http server) supports byte-range requests, and that the browser is in the process of pushing data to the plug-in.
Debugger - Firefox Developer Tools
setting this flag to true is intended for uses of subsystems of the debugger api (e.g, debugger.source) for purposes other than step debugging a target javascript program.
...in some cases, the code coverage might expose information which pre-date the modification of this flag.
...thus, for example, a debugger.object referring to a second debugger.object which refers to a global does not designate that global for the purposes of this function.) the global designated byglobal must be in a different compartment than this debugger instance itself.
DevTools API - Firefox Developer Tools
a definition is a js light object that exposes different information about the tool (like its name and its icon), and a build method that will be used later-on to start an instance of this tool.
... console.log("network monitor initialized to toolbox", toolbox); }); toolsidebar to build a sidebar in your tool, first, add a xul:tabbox where you want the sidebar to live: <splitter class="devtools-side-splitter"/> <tabbox id="mytool-sidebar" class="devtools-sidebar-tabs" hidden="true"> <tabs/> <tabpanels flex="1"/> </tabbox> a sidebar is composed of tabs.
... if the loaded document exposes a window.setpanel(toolpanel) function, the sidebar will call it once the document is loaded.
Migrating from Firebug - Firefox Developer Tools
the devtools display an element {} rule for this purpose, which requires a single click into it to start editing the properties.
...the style editor has a sidebar for this purpose.
...the network monitor has a preview panel for this purpose.
CSSStyleDeclaration - Web APIs
the cssstyledeclaration interface represents an object that is a css declaration block, and exposes style information and various style-related methods and properties.
... a cssstyledeclaration object can be exposed using three different apis: via htmlelement.style, which deals with the inline styles of a single element (e.g., <div style="...">).
... via window.getcomputedstyle(), which exposes the cssstyledeclaration object as a read-only interface.
Hit regions and accessibility - Web APIs
canvas content is not exposed to accessibility tools like semantic html is.
...you can use aria attributes to describe the behavior and purpose of the canvas element.
...the hit region api allows you to define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools.
EXT_disjoint_timer_query - Web APIs
types this extension exposes a new type: gluint64ext unsigned 64-bit integer number.
... constants this extension exposes seven new constants.
... methods this extension exposes eight new methods.
History.replaceState() - Web APIs
examples suppose https://www.mozilla.org/foo.html executes the following javascript: const stateobj = { foo: 'bar' }; history.pushstate(stateobj, '', 'bar.html'); the explanation of these two lines above can be found in the example of pushstate() method section of the working with the history api article.
... then suppose https://www.mozilla.org/bar.html executes the following javascript: history.replacestate(stateobj, '', 'bar2.html'); this will cause the url bar to display https://www.mozilla.org/bar2.html, but won't cause the browser to load bar2.html or even check that bar2.html exists.
... suppose now that the user navigates to https://www.microsoft.com, then clicks the back button.
Intersection Observer API - Web APIs
or specifically which ones they are; however, it covers the much more common use case of "if they intersect by somewhere around n%, i need to do something." intersection observer concepts and usage the intersection observer api allows you to configure a callback that is called: (1) whenever one element, called the target, intersects either the device viewport or a specified element; for the purpose of this api, this is called the root element or root (2) and whenever the observer is asked to watch a target for the very first time typically, you'll want to watch for intersection changes with regard to the element's closest scrollable ancestor, or, if the element isn't a descendant of a scrollable element, the viewport.
... when the callback is invoked, it receives a list of intersectionobserverentry objects, one for each observed target which has had the degree to which it intersects the root change such that the amount exposed crosses over one of the thresholds, in either direction.
... <div id="box"> <div class="vertical"> welcome to <strong>the box!</strong> </div> </div> css the css isn't terribly important for the purposes of this example; it lays out the element and establishes that the background-color and border attributes can participate in css transitions, which we'll use to affect the changes to the element as it becomes more or less obscured.
Navigator - Web APIs
WebAPINavigator
navigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object navigator.mediacapabilities read only returns a mediacapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities.
...this property is kept only for compatibility purpose.
... navigator.credentials returns the credentialscontainer interface which exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out.
Using the Screen Capture API - Web APIs
visible vs logical display surfaces for the purposes of the screen capture api, a display surface is any content object that can be selected by the api for sharing purposes.
... the dumpoptionsinfo() function—which we will look at in a moment—dumps information about the stream to the log box for educational purposes.
... function stopcapture(evt) { let tracks = videoelem.srcobject.gettracks(); tracks.foreach(track => track.stop()); videoelem.srcobject = null; } dumping configuration information for informational purposes, the startcapture() method shown above calls a method named dumpoptions(), which outputs the current track settings as well as the constraints that were placed upon the stream when it was created.
USBDevice - Web APIs
WebAPIUSBDevice
usbdevice.deviceclass read only one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
... usbdevice.deviceprotocol read only one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
... usbdevice.devicesubclass read only one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
WEBGL_compressed_texture_astc - Web APIs
the webgl_compressed_texture_astc extension is part of the webgl api and exposes adaptive scalable texture compression (astc) compressed texture formats to webgl.
... methods this extension exposes one new methods.
... constants the compressed texture formats are exposed by 28 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
syntax void gl.uniformmatrix2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x3fv(location, transpose, data,...
... optional srcoffset, optional srclength); void gl.uniformmatrix2x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4fv(location, transpose, data, optional srcoffset, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
... transpose a glboolean specifying whether to transpose the matrix.
WebGL model view projection - Web APIs
these matrices can be composed together and grouped in special ways to make them useful for rendering complicated 3d scenes.
... these composed matrices ultimately move the original model data around into a special coordinate space called clip space.
... // this function is for illustration purposes only.
Web Video Text Tracks Format (WebVTT) - Web APIs
the primary purpose of webvtt files is to add text overlays to a <video>.
...following interface can be used to expose webvtt cues in dom api: enum autokeyword { "auto" }; enum directionsetting { "" /* horizontal */, "rl", "lr" }; enum linealignsetting { "start", "center", "end" }; enum positionalignsetting { "line-left", "center", "line-right", "auto" }; enum alignsetting { "start", "center", "end", "left", "right" }; [constructor(double starttime, double endtime, domstring text)] interface vttcue : texttrackcu...
...the interface code is given below which can be used to expose the webvtt regions in dom api: enum scrollsetting { "" /* none */, "up" }; [constructor] interface vttregion { attribute double width; attribute long lines; attribute double regionanchorx; attribute double regionanchory; attribute double viewportanchorx; attribute double viewportanchory; attribute scrollsetting scroll; }; methods and properties the methods used in webvtt are thos...
Lighting a WebXR setting - Web APIs
you can learn all about the proposed api and a fair amount about the concept of lighting estimation in the explainer documnent that's included in the specification's github repository.
... the specifics of how lighting estimation works, especially in the context of the proposed api, is out of scope for the moment.
... the lighting estimation api specification mandates that all user agents perform temporal and spatial filtering to fuzz the data in a manner that reduces its usefulness for the purpose of locating the user or performing side-channel attacks.
Advanced techniques: Creating and sequencing audio - Web APIs
pulse user controls for the ui controls, let's expose both frequencies of our oscillators, allowing them to be controlled via range inputs.
... let bandpass = audioctx.createbiquadfilter(); bandpass.type = 'bandpass'; bandpass.frequency.value = 1000; // connect our graph noise.connect(bandpass).connect(audioctx.destination); noise user controls on the ui we'll expose the noise duration and the frequency we want to band, allowing the user to adjust them via range inputs and event handlers just like in previous sections: <label for="duration">duration</label> <input name="duration" id="duration" type="range" min="0" max="2" value="1" step="0.1" /> <label for="band">band</label> <input name="band" id="band" type="range" min="400" max="1200" value="1000" step="...
...let's expose that to our ui, so we can speed up and slow down our sample.
XRFrame - Web APIs
WebAPIXRFrame
in addition to providing a reference to the xrsession for which this frame is to be rendered, the getviewerpose() method is provided to obtain the xrviewerpose describing the viewer's position and orientation in space, and getpose() can be used to create an xrpose describing the relative position of one xrspace relative to another.
... methods getpose() returns an xrpose object representing the spatial relationship between the two specified xrspace objects.
... getviewerpose() returns an xrviewerpose describing the viewer's position and orientation in a given xrreferencespace.
XRHandedness - Web APIs
function updateinputsources(session, frame, refspace) { for (let source of session.inputsources) { if (source.gripspace) { let grippose = frame.getpose(source.gripspace, refspace); if (grippose) { myrenderhandobject(grippose, inputsource.handedness); } } } } this function, which would be called every animation frame (or possibly just periodically, depending on the degree of smoothness required and any performance constraints), scans the list of input sources looking for any which have a gripspace whic...
... if gripspace is non-null, the function proceeds to get the pose for the gripspace transformed into the current reference space.
... assuming that's then valid, a function called myrenderhandobject() is called with the grip's pose and the value of handedness.
XRInputSource.gripSpace - Web APIs
the read-only xrinputsource property gripspace returns an xrspace whose native origin tracks the pose used to render virtual objects so they appear to be held in (or part of) the user's hand.
... for (let source in xrsession.inputsources) { if (source.gripspace) { let grippose = frame.getpose(source.gripspace, xrrefspace); if (grippose) { mydrawmeshusingtransform(controllermesh, grippose.transform.matrix); } } } for each input source which has a value for gripspace, this loop obtains the xrpose representing the position and orientation that are described by gripspace.
... if a valid pose is returned, a method mydrawmeshusingtransform() is called to draw the controller's mesh transformed using the grip pose's transform matrix.
XRInputSource.handedness - Web APIs
function updateinputsources(session, frame, refspace) { for (let source of session.inputsources) { if (source.gripspace) { let grippose = frame.getpose(source.gripspace, refspace); if (grippose) { myrenderhandobject(grippose, inputsource.handedness); } } } } this function, which would be called every animation frame (or possibly just periodically, depending on the degree of smoothness required and any performance constraints), scans the list of input sources looking for any which have a gripspace whic...
... if gripspace is non-null, the function proceeds to get the pose for the gripspace transformed into the current reference space.
... assuming that's then valid, a function called myrenderhandobject() is called with the grip's pose and the value of handedness.
XRInputSourceEventInit.frame - Web APIs
the xrinputsourceeventinit dictionary's property frame specifies an xrframe providing information about the timestamp at which the new input source event took place, as well as access to the xrframe method getpose() which can be used to map the coordinates of any xrreferencespace to the space in which the event took place.
... syntax xrinputsourceeventinit.frame = xrframe; let xrinputsourceeventinit = { frame: xrframe }; let xrinputsourceevent = new xrinputsourceevent(type, { frame: xrframe }); value an xrframe indicating the time at which the event took place, and providing a getpose() method which can be used to map reference spaces to the world reference space.
...instead, the xrframe specified by the frame property is simply a method to provide access to the getpose() method, which you can use to get the relative positions of the objects in the scene at the time the event occurred.
XRSession: squeeze event - Web APIs
the handler fetches the pose representing the target ray for tracked-pointer inputs and sends the pose's transform to a function called myhandlesqueezewithray().
... xrsession.addeventlistener("squeeze", event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandlesqueezewithray(targetraypose.transform); } } }); you can of course also set up a handler for squeeze events by setting the xrsession object's onsqueeze event handler property to a function that handles the event: xrsession.onsqueeze = event => { if (...
...event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandlesqueezewithray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'squeeze event' in that specification.
XRSession - Web APIs
WebAPIXRSession
with xrsession methods, you can poll the viewer's position and orientation (the xrviewerpose), gather information about the user's environment, and present imagery to the user.
...returns an integer value which can be used to identify the request for the purposes of canceling the callback using cancelanimationframe().
... const xr = navigator.xr; if (xr) { xr.requestsession("inline").then((xrsession) => { xrsession.requestreferencespace("local").then((xrreferencespace) => { xrsession.requestanimationframe((time, xrframe) => { let viewer = xrframe.getviewerpose(xrreferencespace); gl.bindframebuffer(xrwebgllayer.framebuffer); for (xrview of viewer.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); } }); }); }); } else { /* webxr is not available */ } specifications specificati...
XRView.eye - Web APIs
WebAPIXRVieweye
usage notes the primary purpose of this property is to allow the correct area of any pre-rendered stereo content to be presented to the correct eye.
... examples this code, from the viewer pose's renderer, iterates over the pose's views and renders them.
... 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 = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); renderscene(gl, ...
XRWebGLLayer.getViewport() - Web APIs
this works because the set of views returned by an xrviewerpose each represent one eye's perspective on the scene.
... since the framebuffer is split in half, one half for each eye, setting the webgl viewport to match the webxr layer's viewport will ensure that when rendering the scene for the current eye's pose, it is rendered into the correct half of the framebuffer.
... <<<--- 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 definition of 'xrwebgllayer.getviewport()' in that specification.
ARIA Test Cases - Accessibility
there are several purposes for providing this information: help browser vendors provide correct implementations help at vendors provide correct implementations inform authors as to what actually works reliably in general we're testing with the latest public releases.
... reference to link example note regarding dojo/dijit test files the main purpose of dojo's dijit test files are for dojo developers to exercise and debug the code.
... jaws 10 - - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - property-only test cases these testcases involve aria properties used to enhance html controls (as opposed to javascript-built widgets).
ARIA: form role - Accessibility
make sure to have a unique label on each form in a document to help users understand the purpose of the form.
... labeling landmarks each <form> element and form role that needs to be exposed as a landmark must be given an accessible name.
... this name will allow an assitive technology user to be able to quickly understand the purpose of the form landmark.
ARIA: checkbox role - Accessibility
elements containing role="checkbox" must also include the aria-checked attribute to expose the checkbox's state to assistive technology.
...similarly, an element with role="checkbox" can expose three states through the aria-checked attribute: true, false, or mixed.
...ument.getelementbyid('chkpref'); switch(item.getattribute('aria-checked')) { case "true": item.setattribute('aria-checked', "false"); break; case "false": item.setattribute('aria-checked', "true"); break; } } accessibility concerns when the checkbox role is added to an element, the user agent should do the following: expose the element as having a checkbox role in the operating system's accessibility api.
WAI-ARIA Roles - Accessibility
elements containing role="checkbox" must also include the aria-checked attribute to expose the checkbox's state to assistive technology.aria: comment rolethe comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.aria: complementary rolethe complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated.
...the main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.aria: mark rolethe mark landmark role semantically denotes html elements containing text that is marked/highlighted for reference purposes.
...a rowgroup contains one or more rows of cells, grid cells, column headers, or row headers within a grid, table or treegrid.aria: search rolethe search landmark role is used to identify a section of the page used to search the page, site, or collection of sites.aria: suggestion rolethe suggestion landmark role semantically denotes a single proposed change to an editable document.
Accessibility Information for Web Authors - Accessibility
its purpose is to aid humans in the web accessibility evaluation process.
...furthermore, assistive technologies do not understand what these widgets are supposed to be, or what state they are in or what they are capable of.
... purpose newsgroup mailing list google group developer discussion mozilla.dev.accessibility subscribe/unsubscribe google group end user support mozilla.support.accessibility subscribe/unsubscribe google group ...
Using media queries - CSS: Cascading Style Sheets
note: the examples on this page use css's @media for illustrative purposes, but the basic syntax remains the same for all types of media queries.
... syntax a media query is composed of an optional media type and any number of media feature expressions.
... width width of the viewport including width of scrollbar logical operators the logical operators not, and, and only can be used to compose a complex media query.
Event reference
compositionupdate a character is added to a passage of text being composed.
... compositionupdate compositionevent dom l3 a character is added to a passage of text being composed.
... ussdreceived firefox os specific a new ussd message is received mscontentzoom microsoft specific msmanipulationstatechanged microsoft specific mspointerhover microsoft specific mozilla-specific events note: these events are never exposed to web content and can only be used in a xul chrome content context.
Ajax - Developer guides
WebGuideAJAX
pure-ajax navigation example this article provides a working (minimalist) example of a pure-ajax website composed only of three pages.
... xml the extensible markup language (xml) is a w3c-recommended general-purpose markup language for creating special-purpose markup languages.
...its primary purpose is to facilitate the sharing of data across different systems, particularly systems connected via the internet.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
the <img> element serves two purposes: it describes the size and other attributes of the image and its presentation.
... it is composed of a comma-separated list of image descriptors.
... each image descriptor is composed of a url of the image, and either...
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
you should not use <u> to simply underline text for presentation purposes, or to denote titles of books.
...ou should use an element other than <u>, such as: <em> to denote stress emphasis <b> to draw attention to text <mark> to mark key words or phrases <strong> to indicate that text has strong importance <cite> to mark the titles of books or other publications <i> to denote technical terms, transliterations, thoughts, or names of vessels in western texts to provide textual annotations (as opposed to the non-textual annotations created with <u>), use the <ruby> element.
... examples indicating a spelling error this example uses the <u> element and some css to display a paragraph which includes a misspelled error, with the error indicated in the red wavy underline style which is fairly commonly used for this purpose.
Global attributes - HTML: Hypertext Markup Language
in addition to the basic html global attributes, the following global attributes also exist: xml:lang and xml:base — these are inherited from the xhtml specifications and deprecated, but kept for compatibility purposes.
...its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with css).
...this attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes.
MIME types (IANA media types) - HTTP
a media type (also known as a multipurpose internet mail extensions or mime type) is a standard that indicates the nature and format of a document, file, or assortment of bytes.
...they treat it as if the content-disposition header was set to attachment, and propose a "save as" dialog.
... when the 206 partial content status code is sent, this mime type indicates that the document is composed of several parts, one for each of the requested ranges.
Resource URLs - HTTP
syntax resource urls are composed of two parts: a prefix (resource:), and a url pointing to the resource you want to load: resource://<url> an example: resource://gre/res/svg.css when arrows are found in the resource url's ('->'), it means that the first file loaded the next one: resource://<file-loader> -> <file-loaded> please refer to identifying resources on the web for more general details.
... resources that have to be exposed to web content have been moved to a new location named resource://content-accessible/, which is isolated and only contains non-sensitive resources.
... in this way we can keep essential resources exposed and have most threats eliminated.
Browser detection using the user agent - HTTP
let us imagine a page composed of boxes of information; each box is about a different feline breed or canine breed.
...for the purposes of grouping the content meaningfully, all the cat boxes are separated from all the dog boxes such that the cat and dog boxes are not intermixed together.
...do you actually want to detect firefox, as opposed to seamonkey, or chrome as opposed to chromium?
Access-Control-Allow-Credentials - HTTP
the access-control-allow-credentials response header tells browsers whether to expose the response to frontend javascript code when the request's credentials mode (request.credentials) is include.
... when a request's credentials mode (request.credentials) is include, browsers will only expose the response to frontend javascript code if the access-control-allow-credentials value is true.
...for a cors request with credentials, in order for browsers to expose the response to frontend javascript code, both the server (using the access-control-allow-credentials header) and the client (by setting the credentials mode for the xhr, fetch, or ajax request) must indicate that they’re opting in to including credentials.
HTTP headers - HTTP
WebHTTPHeaders
iana also maintains a registry of proposed new http headers.
... access-control-allow-credentials indicates whether the response to the request can be exposed when the credentials flag is true.
... access-control-expose-headers indicates which headers can be exposed as part of the response by listing their names.
About JavaScript - JavaScript
objects are created programmatically in javascript, by attaching methods and properties to otherwise empty objects at run time, as opposed to the syntactic class definitions common in compiled languages like c++ and java.
... each of mozilla's javascript engines expose a public api which application developers can use to integrate javascript into their software.
...a javascript web server would expose host objects representing a http request and response objects, which could then be manipulated by a javascript program to dynamically generate web pages.
Object.prototype.__proto__ - JavaScript
the __proto__ property of object.prototype is an accessor property (a getter function and a setter function) that exposes the internal [[prototype]] (either an object or null) of the object through which it is accessed.
... description the __proto__ getter function exposes the value of the internal [[prototype]] of an object.
...this is for example purposes only.
Symbol - JavaScript
the symbol() function returns a value of type symbol, has static properties that expose several members of built-in objects, has static methods that expose the global symbol registry, and resembles a built-in object class, but is incomplete as a constructor because it does not support the syntax "new symbol()".
... a symbol value may be used as an identifier for object properties; this is the data type's primary purpose, although other use-cases exist, such as enabling opaque data types, or serving as an implementation-supported unique identifier in general.
... some further explanation about purpose and usage can be found in the glossary entry for symbol.
icons - Web app manifests
the purpose of this member is to allow a user agent to quickly ignore images with media types it does not support.
... purpose defines the purpose of the image, for example if the image is intended to serve some special purpose in the context of the host os (i.e., for better integration).
... purpose can have one or more of the following values, separated by spaces: monochrome: a user agent can present this icon where a monochrome icon with a solid fill is needed.
Authoring MathML - MathML
the mathml code is not exposed to web crawlers (e.g.
... pros: you get static web pages: the latex source don't need to be parsed at each page load, the mathml code is exposed to web crawlers and you can put them easily on any web server.
...on unix, you can then download itex2mml, build and install it: wget http://golem.ph.utexas.edu/~distler/blog/files/itextomml.tar.gz; \ tar -xzf itextomml.tar.gz; \ cd itex2mml/itex-src; make sudo make install now suppose that you have a html page with tex fragments delimited by dollars: input.html ...
Media container formats (file types) - Web media technologies
because quicktime support is, for all intents and purposes, primarily available on apple devices, it is no longer widely used on the internet.
... consider using this container format compressed files for general-purpose playback mp3 (mpeg-1 audio layer iii) losslessly compressed files flac with alac fallback uncompressed files wav now that mp3's patents have all expired, the choice of audio file format has become much easier to make.
... consider using this container format general purpose video, preferably in an open format webm (ideally with mp4 fallback) general purpose video mp4 (ideally with webm or ogg fallback) high compression optimized for slow connections 3gp (ideally with mp4 fallback) compatibility with older devices/browsers quicktime (ideally with avi and/or mpeg-2 fallback) these suggestions make a number of assumptions.
Content Scripts - Archive of obsolete content
passing configuration options the contentscriptoptions is a json object that is exposed to content scripts as a read-only value under the self.options property: // main.js var tabs = require("sdk/tabs"); tabs.on('ready', function(tab) { tab.attach({ contentscript: 'window.alert(self.options.message);', contentscriptoptions: {"message" : "hello world"} }); }); any kind of jsonable value (object, array, string, etc.) can be used here.
... however, the worker is not exposed to add-on code in quite the same way in all modules.
Modules - Archive of obsolete content
this is useful if the api to be exposed does not have a corresponding js file, or is written in an incompatible format.
... cuddlefish uses this option to expose the components object as a module called chrome, in a way similar to the code here below: const { classes: cc, constructor: cc, interfaces: ci, utils: cu, results: cr, manager: cm } = components; let loader = loader({ paths: ["./": "http://www.foo.com/"], resolve: function (id, requirer) { // your logic here return id; }, modules: { 'chrome': { components: components, cc: cc, cc: bind(cc, components), ci: ci, cu: cu, cr: cr, cm: cm } } }); all accesses to the chrome module go through this one point.
Contributor's Guide - Archive of obsolete content
content processes a content process was supposed to run all the code associated with a single tab.
... conversely, an add-on process was supposed to run all the code associated with a single add-on.
indexed-db - Archive of obsolete content
experimental exposes the indexeddb api to add-ons.
... the api exposed by indexed-db is almost identical to the dom indexeddb api, so we haven't repeated its documentation here, but refer you to the indexeddb api documentation for all the details.
page-worker - Archive of obsolete content
contentscriptoptions object read-only value exposed to content scripts under self.options property.
...cument element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
panel - Archive of obsolete content
contentscriptoptions object read-only value exposed to content scripts under addon.options property.
...ment element for the panel is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the panel has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under addon.options property.
content/loader - Archive of obsolete content
example: the following code creates a wrapper on a hidden frame that reloads a web page in the frame every time the contenturl property is changed: var hiddenframes = require("sdk/frame/hidden-frame"); var { loader } = require("sdk/content/content"); var pageloader = loader.compose({ constructor: function pageloader(options) { options = options || {}; if (options.contenturl) this.contenturl = options.contenturl; this.on('propertychange', this._onchange = this._onchange.bind(this)); let self = this; hiddenframes.add(hiddenframes.hiddenframe({ onready: function onready() { let frame = self._frame = this.element; self._emit('pr...
...cument element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoptions read-only value exposed to content scripts under self.options property.
core/heritage - Archive of obsolete content
reading or writing such code requires sharp eye and lot's of discipline, mainly due to code fragmentation and lots of machinery being exposed: // defining a simple class function dog(name) { // classes are for creating instances, calling them without `new` changes // behavior, which in majority cases you need to handle, so you end up // with additional boilerplate.
...this is too much machinery exposed.
places/history - Archive of obsolete content
// we'd compose the query with the following options let lastweek = date.now - (1000*60*60*24*7); search( // first query looks for all entries before last week with 'ruby' [{ query: "ruby", to: lastweek }, // second query searches all entries after last week with 'javascript' { query: "javascript", from: lastweek }], // we want to order chronologically by visit date { sort: "date" } ).on("end", func...
... placesemitter the placesemitter is not exposed in the module, but returned from the search functions.
preferences/event-target - Archive of obsolete content
these are the same preferences that are exposed to users in the about:config page.
...you can also use the simple-prefs module to access just the preferences for your own add-on and expose them to the user in the add-on manager.
preferences/service - Archive of obsolete content
these are the same preferences that are exposed to users in the about:config page.
...you can also use the simple-prefs module to access just the preferences for your own add-on and expose them to the user in the add-on manager.
ui/button/toggle - Archive of obsolete content
for example, suppose the browser has two windows (w1 and w2), and each window has two tabs.
...the only purpose of the extra event is that change is a more natural event name for a toggle button, as it matches the change event emitted by elements like <select> and <input>.
util/list - Archive of obsolete content
list is composed out of iterable, therefore it provides custom enumeration behavior that is similar to array (enumerates only on the elements of the list).
... examples: var { list } = require("sdk/util/list"); var mylist = list.compose({ add: function add(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._add.bind(this)); }, remove: function remove(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._remove.bind(this)); } }); mylist('foo', 'bar', 'baz').length == 3; // true new mylist('new', 'keyword').length == 2; // true mylist.apply(null, [1, 2, 3]).length == 3; // true let list = mylist(); list.length == 0; // true list.add(1, 2, 3) == 3; // true properties length number of elements in this list.
View Source for XUL Applications - Archive of obsolete content
importing gviewsourceutils xul applications wanting to show the source code for documents should import the viewsourceutils.js script instead of attempting to open the viewsource.xul window themselves: <script type="application/javascript" src="chrome://global/content/viewsourceutils.js"/> viewsourceutils.js exposes a gviewsourceutils global into the scope of the window that imports that script.
... method overview gviewsourceutils exposes several methods, but the only one you should be using directly is the viewsource method.
Extension Etiquette - Archive of obsolete content
generic prefixes such as myextension-, or short prefixes such as ffx-, are likely to be used elsewhere, and therefore unsuitable to the purpose.
...make sure your extension's homepage states the "obvious," including the purpose of your extension.
Jetpack Processes - Archive of obsolete content
a mechanism to optionally disable this feature has been proposed in bug 614351.
...individual lines of the form //@line 1 "foo.js" can be used to specify filename and line number information for debugging purposes.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
widgets that can be used in xul root elements xul documents use different root elements for different purposes.
...apart from having a different intended purpose than the window element, it is functionally no different.
The Box Model - Archive of obsolete content
any xul interface can be broken down into the following basic components: boxes text images alignment and flexibility widths and heights margins and paddings menus, toolbar buttons, and even the most complex elements in xul are composed of these simple ingredients.
... here's a very simple example of an hbox with 3 child buttons: <hbox> <button label="cat" /> <button label="parrot" /> <button label="porcupine" /> </hbox> this is how it looks on mac os (the black border was added for illustrative purposes, boxes don't have borders by default): if you use a vbox instead, it looks like this: the orientation of boxes (and most xul elements) can be controlled using the orient attribute or the -moz-box-orient css property.
List of Mozilla-Based Applications - Archive of obsolete content
belgum internet tv service basilisk pre-servo xul-based web browser uses most of the firefox 55 source code batik java-based toolkit uses mozilla rhino bitbox security focused browser seemingly based on firefox blackbird browser for african american community bluegriffon wysiwyg editor next generation version of composer buzzbird twitter client built on xulrunner camino browser 2.5m downloads and ~400,000 active users ...
...red by xulrunner foxkeh clock clock frizione javascript development, testing and deployment environment uses mozilla rhino geckofx embeddable gecko gjs javascript bindings for gnome globalmojo browser that raises money for your favorite causes gluescript a javascript engine which can be used as a general purpose language uses mozilla spidermonkey and formerly called wxjavascript gnome operating system gnome 3 will use spidermonkey through gjs google adwords editor editor google gadgets for linux google’s desktop widget engine uses xulrunner according to the build instructions grani grain sizing assessment tool according to this wiki page g...
Defining Cross-Browser Tooltips - Archive of obsolete content
the solution the most obvious solution is to use the alt and title attributes for their intended purposes, instead of adhering to their historical misuses.
... if such a find-and-replace operation is somehow not feasible, authors with the ability to run proxy servers can use the approach proposed by christian jensen (cf.
Notes on HTML Reflow - Archive of obsolete content
the purpose of the dirty reflow is to allow these individual reflows to be coalesced intelligently.
...its purpose is to convert html reflows their box analog.
Autodial for Windows NT - Archive of obsolete content
"what's a system service" they might ask when told about how autodial is supposed to work now.
...i don't see a need to expose this pref in the ui, but perhaps it should be there.
Documentation for BiDi Mozilla - Archive of obsolete content
text fields and composer the specification of the bidi changes to composer was posted in the editor and i18n newsgroups, and responses there were taken into account.
...the text pasted from the clipboard (to the composer or to an edit field) is pasted as is.
JavaScript Client API - Archive of obsolete content
y be downloaded) a separate, conspicuous, and reasonably detailed privacy policy detailing how data collected or transmitted by your third party client is managed and protected; (b) that your third party client will only store data in encrypted form on the firefox sync servers operated by mozilla; (c) that you and your third party client will use the firefox sync apis solely for their intended purpose; (d) that your third party client will not hide or mask its identity as it uses the services and/or firefox sync apis, including by failing to follow required identification conventions; and (e) that you and your third party client will not use the firefox sync apis for any application or service that replicates or attempts to replicate the services or firefox sync experience unless such use is n...
...its purpose in life is to track changes to whatever data type you are syncing.
Creating a Help Content Pack - Archive of obsolete content
if you don't know rdf, that's okay - for our purposes, you won't need to learn very much.
...the rdf:id attribute serves this purpose.
Hidden prefs - Archive of obsolete content
mail composition "other header" pref ("mail.compose.other.header") the format for this a comma delimited list of mail headers, like "approved,x-no-archive" an example for your prefs.js would be: user_pref("mail.compose.other.header", "approved"); this will cause "approved" to show up in the compose window address picker, under to:, cc:, bcc:, newsgroup:, etc.
...| mail & newsgroups | addressing" "other compose header" pref from mailnews.js: // you can specify a comma delimited list of optional headers // this will show up in the address picker in the compose window // examples: "x-face" or "approved" pref("mail.compose.other.header", "approved,x-no-archive"); ...
Modularization techniques - Archive of obsolete content
introduction the purpose of this document is provide all the information you need to create a new mozilla module or break existing code into a module.
...*aresult = null; nsisupports inst = new nssamplefactory(); if (inst == null) { return ns_error_out_of_memory; } nsresult res = inst->queryinterface(kifactoryiid, aresult); if (res != ns_ok) { // we didn't get the right interface, so clean up delete inst; } return res; } file main.cpp main.cpp is a simple program that creates an instance of our sample class and disposes of it.
Plug-n-Hack - Archive of obsolete content
overview plug-n-hack (pnh) is a proposed standard from the mozilla security team for defining how security tools can interact with browsers in a more useful and usable way.
...while some of the pnh capabilities do have a fixed meaning, particularly around proxy configuration, most of the capabilities are completely generic, allowing tools to expose whatever functionality they want.
Safely loading URIs - Archive of obsolete content
these methods are exposed on the nsiscriptsecuritymanager interface and are called checkloaduri, checkloaduriwithprincipal, and checkloaduristr.
... all three methods take three arguments: the first argument identifies the source of the uri, the second argument is the uri that one plans to load, and the third argument is a set of flags that can be used to impose additional restrictions on the uris that may be loaded.
Event Handlers - Archive of obsolete content
additional attributes can be used to impose a filter on the event handler.
... when a filter is imposed, additional conditions must be met before the event handler will fire.
XTech 2005 Presentations - Archive of obsolete content
these include plans to expose the rdf api to public web content, as well as performance and correctness improvements.
...to realize this potential in web applications, browsers must expose rich new graphics apis to web content.
Introduction to XUL - Archive of obsolete content
the intention is to build cross-platform applications like browsers and mail clients from a set of tools designed for that purpose.
...(for standards purposes, we will probably need to change the the mime type to something like "text/x-xul".) these files are processed using the same parser as "text/xml" files (and therefore subject to xml syntax rules, as they should be).
Menus - Archive of obsolete content
the menu and each menuitem has a label indicating its purpose.
...if you want to create a general purpose popup that isn't a menu, use a panel instead.
Code Samples - Archive of obsolete content
change the first line to specify the page that you want to open: const url = "http://www.mozilla.org/" var uri = components .classes["@mozilla.org/network/simple-uri;1"] .getservice(components.interfaces.nsiuri) uri.spec = url components .classes["@mozilla.org/uriloader/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice) .loadurl(uri) compose an e-mail to compose an e-mail, use the same code as in the section open a web page above.
...rds* const name = "toolkit:passwordmanager" const uri = "chrome://passwordmgr/content/passwordmanager.xul" seamonkey navigator const name = "navigator:browser" const uri = "chrome://navigator/content/" mail & newsgroups const name = "mail:3pane" const uri = "chrome://messenger/content/" composer const name = "composer:html" const uri = "chrome://editor/content/" address book const name = "mail:addressbook" const uri = "chrome://messenger/content/addressbo...ddressbook.xul" irc chat const name = "irc:chatzilla" const uri = "chrome://chatzilla/content/" calendar const name = "cale...
Input Controls - Archive of obsolete content
in xul, you can use the textbox element for this purpose as well -- two separate elements are not necessary.
...radio buttons can be used for a similar purpose when there are a set of them and only one can be selected at once.
Archived Mozilla and build documentation - Archive of obsolete content
plug-n-hack plug-n-hack (pnh) is a proposed standard from the mozilla security team for defining how security tools can interact with browsers in a more useful and usable way.
... table cellmap the table layout use the cellmap for two purposes: table cellmap - border collapse this document describes the additional information that is stored for border collapse tables in the cellmap.
Gecko Compatibility Handbook - Archive of obsolete content
since a browser is supposed to ignore html tags it does not recognize and render the content inside the tags, web page authors have used the technique of combining proprietary html that will work as expected in each browser.
...we will have more to say about doctypes later in this article, but essentially the doctype is supposed to indicate to a browser what version of html is used in the page.
NPObject - Archive of obsolete content
npobject is the type used to express objects exposed by either the plugin or by the browser through this api.
... the browsers are expected to expose their window objects and everything reachable from it through this api.
The First Install Problem - Archive of obsolete content
proposed solution on mac os x, the system's plugins folder will probably suffice as an install location in which browsers installed later can find their plugins.
...this document proposes a meta-information model in the win32 registry similar to the one used by microsoft's hkey_classes_root\clsid\ where a new activex control (ocx) on the system presents its uuid as a registry key (identifying the activex control) as well as information about where to find the ocx (e.g.
What is RSS - Archive of obsolete content
(although some were using rss 0.93 and rss 0.94 even though they weren't supposed to.) in september 2002 userland released rss 2.0.
... rss 2.0 was meant to be a replacement for rss 0.92 (and the rss 0.93 and rss 0.94 drafts that no one was supposed to use).
Threats - Archive of obsolete content
information passes to a person who poses as the intended recipient.
...for example, suppose the site www.example.net pretends to be a furniture store when it is really just a site that takes credit-card payments but never sends any goods.
Browser Detection and Cross Browser Support - Archive of obsolete content
since the user agent string was exposed as a property of the navigator object (e.g.
... recommendations target the standards and not particular browsers while the period from 1994-2000 was dominated by incompatible non-standard browsers from netscape and microsoft, today the dominating factor in web development are the standards proposed by the world wide web consortium (w3c).
Generator comprehensions - Archive of obsolete content
suppose we have an iterator it which iterates over a large sequence of integers.
...m it, doubled when a generator comprehension is used as the argument to a function, the parentheses used for the function call means that the outer parentheses can be omitted: var result = dosomething(for (i in it) i * 2); the significant difference between the two examples being that by using the generator comprehension, you would only have to loop over the 'obj' structure once, total, as opposed to once when comprehending the array, and again when iterating through it.
XForms Custom Controls - Archive of obsolete content
purpose you are in the right place if you would like to create your own custom renderings of the xforms controls like input, output, trigger, etc.
...the purpose of this article is to give you enough background information so that you'll be able to get a good start.
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
introduction the purpose of this page is to gather requests for enhancement to the mozilla xforms implementation.
... enhancements of xforms elements if you find that none of the elements proposed by the xforms spec address your requirements, please post your usecase here.
RDF in Mozilla FAQ - Archive of obsolete content
rdf serves two primary purposes in mozilla.
... in mozilla, datasources can be composed together using the composite data source.
GLSL Shaders - Game development
the purpose of the vertex shader is to set up the gl_position variable — this is a special, global, and built-in glsl variable.
...the purpose of the fragment shader is to set up the gl_fragcolor variable.
Desktop gamepad controls - Game development
an api exposes all the information you need to hook up your game's logic and successfully control the user interface and gameplay.
...received values are assigned to the proper objects and returns the pressed info for debugging purposes.
Implementing controls using the Gamepad API - Game development
(we could use the gamepad.connected boolean for this purpose, but we wanted to have a separate variable for turning on turbo mode without needing to have a gamepad connected, for reasons explained above.) disconnect: function(evt) { gamepadapi.turbo = false; delete gamepadapi.controller; console.log('gamepad disconnected.'); }, the disconnect function sets the gamepad.turbo property to false and removes the variable containing the gamepad object.
...ons[b].pressed) { pressed.push(gamepadapi.buttons[b]); } } } // loop through axes and push their values to the array var axes = []; if(c.axes) { for(var a=0,x=c.axes.length; a<x; a++) { axes.push(c.axes[a].tofixed(2)); } } // assign received values gamepadapi.axesstatus = axes; gamepadapi.buttonsstatus = pressed; // return buttons for debugging purposes return pressed; }, on every frame, update() saves buttons pressed during the previous frame to the buttonscache array and takes fresh ones from the gamepadapi.controller object.
Efficient animation for web games - Game development
when you animate position with javascript, the browser cannot easily make that same assumption, and so you might end up causing it to draw only the newly-exposed region of content, which may introduce slow-down.
...requestanimationframe includes a domhighrestimestamp in its callback function prototype, which you definitely should use (as opposed to using the date object), as this will be the time the frame began rendering, and ought to make your animations look more fluid.
Plug-in Development Overview - Gecko Plugin API Reference
for more information about mime types, see these mime rfcs: rfc-2045: "multipurpose internet mail extensions (mime) part one: format of internet message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms.
...both technologies are now obsolete for the purposes of plug-in scriptability, and the cross-browser npruntime api should be used instead.
CORS-safelisted response header - MDN Web Docs Glossary: Definitions of Web-related terms
a cors-safelisted response header is an http header which has been safelisted so that it will not be filtered when responses are processed by cors, since they're considered safe (as the headers listed in access-control-expose-headers).
... by default, the safelist includes the following response headers: cache-control content-language content-type expires last-modified pragma examples extending the safelist you can extend the list of cors-safelisted response headers by using the access-control-expose-headers header: access-control-expose-headers: x-custom-header, content-length ...
CORS - MDN Web Docs Glossary: Definitions of Web-related terms
access-control-allow-credentials indicates whether or not the response to the request can be exposed when the credentials flag is true.
... access-control-expose-headers indicates which headers can be exposed as part of the response by listing their names.
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
the method is installed on the prototype of myobject (thus it is an instance method) as opposed to being a static method.
... the static keyword indicates that this method is a class method as opposed to being an instance method.
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
depending on how strict an administrating organization might be, tld often serves as a clue to the purpose, ownership, or nationality of a website.
... sponsored top-level domains (stld) these domains are proposed and sponsored by private organizations that decide whether an applicant is eligible to use the tld, based on community theme concepts.
Brotli - MDN Web Docs Glossary: Definitions of Web-related terms
brotli is a general-purpose lossless compression algorithm.
... it compresses data using a combination of a modern variant of the lz77 algorithm, huffman coding, and second-order context modeling, providing a compression ratio comparable to the best currently available general-purpose compression methods.
CSS and JavaScript accessibility best practices - Learn web development
by the same token, a heading loses its visual purpose if you style it so it doesn't look like a heading.
...listitem = document.createelement('li'); const anchor = document.createelement('a'); anchor.textcontent = testitem.input.name + ' field is empty: fill in your ' + testitem.input.name + '.'; anchor.href = '#' + testitem.input.name; anchor.onclick = function() { testitem.input.focus(); }; listitem.appendchild(anchor); errorlist.appendchild(listitem); } each link serves a dual purpose — it tells you what the error is, plus you can click on it/activate it to jump straight to the input element in question and correct your entry.
Test your skills: Images and Form elements - Learn web development
for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Test your skills: Overflow - Learn web development
try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the example as displayed in the image: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Test your skills: position - Learn web development
for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
... try updating the live code below to recreate the finished example: for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
How CSS is structured - Learn web development
previous overview: first steps next now that you are beginning to understanding the purpose and use of css, let's examine the structure of css.
... .special { color: red; } p { color: blue; } suppose that in our html document, we have a paragraph with a class of special.
What is CSS? - Learn web development
for example, you could take a look at the mdn reference to the backgrounds and borders module to find out what its purpose is, and what different properties and other features it contains.
... css specifications all web standards technologies (html, css, javascript, etc.) are defined in giant documents called specifications (or simply "specs"), which are published by standards organizations (such as the w3c, whatwg, ecma, or khronos) and define precisely how those technologies are supposed to behave.
Styling links - Learn web development
we also use background-size to specify the size we want the background image to be shown at — it is useful to have a larger icon and then resize it like this as needed for responsive web design purposes.
... the last three declarations are pretty simple and are mainly just for cosmetic purposes.
How to structure a web form - Learn web development
the <fieldset> and <legend> elements the <fieldset> element is a convenient way to create groups of widgets that share the same purpose, for styling and semantic purposes.
...the text content of the <legend> formally describes the purpose of the <fieldset> it is included inside.
Tips for authoring fast-loading HTML pages - Learn web development
use a content delivery network (cdn) for the purposes of this article, a cdn is a means to reduce the physical distance between your server and your visitor.
...suppose your website server is located in the united states and it has a visitor from india; the page load time will be much higher for the indian visitor compared to a visitor from the us.
Advanced text formatting - Learn web development
the purpose of these lists is to mark up a set of items and their associated descriptions, such as terms and definitions, or questions and answers.
...the <time> element allows you to attach an unambiguous, machine-readable time/date for this purpose.
Document and website structure - Learn web development
the footer is also sometimes used for seo purposes, by providing links for quick access to popular content.
...for example: <p>the king walked drunkenly back to his room at 01:00, the beer doing nothing to aid him as he staggered through the door <span class="editor-note">[editor's note: at this point in the play, the lights should be down low]</span>.</p> in this case, the editor's note is supposed to merely provide extra direction for the director of the play; it is not supposed to have extra semantic meaning.
HTML Tables - Learn web development
LearnHTMLTables
a very common task in html is structuring tabular data, and it has a number of elements and attributes for just this purpose.
... guides this module contains the following articles: html table basics this article gets you started with html tables, covering the very basics such as rows and cells, headings, making cells span multiple columns and rows, and how to group together all the cells in a column for styling purposes.
Introduction to events - Learn web development
note: event handlers are sometimes called event listeners — they are pretty much interchangeable for our purposes, although strictly speaking, they work together.
...onst para = document.queryselector('p'); form.onsubmit = function(e) { if (fname.value === '' || lname.value === '') { e.preventdefault(); para.textcontent = 'you need to fill in both names!'; } } obviously, this is pretty weak form validation — it wouldn't stop the user validating the form with spaces or numbers entered into the fields, for example — but it is ok for example purposes.
Third-party APIs - Learn web development
the purpose of these is so that the user knows what is going on in the websites they visit and is less likely to fall victim to someone using an api in a malicious way.
...for the google maps api in particular, you need to provide a credit card for billing purposes (although basic usage is free), which we didn't think was acceptable for a basic tutorial.
Server-side web frameworks - Learn web development
— other factors include: framework purpose/origin: some web frameworks were initially created to solve certain types of problems, and remain better at creating web apps with similar constraints.
...there are many excellent independent components, but sometimes it can be hard to work out which is the best for a particular purpose!
Ember resources and troubleshooting - Learn web development
what is the purpose of controllers?
... what is the purpose of routes?
Framework main features - Learn web development
suppose you're building a website for an online magazine, and you need to be sure that each contributing writer gets credit for their work.
... components in components one key benefit of component-based ui architecture is that components can be composed together.
Beginning our React todo list - Learn web development
the aria-labelledby attribute tells assistive technologies that we're treating our list heading as the label that describes the purpose of the list beneath it.
... making this association gives the list a more informative context, which could help screen reader users better understand the purpose of it.
Componentizing our Svelte app - Learn web development
repl to code along with us using the repl, start at https://svelte.dev/repl/99b9eb228b404a2f8c8959b22c0a40d3?version=3.23.2 breaking the app into components in svelte, an application is composed from one or more components.
...components can be big or small, but they are usually clearly defined: the most effective components serve a single, obvious purpose.
Working with Svelte stores - Learn web development
to handle those situations, we can take advantage of aria live regions, which provide a way to programmatically expose dynamic content changes so that they can be detected and announced by assistive technologies.
...if you have a central place where all the state modification is applied, components could just call those methods to modify the app's state and reactively display the info exposed by the store.
Handling common accessibility problems - Learn web development
html semantic html (where the elements are used for their correct purpose) is accessible right out of the box — such content is readable by sighted viewers (provided you don't do anything silly like make the text way too small or hide it using css), but will also be usable by assistive technologies like screen readers (apps that literally read out a web page to their user), and confer other advantages too.
...see desktop mouse and keyboard controls for some game-related examples that can be adapted for any purpose.
Setting up your own test automation environment - Learn web development
if you wish to extract these results for reporting purpose from lambdatest platform then you can do so by using lambdatest restful api.
...we have tested this locally, but you could set this up on just about any server along with the relevant browser drivers, and then connect your scripts to it using the url you choose to expose it at.
Introducing a complete toolchain - Learn web development
checking the file (and not saving it) is useful for purposes like checks that run before a release - i.e.
... although this stage of our toolchain can be quite painful, because we've chosen a tool that purposely tries to reduce configuration and complexity, there's really nothing more we need to do during the development phase.
Learn web development
random glossary entry semantics in programming, semantics refers to the meaning of a piece of code — for example "what effect does running that line of javascript have?", or "what purpose or role does that html element have" (rather than "what does it look like?".) topics covered the following is a list of all the topics we cover in the mdn learning area.
... html — structuring the web html is the language that we use to structure the different parts of our content and define what their meaning or purpose is.
Information for Assistive Technology Vendors
in addition, we provide some simple interfaces via which we expose a read-only dom (document object model).
... purpose newsgroup mailing list google group developer discussion mozilla.dev.accessibility subscribe/unsubscribe google group end user support mozilla.support.accessibility subscribe/unsubscribe google group ...
Choosing the right memory allocator
allocating memory in xpcom these are general purpose memory-management routines that you should use unless your code falls into one of the other categories below.
... js_malloc() js_realloc() js_free() js_strdup() arena allocators nspr exposes arena allocators that can be used to efficiently allocate lots of small, uniformly sized objects.
The Firefox codebase: CSS Guidelines
for testing purposes, here is an example of a webextension theme.
... never write css specially for the built-in light/dark theme in compacttheme.css unless that css isn't supposed to affect webextension themes.
Eclipse CDT Manual Setup
note the requirements that this method of build option discovery imposes on us.
... below we will configure eclipse's build step so that you use it only occasionally to manually trigger a special "build" (actually a fast script that fakes a build) purely for the purposes of setting/updating the compiler options that eclipse associates with each source file.
Gecko Logging
log level numeric value purpose mozilla logging levels disabled 0 indicates logging is disabled.
... the log crate lists the available log levels: log level purpose rust logging levels error designates very serious errors.
Reviewer Checklist
good web citizenship make sure new web-exposed apis actually make sense and are either standards track or preffed off by default.
... [fennec: android services has logger.pii() for this purpose (e.g., logging profile dir)].
mach
if you don't use mach, you have to find another solution for the following problems: discovering what commands or make targets are available (mach exposes everything through mach help while inside "mozilla-central" , else you'll just get a cryptic error message) making more sense out of command output (mach offers terminal colorization and structured logging) getting productive tools in the hands of others (mach "advertises" tools to people through mach help (unless it actually just gives you a cryptic error message) - in the former case, people...
...instead, it aims to expose that tooling through a common, shared interface.
Experimental features in Firefox
these nightly builds of firefox typically include experimental or partially-implemented features, including those for proposed or cutting-edge web platform standards.
...the hit region api allows you define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools.
Embedding Tips
the nsiauthprompt interface allows the networking layer to pose a user / password prompt to obtain the values needed for authentication.
... your own implementation should pose this dialog, or fill in the values that are needed for the upload to succeed.
HTML parser threading
the method implementations assert which thread they are supposed to be called on.
...nodes created by tree ops are owned by the parser for the lifetime of the parser, so for refcounting purposes, the parser owns each nsicontent object it creates by one reference no matter how many copies of the content handle for the node exist inside the parser.
Introduction to Layout in Mozilla
ext non-geometric information may be shared by adjacent frames reference counted, owned by frame view clipping, z-order, transparency [0..1] per frame, owned by frame widget native window [0..1] per view, owned by view key data structures the document owns the content model, and one or more presentations exposed programmatically via dom apis the presentation owns the frame hierarchy frames own the style contexts, views, widgets presentation has media type, dimensions, etc.
...“in the flow” incremental reflow multiple reflow commands are batched nsreflowpath maintains a tree of target frames amortize state recovery and damage propagation cost painting as reflow proceeds through the frame hierarchy, areas are invalidated via nsiviewmanager::updateview unless immediate, invalid areas are coalesced and processed asynchronously via os expose event native expose event dispatched to widget; widget delegates to the view manager view manager paints views back-to-front, invoking presshell’s paint method presshell::paint walks from the view to the frame; invokes nsiframe::paint for each layer incrementalism single-threaded simple (no locking) can’t leave event queue unattended content construction unwi...
Assert.jsm
json.stringify is not designed to be used for this purpose; objects may have ambiguous tojson() implementations that would influence the test.
... all assertion methods provide both the actual and expected values to the assertion error for display purposes.
Localizing with Pontoon
note that for our purposes here, we'll be using firefox affiliates website to demo pontoon's functionality and workflow.
... publishing your localization suppose you now want to publish your l10n work by committing it to a repo.
Gecko Profiler FAQ
for this purpose you should try to use a native profiler on your platform of choice (for example xperf/vtune on windows, instruments on osx, and perf/zoom on linux.) one workaround is to break the hot function into several explicitly-non-inline helpers, recompile, and re-profile.
...the profile contains markers for dom events, and those include user-generated events like mouse clicks, but these markers are only exposed as a huge unsearchable list in the markers tab.
Leak-hunting strategies and tips
xpconnect allows an xpcom object to be exposed to javascript, and it allows certain javascript objects to be exposed to c++ code as normal xpcom objects.
... when a c++ object is exposed to javascript (the more common of the two), an xpcwrappednative object is created.
Memory Profiler
however, the information exposed in this way is usually a snapshot and the history of how memory has been used goes missing.
...it's supposed to profile a very long time period without problem.
powermetrics
user%: percentage of that cpu time spent in user space (as opposed to kernel mode.) deadlines (<2 ms, 2-5 ms): these two columns count how many "short" timers woke up threads in the process, per second, during the sample period.
...the second column counts "package idle exit" wakeups, which wake up the entire package as opposed to just a single core; such wakeups are particularly expensive, and this count is a subset of the first column's count.
Productization guide
purpose of productization there are two main purposes of adding default web services to mozilla products: provide users with useful and relevant content demonstrate certain features of the product the first one (provide users with useful and relevant content) is obvious: we want to improve our users’ experience on the web, so we provide a couple of well-thought suggestions for different services.
...the second purpose (demonstrate certain features of the product) is equally important: by providing these default services, we demonstrate particular features of the product, the ones which otherwise wouldn’t be as discoverable.
About NSPR
history a good portion of the library's purpose, and perhaps the primary purpose in the gromit environment, was to provide the underpinnings of the java vm, more or less mapping the sys layer that sun defined for the porting of the java vm to various platforms.
...it is a goal of nspr that nspr impose as little overhead as possible in accessing those appropriate system features.
Logging
nspr uses this facility itself for its own development debugging purposes.
... log types and variables two types supporting nspr logging are exposed in the api: prlogmoduleinfo prlogmodulelevel two environment variables control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and macros the functions and macros for logging are: pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_assert (new in nspr 4.6.6xx...
NSS_3.12_release_notes.html
bug 357015: on windows, readsystemfiles reads 21 files as opposed to 10 files in c:\windows\system32.
...obal salt as having no password bug 405966: unknown signature oid 1.3.14.3.2.29 causes sec_error_bad_signature, 3.11 ignores it bug 413010: cert_comparerdn may return a false match bug 417664: false positive crl revocation test on ppc/ppc64 nss_enable_pkix_verify=1 bug 404526: glibc detected free(): invalid pointer bug 300929: certificate policy extensions not supported bug 129303: nss needs to expose interfaces to deal with multiple token sources of certs.
NSS Developer Tutorial
a data buffer is usually represented as: unsigned char *data; unsigned int len; the buffer pointer is unsigned char *, as opposed to void *, so we can perform pointer arithmetic without casting.
... for historical reasons, the buffer length is unsigned int, as opposed to size_t.
NSS sources building testing
several tools are general purpose and can be used to inspect and manipulate the storage files that software using the nss library creates and modifies.
... other tools are only used for testing purposes.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
for the sake of completeness, it's also a good idea to expose public key objects.
... if i have a multipurpose token that supports all required pkcs #11 functions and provides rsa_pkcs and dsa mechanisms but but not aes, des or rc4, will nss use the token for the rsa_pkcs mechanisms and the nss internal pkcs #11 module for aes, des or rc4 when making an ssl connection?
sslfnc.html
the third parameter to the password callback function is application-defined and can be used for any purpose.
... description the ssl_revealurl function is used by certificate authentication callback function to obtain the domain name of the desired ssl server for the purpose of comparing it with the domain name in the certificate presented by the server actually contacted.
NSS tools : signtool
for testing purposes only, you can create an object-signing certificate with netscape signing tool 1.3.
...to create a file for this purpose, enter each of the seven input fields, in order, on a separate line.
Rhino overview
rhino contains all the features of javascript 1.7 allows direct scripting of java a javascript shell for executing javascript scripts a javascript compiler to transform javascript source files into java class files a javascript debugger for scripts executed with rhino language the javascript language itself is standardized by standard ecma-262 ecmascript: a general purpose, cross-platform programming language.
...these features are generally not broadly useful, yet they impose significant constraints on implementations that hamper or prevent optimization.
Scripting Java
rhino provides a top-level function importpackage that serves the same purpose as java's import declaration.
...you must use the java.lang.reflect.array class for this purpose.
64-bit Compatibility
for all intents and purposes they are also 32-bit on 64-bit platforms: intn, uintn jsintn, jsuintn, jsbool general problems with pointers when performing bitwise operations on pointer values, make sure that both operands are 64-bit.
...a native integer is the size used for intptr_t/uintptr_t, which is usually the width of a general-purpose register on the target cpu.
JSAPI Cookbook
*/ js::rootedobject obj(cx, js_new(cx, constructor, args)); if (!obj) return false; calling a global js function // javascript var r = foo(); // where f is a global function /* jsapi * * suppose the script defines a global javascript * function foo() and we want to call it from c.
... */ js::rootedvalue r(cx); if (!js_callfunctionname(cx, js_getglobalobject(cx), "foo", 0, null, &r)) return false; calling a js function via a local variable // javascript var r = f(); // where f is a local variable /* jsapi * * suppose f is a local c variable of type js::value.
JSFastNative
the term "native" here refers to c/c++ code as opposed to javascript code.
... argc unsigned int the number of arguments supplied to the function by the caller (as opposed to, say, the number of arguments the function is specified to take in its jsfunctionspec).
JSNative
the term "native" here refers to c/c++ code as opposed to javascript code.
... argc unsigned the number of arguments supplied to the function by the caller (as opposed to, say, the number of arguments the function is specified to take in its jsfunctionspec).
JSObjectOps.newObjectMap
description note: the jsapi does not expose the data structure that would be necessary to develop new jsobjectmap subclasses.
...when nrefs reaches 0 due to a js_dropobjectmap call, jsobjectops.destroyobjectmap will be called to dispose of the map.
JS_DefineFunction
description js_definefunction exposes a c/c++ function to scripts by defining a new method on an existing javascript object.
...call is a pointer to the c/c++ function that is to be exposed to javascript.
JS_GetFunctionObject
in other cases, the object returned by js_getfunctionobject is not necessarily safe to call and should not be exposed to script.
...but in the jsapi there are two separate concepts: a jsobject is what is exposed to scripts and has properties and can be stored in variables; and the corresponding jsfunction contains the code of a function.
JS_GetLocaleCallbacks
callback functions struct jslocalecallbacks { jslocaletouppercase localetouppercase; jslocaletolowercase localetolowercase; jslocalecompare localecompare; // not used #if expose_intl_api jslocaletounicode localetounicode; }; typedef bool (* jslocaletouppercase)(jscontext *cx, js::handlestring src, js::mutablehandlevalue rval); typedef bool (* jslocaletolowercase)(jscontext *cx, js::handlestring src, js::mutablehandlevalue rval); typedef bool (* jslocalecompare)(jscontext *cx, js::handlestring src1, js::handlestring src2, js::mutablehandle...
...if expose_intl_api is defined, intl api is used instead.
JS_GetParent
such an object should not be passed to any other jsapi function that could expose it to script code.
... an object's parent serves two purposes in spidermonkey: for some functions, it is used to implement lexical scoping (but this is an implementation detail).
JS_GetReservedSlot
these fields are not directly exposed to scripts.
...(note that private values must not be exposed directly to javascript.
JS_InitClass
the jsclass is an internal data structure that is not exposed outside the javascript engine.
...they can also have methods and properties that are only present on the constructor; these are called "static methods" and "static properties" because they serve the same purpose and use the same syntax as static methods and fields in java.
SpiderMonkey 31
migrating to spidermonkey 31 the first change most embedders will notice is that spidermonkey must now be initialized before it can be used, using the newly-repurposed js_init method.
...embedders still need to build with nspr, as the new wrappers require using spidermonkey internal functions which are not exposed to the public api.
Thread Sanitizer
the default way of symbolizing the traces is much slower than using llvm-symbolizer for that purpose: llvm ships with a symbolizer binary that tsan will readily use to immediately output symbolized traces much faster.
...this list is a good tool to temporarily hide some traces, especially for debugging purposes.
Mozinfo
mozinfo proposes to solve this problem.
...the current implementation exposes relevant key, values: os, version, bits, and processor.
A Web PKI x509 certificate primer
key usage this extension is used to constrain the purpose for the key in the certificate.
...this is one of the most powerful extensions for businesses to have to help limit risk imposed by losing the private key of the ca.
Gecko Roles
role_dial represents a dial or knob whose purpose is to allow a user to set a value.
... role_date_editor represents control whose purpose is to allow a user to edit a date.
The Publicity Stream API
the publicity stream is provided as a central place for applications to publicize application usage for the purpose of notifying a user's friends of the applications which their friends are using.
...publicity stream api (navigator.apps.publicity.*) the publicity api is exposed as properties on the navigator.apps.publicity object.
Fun With XBL and XPConnect
exposing the xpcom interfaces one somewhat nasty trick you need to do is to manually expose the interfaces of the xpcom object that you want your widget to support.
...the handler calls the auto complete method we've exposed on the widget which in turn forwards the call to the xpcom object, passing in our implementation of nsiautocompletelistener.
Building the WebLock UI
one of the most efficient ways to expose this is to use radio buttons, which allow the user to toggle a particulart state, as the figure above illustrates.
...in overlays the ordinarily unique id attributes that xul elements use to distinguish themselves are purposely made redundant with ui in the existing browser with which they should be merged.
Detailed XPCOM hashtable guide
future plans nsisimpleenumerator support the (obsolete) nshashtable has a wrapper that exposes an nsisimpleenumerator on its items.
...mozilla has tuned a good general-purpose hash algorithm for strings and nsid.
Components.utils.evalInWindow
this does impose some restrictions on the sorts of things that can be returned: in particular, the result can't contain any functions, because functions can't be structured-cloned.
... example suppose a page script defines a variable: // page-script.js var somelocalvariable = { name: "selection1", node: document.documentelement }; an add-on script or other privileged script can access the variable using evalinwindow(): // add-on-script.js var result = components.utils.evalinwindow("somelocalvariable", contentwindow); console.log(result); // {"name":"selection1","node":{}} the add-on code can modify the variable as well, of course: // add-on-script.js components.utils.evalinwindow("somelocalvariable.newprop = 42", contentwindow); // page-script.js console.log(window.somelocalvariable.newprop); // 42 but note that the add-on script must trust that the page script has not redefined the setter on somelocalvariable: unlike xraywrappers, evalinwindow() does not provide x...
Components.utils.exportFunction
this function provides a safe way to expose a function from a privileged scope to a less-privileged scope.
...suppose the content window defines a local variable bar: // page-script.js var bar = {}; now the add-on script can attach the function to bar: // addon-script.js components.utils.exportfunction(greetme, contentwindow.bar, {defineas: "greetme"}); // page-script.js var value = bar.greetme("bob"); console.log(value); // "hello bob" ...
XPConnect wrappers
security wrappers exposed to chrome to learn about security wrappers, see the article on script security in gecko.
... note that a previous version of the current page recommended using __exposedprops__ to expose objects from chrome to content.
XPCOM glue classes
if there is no base class method with the same signature, a compiler with static-checking enabled will fail to compile.ns_postconditionmacrons_preconditionmacronsacstringthe nsacstring abstract class represents a character string composed of single-byte storage units.
... this class is typically used to represent ascii or utf-8 character arrays.nsacstring (external)class declarationnsacstring_internalclass declarationnsadoptingcstringclass declarationnsadoptingstringclass declarationnsastringthe nsastring abstract class represents a character string composed of double-byte storage units.
IAccessibleHypertext
other-licenses/ia2/accessiblehypertext.idlnot scriptable this interface exposes information about hypertext in a document.
... 1.0 66 introduced gecko 1.9 inherits from: iaccessibletext last changed in gecko 1.9 (firefox 3) the iaccessiblehypertext interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other documents.
mozITXTToHTMLConv
whattodo a bit field composed of the conversion control attributes indicating what conversions to apply.
... whattodo a bit field composed of the conversion control attributes indicating what conversions to apply.
GroupPosition
remark alternatively this information is exposed by nsiaccessible.attribute attribute, also see group attributes page.
... refer to accessible web specifications to get an idea what elements expose group information.
nsIAccessibleEvent
isfromuserinput boolean returns true if the event was caused by explicit user input, as opposed to purely originating from a timer or mouse movement.
...that is, changes to text that is exposed through the iaccessibletext and iaccessibleeditabletext interfaces.
nsIAccessibleRole
role_dial 49 represents a dial or knob whose purpose is to allow a user to set a value.
... role_date_editor 69 represents control whose purpose is to allow a user to edit a date.
nsIDocShell
app_type_editor 2 this is the value of the apptype attribute used by thunderbird and seamonkey to indicate that email messages or web pages are composed in this window.
... load_cmd_pushstate 0x8 returned by the loadtype attribute when the page has used history.pushstate() character set source constants these constants are not exposed to script.
nsIHttpChannel
empty headers will have an empty string as value and multiple headers will not be merged as opposed to getresponseheader().
...empty headers will be have an empty string as value and multiple headers will not be merged as opposed to visitresponseheaders().
nsIMessenger
displayname the file name for display purposes.
... displayname the file name for display purposes.
nsIMsgSendLater
inherits from: nsistreamlistener implemented by: @mozilla.org/messengercompose/sendlater;1.
... to create an instance, use var msgsendlater = components.classes["@mozilla.org/messengercompose/sendlater;1"] .getservice(components.interfaces.nsimsgsendlater); method overview void sendunsentmessages(in nsimsgidentity identity); void removelistener(in nsimsgsendlaterlistener listener); void addlistener(in nsimsgsendlaterlistener listener); nsimsgfolder getunsentmessagesfolder](in nsimsgidentity identity); attributes attribute type description msgwindow nsimsgwindow methods sendunsentmessages() sends all unsent messages for an identity.
nsIScriptableUnescapeHTML
parser/html/nsiscriptableunescapehtml.idlscriptable this interface is a utility interface that exposes the kind of markup parser behavior that the feed service needs.
... element the nsidomelement to be used as the context node for the purposes of the fragment parsing algorithm.
nsIScrollable
getdefaultscrollbarpreferences(in long scrollorientation); void getscrollbarvisibility(out boolean verticalvisible, out boolean horizontalvisible); void getscrollrange(in long scrollorientation, out long minpos, out long maxpos); obsolete since gecko 29.0 void setcurscrollpos(in long scrollorientation, in long curpos); obsolete since gecko 29.0 void setcurscrollposex(in long curhorizontalpos, in long curverticalpos); obsolete since gecko 29.0 void setdefaultscrollbarpreferences(in long scrollorientation, in long scrollbarpref); void setscrollrange(in long scrollorientation, in long minpos, in long maxpos); obsolete since gecko 29.0 void setscrollrangeex(in long minhorizontalpos, in long maxhorizontalpos, in long minverticalpos, in ...
... setcurscrollposex() obsolete since gecko 29.0 (firefox 29.0 / thunderbird 29.0 / seamonkey 2.26) void setcurscrollposex( in long curhorizontalpos, in long curverticalpos ); parameters curhorizontalpos an integer representing the horizontal position of the cursor.
nsITextInputProcessorCallback
example of simple js-ime: var simpleime = { _hasfocus: false, _hasrightstocompose: false, _tip: null, _callback: function simpleime_callback(atip, anotification) { try { switch (anotification.type) { case "request-to-commit": atip.commitcomposition(); break; case "request-to-cancel": atip.cancelcomposition(); break; case "notify-focus": this._hasfocus = true; break; case...
... "notify-blur": this._hasfocus = false; break; case "notify-detached": this._hasfocus = false; this._hasrightstocompose = false; break; } return true; } catch (e) { return false; } }, setcomposition: function simpleime_setcomposition(atext, aclauses, acaret) { if (!this._tip) { this._tip = components.classes["@mozilla.org/text-input-processor;1"].
nsIWebBrowserPersist
encode_flags_selection_only 1 output only the current selection as opposed to the whole document.
... saveprivacyawareuri() save the specified uri to file, explicitly dictating whether the operation should be considered private for the purposes of network requests, caching, etc.
Getting Started Guide
in each case, you are essentially extracting the raw pointer value for your own purpose.
... you can tell callers you are giving them ownership in a way that doesn't pose this hazard by returning a already_addrefed<t> (see bug #59212).
Using the clipboard
for example, a textbox would accept "text/unicode" (or "text/plain") while a composer window might accept html and image data.
...the code below can be used for this purpose: if (str) { var pastetext = str.value.queryinterface(ci.nsisupportsstring).data; } because the data from the transferable is an nsisupportsstring, we need to convert it into a javascript string.
Mozilla technologies
the publicity stream is provided as a central place for applications to publicize application usage for the purpose of notifying a user's friends of the applications which their friends are using.
...the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users.
Address Book examples
there are several hooks in the address book code exposed to add-on developers to help extend the behavior of the address book.
... load and save listeners edit dialogs for both contacts and mailing lists expose functions for registering load and save listeners.
Mail and RDF
mozilla mail exposes many of it's data structures to rdf through a few datasources.
... there are of course many more properties that are exposed via rdf, but this should give you a feel for it.
Mail client architecture overview
most of these modules have little dependancy on the mail reader itself: compose - the mail compose module is responsible for anything that has to do with sending mail.
... this includes the mail compose window, creation of rfc822 messages from the data a user has entered, and sending the messages via smtp.
libmime content type handlers
pizzarro <rhp@netscape.com> contents overview api's plugin location/installation sample content type handler plugin overview the libmime module implements a general-purpose mime parser and one of the primary methods provided by the parser is the ability to emit an html representation of an input stream.
...the primary * purpose of these handlers will be to represent the attached data in a * viewable html format that is useful for the user * * note: these will all register by their content type prefixed by the * following: mimecth:text/vcard * * libmime will then use nscomponentmanager::contractidtoclsid() to * locate the appropriate content type handler */ #ifndef nsimimecontenttypeha...
Working with windows in chrome code
suppose you're developing a browser extension that consists of a browser.xul overlay and an options window.
... suppose the overlay contains a button to open the extension's options window which needs to read some data from the browser window.
Standard OS Libraries
wayland is not considered stable, but it's supposed to replace xorg in the long term.
...the list of the exposed symbols/functions can be found here: gnome developer :: gtk+ reference manual.
Plug-in Development Overview - Plugins
for more information about mime types, see these mime rfcs: rfc-2045: "multipurpose internet mail extensions (mime) part one: format of internet message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms.
...both technologies are now obsolete for the purposes of plug-in scriptability, and the cross-browser npruntime api should be used instead.
DOM Inspector internals - Firefox Developer Tools
(internally, a panel may be loosely referred to as a "pane", but a panelset is always referred to as a "panelset".) a panel's purpose is to manage available viewers.
... host-integration overlays dom inspector is a general-purpose extension, suitable for use with any mozilla toolkit host application.
Debugger.Memory - Firefox Developer Tools
function properties of the debugger.memory.prototype object memory use analysis exposes implementation details memory analysis may yield surprising results, because browser implementation details that are transparent to content javascript often have visible effects on memory consumption.
... web developers need to know their pages’ actual memory consumption on real browsers, so it is correct for the tool to expose these behaviors, as long as it is done in a way that helps developers make decisions about their own code.
Debugger.Script - Firefox Developer Tools
for example, suppose we have a script for the following source code: a=[] for (i=1; i < 10; i++) // it's hip to be square.
... the elements of the array are objects, each of which describes a single entry point, and contains the following properties: linenumber: the line number for which offset is an entry point columnnumber: the column number for which offset is an entry point offset: the bytecode instruction offset of the entry point for example, suppose we have a script for the following source code: a=[] for (i=1; i < 10; i++) // it's hip to be square.
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
if you click on the item, the display shifts to show details about that element: this view shows information about the calculations for the size of the selected flex item: a diagram visualizing the sizing of the flex item content size - the size of the component without any restraints imposed on it by its parent flexibility - how much a flex item grew or shrunk based on its flex-grow value when there is extra free space or its flex-shrink value when there is not enough space minimum size (only appears when an item is clamped to its minimum size) - the minimum content size of a flex item when there is no more free space in the flex container final size - the size of the flex item a...
...fter all sizing constraints imposed on it have been applied (based on the values of flex-grow, flex-shrink and flex-basis) at the top of the section is a drop-down list of all the items in the selected flexbox container: you can use this drop-down to select any of the other flex items in the flex container.
Waterfall - Firefox Developer Tools
for example, suppose we have code like this: var iterations = 70; var multiplier = 1000000000; function calculateprimes() { console.time("calculating..."); var primes = []; for (var i = 0; i < iterations; i++) { var candidate = i * (multiplier * math.random()); var isprime = true; for (var c = 2; c <= math.sqrt(candidate); ++c) { if (candidate % c === 0) { // not prime ...
... for example, suppose we adapt the code above to make a timestamp every 10 iterations of the loop, labeled with the iteration number: var iterations = 70; var multiplier = 1000000000; function calculateprimes() { console.time("calculating..."); var primes = []; for (var i = 0; i < iterations; i++) { if (i % 10 == 0) { console.timestamp(i.tostring()); } var candidate = i * (multiplier * mat...
ANGLE_instanced_arrays - Web APIs
constants this extension exposes one new constant, which can be used in the gl.getvertexattrib() method: ext.vertex_attrib_array_divisor_angle returns a glint describing the frequency divisor used for instanced rendering when used in the gl.getvertexattrib() as the pname parameter.
... methods this extension exposes three new methods.
Bluetooth.getAvailability() - Web APIs
the getavailability() method of bluetooth interface of web bluetooth api interface exposes the bluetooth capabilities of the current device.
... for a returns a boolean which is true if the deveice has a bluetooth adapter and false otherwise (unless user configured user agent not to expose a real value).
Body.body - Web APIs
WebAPIBodybody
the body read-only property of the body mixin is a simple getter used to expose a readablestream of the body contents.
... example in our simple stream pump example we fetch an image, expose the response's stream using response.body, create a reader using readablestream.getreader(), then enqueue that stream's chunks into a second, custom readable stream — effectively creating an identical copy of the image.
Using dynamic styling information - Web APIs
the css object model (cssom), part of the dom, exposes specific interfaces allowing manipulation of a wide amount of information regarding css.
... the basic style object exposes the stylesheet and the cssstylesheet interfaces.
Credential Management API - Web APIs
credentialscontainer exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out.
... federatedcredential provides information about credentials from a federated identity provider, which is an entity that a website trusts to correctly authenticate a user, and which provides an api for that purpose.
DOMPoint - Web APIs
WebAPIDOMPoint
in the following snippet, the pose of the xr device (such as a vr headset or phone with ar capabilities) can be retrieved by calling using xrframe.getviewerpose() during an xrsession animation frame, then accessing the resulting xrpose's transform property, which contains two dompointreadonly attributes: position as a vector and orientation as a quaternion.
... function onxrframe(time, xrframe) { let viewerpose = xrframe.getviewerpose(xrreferencespace); if (viewerpose) { let position = viewerpose.transform.position; let orientation = viewerpose.transform.orientation; console.log('xr viewer position: {x: ' + roundtotwo(position.x) + ', y: ' + roundtotwo(position.y) + ', z: ' + roundtotwo(position.z)); console.log('xr viewer orientation: {x: ' + roundtotwo(orientation.x) + ', y: ' + roundtotwo(orientation.y) + ', z: ' + roundtotwo(orientation.z) + ', w: ' + roundtotwo(orientation.w)); } } specifications specification status comment ...
Introduction to the DOM - Web APIs
attribute when an attribute is returned by a member (e.g., by the createattribute() method), it is an object reference that exposes a special (albeit small) interface for attributes.
...a namednodemap has an item() method for this purpose, and you can also add and remove items from a namednodemap.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
whitespace is any string of text composed only of spaces, tabs or line breaks (to be precise, crlf sequences, carriage returns or line feeds).
...blocks occupy the full width available and are stacked on top of each other, which means that we end up with a layout composed of this list of blocks: <block>⏎⇥</block> <block>◦◦hello◦◦</block> <block>⏎◦◦◦</block> <block>◦◦world!◦◦</block> <block>◦◦⏎</block> this is then simplified further by applying the processing rules for whitespace in inline formatting contexts to these blocks: <block></block> <block>hello</block> <block></block> <block>world!</block> <block></block> ...
EXT_texture_compression_bptc - Web APIs
the ext_texture_compression_bptc extension is part of the webgl api and exposes 4 bptc compressed texture formats.
... constants the compressed texture formats are exposed by 4 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
EXT_texture_compression_rgtc - Web APIs
the ext_texture_compression_rgtc extension is part of the webgl api and exposes 4 rgtc compressed texture formats.
... constants the compressed texture formats are exposed by 4 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
Element: blur event - Web APIs
bubbles no cancelable no interface focusevent event handler property onblur sync / async sync composed yes examples simple example html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const password = document.queryselector('input[type="password"]'); password.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result even...
...orm> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that this event is composed.
Element: focus event - Web APIs
bubbles no cancelable no interface focusevent event handler property onfocus sync / async sync composed yes examples simple example html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const password = document.queryselector('input[type="password"]'); password.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }); password.addeventlistener('blur', (event) => { event.target.style.background = ''; }); result ...
...orm> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that this event is composed.
Element: focusin event - Web APIs
bubbles yes cancelable no interface focusevent event handler property onfocusin sync / async sync composed yes examples live example html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specific...
...ations specification status comment ui events working draft added info that this event is composed.
Element: focusout event - Web APIs
bubbles yes cancelable no interface focusevent event handler property onfocusout sync / async sync composed yes examples live example html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specificat...
...ions specification status comment ui events working draft added info that this event is composed.
Comparison of Event Targets - Web APIs
there are five targets to consider: property defined in purpose event.target dom event interface the dom element on the lefthand side of the call that triggered this event, eg: element.dispatchevent(event) event.currenttarget dom event interface the eventtarget whose eventlisteners are currently being processed.
... event.composedtarget event.webidl the original non-native target of the event before composition from shadow dom.
HTMLScriptElement - Web APIs
html <script> elements expose the htmlscriptelement interface, which provides special properties and methods for manipulating the behavior and execution of <script> elements (beyond the inherited htmlelement interface).
...for scripts from other origins, this controls if error information will be exposed.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
in order to allow microtasks to be used by third-party libraries, frameworks, and polyfills, the queuemicrotask() method is exposed on the window and worker interfaces through the windoworworkerglobalscope mixin.
... simply pass the javascript function to call while the context is handling microtasks into the queuemicrotask() method, which is exposed on the global context as defined by either the window or worker interface, depending on the current execution context.
Recommended Drag Types - Web APIs
you can use comments to indicate the purpose of a url, the title associated with a url, or other data.
... dragging custom data you can also use other types that you invent for custom purposes.
ImageBitmap.close() - Web APIs
WebAPIImageBitmapclose
the imagebitmap.close() method disposes of all graphical resources associated with an imagebitmap.
... var bitmap = offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } bitmap.close(); // imagebitmap { width: 0, height: 0 } -- disposed specifications specification status comment html living standardthe definition of 'close()' in that specification.
LocalFileSystem - Web APIs
for example, if you were to create a mail app, you might create a temporary storage for caching assets (like images and attachments) to speed up performance, while creating persistent storage for unique data—such as drafts of emails that were composed while offline—that should not be lost before they are backed up into the cloud.
... to use persistent storage with the file system api, chrome exposes a requestquota api.
Node.getRootNode() - Web APIs
WebAPINodegetRootNode
the available options are: composed: a boolean that indicates whether the shadow root should be returned (false, the default), or a root node beyond shadow root (true).
...ent.getrootnode().nodename); // #document console.log(child.getrootnode().nodename); // #document // create a shadowroot var shadowroot = shadowhost.attachshadow({mode:'open'}); shadowroot.innerhtml = '<style>div{background:#2bb8aa;}</style>' + '<div class="js-shadowchild">content</div>'; var shadowchild = shadowroot.queryselector('.js-shadowchild'); // the default value of composed is false console.log(shadowchild.getrootnode() === shadowroot); // true console.log(shadowchild.getrootnode({composed:false}) === shadowroot); // true console.log(shadowchild.getrootnode({composed:true}).nodename); // #document </script> specifications specification status comment domthe definition of 'getrootnode()' in that specification.
OES_vertex_array_object - Web APIs
constants this extension exposes one new constant, which can be used in the gl.getparameter() method: ext.vertex_array_binding_oes returns a webglvertexarrayobject object when used in the gl.getparameter() method as the pname parameter.
... methods this extension exposes four new methods.
PromiseRejectionEvent - Web APIs
these events are particularly useful for telemetry and debugging purposes.
... examples this simple example catches unhandled promise rejections and logs them for debugging purposes.
RTCDataChannel.label - Web APIs
you may use the label as you wish; you could use it to identify all the channels that are being used for the same purpose, by giving them all the same name.
... or you could give each channel a unique label for tracking purposes.
RTCIceCandidate.relatedAddress - Web APIs
the related address and port (relatedport) are not used at all by ice itself; they are provided for analysis and diagnostic purposes only, and their inclusion may be blocked by security systems, so do not rely on them having non-null values.
...relatedaddress can be used for diagnostic purposes; by observing the relationships between the various types of candidates and their addresses and related addresses.
RTCIceCandidate.relatedPort - Web APIs
the related address (relatedaddress) and port are not used at all by ice itself; they are provided for analysis and diagnostic purposes only, and their inclusion may be blocked by security systems, so do not rely on them having non-null values.
... usage notes the related address and port are not used by ice itself, and are only present for diagnostic and quality-of-service purposes.
RTCPeerConnection.createOffer() - Web APIs
the createoffer() method of the rtcpeerconnection interface initiates the creation of an sdp offer for the purpose of starting a new webrtc connection to a remote peer.
... the sdp offer includes information about any mediastreamtracks already attached to the webrtc session, codec, and options supported by the browser, and any candidates already gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
RTCPeerConnection: icecandidate event - Web APIs
indicating the end of a generation of candidates when an ice negotiation session runs out of candidates to propose for a given rtcicetransport, it has completed gathering for a generation of candidates.
... this signal exists for backward compatibility purposes and does not need to be delivered onward to the remote peer (which is why the code snippet above checks to see if event.candidate is null prior to sending the candidate along.
Response.type - Web APIs
WebAPIResponsetype
it can be one of the following: basic: normal, same origin response, with all headers exposed except “set-cookie” and “set-cookie2″.
... note: an "error" response never really gets exposed to script: such a response to a fetch() would reject the promise.
SharedWorker() - Web APIs
name optional a domstring specifying an identifying name for the sharedworkerglobalscope representing the scope of the worker, which is mainly useful for debugging purposes.
... name: a domstring specifying an identifying name for the sharedworkerglobalscope representing the scope of the worker, which is mainly useful for debugging purposes.
Storage API - Web APIs
the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things.
...both of these values are estimates; there are several reasons why they're not precise: user agents are encouraged to obscure the exact size of the data used by a given origin, to prevent these values from being used for fingerprinting purposes.
Streams API - Web APIs
for example, the response body returned by a successful fetch request can be exposed as a readablestream, and you can then read it using a reader created with readablestream.getreader(), cancel it with readablestream.cancel(), etc.
... body the response body returned by a successful fetch request is exposed by default as a readablestream, and can have a reader attached to it, etc.
WEBGL_compressed_texture_atc - Web APIs
the webgl_compressed_texture_atc extension is part of the webgl api and exposes 3 atc compressed texture formats.
... constants the compressed texture formats are exposed by 3 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_compressed_texture_etc - Web APIs
the webgl_compressed_texture_etc extension is part of the webgl api and exposes 10 etc/eac compressed texture formats.
... constants the compressed texture formats are exposed by 10 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_compressed_texture_etc1 - Web APIs
the webgl_compressed_texture_etc1 extension is part of the webgl api and exposes the etc1 compressed texture format.
... constants the compressed texture format is exposed by a constant and can be used with the compressedteximage2d() method (note that etc1 is not supported with the compressedtexsubimage2d() method).
WEBGL_compressed_texture_pvrtc - Web APIs
the webgl_compressed_texture_pvrtc extension is part of the webgl api and exposes four pvrtc compressed texture formats.
... constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() (where the height and width parameters must be powers of 2) and compressedtexsubimage2d() (where the the height and width parameters must equal the current values of the existing texture and the xoffset and yoffset parameters must be 0).
WEBGL_compressed_texture_s3tc - Web APIs
the webgl_compressed_texture_s3tc extension is part of the webgl api and exposes four s3tc compressed texture formats.
... constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_compressed_texture_s3tc_srgb - Web APIs
the webgl_compressed_texture_s3tc_srgb extension is part of the webgl api and exposes four s3tc compressed texture formats for the srgb colorspace.
... constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_draw_buffers - Web APIs
constants this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffertexture2d(), gl.getframebufferattachmentparameter() ext.drawbufferswebgl(), and gl.getparameter() methods.
... methods this extension exposes one new method.
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
syntax webglrenderingcontext.uniformmatrix2fv(location, transpose, value); webglrenderingcontext.uniformmatrix3fv(location, transpose, value); webglrenderingcontext.uniformmatrix4fv(location, transpose, value); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
... transpose a glboolean specifying whether to transpose the matrix.
Lighting in WebGL - Web APIs
for our purposes, we're going to simplify the lighting model by only considering simple directional and ambient lighting; we won't have any specular highlights or point light sources in this scene.
... programinfo.attriblocations.vertexnormal); } finally, we need to update the code that builds the uniform matrices to generate and deliver to the shader a normal matrix, which is used to transform the normals when dealing with the current orientation of the cube in relation to the light source: const normalmatrix = mat4.create(); mat4.invert(normalmatrix, modelviewmatrix); mat4.transpose(normalmatrix, normalmatrix); ...
Using textures in WebGL - Web APIs
note that the texture coordinates range from 0.0 to 1.0; the dimensions of textures are normalized to a range of 0.0 to 1.0 regardless of their actual size, for the purpose of texture mapping.
... first, the code to specify the colors buffer is gone, replaced with this: // tell webgl how to pull out the texture coordinates from buffer { const num = 2; // every coordinate composed of 2 values const type = gl.float; // the data in the buffer is 32 bit float const normalize = false; // don't normalize const stride = 0; // how many bytes to get from one set to the next const offset = 0; // how many bytes inside the buffer to start from gl.bindbuffer(gl.array_buffer, buffers.texturecoord); gl.vertexattribpointer(programinfo.attriblocations.texturecoord...
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
it isn't adequate for the purposes of fully managing users, memberships, permissions, and so forth, but provides the basics needed for an unrestricted multi-user communication session.
... where it matters for webrtc purposes, these are dealt with in a variety of places within the webrtc infrastructure.
Using DTMF with WebRTC - Web APIs
adding candidates to the caller when the caller's rtcpeerconnection ice layer comes up with a new candidate to propose, it issues an icecandidate event to callerpc.
... function handlecallersignalingstatechangeevent() { log("caller's signaling state changed to " + callerpc.signalingstate); } function handlecallergatheringstatechangeevent() { log("caller's ice gathering state changed to " + callerpc.icegatheringstate); } adding candidates to the receiver when the receiver's rtcpeerconnection ice layer comes up with a new candidate to propose, it issues an icecandidate event to receiverpc.
Fundamentals of WebXR - Web APIs
these are not common among everyday users; they're mostly either experimental, used for demonstration purposes, or used by larger organizations.
... general-purpose 3d frameworks these frameworks are good for general-purpose programming as well as for game development when you want to do the logic yourself.
Using the Web Animations API - Web APIs
css animations have a familiar syntax that breaks down nicely for demonstration purposes.
... representing timing properties we’ll also need to create an object of timing properties (an animationeffecttimingproperties object) corresponding to the values in alice’s animation: var alicetiming = { duration: 3000, iterations: infinity } you’ll notice a few differences here from how equivalent values are represented in css: for one, the duration is in milliseconds as opposed to seconds — 3000 not 3s.
Basic concepts behind Web Audio API - Web APIs
each input or output is composed of one or more audio channels, which together represent a specific audio layout.
... the web audio api exposes only planar buffers, because it's made for processing.
Using the Web Audio API - Web APIs
also, for accessibility, it's nice to expose that track in the dom.
... we'll expose the song on the page using an <audio> element.
Web Audio API - Web APIs
this last connection is only necessary if the user is supposed to hear the audio.
... analysernode the analysernode interface represents a node able to provide real-time frequency and time-domain analysis information, for the purposes of data analysis and visualization.
Attestation and Assertion - Web APIs
they have similar names and similar purposes, but understanding the differences may be an initial point of confusion.
... to create android safetynet attestations fido u2f - security keys that implement the fido u2f standard use this format none - browsers may prompt users whether they want a site to be allowed to see their attestation data and/or may remove attestation data from the authenticator's response if the `attestation` parameter in `navigator.credentials.create()` is set to `none` the purpose of attestation is to cryptographically prove that a newly generated key pair came from a specific device.
Using Web Workers - Web APIs
so for example, suppose a document is served with the following header: content-security-policy: script-src 'self' among other things, this will prevent any scripts it includes from using eval().
... to illustrate this, let's create for didactical purpose a function named emulatemessage(), which will simulate the behavior of a value that is cloned and not shared during the passage from a worker to the main page or vice versa: function emulatemessage(vval) { return eval('(' + json.stringify(vval) + ')'); } // tests // test #1 var example1 = new number(3); console.log(typeof example1); // object console.log(typeof emulatemessage(example1)); /...
Window: blur event - Web APIs
WebAPIWindowblur event
bubbles no cancelable no interface focusevent event handler property onblur sync / async sync composed yes examples live example this example changes the appearance of a document when it loses focus.
...click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that this event is composed.
Window: focus event - Web APIs
bubbles no cancelable no interface focusevent event handler property onfocus sync / async sync composed yes examples live example this example changes the appearance of a document when it loses focus.
...click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that this event is composed.
Privileged features - Web APIs
the page is supposed to provide a user interface of its own, usually this feature is used to open xul documents (standard dialogs like the javascript console are opened this way).
...they are said to be dialog because their normal, usual purpose is to only notify info and to be dismissed, closed.
Window.requestFileSystem() - Web APIs
it has even been removed from the proposed specification.
... return value undefined example specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
the queuemicrotask() method, which is exposed on the window or worker interface, queues a microtask to be executed at a safe time prior to control returning to the browser's event loop.
... queuemicrotask() is exposed on the windoworworkerglobalscope mixin.
WorkerNavigator - Web APIs
this property is kept only for compatibility purposes.
...this property is kept only for compatibility purposes.
Using XMLHttpRequest - Web APIs
this is what i suppose...: */ /* "4\3\7 - einstein said e=mc2" ----> "4\\3\\7\ -\ einstein\ said\ e\=mc2" */ return stext.replace(/[\s\=\\]/g, "\\$&"); } function submitrequest (otarget) { var nfile, sfieldtype, ofield, osegmreq, ofile, bispost = otarget.method.tolowercase() === "post"; /* console.log("ajaxsubmit - serializing form..."); */ this.contenttype = bispost && otarget.enctype ?
...for didactic purposes here is a translation of the previous example transformed to use the formdata api.
XMLHttpRequest.open() - Web APIs
user optional the optional user name to use for authentication purposes; by default, this is the null value.
... password optional the optional password to use for authentication purposes; by default, this is the null value.
XRInputSource.targetRaySpace - Web APIs
to determine the position and orientation of the target ray while rendering a frame, pass it into the xrframe method getpose() method, then use the returned xrpose object's transform to gather the spatial information you need.
... function updateinputsources(session, frame, refspace) { for (let source of session.getinputsources()) { let targetraypose = frame.getpose(inputsource.targetrayspace, refspace); if (targetraypose) { if (source.targetraymode == "tracked-pointer") { myrendertargetrayasbeam(targetraypose); } } /* ...
XRInputSource - Web APIs
note: while xrinputsource uses the gamepad interface from the gamepad api, this input device is strictly associated with the webxr hardware and is not a general-purpose gaming device.
... gripspaceread only an xrspace whose origin tracks the pose which is used to render objects which should appear as if they're held in the hand indicated by handedness.
XRInputSourceEvent - Web APIs
because this is an event frame, not an animation frame, you cannot call the xrframe method getviewerpose() on it; instead, use getpose().
... xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification.
XRSession.onsqueeze - Web APIs
after checking that the event occurred on the user's dominant hand, the pose's target ray is obtained.
... xrsession.onsqueeze = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (user.heldobject && targetraypose) { dropobjectusingray(user.heldobject, targetraypose.transform.matrix): } } }; see the examples in the onsqueezestart and onsqueezeend event handlers for the reset of the event handling related to this approach.
XRSession.requestAnimationFrame() - Web APIs
this can be used to obtain the poses of the viewer and the scene itself, as well as other information needed to render a frame of an ar or vr scene.
... // obtain xr object const xr = navigator.xr // request a new xrsession xr.requestsession("inline").then((xrsession) => { xrsession.requestanimationframe((time, xrframe) => { let viewer = xrframe.getviewerpose(xrreferencespace) gl.bindframebuffer(xrwebgllayer.framebuffer) for (xrview of viewer.views) { let xrviewport = xrwebgllayer.getviewport(xrview) gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height) // webgl draw calls will now be rendered into the appropriate viewport.
XRSession: select event - Web APIs
the handler fetches the pose representing the target ray for tracked-pointer inputs and sends the pose's transform to a function called myhandleselectwithray().
... xrsession.addeventlistener("select", event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose.transform); } } }); you can of course also set up a handler for select events by setting the xrsession object's onselect event handler property to a function that handles the event: xrsession.onselect = event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose.transform); } } }; speci...
XRViewport - Web APIs
after initial setup, it iterates over each of the views within the viewer's pose, configuring the viewport as dictated by the xrwebgllayer.
... xrsession.requestanimationframe((time, xrframe) => { let viewerpose = xrframe.getviewerpose(xrreferencespace); gl.bindframebuffer(xrwebgllayer.framebuffer); for (xrview of viewerpose.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); // now we can use webgl to draw into a viewport matching // the viewer's needs } }); specifications specification status comment webxr device apithe definition of 'xrviewport' in that specification.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
this ensures that the scene we render will not only match the viewpoint we need to express (which is defined by the position and orientation data in the pose), but that the rendered output will be constrained within the correct portion of the frame buffer for the eye we're drawing, regardless of any scaling that is being performed.
...the result is a rendering context that looks like the diagram below: each time the xrviewerpose's views are iterated over for rendering, the rendering loop obtains an xrview for the left eye which has its top-left corner at (0, 0) with its width and height being 1280x1440 pixels.
XRWebGLLayer - Web APIs
this information includes the pose (an xrviewerpose object) that describes the position and facing direction of the viewer within the scene as well as a list of xrview objects, each representing one perspective on the scene.
... let pose = xrframe.getviewerpose(xrreferencespace); if (pose) { let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebffer); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the view */ } } specifications specification status comment webxr device apithe definition of 'xrwebgllayer' in that specification.
Introduction - Web APIs
css (cascade style sheets) was one of the first ways proposed by the w3c.
... xsl (extensible stylesheet language) transformations are composed of two parts: xsl elements, which allow the transformation of an xml tree into another markup tree and xpath, a selection language for trees.
Using the alertdialog role - Accessibility
which particular control focus should be moved to depends on the purpose of the dialog.
... possible effects on user agents and assistive technology when the alertdialog role is used, the user agent should do the following: expose the element as a dialog in the operating system's accessibility api.
ARIA: Navigation Role - Accessibility
associated wai-aria roles, states, and properties aria-label a brief description of the purpose of the navigation, omitting the term "navigation", as the screen reader will read both the role and the contents of the label.
...this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
ARIA: Region role - Accessibility
every element with a region role should include a label that describes the purpose of the content in the region, preferably with an aria-labelledby referencing a visible header.
...this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
ARIA: switch role - Accessibility
possible effects on user agents and assistive technology when the switch role is added to an element, the user agent handles it like this: the element is exposed to the system's accessibility infrastructure as having the switch role.
... document.queryselectorall(".switch").foreach(function(theswitch) { theswitch.addeventlistener("click", handleclickevent, false); }); function handleclickevent(evt) { let el = evt.target; if (el.getattribute("aria-checked") == "true") { el.setattribute("aria-checked", "false"); } else { el.setattribute("aria-checked", "true"); } } css the purpose of the css is to establish a look and feel for the switch that's reminiscent of the power switch paradigm.
ARIA: dialog role - Accessibility
when the dialog appears on the screen, keyboard focus (whose control depends upon the dialogs purpose) should be moved to the default focusable control inside the dialog.
... possible effects on user agents and assistive technology when the dialog role is used, the user agent should do the following: expose the element as a dialog in the operating system's accessibility api.
ARIA: textbox role - Accessibility
focus event handler and aria-activedescendent attribute if you are implementing a composite widget, such as a combobox composed of a text box and a listbox, you need to manage the aria-activedescendent attribute using a handler.
... possible effects on user agents and assistive technology when the textbox role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a textbox role in the operating system's accessibility api.
Web Accessibility: Understanding Colors and Luminance - Accessibility
for the purposes of this document, we'll use terminlogy as it is defined in the w3c, in the css color module level 3 when working with color, it's important to know which "color space" you are working in, as different color spaces map to different measurement systems.
... in general, for accessibility purposes, the more contrast the better.
Accessibility
html: a good basis for accessibility a great deal of web content can be made accessible just by making sure the correct html elements are used for the correct purpose at all times.
... other documentation understanding the web content accessibility guidelines this set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the w3c web content accessibility guidelines 2.0 (wcag 2.0 or just wcag, for the purposes of this writing).
-moz-user-input - CSS: Cascading Style Sheets
note: -moz-user-input was one of the proposals leading to the proposed css 3 user-input property, which has not yet reached candidate recommendation (call for implementations).
... a similar property, user-focus, was proposed in early drafts of a predecessor of the css3 ui specification, but was rejected by the working group.
:empty - CSS: Cascading Style Sheets
WebCSS:empty
accessible names expose the interactive control to the accessibility tree, an api that communicates information useful for assistive technologies.
...this is commonly used for buttons that rely solely on an icon to convey purpose.
@supports - CSS: Cascading Style Sheets
WebCSS@supports
the following example returns true if and only if the two shorter expressions are simultaneously true: @supports (display: table-cell) and (display: list-item) {} multiple conjunctions can be juxtaposed without the need of more parentheses.
...the following example returns true if at least one of the two shorter expressions is true: @supports (transform-style: preserve) or (-moz-transform-style: preserve) {} multiple disjunctions can be juxtaposed without the need of more parentheses.
Border-radius generator - CSS: Cascading Style Sheets
r = 200; inputslidermanager.setunit(this.topic, units[this.unitr]); inputslidermanager.setmax(this.topic, this.maxr / 2); } radiuscontainer.prototype.updateunits = function updateunits(unit) { if (this.rounded) { this.setunitr(this.unitr); return; } if (unit === 0) this.setunitx(this.unitx); if (unit === 1) this.setunity(this.unity); } radiuscontainer.prototype.composeborderradius = function composeborderradius () { if (this.rounded === true) { var unit = units[this.unitr]; var value = math.round(this.size / 2); return value + unit; } var unitx = units[this.unitx]; var unity = units[this.unity]; var valuex = math.round(this.width / 2); var valuey = math.round(this.height / 2); if (valuex === valuey && this.unitx === this.unity) retu...
...rn valuex + unitx; return valuex + unitx + ' ' + valuey + unity; } radiuscontainer.prototype.updateborderradius = function updateborderradius () { var radius = this.composeborderradius(); var corner = 0; if (this.topic === 'top-left') { subject.style.bordertopleftradius = radius; corner = 0; } if (this.topic === 'top-right') { subject.style.bordertoprightradius = radius; corner = 1; } if (this.topic === 'bottom-right') { subject.style.borderbottomrightradius = radius; corner = 2; } if (this.topic === 'bottom-left') { subject.style.borderbottomleftradius = radius; corner = 3; } tool.updateoutput(corner, radius); } radiuscontainer.prototype.updatecontainer = function updatecontainer(deltax, deltay) { if (this.rounded === true) { t...
Basic Concepts of grid layout - CSS: Cascading Style Sheets
you can also create a grid using flexible sizes with percentages or with the new fr unit designed for this purpose.
... grid-column-gap: 10px; grid-row-gap: 1em; border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } any space used by gaps will be accounted for before space is assigned to the flexible length fr tracks, and gaps act for sizing purposes like a regular grid track, however you cannot place anything into a gap.
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
suppose you wish to style any h2 element that is the target of a url, but do not want any other kind of element to get a target style.
...id="one">...</h4> <p id="two">...</p> <div id="three">...</div> <a id="four">...</a> <em id="five">...</em> <a href="#one">first</a> <a href="#two">second</a> <a href="#three">third</a> <a href="#four">fourth</a> <a href="#five">fifth</a> conclusion in cases where a fragment identifier points to a portion of the document, readers may become confused about which part of the document they're supposed to be reading.
Specificity - CSS: Cascading Style Sheets
specificity is based on the matching rules which are composed of different sorts of css selectors.
...in the following case, the selector *[id="foo"] counts as an attribute selector for the purpose of determining the selector's specificity, even though it selects an id.
<blend-mode> - CSS: Cascading Style Sheets
<div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: overlay; } darken the final color is composed of the darkest values of each color channel.
... <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: darken; } lighten the final color is composed of the lightest values of each color channel.
caption-side - CSS: Cascading Style Sheets
this value was proposed for css 2, but removed from the final css 2.1 specification.
... this value was proposed for css 2, but removed from the final css 2.1 specification.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
this value's only purpose is to create a new block formatting context (bfc).
... if only an inner value of flex, grid, or flow-root is specified then the specification explains that the outer value should be set to block: "if a <display-inside> value is specified but <display-outside> is omitted, the element’s outer display type defaults to block—except for ruby, which defaults to inline." finally, we have some legacy pre-composed inline-level values of: inline-block inline-table inline-flex inline-grid if a supporting browser comes across these as single values then it treats them the same as the two-value versions: inline flow-root inline table inline flex inline grid so all of the current situations are neatly covered, meaning that we maintain compatibility of existing and new sites that use the single ...
font-smooth - CSS: Cascading Style Sheets
antialiased - smooth the font on the level of the pixel, as opposed to the subpixel.
... grayscale - render text with grayscale antialiasing, as opposed to the subpixel.
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-column-end - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-column-start - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-column - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-row-end - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-row-start - CSS: Cascading Style Sheets
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid, corresponding to the search direction, are assumed to have that name for the purpose of counting this span.
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
if not enough lines with that name exist, all implicit grid lines are assumed to have that name for the purpose of finding this position.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
image-orientation - CSS: Cascading Style Sheets
description this property is intended only to be used for the purpose of correcting the orientation of images which were shot with the camera rotated.
...for any purpose other than correcting an image's orientation due to how it was shot or scanned, use a transform property with the rotate keyword to specify rotation.
text-orientation - CSS: Cascading Style Sheets
sideways-right an alias to sideways that is kept for compatibility purposes.
... proposed recommendation initial definition.
Video player styling basics - Developer guides
javascript as mentioned above, a data-state attribute is used in various places for styling purposes and these are set using javascript.
... styling the resultant video player style used here is rather basic — this is intentional, as the purpose is to show how such a video player could be styled and be made responsive.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
are not valid javascript escapes; the character code strategy is more general-purpose.) inline svg and mathml support as a completely new parsing feature, html5 introduced support for inline svg and mathml in text/html.
... to deal with legacy pages where authors have pasted partial svg fragments into html (who knows why) or used a <math> tag for non-mathml purposes, attempts to nest various common html elements as children of svg elements (without foreignobject) will immediately break out of svg or mathml context.
Using HTML sections and outlines - Developer guides
important: there are no implementations of the proposed outline algorithm in web browsers nor assistive technology; it was never part of a final w3c specification.
...it is important for developers to use these semantic elements in line with their intended purposes.
Index - Developer guides
WebGuideIndex
5 wai aria live regions/api support ajax, accessibility firefox 3 contains important improvements to the way the mozilla engine exposes live changes in a document.
...such events are commonly called synthetic events, as opposed to the events fired by the browser itself.
Writing forward-compatible websites - Developer guides
for the purpose of this piece of advice, "current" means the most recent version of a browser you have tested.
... for the purpose of this piece of advice, "current" means the most recent version of a browser you have tested, as in the case of the ua sniffing advice above.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
if you're unhappy with the color that's proposed to you, you can change the color scheme, to see if you find something you like better.
... for example, if we don't like the proposed greenish-blue color, we can click the triad color scheme icon, which presents us with the following: that greyish blue in the top-right looks pretty good.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
for instance, a browser might let the user save their name, address, phone number, and email addresses for autocomplete purposes.
...when creating a new account or changing passwords, this should be used for an "enter your new password" or "confirm new password" field, as opposed to a general "enter your current password" field that might be present.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
non-standard values apple-touch-icon-precomposed <!-- third-generation ipad with high-resolution retina display: --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="favicon144.png"> <!-- iphone with high-resolution retina display: --> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="favicon114.png"> <!-- first- and second-generation ipad: --> <link rel="apple-touch-icon-precomposed" sizes="72x72" h...
...ref="favicon72.png"> <!-- non-retina iphone, ipod touch, and android 2.1+ devices: --> <link rel="apple-touch-icon-precomposed" href="favicon57.png"> ...
Date and time formats used in HTML - HTML: Hypertext Markup Language
while the gregorian calendar wasn't created until the year 1582 (replacing the similar julian calendar), for html's purposes, the gregorian calendar is extended back to the year 1 c.e.
... for the purposes of html dates, years are always at least four digits long; years prior to the year 1000 are padded with leading zeroes ("0"), so the year 72 is written as 0072.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
this can be used, in turn, for styling or scripting purposes.
... default styling the purpose of this element is purely for the convenience of the author and all browsers display it inline (display: inline) by default, though its default styling varies from one browser to another: some browsers, like internet explorer, do not style it differently than a <span> element.
<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.
... example <p>the <acronym title="world wide web">www</acronym> is only a component of the internet.</p> default styling though the purpose of this tag is purely for the convenience of the author, its default styling varies from one browser to another: some browsers, like internet explorer, do not style it differently than a <span> element.
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
for this purpose, use the <h1> to <h6> tags.
... if there is no semantic purpose to using the <b> element, you should use the css font-weight property with the value "bold" instead in order to make text bold.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
styling with css the <br> element has a single, well-defined purpose — to create a line break in a block of text.
... you can set a margin on <br> elements themselves to increase the spacing between the lines of text in the block, but this is a bad practice — you should use the line-height property that was designed for that purpose.
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
however, it should not be used simply to apply italic styling; use the css font-style property for that purpose.
...neither is for purely decorational purposes, that's what css styling is for.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
note: it's also crucial to remember that a user can tinker with your html behind the scenes, so your site must not use this validation for any security purposes.
...we want to ensure that not only does the user provide a valid e-mail address, but for security purposes, we require that the address be an internal corporate e-mail address.
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
these numbers, used for tax and identification purposes in the us, are in the form "123-45-6789".
...obviously this defeats the purpose of a password field, but it's helpful for experimenting with the pattern.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
the attributes shared by all <input> elements, range inputs offer the following attributes: attribute description list the id of the <datalist> element that contains optional pre-defined options max the maximum permitted value min the minimum permitted value step the stepping interval, used both for user interface and validation purposes list the values of the list attribute is the id of a <datalist> element located in the same document.
... html use similar html as in the previous examples, we add the attribute with a value of vertical: <input type="range" min="0" max="11" value="7" step="1" orient="vertical"> writing-mode: bt-lr; the writing-mode property should generally not be used to alter text direction for internationalization or localization purposes, but can be used for special effects.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
despite the fact that inputs of type tel are functionally identical to standard text inputs, they do serve useful purposes; the most quickly apparent of these is that mobile browsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone numbers.
...when creating any kind of registration or e-commerce site, for example, you will likely need to ask the user for a telephone number, whether for business purposes or for emergency contact purposes.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
its purpose is to identify the element when linking.
...the title should not be used as the primary explanation of the purpose of the form control.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
for example, a link to the site's favicon: <link rel="icon" href="favicon.ico"> there are a number of other icon rel values, mainly used to indicate special icon types for use on various mobile platforms, e.g.: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-icon-114.png" type="image/png"> the sizes attribute indicates the icon size, while the type contains the mime type of the resource being linked.
... <!-- third-generation ipad with high-resolution retina display: --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="favicon144.png"> <!-- iphone with high-resolution retina display: --> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="favicon114.png"> <!-- first- and second-generation ipad: --> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="favicon72.png"> <!-- non-retina iphone, ipod touch, and android 2.1+ devices: --> <link rel="apple-touch-icon-precompose...
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
the html mark text element (<mark>) represents text which is marked or highlighted for reference or notation purposes, due to the marked passage's relevance or importance in the enclosing context.
... don't use <mark> for syntax highlighting purposes; instead, use the <span> element with appropriate css applied to it.
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
however, it should not be used simply to apply bold styling; use the css font-weight property for that purpose.
... the intended meaning or purpose of the enclosed text should be what determines which element you use.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
the <tbody> element, along with its cousins <thead> and <tfoot>, provide useful semantic information that can be used when rendering for either screen or printer as well as for accessibility purposes.
...we do, however, add a slightly more subtle style for header cells contained directly within a <tbody> (as opposed to those which reside in a <thead>).
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
ski</td> <td>533175</td> <td><time datetime="2011-01013">january 13, 2011</time></td> <td><time datetime="2017-04008">april 8, 2017</time></td> <td>37.00</td> </tr> <tr> <th>hoshi nakamura</td> <td>601942</td> <td><time datetime="2012-07-23">july 23, 2012</time></td> <td>n/a</td> <td>15.00</td> </tr> </table> the differences that matter here—for the purposes of discussing row and column spans—are in the first few lines of the code above.
...datetime="2011-01013">january 13, 2011</time></td> <td><time datetime="2017-04008">april 8, 2017</time></td> <td>37.00</td> </tr> <tr> <th scope="row">hoshi nakamura</td> <td>601942</td> <td><time datetime="2012-07-23">july 23, 2012</time></td> <td>n/a</td> <td>15.00</td> </tr> </tbody> </table> the differences that matter here—for the purposes of discussing row and column spans—are in the first few lines of the code above.
Basics of HTTP - HTTP
this introductory article describes this structure, its purpose, and its possibilities.
...this article explains the frame structure, its purpose, and the way it's encoded.
Using HTTP cookies - HTTP
WebHTTPCookies
cookies are mainly used for three purposes: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other settings tracking recording and analyzing user behavior cookies were once used for general client-side storage.
...these techniques violate the principles of user privacy and user control, may violate data privacy regulations, and could expose a website using them to legal liability.
Index - HTTP
WebHTTPHeadersIndex
7 access-control-allow-credentials cors, http, reference, header the access-control-allow-credentials response header tells browsers whether to expose the response to frontend javascript code when the request's credentials mode (request.credentials) is "include".
... 11 access-control-expose-headers cors, http, reference, header the access-control-expose-headers response header indicates which headers can be exposed as part of the response by listing their names.
HTTP Messages - HTTP
WebHTTPMessages
http messages are composed of textual information encoded in ascii, and span over multiple lines.
... http requests, and responses, share similar structure and are composed of: a start-line describing the requests to be implemented, or its status of whether successful or a failure.
Proxy Auto-Configuration (PAC) file - HTTP
furthermore, the three remaining proxy servers share the load based on url patterns, which makes their caching more effective (there is only one copy of any document on the three servers - as opposed to one copy on each of them).
... the load is distributed like this: proxy purpose #1 .com domain #2 .edu domain #3 all other domains #4 hot stand-by all local accesses are desired to be direct.
HTTP
WebHTTP
it was designed for communication between web browsers and web servers, but it can also be used for other purposes.
...iana also maintains a registry of proposed new http message headers.
CSS Houdini
houdini is a set of low-level apis that exposes parts of the css engine, giving developers the power to extend css by hooking into the styling and layout process of a browser’s rendering engine.
...the css typed om exposes css values as typed javascript objects to allow their performant manipulation.
Expressions and operators - JavaScript
suppose you define the following variables: var myfun = new function('5 + 2'); var shape = 'round'; var size = 1; var foo = ['apple', 'mango', 'orange']; var today = new date(); the typeof operator returns the following results for these variables: typeof myfun; // returns "function" typeof shape; // returns "string" typeof size; // returns "number" typeof foo; // returns "...
...use this either with the dot or the bracket notation: this['propertyname'] this.propertyname suppose a function called validate validates an object's value property, given the object and the high and low values: function validate(obj, lowval, hival) { if ((obj.value < lowval) || (obj.value > hival)) console.log('invalid value!'); } you could call validate in each form element's onchange event handler, using this to pass it to the form element, as in the following example: <p>enter a nu...
Functions - JavaScript
encodeuri() the encodeuri() method encodes a uniform resource identifier (uri) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
... encodeuricomponent() the encodeuricomponent() method encodes a uniform resource identifier (uri) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
Introduction - JavaScript
core javascript can be extended for a variety of purposes by supplementing it with additional objects; for example: client-side javascript extends the core language by supplying objects to control a browser and its document object model (dom).
...the dom defines the way in which html document objects are exposed to your script.
Keyed collections - JavaScript
everything exposed on the instance and prototype is public; everything else is inaccessible from the outside world because privates is not exported from the module.
...they will not leak memory, so it can be safe to use dom elements as a key and mark them for tracking purposes, for example.
JavaScript modules - JavaScript
for learning and portability purposes, we decided to keep to .js.
... also, note that you might get different behavior from sections of script defined inside modules as opposed to in standard scripts.
Using Promises - JavaScript
ult1, result2 and result3 */ }); sequential composition is possible using some clever javascript: [func1, func2, func3].reduce((p, f) => p.then(f), promise.resolve()) .then(result3 => { /* use result3 */ }); basically, we reduce an array of asynchronous functions down to a promise chain equivalent to: promise.resolve().then(func1).then(func2).then(func3); this can be made into a reusable compose function, which is common in functional programming: const applyasync = (acc,val) => acc.then(val); const composeasync = (...funcs) => x => funcs.reduce(applyasync, promise.resolve(x)); the composeasync() function will accept any number of functions as arguments, and will return a new function that accepts an initial value to be passed through the composition pipeline: const transformdata = co...
...mposeasync(func1, func2, func3); const result3 = transformdata(data); in ecmascript 2017, sequential composition can be done more simply with async/await: let result; for (const f of [func1, func2, func3]) { result = await f(result); } /* use last result (i.e.
Memory Management - JavaScript
the purpose of a garbage collector is to monitor memory allocation and determine when a block of allocated memory is no longer needed and reclaim it.
... v8 engine flags the max amount of available heap memory can be increased with a flag: node --max-old-space-size=6000 index.js we can also expose the garbage collector for debugging memory issues using a flag and the chrome debugger: node --expose-gc --inspect index.js see also ibm article on "memory leak patterns in javascript" (2007) kangax article on how to register event handler and avoid memory leaks (2010) performance ...
Array.prototype.reduce() - JavaScript
].reduce( maxcallback ); // 22 [ { x: 2 } ].reduce( maxcallback ); // { x: 2 } [ ].reduce( maxcallback ); // typeerror // map & reduce with initialvalue; better solution, also works for empty or larger arrays [ { x: 22 }, { x: 42 } ].map( el => el.x ) .reduce( maxcallback2, -infinity ); how reduce() works suppose the following use of reduce() occurred: [0, 1, 2, 3, 4].reduce(function(accumulator, currentvalue, currentindex, array) { return accumulator + currentvalue }) the callback would be invoked four times, with the arguments and return values in each call being as follows: callback iteration accumulator currentvalue currentindex array return value first call ...
... p2, f3, p4] runpromiseinsequence(promisearr, 10) .then(console.log) // 1200 function composition enabling piping // building-blocks to use for composition const double = x => x + x const triple = x => 3 * x const quadruple = x => 4 * x // function composition enabling pipe functionality const pipe = (...functions) => input => functions.reduce( (acc, fn) => fn(acc), input ) // composed functions for multiplication of specific values const multiply6 = pipe(double, triple) const multiply9 = pipe(triple, triple) const multiply16 = pipe(quadruple, quadruple) const multiply24 = pipe(double, triple, quadruple) // usage multiply6(6) // 36 multiply9(9) // 81 multiply16(16) // 256 multiply24(10) // 240 write map using reduce if (!array.prototype.mapusingreduce) { array.proto...
Array.prototype.reduceRight() - JavaScript
nst f2 = x => mult3(f3, x); add5(f2, input); } ​​​​​​difference between reduce and reduceright var a = ['1', '2', '3', '4', '5']; var left = a.reduce(function(prev, cur) { return prev + cur; }); var right = a.reduceright(function(prev, cur) { return prev + cur; }); console.log(left); // "12345" console.log(right); // "54321" defining composible function the concept of compose function is simple it combines n functions.
... * * h(x) = f(g(x)) * * function execution happens right to left * * https://en.wikipedia.org/wiki/function_composition */ const compose = (...args) => (value) => args.reduceright((acc, fn) => fn(acc), value) // increment passed number const inc = (n) => n + 1 // doubles the passed value const double = (n) => n * 2 // using composition function console.log(compose(double, inc)(2)); // 6 // using composition function console.log(compose(inc, double)(2)); // 5 specifications specification ecmascript (ecma-262)the definition of 'array.prototype.reduceright' in that specifi...
Function.prototype.call() - JavaScript
the main purpose of the anonymous function here is to add a print function to every object, which is able to print the correct index of the object in the array.
... passing the object as this value is not strictly necessary, but is done for explanatory purpose.
Object.prototype.hasOwnProperty() - JavaScript
the hasownproperty() method returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it).
...perty to get correct results: var foo = { hasownproperty: function() { return false; }, bar: 'here be dragons' }; foo.hasownproperty('bar'); // always returns false // use another object's hasownproperty // and call it with 'this' set to foo ({}).hasownproperty.call(foo, 'bar'); // true // it's also possible to use the hasownproperty property // from the object prototype for this purpose object.prototype.hasownproperty.call(foo, 'bar'); // true note that in the last case there are no newly created objects.
Promise.prototype.then() - JavaScript
if the function passed as handler to then returns a promise, an equivalent promise will be exposed to the subsequent then in the method chain.
... this function // exposes a similar api, except the fulfillment // value of this function's promise has had more // work done on it.
Promise - JavaScript
for the nesting shown above, suppose the .then() associated with "promise b" returns a nextvalue of "promise x".
...the chain is composed of .then() calls, and typically (but not necessarily) has a single .catch() at the end, optionally followed by .finally().
RegExp.prototype.exec() - JavaScript
using this internally, exec() can be used to iterate over multiple matches in a string of text (with capture groups), as opposed to getting just the matching strings with string.prototype.match().
... a newer function has been proposed to simplify matching multiple parts of a string (with capture groups): string.prototype.matchall().
TypedArray - JavaScript
this constructor is not directly exposed: there is no global %typedarray% or typedarray property.
...the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
encodeURI() - JavaScript
the encodeuri() function encodes a uri by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
...also, encodeuri() does not encode a few additional characters, known as "unreserved marks", which do not have a reserved purpose but are allowed in a uri "as is".
eval() - JavaScript
for example, suppose you have a variable x.
... parsing json (converting strings to javascript objects) if the string you're calling eval() on contains data (for example, an array: "[1, 2, 3]"), as opposed to code, you should consider switching to json, which allows the string to use a subset of javascript syntax to represent data.
new operator - JavaScript
examples object type and object instance suppose you want to create an object type for cars.
...for example: var kenscar = new car('nissan', '300zx', 1992); object property that is itself another object suppose you define an object called person as follows: function person(name, age, sex) { this.name = name; this.age = age; this.sex = sex; } and then instantiate two new person objects as follows: var rand = new person('rand mcnally', 33, 'm'); var ken = new person('ken jones', 39, 'm'); then you can rewrite the definition of car to include an owner property that takes a person object, as fol...
typeof - JavaScript
(reference) a fix was proposed for ecmascript (via an opt-in), but was rejected.
... typeof undeclaredvariable === 'undefined'; typeof newletvariable; // referenceerror typeof newconstvariable; // referenceerror typeof newclass; // referenceerror let newletvariable; const newconstvariable = 'hello'; class newclass{}; exceptions all current browsers expose a non-standard host object document.all with type undefined.
Autoplay guide for media and Web Audio APIs - Web media technologies
while autoplay of media serves a useful purpose, it should be used carefully and only when needed.
... firefox media.allowed-to-play.enabled a boolean preference which specifies whether or not the htmlmediaelement.allowedtoplay property is exposed to the web.
Digital audio concepts - Web media technologies
as a result, audio data is difficult to compress using traditional algorithms such as those used by generral-purpose tools like zip, which usually work by replacing repeating sequences of data with a shorthand representation.
...cbr is primarily used in codecs designed for voice-only purposes, where the frequency range and variation tends to be minimal, allowing cbr encoding to work without unworkable fluctuations in audio quality.
Web video codec guide - Web media technologies
its primary purpose is to be used to stream mpeg-4 audio and video over an rtp session.
... preparing video externally to prepare video for archival purposes from outside your web site or app, use a utility that performs compression on the original uncompressed video data.
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
a new way of sizing images before loading completes recognizing the problem, a wicg community group formed to propose an intrinsicsize attribute.
... folks from mozilla then expanded on this thinking, working on a proposal in the css box sizing level 4 draft to define an aspect-ratio property and propose the idea of using the width and height attributes to compute layout.
Populating the page: how browsers work - Web Performance
the dom is also exposed, and can be manipulated through various apis in javascript.
... in our example, suppose the initial layout occurs before the image is returned.
Media - Progressive web apps (PWAs)
information: media the purpose of css is to specify how content is presented to the user.
...(in html5, this can be marked up with the <nav> element instead of <div> with an id attribute.) when printing the document, the navigation area has no purpose.
SVG Core Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeCore
its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with css).
... value: any valid language id; animatable: no tabindex the tabindex svg attribute allows you to control whether an element is focusable and to define the relative order of the element for the purposes of sequential focus navigation.
d - SVG: Scalable Vector Graphics
WebSVGAttributed
a path definition is a list of path commands where each command is composed of a command letter and numbers that represent the command parameters.
...each command is composed of a command letter and numbers that represent the command parameters.
tabindex - SVG: Scalable Vector Graphics
the tabindex attribute allows you to control whether an element is focusable and to define the relative order of the element for the purposes of sequential focus navigation.
...rg/2000/svg"> <circle cx="60" cy="60" r="15" tabindex="1" /> <circle cx="60" cy="160" r="30" tabindex="3" /> <circle cx="160" cy="60" r="30" tabindex="2" /> <circle cx="160" cy="160" r="60" tabindex="4" /> </svg> usage notes value valid integer default value none animatable no valid integer relative order of the element for the purposes of sequential focus navigation.
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
--> </svg> the effect is the same as if the nodes were deeply cloned into a non-exposed dom, then pasted where the use element is, much like cloned template elements in html5.
... since the cloned nodes are not exposed, care must be taken when using css to style a use element and its cloned descendants.
Basic shapes - SVG: Scalable Vector Graphics
the purpose of these shapes is fairly obvious from their names.
... polygon a <polygon> is similar to a <polyline>, in that it is composed of straight line segments connecting a list of points.
Basic Transformations - SVG: Scalable Vector Graphics
actually, that's its only purpose.
...for this purpose, the translate() transformation stands ready.
Gradients in SVG - SVG: Scalable Vector Graphics
gradients are defined in a defs section as opposed to on a shape itself to promote reusability.
...the two methods have been intermixed for the purposes of this example.
Other content in SVG - SVG: Scalable Vector Graphics
embedding raster images much like the img element in html svg has an image element to serve the same purpose.
...its sole purpose is to be a container for other markup and a carrier for svg styling attributes (most prominently width and height to define the space the object will take).
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
complex shapes composed only of straight lines can be created as <polyline>s.
...it's composed of horizontal and vertical lines only.
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>.
...in other words, the dom tree from the <element-details> elements get composed together with the content of the shadow root.
Web Components
event extensions extensions to the event interface related to shadow dom: event.composed: returns a boolean which indicates whether the event will propagate across the shadow dom boundary into the standard dom (true), or not (false).
... event.composedpath: returns the event’s path (objects on which listeners will be invoked).
XML Index - XML: Extensible Markup Language
WebXMLIndex
it stands for extensible markup language and is a w3c recommended specification as a general purpose markup language.
...the primary purpose of the language is the sharing of data across different systems, such as the internet.
XML: Extensible Markup Language
WebXML
it stands for extensible markup language and is a w3c recommended specification as a general purpose markup language.
...the primary purpose of the language is the sharing of data across different systems, such as the internet.
Understanding WebAssembly text format - WebAssembly
this is an intermediate form designed to be exposed in text editors, browser developer tools, etc.
...linear memory exposes the raw contents of stored values as bytes and this would allow wasm content to arbitrarily observe and corrupt raw function addresses, which is something that cannot be allowed on the web.
Using the WebAssembly JavaScript API - WebAssembly
the equivalent code would look like this: fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => webassembly.instantiate(bytes, importobject) ).then(results => { results.instance.exports.exported_func(); }); viewing wasm in developer tools in firefox 54+, the developer tool debugger panel has functionality to expose the text representation of any wasm code included in a web page.
... webassembly memory exposes its bytes by simply providing a buffer getter/setter that returns an arraybuffer.
Compiling an Existing C Module to WebAssembly - WebAssembly
$ git clone https://github.com/webmproject/libwebp to start off simple, expose webpgetencoderversion() from encode.h to javascript by writing a c file called webp.c: #include "emscripten.h" #include "src/webp/encode.h" emscripten_keepalive int version() { return webpgetencoderversion(); } this is a good simple program to test whether you can get the source code of libwebp to compile, as it doesn't require any parameters or complex data structures to invoke this functio...
...for that, you need to expose two additional functions — one that allocates memory for the image inside wasm and one that frees it up again: #include <stdlib.h> // required for malloc definition emscripten_keepalive uint8_t* create_buffer(int width, int height) { return malloc(width * height * 4 * sizeof(uint8_t)); } emscripten_keepalive void destroy_buffer(uint8_t* p) { free(p); } the create_buffer() function alloc...
2015 MDN Fellowship Program - Archive of obsolete content
you may propose your own subject area (examples: virtual reality on the web, network security, css, etc.) or we will work with you to match you to the best subject based on your background and mozilla priorities.
Communicating With Other Scripts - Archive of obsolete content
messaging from content script to page script suppose we have a page called "listen.html" hosted at "my-domain.org", and we want to send messages from the add-on to a script embedded in that page.
Cross-domain Content Scripts - Archive of obsolete content
suppose your content script includes a line like: // content-script.js: unsafewindow.mycustomapi = function () {}; if you have included the "cross-domain-content" key, when the page script tries to access mycustomapi this will result in a "permission denied" exception.
Loading Content Scripts - Archive of obsolete content
the contentscriptoptions is a json that is exposed to content scripts as a read only value under self.options property.
self - Archive of obsolete content
this is an older api than the api provided by port, and for most purposes the port api is a better choice.
Communicating using "port" - Archive of obsolete content
however, the worker is not exposed to add-on code in quite the same way in all modules.
Communicating using "postMessage" - Archive of obsolete content
suppose the content script wants to send mouseout events as well as mouseover.
Program ID - Archive of obsolete content
the id is used for a variety of purposes.
SDK and XUL Comparison - Archive of obsolete content
the sdk's supported apis expose a relatively small set of this functionality.
Guides - Archive of obsolete content
sdk infrastructure module structure of the sdk the sdk, and add-ons built using it, are of composed from reusable javascript modules.
context-menu - Archive of obsolete content
for example, suppose your add-on looks like this: var script = "self.on('click', function (node, data) {" + " console.log('clicked: ' + node.nodename);" + "});"; var cm = require("sdk/context-menu"); cm.item({ label: "body context", context: cm.selectorcontext("body"), contentscript: script }); this add-on creates a context-menu item that uses selectorcontext to display the item w...
page-mod - Archive of obsolete content
note that this is a very naive implementation, created only for demonstration purposes, and will not work properly in many real-world cases.
private-browsing - Archive of obsolete content
opting into private browsing add-ons built using the sdk must opt into private browsing by setting the following key in their package.json file: "permissions": {"private-browsing": true} if an add-on has not opted in, then the high-level sdk modules will not expose private windows, or objects (such as tabs) that are associated with private windows: the windows module will not list any private browser windows, generate any events for private browser windows, or let the add-on open any private browser windows the tabs module will not list any tabs that belong to private browser windows, and the add-on won't receive any events for such tabs a...
simple-prefs - Archive of obsolete content
suppose you've defined a preference like this: "preferences": [{ "name": "somepreference", "title": "some preference title", "description": "some short description for the preference", "type": "string", "value": "this is the default string value" }] you can access somepreference using the prefs property: var preferences = require("sdk/simple-prefs").prefs; console.lo...
system - Archive of obsolete content
this function exposes that functionality to add-on authors.
High-Level APIs - Archive of obsolete content
indexed-db exposes the indexeddb api to add-ons.
console/plain-text - Archive of obsolete content
usage the plain-text console is a constructor for creating a console object to be used for traditional logging purposes.
content/worker - Archive of obsolete content
worker worker is composed from the eventemitter trait, therefore instances of worker and their descendants expose all the public properties exposed by eventemitter along with additional public properties that are listed below.
net/xhr - Archive of obsolete content
possible attenuations before being exposed to unprivileged code, this object needs to be attenuated in such a way that, at the very least, it can't access the user's filesystem.
places/bookmarks - Archive of obsolete content
for example, suppose we called search() with two query objects: [{ url: "mozilla.org", tags: ["mobile"]}, { tags: ["firefox-os"]}] this will return: all bookmark items from mozilla.org that are also tagged "mobile" all bookmark items that are tagged "firefox-os" an options object may be used to determine overall settings such as sort order and how many objects should be returned.
remote/parent - Archive of obsolete content
its primary purpose is to help build apis.
system/runtime - Archive of obsolete content
all properties exposed are read-only.
system/xul-app - Archive of obsolete content
with the exception of ids, each of these properties exposes the attribute of the same name on the nsixulappinfo interface.
test/assert - Archive of obsolete content
to check that the exception thrown contains a specific message, pass a regular expression here: the message property of the exception thrown must match the regular expression for example, suppose we define two different custom exceptions: function myerror(message) { this.name = "myerror"; this.message = message || "default message"; } myerror.prototype = new error(); myerror.prototype.constructor = myerror; function anothererror(message) { this.name = "anothererror"; this.message = message || "default message"; console.log(this.message); } anothererror.prototype = new erro...
Low-Level APIs - Archive of obsolete content
privileged modules that expose powerful low-level capabilities such as window/utils and net/xhr.
cfx - Archive of obsolete content
suppose your the following local.json is as follows: { "configs": { "ff40": ["-b", "/usr/bin/firefox-4.0"] } } you can run: cfx test --use-config=ff40 and it would be equivalent to: cfx test -a firefox -b /usr/bin/firefox-4.0 this method of defining configuration options can be used for all of the run, build, and test tools.
Storing annotations - Archive of obsolete content
the annotation is composed of the text the user entered and the "annotation anchor", which consists of the url, element id and element content: function handlenewannotation(annotationtext, anchor) { var newannotation = new annotation(annotationtext, anchor); simplestorage.storage.annotations.push(newannotation); } this function calls a constructor for an annotation object, which we also need to supply: function ann...
Chrome Authority - Archive of obsolete content
var xhr = require("x"+"hr"); var modname = "xpcom"; var xpcom = require(modname); var one = require("one"); var two = require("two"); the intention is that developers use require() statements for two purposes: to declare (to security reviewers) what sorts of powers the module wants to use, and to control how those powers are mapped into the module's local namespace.
Creating Event Targets - Archive of obsolete content
modules as event targets we can adapt this code into a separate module that exposes the sdk's standard event interface.
Creating Reusable Modules - Archive of obsolete content
} return path; } hash function firefox has built-in support for hash functions, exposed via the nsicryptohash xpcom interface the documentation page for that interface includes an example of calculating an md5 hash of a file's contents, given its path.
Unit Testing - Archive of obsolete content
so we'll create a base64 module to expose these functions from the platform (see creating reusable modules).
Tutorials - Archive of obsolete content
development techniques logging log messages to the console for diagnostic purposes.
Bootstrapped extensions - Archive of obsolete content
any user interface that has been injected must be removed, tasks shut down, and objects disposed of.
Drag & Drop - Archive of obsolete content
wuri(str.data.split("\n")[0], null, null); } else { var file = data.value.queryinterface(components.interfaces.nsifile); if (file) uri = _ios.newfileuri(file); } } if (uri) uris.push(uri); } // use the array of file uris } the _dragover function checks the drag data to see if a simple text file or general purpose file types are available.
Finding window handles - Archive of obsolete content
comparing to the method above, by using this method, you don't have to compile your component with nsiwidget.h and other bunchs of h files that should not be exposed to outside, and could change every time firefox updates, all you need is nsibasewindow.idl(it's not in gecko_sdk, get this from the latest firefox source, or http://mxr.mozilla.org/mozilla/sourc...basewindow.idl), and use xpidl to compile it to .h file, although that's stll a unfrozen interface, but it should be a lot better.
Forms related code snippets - Archive of obsolete content
we used it only for didactic purpose.
Examples and demos from articles - Archive of obsolete content
multipage ajax navigation example this article provides a working (minimalist) example of a pure-ajax web site composed only of three pages.
Label and description - Archive of obsolete content
note: if running in a xulrunner application add the following preferences to your default preferences file: pref("network.protocol-handler.expose.http", false); pref("network.protocol-handler.warn-external.http", false); change or add additional protocols (https or ftp) as needed.
Preferences - Archive of obsolete content
xpcom interfaces for preferences system mozilla exposes its preferences system through a few xpcom interfaces.
Rosetta - Archive of obsolete content
for a fast overview on the code proposed here you can git clone https://github.com/madmurphy/rosetta.js, or, at your choice, directly download this .zip file.
SVG General - Archive of obsolete content
you will also find some general purpose scripting helpers, that should make scripting svg a little easier.
Code snippets - Archive of obsolete content
window handles can be used for ipc and accessibility purposes.
Communication between HTML and your extension - Archive of obsolete content
from what i gather, xbl components are more designed for creating custom components and their specific component behavior rather than trying to impose some kind of messaging on existing components.
Extension Versioning, Update and Compatibility - Archive of obsolete content
overriding compatibility checking for testing purposes you can tell the application to somewhat ignore compatibility checks when installing add-ons.
How to convert an overlay extension to restartless - Archive of obsolete content
firefox profiles aren't the pristine environment they're supposed to be.
Installing Extensions and Themes From Web Pages - Archive of obsolete content
a note on updateenabled() installtrigger exposes a function called updateenabled that some of you may be calling before you call installtrigger.install.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
this program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
fixme: figure 1: uncheck “exclude browser files.” set up quicknote for the purposes of this explanation, we’re going to use the file-storage mechanism in quicknote1 for our debugger.
Adding Events and Commands - Archive of obsolete content
suppose your extension interacts with pages from a website, and you want some actions on this site to trigger actions in your extension.
Adding menus and submenus - Archive of obsolete content
this is because menus on mac are located in a single menu bar which is controlled by the operating system, as opposed to menus in other systems, which are entirely controlled by firefox.
Appendix A: Add-on Performance - Archive of obsolete content
the browser will now load faster, and your code will still load at startup for all practical purposes.
Appendix D: Loading Scripts - Archive of obsolete content
under ordinary circumstances, native objects passed out of sandboxes are wrapped in xraywrapper objects, which means that only native properties of these objects are directly exposed to privileged code.
Introduction - Archive of obsolete content
firefox and other mozilla applications can be seen as composed of two different parts: a user interface layer that is distinct for each project, and a common platform on top of which the interface layer is built.
Mozilla Documentation Roadmap - Archive of obsolete content
you'll need an irc client in order to do this, and the chatzilla extension works well for this purpose.
User Notifications and Alerts - Archive of obsolete content
below is preferrable because it only cuts the bottom part of the current page, as opposed to pushing down all tabs and content.
Security best practices in extensions - Archive of obsolete content
sandboxed http connections the main purpose of sandboxed http connections is to interact with a web service, without interfering with the cookies set in the browser by that service/site.
Setting up an extension development environment - Archive of obsolete content
chrome list navigate and view files in chrome:// (firefox version, thunderbird version) chrome edit plus a user file editor (firefox and thunderbird) firebug a variety of development tools (firefox) pentadactyl, a general purpose extension with builtin tools for extension development, including a command line with chrome javascript evaluation (including property and function argument completion) and the ability to demand-load external javascript and css files into window chrome.
Supporting search suggestions in search plugins - Archive of obsolete content
this enhancement request - the handling of a selected suggestion, namely calling of a full specified url as proposed in the opensearch standard - is tracked in bug 386591.
Tabbed browser - Archive of obsolete content
.interfaces.nsiloadcontext); } catch (ex) { try { loadcontext = asubject.loadgroup.notificationcallbacks.getinterface(components.interfaces.nsiloadcontext); //in ff26 asubject.loadgroup.notificationcallbacks was null for me, i couldnt find a situation where it wasnt null, but whenever this was null, and i knew a loadcontext is supposed to be there, i found that "interfacerequestor.getinterface(components.interfaces.nsiloadcontext);" worked fine, so im thinking in ff26 it doesnt use asubject.loadgroup.notificationcallbacks anymore, but im not sure } catch (ex2) { loadcontext = null; //this is a problem i dont know why it would get here } } ...
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
besides the fact that the engineers can finally focus on building out the working functionality of the site rather than worrying about appearance or where the next spacer.gif is supposed to go?
Underscores in class and ID Names - Archive of obsolete content
a common substitute is the hyphen character (-), as in: p.urgent-note {color: maroon;} many authors choose instead to use camel case names such as this: p.urgentnote {color: maroon;} if the initial-cap approach is used, however, remember that class and id names are also supposed to be case-sensitive.
XML data - Archive of obsolete content
previous section: svg next section: xbl binding information: xml data xml (extensible markup language) is a general-purpose language for any kind of structured data.
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
spell check suppose you have a web publishing system for a portal, and a spell check application on your server.
Environment variables affecting crash reporting - Archive of obsolete content
the breakpad crash reporting used in mozilla projects supports some environment variables, primarily for testing purposes.
No Proxy For configuration - Archive of obsolete content
entry points: preferences | advanced | proxies control-click menu for off line-online icon (network plug) configuration the no proxy list is composed of either domain elements or ipv4 address elements.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
if you need scripting functionality, consider shipping a modified pluginhostctrl.dll that exposes methods you wish to call on your plugin.
Creating a Firefox sidebar extension - Archive of obsolete content
the broadcaster serves two purposes.
Prerequisites - Archive of obsolete content
if you currently use mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of this demo.
Getting Started - Archive of obsolete content
skin\classic\editor editor contains files of composer.
Creating a Microsummary - Archive of obsolete content
but for the purposes of generating a microsummary for the spread firefox page, we only need to use a single <template> element that matches the root node of the document and is processed once: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1...
Dehydra - Archive of obsolete content
dehydra was a lightweight, scriptable, general purpose static analysis tool capable of application-specific analyses of c++ code.
Developing New Mozilla Features - Archive of obsolete content
it’s possible developers may not pay much attention to you because they believe your proposed feature is not a high priority, or is not wanted at all, or that you haven’t demonstrated that you understand the codebase and mozilla coding practices well enough for them to spend a lot of time with you.
Embedding FAQ - Archive of obsolete content
(new progresslistener() { public void changed(progressevent event) { } public void completed(progressevent event) { nsidomdocument doc = browser.getdocument(); system.out.println(doc); } }); while (!shell.isdisposed()) { if (!display.readanddispatch()) { display.sleep(); } } } how to map a javascript function to a c++ function define an xpcom class defining the function you'll be doing in javascript.
Downloading Nightly or Trunk Builds - Archive of obsolete content
these are the "tinderbox builds", also known as "hourly builds" though it usually takes more than one hour to make one; they are followed by automatic tests and their main purpose is to check that nothing is horridly wrong with the latest change to the source: what they are doing is to constantly check that the current source can be built into an executable and that that executable passes a certain more-or-less fixed set of tests.
Layout FAQ - Archive of obsolete content
try using event.preventdefault() what is the purpose of the ns_lossyconvertucs2toascii() function?
Layout System Overview - Archive of obsolete content
a block is a rectangular region that is composed of one or more lines.
Repackaging Firefox - Archive of obsolete content
sample dex the best way to get started is probably to look at a simple dex and modify it for your own purposes.
Help Viewer - Archive of obsolete content
help viewer project page articles & tutorials creating a help content pack task-oriented, as opposed to spec-type stuff like the link below will be other resources content pack specification a technical description of it, meant primarily to solidify the idea of exactly what constitutes a content pack ...
Enabling Experimental Jetpack Features - Archive of obsolete content
the proposed method for accessing jetpack features that are still in development and may be added in the future is inspired by python's future module.
Enabling - Archive of obsolete content
the proposed method for accessing jetpack features that are still in development and may be added in the future is inspired by python's future module.
Settings - Archive of obsolete content
the value of the settings property is an array of objects representing the settings to expose to users.
Settings - Archive of obsolete content
the value of the settings property is an array of objects representing the settings to expose to users.
Enabling Experimental Jetpack Features - Archive of obsolete content
ArchiveMozillaJetpackdocsMetaFuture
the proposed method for accessing jetpack features that are still in development and may be added in the future is inspired by python's future module.
Litmus tests - Archive of obsolete content
ffts, or full functionality tests this is supposed to be more comprehensive and will take longer to run.
Message Summary Database - Archive of obsolete content
there are a set of generic property methods so that core code and extensions can set attributes on msg headers without changing nsimsghdr.idl.msg threads we store thread information persistently in the database and expose these object through the [nsimsgthread interface.
Microsummary topics - Archive of obsolete content
thus, to differentiate requests initiated manually by users for the purpose of viewing a web page from those initiated automatically by firefox for the purpose of summarizing that page, check for the presence and value of the x-moz request header.
Monitoring downloads - Archive of obsolete content
instead, it is closed when the garbage collector disposes of the connection object.
Mozilla Crypto FAQ - Archive of obsolete content
the itar still exist, but are no longer used in the context of export control of encryption software; for this purpose they have been replaced by the ear.
New Security Model for Web Services - Archive of obsolete content
summary advantages the proposed declaration file places the server operator, not the client in control of access to his server by untrusted scripts.
Plug-n-Hack Phase1 - Archive of obsolete content
for testing); plug-n-hack requires tool and service manifests to be served from the same origin as the api endpoints but, for testing purposes, ringleader (the firefox addon implementation of the browser component) allows you to set a preference to relax or disable origin checks.
Bundles - Archive of obsolete content
the application profile directory can be used instead for this purpose.
Extensions - Archive of obsolete content
the code snippet will look something like this: <em:targetapplication> <!– prism –> <description> <em:id>prism@developer.mozilla.org</em:id> <em:minversion>0.8</em:minversion> <em:maxversion>1.0.0.*</em:maxversion> </description> </em:targetapplication> in addition to the install manifest changes, you may want to expose your extension into the prism ui.
Scripting - Archive of obsolete content
prism exposes desktop integration features through an property of the window object called platform.
Hacking wiki - Archive of obsolete content
the <tt>css</tt> folder contains files that are supposed to be in the <tt>/css</tt> directory of the site.) to get a working install, you need to configure mediawiki.
Proxy UI - Archive of obsolete content
for the purposes of this document, "proxy mode" means both: whatever was selected in the ui (as opposed to the value of the network.proxy.type.
RDF Datasource How-To - Archive of obsolete content
ns_release(mydatasource); } nsservicemanager::releaseservice(krdfservicecid, rdf); } displaying rdf as content now that you've gone through all this pain to expose your information as a datasource, you probably want to see it.
Space Manager Detailed Design - Archive of obsolete content
it is not a general purpose class, and is not intended to be subclasses .
Static Analysis for Windows Code under Linux - Archive of obsolete content
you can obtain mozilla 2 code by: hg clone http://hg.mozilla.org/mozilla-central/ and compose a .mozconfig file for cross-compiling mozilla with static analysis hooked: #specify the cross compile cross_compile=1 ac_add_options --enable-application=browser ac_add_options --host=i686-linux ac_add_options --target=i686-mingw32 ac_add_options --enable-default-toolkit=cairo-windows mk_add_options moz_objdir=@topsrcdir@/../mozilla-mingw # mozilla trunk uses many vista only features on windows...
Supporting per-window private browsing - Archive of obsolete content
you can use the nsiprivatebrowsingchannel interface for this purpose.
Table Cellmap - Archive of obsolete content
introduction the table layout use the cellmap for two purposes: quick lookup of table structural data store of the border collapse data the cellmap code is contained in nscellmap.cpp and nscellmap.h this document does currently describe only the quick lookup part of the game, border collapse is still far away cellmap data - overview the entries in the cellmap contain information about the table cell frame corresponding to a given row and column number (celldata.h).
Tamarin build documentation - Archive of obsolete content
elease mac-64-release mac-32-debug mac-64-debug mac-32-release-debugger mac-64-release-debugger mac-32-debug-debugger mac-64-debug-debugger the build location will be project_root/build_name/avm note: as discussed above, the c++ indexer has been setup to track the current build config, so the correct conditional compiles are highlighted in the editor run/debug from eclipse for test purposes, a launch config (running the helloworld test from esc) has been included for each of the build configs.
When To Use ifdefs - Archive of obsolete content
this rule has many exceptions, some of which are listed here: the code in editor/ui/ is built by the suite, standalone composer, and thunderbird, but it is considered application-specific.
XBL 1.0 Reference - Archive of obsolete content
for this reason it contains many comments and some blocks could be avoided in a more compact solution yet used here for demonstration purposes.
XBL - Archive of obsolete content
it is supposed to include a subset of xbl 2.0 features needed for svg.
cancelInstall - Archive of obsolete content
for most purposes, it's recommended that one of the standard return codes be used.
execute - Archive of obsolete content
executing installed files note: if the file you wish to execute is one you are installing (as opposed to an installer executable that you plan to delete once it runs), then use the execute method on the file object instead.
Install Object - Archive of obsolete content
the following two lines, for example, are equivalent: f = getfolder("program"); f = install.getfolder("program"); an installation script is composed of calls to the install object, and generally takes the following form: initialize the installation call initinstall with the name of the installation and the necessary registry and version information.
Learn XPI Installer Scripting by Example - Archive of obsolete content
"program" represents the directory where software itself is installed (e.g., c:\program files\ on win32 systems), as opposed to supporting directories like "components", "chrome", or "temporary" (see getfolder in the xpinstall api reference for a list of keywords).
Directions of the Mozilla RDF engine - Archive of obsolete content
these include plans to expose the rdf api to public web content, as well as performance and correctness improvements.
SVG And Canvas In Mozilla - Archive of obsolete content
to realize this potential in web applications, browsers must expose rich new graphics apis to web content.
buttons - Archive of obsolete content
if it is set to true any changes to settings are supposed to be applied immediately.
flags - Archive of obsolete content
« xul reference home flags type: space-separated list of the values below a set of flags used for miscellaneous purposes.
textbox.empty - Archive of obsolete content
can be used for styling purposes.
textbox.label - Archive of obsolete content
« xul reference home label type: string if present and not empty, this will be exposed to screen readers through the label property.
value - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
CheckboxStateChange - Archive of obsolete content
this event is used mainly for an accessibility purpose.
RadioStateChange - Archive of obsolete content
this event is used mainly for an accessibility purpose.
ValueChange - Archive of obsolete content
this event is used mainly for an accessibility purpose.
Getting File Information - Archive of obsolete content
the four methods above are usually sufficient for most purposes.
How to implement a custom XUL query processor component - Archive of obsolete content
from the beginning of the name var name = avar.tostring().slice(1); return this._data[name]; }, // return an object instead of a string for convenient comparison purposes // or null to say just use string value getbindingobjectfor: function(avar) { return null; }, // called when a rule matches this item.
ContextMenus - Archive of obsolete content
what constitutes the default item isn't specified, but is usually the operation carried out when the item was left-clicked or pressed normally, as opposed to context clicked.
MenuModification - Archive of obsolete content
this value be set as the menuitem's value attribute and can be used for whatever purpose is desired.
Sorting and filtering a custom tree view - Archive of obsolete content
for our purposes, we'll hard code it.
Attribute Substitution - Archive of obsolete content
a special tag is used for this purpose, the textnode tag.
Multiple Rules - Archive of obsolete content
three attributes are used for this purpose.
Result Generation - Archive of obsolete content
while the information network created by the template builder contains a number of different pieces of necessary information, for the purposes of this discussion, we will only be interested in the list of possible results.
Simple Query Syntax - Archive of obsolete content
the equivalent triple for the above example might be: <triple subject="?photo" predicate="http://www.xulplanet.com/rdf/country" object="http://www.daml.org/2001/09/countries/iso#it"/> adjusting simple query conditions the simple syntax is limited in the kind of filtering it can do, however it is often sufficient for many purposes.
Template Builder Interface - Archive of obsolete content
rebuilding and refreshing a template the main purpose of accessing the builder for an element is to call its 'rebuild' method.
Template Logging - Archive of obsolete content
this indicates first, that this is a new result, as opposed to a result being removed, and second, that this result is 'active'.
Template and Tree Listeners - Archive of obsolete content
« previousnext » there are several listeners (or observers) used during the template build process, each used for different purposes.
textbox (Toolkit autocomplete) - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
Textbox (XPFE autocomplete) - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
on and affected window(s) palette id chrome://browser/content/browser.xul firefox - main window browsertoolbarpalette chrome://navigator/content/navigator.xul seamonkey 2.0 - browser window browsertoolbarpalette chrome://messenger/content/messenger.xul thunderbird - main window mailtoolbarpalette chrome://messenger/content/messenger...gercompose.xul thunderbird - compose window msgcomposetoolbarpalette chrome://messenger/content/addressbo...ddressbook.xul thunderbird - address book addressbooktoolbarpalette chrome://editor/content/editor.xul kompozer - main window nvutoolbarpalette chrome://calendar/content/calendar.xul sunbird - main window calendartoolbarpalette more information...
Adding Labels and Images - Archive of obsolete content
you can use two xul elements for this purpose.
Broadcasters and Observers - Archive of obsolete content
this attribute forwarding is quite useful for a number of purposes.
Creating a Skin - Archive of obsolete content
mozilla composer provides some icons for open and save buttons, which we'll just use here to save time.
Creating a Window - Archive of obsolete content
the xul window will appear in the browser window as opposed to a new window, but this is often sufficient during the early stages of development.
Custom Tree Views - Archive of obsolete content
naturally, since a custom tree view is being used, the content tree view will not be used, so the treeitem, treerow, and treecell elements will have no purpose since the custom view will get its data from elsewhere.
Document Object Model - Archive of obsolete content
the dom structure may be examined and modified using various methods provided for this purpose.
Focus and Selection - Archive of obsolete content
suppose you wanted to move the focus from where it currently is, to the next place the browser thinks it should be.
List Controls - Archive of obsolete content
xul has a menulist element which can be used for this purpose.
Localization - Archive of obsolete content
xml provides entities which can be used for a similar purpose.
More Event Handlers - Archive of obsolete content
you should use a load event to do these kinds of things as opposed to adding a script at the top level outside of a function.
Property Files - Archive of obsolete content
for this purpose, property files can be used.
Stacks and Decks - Archive of obsolete content
the stack and deck elements can be used for this purpose.
XPCOM Examples - Archive of obsolete content
the cookie service can be used for such a purpose.
Writing Skinnable XUL and CSS - Archive of obsolete content
for example, the skin for the navigator package should contain a file called navigator.css that determines the default look of all xul windows posed from this package.
XUL Accesskey FAQ and Policies - Archive of obsolete content
for example, here's how we add an accesskey to a xul button: <button label="apply instantly" accesskey="a" /> apply instantly - or - <button label="apply instantly" accesskey="a" /> apply instantly in mozilla, we use dtd's for one more layer of abstraction, for purposes of internationalization.
XUL element attributes - Archive of obsolete content
flags type: space-separated list of the values below a set of flags used for miscellaneous purposes.
XUL Template Primer - Bindings - Archive of obsolete content
in our example, the ?friend variable serves this purpose in the first <binding> element.
XUL and RDF - Archive of obsolete content
the implementation of the application object modelpurpose - the purpose of this document is two-fold.
XML - Archive of obsolete content
html -- which is a derived language like our memoml (see the appendix notes for information on the geneology of markup languages) -- has been created for the purposes of representing hypertext documents and the basic relationships between them.
XUL Event Propagation - Archive of obsolete content
events are used for different purposes, but they play a particularly important role in creating interactive xul-based user interfaces, since it is events that bring the information about user actions to the code behind the interface.
description - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
dialog - Archive of obsolete content
if it is set to true any changes to settings are supposed to be applied immediately.
listbox - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
listitem - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
menu - Archive of obsolete content
ArchiveMozillaXULmenu
it is not used for any specific purpose, but you can access it with a script for your own use.
menuitem - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
menulist - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
menuseparator - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
notification - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
preferences - Archive of obsolete content
it's supposed to be a child of <prefpane> element.
prefwindow - Archive of obsolete content
if it is set to true any changes to settings are supposed to be applied immediately.
promptBox - Archive of obsolete content
void removeprompt( nsidomelement aprompt ); parameters aprompt the prompt to dispose of.
radio - Archive of obsolete content
ArchiveMozillaXULradio
it is not used for any specific purpose, but you can access it with a script for your own use.
radiogroup - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
richlistbox - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
richlistitem - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
scale - Archive of obsolete content
ArchiveMozillaXULscale
it is not used for any specific purpose, but you can access it with a script for your own use.
textbox - Archive of obsolete content
label type: string if present and not empty, this will be exposed to screen readers through the label property.
toolbar - Archive of obsolete content
you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar.
toolbox - Archive of obsolete content
you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar.
tree - Archive of obsolete content
ArchiveMozillaXULtree
flags type: space-separated list of the values below a set of flags used for miscellaneous purposes.
treecell - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
Application Update - Archive of obsolete content
pref("app.update.url.details", "http://yourserver.net/yourpage"); // user-settable override to app.update.url for testing purposes.
CommandLine - Archive of obsolete content
for the sake of simplicity, the proposed solution involves the observer service to notify observers that the updated arguments are available.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
for the purposes of this article i'm using dave townsend's mccoy as an example.
Opening a Link in the Default Browser - Archive of obsolete content
er/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice); if (extps.externalprotocolhandlerexists("http")) { // handler for http:// urls exists } link within an iframe to enable a link inside an html document that is the "src" of an iframe to be opened in the default browser, setting the preference: pref("network.protocol-handler.expose-all", false); seems to work.
application/http-index-format specification - Archive of obsolete content
a valid 200 line consists of one or more white space separated tokens that describe the name or purpose of the associated column of data.
calICalendarView - Archive of obsolete content
other areas of the code may use this attribute for setting selection, editing purposes, or any other purpose.
Mozprocess - Archive of obsolete content
api mozprocess.processhandler:processhandler is the central exposed api for mozprocess.
Mozrunner - Archive of obsolete content
mozrunner also exposes two application specific classes, firefoxrunner and thunderbirdrunner which record the binary names necessary for the runner class to find them on the system.
reftest opportunities files - Archive of obsolete content
for example, if some html is in an unexpected place and is supposed to be ignored, then we can match against an html file that is missing that extra mark-up.
Mozilla release FAQ - Archive of obsolete content
regarding shells, i would like to recommend the following: if you are using unix, use bash-family shells for the build because of the better control over redirection (in case you want to log errors and messages) if you are using win32, using the default shell cmd.exe (as opposed to 4dos or 4nt) will probably yield better results.
Format - Archive of obsolete content
firefox 1.5.0.5 planned release - 2006/07/26 discussions firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey.
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
firefox 2 on windows vista discussion about the "state of affairs" of firefox 2 on windows vista rc1 - update for rc1 listed in update history as 'install pending' right-click "copy email address" - bug 353102 a proposed bug fix to the 'copy email address' bug how to use the rss feeds discovery & parsing tool in another open source project?
2006-11-10 - Archive of obsolete content
accessibility in chatzilla gijs kruitbosch and aaron leventhal have proposed an accessibility project involving chatzilla.
2006-09-29 - Archive of obsolete content
firefox 2 on windows vista discussion about the "state of affairs" of firefox 2 on windows vista rc1 - update for rc1 listed in update history as 'install pending' right-click "copy email address" - bug 353102 a proposed bug fix to the 'copy email address' bug how to use the rss feeds discovery & parsing tool in another open source project?
2006-10-13 - Archive of obsolete content
it's suggested that its a os problem in the desktop theme, as opposed to problem with firefox.
2006-12-01 - Archive of obsolete content
devs say this is the way its supposed to be, others say its a bug!
2006-10-06 - Archive of obsolete content
cédric corazza recommends that the proposed documention should be made available on the l10n cvs once it reaches a decent stage so that localizers can get a head-start on the localization before the final version is made available.
2006-07-17 - Archive of obsolete content
firefox 1.5.0.5 planned release - 2006/07/26 discussions firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey.
2006-11-03 - Archive of obsolete content
button in the upper right hand corner the removal of the firefox home page button was purposeful, you can add that function by installing this.
2006-12-01 - Archive of obsolete content
three replacement groups (with sample makeup) are proposed.
2006-10-20 - Archive of obsolete content
traffic october 14, 2006, 6:53pm - ed notes that, on windows, composer 0.1's reccomended install directory needs to be different than those noted in the release notes.
2006-10-27 - Archive of obsolete content
traffic status of xpcom cycle collector graydon hoare provides the xpcom patch which experiments with implementing a general-purpose garbage-cycle collector for xpcom.
2006-11-03 - Archive of obsolete content
john gaunt discusses a proposed xulrunner unit-tests like xpcshell.
2006-11-10 - Archive of obsolete content
benjamin smedberg has been "working on some xptcall refactoring which will allow us to expose xptcall via a frozen api (and c linkage)".
2006-11-17 - Archive of obsolete content
boaz discuses the evolution of web browsers towards a more "application mode" whereas a web browser is loaded for the sole purpose of running a given website.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.quality - november 25-december 1, 2006 announcements need volunteers to maintain jssh for testing on firefox 2 branch - dave liebreich is looking for someone willing to take responsibility for maintaining jssh for testing purposes.
2006-10-06 - Archive of obsolete content
discussions protocol handlers boris zbarsky posed the question, should random webpages have access to the following protocols: feed, pcast, moz-bookmark, webcal, swebcal.
2006-11-24 - Archive of obsolete content
discussions tutorials: non c++ bindings for xpcom tutorials on how to interface with firefox using xpcom on a similar basis to how a developer can with internet explorer through it's com interface tutorals and references related to extension development tutorials on developing extensions which use the third party libraries for firefox references to mozilla api exposed javascript component + xmldocument not accessible a discussion on error: uncaught exception: permission denied to get property xmldocument.textcontent creating xpcom components a good discussion about "components.classes[cid] has no properties" error firefox http explanation about how firefox handles the http aspect meetings none during this week.
2006-12-08 - Archive of obsolete content
however, the c++ call that's supposed to be invoking the method on the javascript object is returning with 0x80004005 (ns_error_failure).
External resources for plugin creation - Archive of obsolete content
project: nixysa project home page description (from the home page): nixysa is a framework written in python to automatically generate glue code for npapi plugins (plugins for browsers such as google chrome or firefox), letting you easily expose c++ classes to javascript from a simple idl representation.
NPEvent - Archive of obsolete content
the event type may be any of the ollowing: graphicsexpose focusin focusout enternotify leavenotify motionnotify buttonpress buttonrelease keypress keyrelease description microsoft windows description the type npevent represents an event passed by npp_handleevent() to a windowless plug-in.
NPWindow - Archive of obsolete content
(the drawable is provided in a graphicsexpose event, when the paint is requested.) description the npwindow structure represents the native window or a drawable, and contains information about coordinate position, size, whether the plug-in is windowed or windowless, and some platform-specific information.
SAX - Archive of obsolete content
the following handlers are available: interface purpose nsisaxcontenthandler receive notification of the logical content of a document (e.g.
Security Controls - Archive of obsolete content
operational controls: the security controls that are primarily implemented and executed by people (as opposed to systems).
Digital Signatures - Archive of obsolete content
the content of the hashed data cannot, for all practical purposes, be deduced from the hash-which is why it is called "one-way." similarly, in public key encryption, a key pair is generated for digital signing.
Encryption and Decryption - Archive of obsolete content
decryption without the correct key is very difficult, and in some cases impossible for all practical purposes.
Sunbird Theme Tutorial - Archive of obsolete content
for testing purposes, go to the <tt>calendar</tt> directory that you have just pasted.
Building a Theme - Archive of obsolete content
for the purposes of just testing our .xpi file we can just drag it into the add-ons manager via "tools -> add-ons manager", or open it using "file -> open file...".
Common Firefox theme issues and solutions - Archive of obsolete content
the purpose of this page is to provide provide theme developers with notes on how to fix common issues.
Making sure your theme works with RTL locales - Archive of obsolete content
gecko 1.9.1 (firefox 3.5) and earlier the chromedir attribute firefox, thunderbird and seamonkey expose an attribute named chromedir on certain elements.
Scratchpad - Archive of obsolete content
from firefox 33 onwards, the key binding preference is exposed in the editor preferences section of the developer tools settings, and you can set it there instead of about:config.
Using SSH to connect to CVS - Archive of obsolete content
if you're typing the commands directly (as opposed to storing them in a batch file that you call), you'll need to replace the occurances of "%%" in the first line with "%".
References - Archive of obsolete content
the webpage explains and proposes with small examples the best coding practices and most recommendable ways of developing problem-free javascript code.
Using Web Standards in your Web Pages - Archive of obsolete content
every proposed w3c web standards replacement in this article is working without a problem in modern browsers like msie 7, firefox 2, opera 9, safari 3, konqueror 3.5+, icab 4, etc.
E4X for templating - Archive of obsolete content
while it may be obvious after a study of the basics of e4x that it can be used for this purpose, if one adds a few common purpose functions (especially along with the convenience of javascript 1.8 expression closures), the templates can function more dynamically, offering the power and readability of templating languages such as smarty for php (though admittedly without the currently wider cross-browser support of xslt or the strictly-xml approach of phptal or seethrough templating).
Processing XML with E4X - Archive of obsolete content
we can also use the for each...in statement introduced in javascript 1.6 as part of javascript's e4x support: for each (var lang in languages.lang) { alert(lang); } for each...in can also be used with regular javascript objects to iterate over the values (as opposed to the keys) contained in the object.
ArrayBuffer.transfer() - Archive of obsolete content
this is not the exact equivalent of this api because browsers that natively support it are be able to internally use the c++ function realloc() which extends the length of the memory and only copies it to a new location as-needed as opposed to the following pollyfill which always copies the whole thing to a new space of memory, but this function transfers data from one arraybuffer to another arraybuffer.
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
additions to the arraybuffer object arraybuffer.transfer() (spec) new typedobject objects based on typed objects draft, and exposed via a global typedobject object, e.g.
VBArray.toArray - Archive of obsolete content
for example, a vbarray with three dimensions and three elements in each dimension is converted into a javascript array as follows: suppose the vbarray contains: (1, 2, 3), (4, 5, 6), (7, 8, 9).
JavaPackage - Archive of obsolete content
examples suppose the redwood corporation uses the java redwood package to contain various java classes that it implements.
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
if you're writing xhtml (as opposed to regular html) you should understand the fundamental differences between html 4 and xhtml.
RDF: Resource Description Framework for metadata - Archive of obsolete content
ArchiveWebRDF
these include plans to expose the rdf api to public web content, as well as performance and correctness improvements.
Server-Side JavaScript - Archive of obsolete content
server-side javascript is another way in which, as this article quotes eich, "mozilla wants to 'get people thinking about javascript as a more general-purpose language' and show them that 'it really is a platform for writing full applications.'" many vendors today are embedding mozilla rhino or mozilla spidermonkey into web server environments.
Standards-Compliant Authoring Tools - Archive of obsolete content
if you're using older versions of tools that rely on old browser bugs or generate browser-specific code, it may be time to upgrade: nvu is a standalone editor created from the remains of mozilla composer.
Reference - Archive of obsolete content
ruakh 20:31, 26 february 2007 (pst) this was something that was supposed to be fixed in the reorganization, which has still yet to occur.
Mozilla XForms User Interface - Archive of obsolete content
generally speaking, the main purpose for these values is to reflect how much space (screen real estate) the displayed widget will take.
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
this innovation, first introduced by microsoft® internet explorer and later adopted into the css specification, is very popular for the styling of text links, particularly those that are supposed to look and act like javascript-driven "rollovers." however, advancing css support in browsers has caused some unexpectedly aggressive hovering behavior on some pages.
Mozilla's DOCTYPE sniffing - Archive of obsolete content
any "doctype html system" as opposed to "doctype html public", except for the ibm doctype noted below a doctype declaration without a dtd, i.e., <!doctype html>.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
47, which don't understand the <param name="movie" value="animation.swf"> param element, which is supposed to tell the flash player which animation to start playing.
Archive of obsolete content
we leverage some of these ideas to help you make your netscape communicator 4.x plugins exposed to javascript in mozilla based browsers.
Anatomy of a video game - Game development
it is known as a domhighrestimestamp but, for all intents and purposes, consider it a floating point number.
3D games on the Web - Game development
the most popular javascript 3d library is three.js, a multi-purpose tool that makes common 3d techniques simpler to implement.
Audio for Web games - Game development
this is often the way that musicians compose music anyway, and the web audio api is extremely good at keeping these parts in sync.
Unconventional controls - Game development
we will need a few helper variables for our code to work — one for the purpose of calculating the degrees from radians, two for holding the horizontal and vertical amount of degrees our hand is leaning above the controller, one for the threshold of that lean, and one for the state of our hand's grab status.
Implementing game control mechanisms - Game development
it will be explained in the given articles themselves below, but you can play with it already, and use the code however you want for learning purposes.
Build the brick field - Game development
note that the brick objects will also be used for collision detection purposes later.
Track the score and win - Game development
it's the main purpose of the game after all, so you should display a winning message if all available points have been collected.
Load the assets and print them on screen - Game development
the purpose of the tutorial is to teach phaser-specific approaches to game development rather than dwelling on subjective best approaches.
Scaling - Game development
the stage object has a backgroundcolor property for this purpose, which we can set using css color definition syntax.
Visual-js game engine - Game development
3) please read the following terms and conditions before using this application: disclaimer of warranty 'visual js' is provided "as-is" and without warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose.
Visual JS GE - Game development
resource js objects used for adding images for animation purposes.
Visual typescript game engine - Game development
*/ private aspectratio: number = 1.333; /** * domain is simple url address, * recommendent to use for local propose lan ip * like : 192.168.0.xxx if you wanna run ant test app with server.
API - MDN Web Docs Glossary: Definitions of Web-related terms
an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
ARPA - MDN Web Docs Glossary: Definitions of Web-related terms
.arpa (address and routing parameter area) is a top-level domain used for internet infrastructure purposes, especially reverse dns lookup (i.e., find the domain name for a given ip address).
DMZ - MDN Web Docs Glossary: Definitions of Web-related terms
it exposes only certain defined endpoints, while denying access to the internal network from external nodes.
DTMF (Dual-Tone Multi-Frequency signaling) - MDN Web Docs Glossary: Definitions of Web-related terms
computers may make use of dtmf when dialing a modem, or when sending commands to a menu system for teleconferencing or other purposes.
Doctype - MDN Web Docs Glossary: Definitions of Web-related terms
its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!doctype html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.
Dynamic programming language - MDN Web Docs Glossary: Definitions of Web-related terms
this is opposed to so-called static programming languages, in which such changes are normally not possible.
Effective connection type - MDN Web Docs Glossary: Definitions of Web-related terms
effectivetype is a property of the network information api, exposed to javascript via the navigator.connection object.
Encapsulation - MDN Web Docs Glossary: Definitions of Web-related terms
because of this, a user of that class only needs to know its interface (that is, the data and functions exposed outside the class), not the hidden implementation.
First interactive - MDN Web Docs Glossary: Definitions of Web-related terms
these metrics have been proposed by the web incubator community group and are already being used in various tools.
Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
besides this, gecko makes sure associated apis work well on every operating system gecko supports, and that appropriate apis are exposed only to relevant support targets.
Gonk - MDN Web Docs Glossary: Definitions of Web-related terms
since firefox os has full control over gonk, we can expose interfaces to gecko that aren't accessible on other operating systems, for example the full telephony stack and display frame buffer.
Hypertext - MDN Web Docs Glossary: Definitions of Web-related terms
hypertext is text that contains links to other texts, as opposed to a single linear flow like in a novel.
ITU - MDN Web Docs Glossary: Definitions of Web-related terms
in the internet age, the itu's role of establishing standards for video and audio data formats used for streaming, teleconferencing, and other purposes.
Intrinsic Size - MDN Web Docs Glossary: Definitions of Web-related terms
the keyword value max-content exposes this behavior.
mime - MDN Web Docs Glossary: Definitions of Web-related terms
mime "multipurpose internet mail extensions" is a standard to describe documents in other forms beside ascii text, e.g.
MIME type - MDN Web Docs Glossary: Definitions of Web-related terms
it serves the same purpose as filename extensions traditionally do on windows.
Middleware - MDN Web Docs Glossary: Definitions of Web-related terms
it is the software that handles communication between components and input/output, so developers can focus on the specific purpose of their application.
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
specifications might also contain sections that are marked as non-normative or informative, which means those are provided there for the purpose of helping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule.
OOP - MDN Web Docs Glossary: Definitions of Web-related terms
it follows a prototype-based model (as opposed to class-based).
Python - MDN Web Docs Glossary: Definitions of Web-related terms
python is a high level general-purpose programming language.
REST - MDN Web Docs Glossary: Definitions of Web-related terms
a document, is transferred with its state and relationships via well-defined, standarized operations and formats or services call themselves restful when they directly modify type of document as opposed to triggering actions somewhere.
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
how it works after entering username and password, behind the gui the sql queries work as follows: "select count(*) from users where username=' " + txt.user.text+" ' and password=' "+ txt.password.text+" ' "; now suppose user enters the username: admin and password: passwd123, so after clicking on the log in button, sql query will run as follows: "select count(*) from users where username=' admin ' and password=' passwd123 ' "; if the credentials are correct, then the user is allowed to log in, so it's a very simple (and therefore insecure) mechanism.
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
in programming, semantics refers to the meaning of a piece of code — for example "what effect does running that line of javascript have?", or "what purpose or role does that html element have" (rather than "what does it look like?".) semantics in javascript in javascript, consider a function that takes a string parameter, and returns an <li> element with that string as its textcontent.
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
symbol can have an optional description, but for debugging purposes only.
Time to interactive - MDN Web Docs Glossary: Definitions of Web-related terms
tti, proposed by the web incubator community group in 2018, is intended to provide a metric that describes when a page or application contains useful content and the main thread is idle and free to respond to user interactions, including having event handlers registered.
UTF-8 - MDN Web Docs Glossary: Definitions of Web-related terms
each byte has some bits reserved for encoding purposes.
W3C - MDN Web Docs Glossary: Definitions of Web-related terms
each standard passes through four stages of maturity: working draft (wd), candidate recommendation (cr), proposed recommendation (pr), and w3c recommendation (rec).
World Wide Web - MDN Web Docs Glossary: Definitions of Web-related terms
tim berners-lee proposed the architecture of what became known as the world wide web.
beacon - MDN Web Docs Glossary: Definitions of Web-related terms
beacons are generally included to provide information about the user for statistical purposes.
JPEG - MDN Web Docs Glossary: Definitions of Web-related terms
jpeg compression is composed of three compression techniques applied in successive layers, including chrominance subsampling, discrete cosine transformation and quantization, and run-length delta & huffman encoding.
markup - MDN Web Docs Glossary: Definitions of Web-related terms
within a text file such as an html file, elements are marked up using tags which explain the purpose of that part of the content.
non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
software specifications often contains information marked as non-normative or informative, which means that those are provided there for the purpose of helping the readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule.
About Scriptable Interfaces - Interfaces
most of the information of this document is based on http://www.mozilla.org/scriptable/ and creating xpcom components scriptable interfaces interfaces allow xpcom components to expose their functionality to the outside world while hiding the inner details of the component implementation.
Accessible multimedia - Learn web development
thers if they are in a quiet place (like a library.) this is not a new concept — television services have had closed captioning available for quite a long time: whereas many countries offer english films with subtitles written in their own native languages, and different language subtitles are often available on dvds, for example there are different types of text track with different purposes.
What is accessibility? - Learn web development
accessibility apis web browsers make use of special accessibility apis (provided by the underlying operating system) that expose information useful for assistive technologies (ats) — ats mostly tend to make use of semantic information, so this information doesn't include things like styling information, or javascript.
Accessibility - Learn web development
html: a good basis for accessibility a great deal of web content can be made accessible just by making sure the correct html elements are always used for the correct purpose .
Test your skills: The Cascade - Learn web development
for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Handling different text directions - Learn web development
you don't need to be working in a language which uses a vertical writing mode to want to do this — you could also change the writing mode of parts of your layout for creative purposes.
Pseudo-classes and pseudo-elements - Learn web development
there are a large number of these, and they often serve quite specific purposes.
Type, class, and ID selectors - Learn web development
you can see both of these uses in the following example: warning: using the same id multiple times in a document may appear to work for styling purposes, but don't do this.
Test your skills: tables - Learn web development
for assessment or further work purposes, download the starting point for this task to work in your own editor or in an online editor.
Floats - Learn web development
with the advent of flexbox and grid it has now returned to its original purpose, as this article explains.
Legacy layout methods - Learn web development
however, flexbox was never designed as a grid system and poses a new set of challenges when used as one.
Supporting older browsers - Learn web development
having access to older versions of internet explorer is particularly useful, and for that purpose, microsoft has made a range of virtual machines available for free download.
CSS layout - Learn web development
with the advent of flexbox and grid it has now returned to its original purpose, as this article explains.
How CSS works - Learn web development
again, the html is as follows: <p> let's use: <span>cascading</span> <span>style</span> <span>sheets</span> </p> let's suppose we apply the following css to it: span { border: 1px solid black; background-color: lime; } the browser will parse the html and create a dom from it, then parse the css.
create fancy boxes - Learn web development
most of the time, that leads to polluting the dom by adding extra html element for the unique purpose of style.
What text editors are available? - Learn web development
you will learn more about customizing your editors and tools as you gain experience, and more importantly you will learn what features are more useful to your purposes.
How can we design for all types of users? - Learn web development
suppose we wanted a base font size of 16px and an h1 (main heading) at the equivalent of 32px, yet if within the h1 we find a span with the subheading class, it too must be rendered at the default font size (usually 16px).
How does the Internet work? - Learn web development
we built that network for our own purposes.
How much does it cost to do something on the Web? - Learn web development
likewise, video-editing software can be free (pitivi, openshot for linux, imovie for mac), less than $100 (adobe premiere elements), or several hundred dollars (adobe premiere pro, avid media composer, final cut pro).
How do I start to design my website? - Learn web development
suppose you are a musician.
How do you upload your files to a web server? - Learn web development
open the filezilla application; you should see something like this: logging in for this example, we'll suppose that our hosting provider (the service that will host our http web server) is a fictitious company "example hosting provider" whose urls look like this: mypersonalwebsite.examplehostingprovider.net.
What are hyperlinks? - Learn web development
the web's original purpose was to provide an easy way to reach, read, and navigate through text documents.
What is a URL? - Learn web development
a url is composed of different parts, some mandatory and others optional.
What is a web server? - Learn web development
typically, these kinds of sites are composed of only a few html templates and a giant database, rather than thousands of static html documents.
How do you set up a local testing server? - Learn web development
one of the easiest ways to do this for our purposes is to use python's simplehttpserver (or http.server, depending on the version of python installed.) to do this: install python.
Basic native form controls - Learn web development
they can have a placeholder; this is text that appears inside the text input box that should be used to briefly describe the purpose of the box.
HTML forms in legacy browsers - Learn web development
you can declare appearance: none; to remove the browser styles, but that generally defeats the purpose: as you lose all styling, removing the default look and feel your visitors are used to.
How to build custom form controls - Learn web development
finally, let's define how the control's options will behave: when the control is opened, the selected option is highlighted when the mouse is over an option, the option is highlighted and the previously highlighted option is returned to its normal state for the purposes of our example, we'll stop with that; however, if you're a careful reader, you'll notice that some behaviors are missing.
UI pseudo-classes - Learn web development
lute; content: "required"; color: white; background-color: black; padding: 5px 10px; top: -26px; left: -70px; } we set the <span> to position: relative simply so that we can set the generated content to position: absolute and position it relative to the <span> rather than the <body> (the generated content acts as though it is a child node of the element it is generated on, for the purposes of positioning).
Your first form - Learn web development
form controls can also be programmed to enforce specific formats or values to be entered (form validation), and paired with text labels that describe their purpose to both sighted and blind users.
CSS basics - Learn web development
this project uses a reddish orange for the body background color, as opposed to dark blue for the <html> element.
HTML basics - Learn web development
its purpose is to embed an image in the html page in the place it appears.
Installing basic software - Learn web development
an ftp program, used on older web hosting accounts to manage files on servers (git is increasingly replacing ftp for this purpose).
JavaScript basics - Learn web development
if the javascript loads first and it is supposed to affect the html that hasn't loaded yet, there could be problems.
Publishing your website - Learn web development
github has a very useful feature called github pages, which allows you to expose website code live on the web.
Getting started with the Web - Learn web development
html basics hypertext markup language (html) is the code that you use to structure your web content and give it meaning and purpose.
HTML Cheatsheet - Learn web development
that's the whole purpose of the cheatsheet, to give you some quick accurate ready to use code snippets for common usages.
Getting started with HTML - Learn web development
the purpose of comments is to allow you to include notes in the code to explain your logic or coding.
Video and audio content - Learn web development
these text strings are called cues, and there are several kinds of cues which are used for different purposes.
HTML table basics - Learn web development
LearnHTMLTablesBasics
overview: tables next this article gets you started with html tables, covering the very basics such as rows and cells, headings, making cells span multiple columns and rows, and how to group together all the cells in a column for styling purposes.
Test your skills: Functions - Learn web development
functions 3 in this task, you return to the problem posed in task 1, with the aim of improving it.
Making decisions in your code — conditionals - Learn web development
you can ignore leap years for the purposes of this example.
Drawing graphics - Learn web development
there are a few javascript functions that will allow you to run functions repeatedly, several times a second, the best one for our purposes here being window.requestanimationframe().
Introduction to web APIs - Learn web development
they generally fall into two categories: browser apis are built into your web browser and are able to expose data from the browser and surrounding computer environment and do useful complex things with it.
Video and Audio APIs - Learn web development
here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> this creates a video player inside the browser like so: you can review what all the html features do in the article linked above; for our purposes here, the most interesting attribute is controls, which enables the default set of playback controls.
A first splash into JavaScript - Learn web development
the only problem now is that if you guess the correct answer or run out of guesses, the game will break because we've not yet defined the setgameover() function that is supposed to be run once the game is over.
Arrays - Learn web development
suppose we want to store a shopping list in an array.
What went wrong? Troubleshooting JavaScript - Learn web development
have a look at line 78, and you'll see the following code: loworhi.textcontent = 'last guess was too high!'; this line is trying to set the textcontent property of the loworhi constant to a text string, but it's not working because loworhi does not contain what it's supposed to.
JavaScript First Steps - Learn web development
in this first article we will look at javascript from a high level, answering questions such as "what is it?", and "what is it doing?", and making sure you are comfortable with javascript's purpose.
Adding features to our bouncing balls demo - Learn web development
draw() this method has the same purpose as ball()'s draw() method: it draws the object instance on the canvas.
Object-oriented JavaScript for beginners - Learn web development
this is known as abstraction — creating a simple model of a more complex thing, which represents its most important aspects in a way that is easy to work with for our program's purposes.
Client-Server Overview - Learn web development
previous overview: first steps next now that you know the purpose and potential benefits of server-side programming we're going to examine in detail what happens when a server receives a "dynamic request" from a browser.
Introduction to the server side - Learn web development
in each case, the code is significantly different: they have different purposes and concerns.
Website security - Learn web development
the purpose of website security is to prevent these (or any) sorts of attacks.
Server-side website programming first steps - Learn web development
client-server overview now that you know the purpose and potential benefits of server-side programming, we're going to examine in detail what happens when a server receives a "dynamic request" from a browser.
Getting started with Ember - Learn web development
this is where most of the "framework" parts come into play, as there are superclasses, where each type of thing has a different purpose and different expected location within your project.
Ember interactivity: Events, classes and state - Learn web development
populate this file with the following code, which simply exposes the todo-data service, via the todos property, to our template.
Routing in Ember - Learn web development
but now we need a way to differentiate between each of these routes, so that they show what they are supposed to show.
Accessibility in React - Learn web development
ext" type="text" value={newname} onchange={handlechange} ref={editfieldref} /> the "edit" button in your view template should read like this: <button type="button" classname="btn" onclick={() => setediting(true)} ref={editbuttonref} > edit <span classname="visually-hidden">{props.name}</span> </button> focusing on our refs with useeffect to use our refs for their intended purpose, we need to import another react hook: useeffect().
Componentizing our React app - Learn web development
key is a special prop that's managed by react – you cannot use the word key for any other purpose.
React interactivity: Events and state - Learn web development
there are a couple of other things to note: the camel-cased nature of onclick is important — jsx will not recognize onclick (again, it is already used in javascript for a specific purpose, which is related but different — standard onclick handler properties).
TypeScript support in Svelte - Learn web development
the variable todosstatus, which we used to programmatically access the methods exposed by the todosstatus component, is of type todosstatus.
Deployment and next steps - Learn web development
navigate to the root of your app and run npx vercel; the first time you do it, you'll be prompted to enter your email address, and follow the steps in the email sent to that address, for security purposes.
Getting started with Svelte - Learn web development
these dependencies won't be sent to production, they are just used for development purposes.
Vue conditional rendering: editing existing todos - Learn web development
<button type="button" class="btn" @click="toggletoitemeditform"> edit <span class="visually-hidden">{{label}}</span> </button> <button type="button" class="btn btn__danger" @click="deletetodo"> delete <span class="visually-hidden">{{label}}</span> </button> </div> </div> </template> we’ve added a wrapper <div> around the whole template for layout purposes.
Adding a new todo form: Vue events, methods, and models - Learn web development
for our purposes, this is much more reasonable since we only need the final data.
Styling Vue components with CSS - Learn web development
the label, however, already denotes the purpose of the form.
Implementing feature detection - Learn web development
let's recap and look at the example we touched on in our handling common javascript problems — the geolocation api (which exposes available location data for the device the web browser is running on) has the main entry point for its use, a geolocation property available on the global navigator object.
Strategies for carrying out testing - Learn web development
your main work machine can also be a place to install other tools for specific purposes, such as accessibility auditing tools, screen readers, and emulators/virtual machines.
Package management basics - Learn web development
description: a quick description of the app's purpose.
Understanding client-side web development tools - Learn web development
client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package managers, and control them using the command line.
Tools and testing - Learn web development
modules understanding client-side web development tools client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package managers, and control them using the command line.
Accessibility Information for Core Gecko Developers
purpose newsgroup mailing list google group developer discussion mozilla.dev.accessibility subscribe/unsubscribe google group end user support mozilla.support.accessibility subscribe/unsubscribe google group ...
Accessibility information for UI designers and developers
purpose newsgroup mailing list google group developer discussion mozilla.dev.accessibility subscribe/unsubscribe google group end user support mozilla.support.accessibility subscribe/unsubscribe google group ...
Embedding API for Accessibility
how we expose this through the user interface is another matter.
Information for External Developers Dealing with Accessibility
purpose newsgroup mailing list google group developer discussion mozilla.dev.accessibility subscribe/unsubscribe google group end user support mozilla.support.accessibility subscribe/unsubscribe google group ...
Information for users
purpose newsgroup mailing list google group developer discussion mozilla.dev.accessibility subscribe/unsubscribe google group end user support mozilla.support.accessibility subscribe/unsubscribe google group ...
Adding a new event
basicevents.h this header file should be used only for defining generic purpose event class such as a common super class of various event classes.
Application cache implementation overview
for purpose of this documentation it's enough to describe the simplest case ; for complete documentation of the selection algorithm refer to the spec or to the code.
Chrome registration
however, the matching locale and skin packages will also be exposed to content.
Creating JavaScript callbacks in components
using javascript functions as callback handlers for components can be a nice convenience to developers and there is virtually zero work to expose the feature.
Creating a spell check dictionary add-on
if you are creating a new dictionary, as opposed to updating an existing one, please make sure that there is not already a dictionary available for your locale.
Creating reftest-based unit tests
presumably, one was supposed to open the pages with a browser and look at them and see if they look right.
Debugging
http logging how to log http network traffic for debugging purposes.
Configuring Build Options
there are many options recognized by the configure script which are special-purpose options intended for embedders or other special situations, and should not be used to build the full suite/xul applications.
Simple SeaMonkey build
mk_add_options moz_objdir=/path/to/comm-central/obj-sm-debug ac_add_options --enable-application=suite ac_add_options --enable-debug ac_add_options --disable-optimize normally a shared build suffices for debugging purposes but current nightly releases are actually static builds which require even more memory to link.
Eclipse CDT
when eclipse's indexer tries to process the mozilla source, eclipse will need considerably more memory than the limits imposed by its default configuration.
Obsolete Build Caveats and Tips
purpose of this page the mozilla build process and code base have evolved considerably over the past few years.
Listening to events on all tabs
astate a value composed of the security state flags and the security strength flags described in the documentation for nsiwebprogresslistener.
Working with Mozilla source code
the articles below will help you get your hands on the mozilla source code, learn to navigate the code, and how to get the changes you propose checked into the tree.
Cross Process Object Wrappers
essentially, the problem is this: suppose the content process is busy with some long-running operation (for example, garbage collection).
Limitations of chrome scripts
however, this "dummy" object is completely static and only exposes a few of the normal properties that windows and documents have.
Message manager overview
for practical purposes, in multiprocess firefox the parent process is the chrome process, and child processes are content processes.
Message manager overview
for practical purposes, in multiprocess firefox the parent process is the chrome process, and child processes are content processes.
mozbrowserusernameandpasswordrequired
the embedder is supposed to retrieve the necessary credentials, usually using a dialog or a database of username/passwords, and then call authenticate() or cancel() as appropriate.
Chrome-only API reference
MozillaGeckoChromeAPI
note: most of the apis exposed to the web in general are also usable in chrome code: see web apis for a list of these.
overflow-clip-box-block
ent-box; } .padding-box { overflow-clip-box-block: padding-box; } javascript function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
overflow-clip-box-inline
nt-box; } .padding-box { overflow-clip-box-inline: padding-box; } javascript function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
overflow-clip-box
und: lime content-box; } .padding-box { overflow-clip-box: padding-box; } js function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
Chrome-only CSS reference
MozillaGeckoChromeCSS
ua stylesheets.) note: most of the css properties exposed to the web in general are also usable in chrome stylesheets: see the css documentation for a list of these.
Getting Started with Chat
this page is being retained for historical and reference purposes.
How test harnesses work
mozilla test harnesses are typically composed of a python runner that invokes firefox, utilizes the browser to run tests, and reports the results.
How to Report a Hung Firefox
if you suspect a hang (as opposed to slow performance), wait one minute on an idle system before getting the stack trace.
IME handling guide
instead, gecko uses gtk_im_context_reset() api for this purpose because most ime cancel composition with it.
Creating a New Protocol
it is acceptable to use synchronous calls on jpw wrappers for testing purposes.
PBackground
for most purposes this is great, because the dom is already bound to the main thread.
Implementing Download Resuming
note: in versions of firefox prior to 3.0 alpha 7, nsiwebbrowserpersist cannot append to existing files (as opposed to overwriting them), and is therefore not usable for this task (see bug 129921).
Internationalized Domain Names (IDN) Support in Mozilla Browsers
during the discussion phase of the idn protocols development, there were some competing ascii-compatible encoding (ace) schemes proposed but an agreement was reached eventually to standardize on a type of ace called "punycode".
AsyncShutdown.jsm
firefox shutdown is composed of phases that take place sequentially.
Following the Android Toasts Tutorial from a JNI Perspective
toasts do not have to be created with jni; they are exposed by the nativewindow feature on firefox for android, see toast documentation.
Sqlite.jsm
sqlite.jsm exposes a transaction api built on top of task.jsm that allows transactions to be written as procedural javascript functions (as opposed to a series of callback driven operations).
Using workers in JavaScript code modules
to create a chromeworker for this purpose, you need to use the nsiworkerfactory interface: var workerfactory = components.classes['@mozilla.org/threads/workerfactory;1'] .createinstance(components.interfaces.nsiworkerfactory); var worker = workerfactory.newchromeworker('script_url.js'); this will create a new chrome worker that will immediately begin to run the script at the specified url (in this case, ...
Webapps.jsm
the webapps.jsm modules exposes the domapplicationregistry, which is responsible for managing all of the open web apps.
Index
different gettext function name) for string which are supposed to support plurals.
Localizing without a specialized tool
for the purposes of this tutorial, we will just convert all letters to uppercase, so that the change is visible in the ui.
Localization prerequisites
there is no warranty; not even for merchantability or fitness for a particular purpose great, hg works.
Localization sign-off reviews
the diff generated for sign-off reviews the image to the right illustrates the revisions diff between the current release revision and your newly proposed release revision.
Localization technical reviews
since it is performed on the first revision a l10n team proposes for release, this first revision requires a very detailed and comprehensive form of review.
Creating localizable web applications
the logic of the website should not be exposed directly in the localization files, to avoid any accidental changes by localizers.
gettext
different gettext function name) for string which are supposed to support plurals.
Mozilla Framework Based on Templates (MFBT)
this pointer is a useful way to expose access to values within an array.
Mozilla Style System
computed style (front end) the interface that the front end exposes to the rest of mozilla consists of a single nsstyleset object and many nsstylecontext objects, each of which holds the computed style for an element, pseudo-element, or text node.
Mozilla Style System Documentation
for example, suppose we had the css stylesheet: /* rule 1 */ doc { display: block; text-indent: 1em; } /* rule 2 */ title { display: block; font-size: 3em; } /* rule 3 */ para { display: block; } /* rule 4 */ [class="emph"] { font-style: italic; } and the following document: <doc> <title>a few quotes</title> <para class="emph">benjamin franklin said that <quote>"a penny saved is a penny earned."</quo...
Build Metrics
static constructors are undesirable because their initialization imposes an unavoidable time penalty every time firefox is started.
DMD
since you cannot mark files in /sdcard/ as executable, we will use /data/local/tmp for this purpose: adb push dmd_fennec /data/local/tmp adb shell cd /data/local/tmp chmod 755 dmd_fennec the final step is to make android use the above wrapper script while launching fennec, so that the environment variable is present when fennec starts up.
JS::PerfMeasurement
eventmask eventsmeasured instances of perfmeasurement expose this constant.
Power profiling overview
intel processors have model-specific registers (msrs) containing measurements of how much time is spent in different c-states, and tools such as powermetrics (mac), powertop and turbostat (linux) can expose this information.
Profiling with the Firefox Profiler
main thread file io, profiled thread file io, all file io - "mainthreadio", "fileio", "allfileio" this will interpose file i/o from a selection of threads, and report them in the profiles.
Scroll-linked effects
one way to implement this without the scroll event listener is to use the css property designed for this purpose: <body style="height: 5000px"> <div id="toolbar" style="position: sticky; top: 0px; margin-top: 100px; width: 100px; height: 20px; background-color: green"></div> </body> this version works well with asynchronous scrolling because position of the "toolbar" div is updated by the browser as the user scrolls.
perf
the following example shows how to invoke it for this purpose.
Research and prep
ensure that your suggestions follow these parameters: search there are typically five search plug-ins listed for firefox desktop (only four for firefox mobile): generic search the default option should expose the quickest path to the best result on the world wide web for the user (indexing a large portion of the global www).
L20n HTML Bindings
when all dom nodes are localized, the document element will fire a documentlocalized event, which you can listen to: document.addeventlistener('documentlocalized', function() { // the dom has been localized and the user sees it in their language yourapp.init(); }); exposing context data you can expose important bits of data to the localization context in form of context data.
Leak And Bloat Tests
code locations the files specific to leak and bloat testing are be stored in: http://mxr.mozilla.org/comm-central/source/mailnews/test/performance these files consist of: overlays (used to provide the hooks for the javascript): bloat/bloataddroverlay.xul bloat/bloatcomposeoverlay.xul bloat/bloatmainoverlay.xul javascript files (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeoverlay.js bloat/bloatmainoverlay.js preference settings (used to provide a defined profile, see below): common/mailnewstestprefs.js python scripts (used to set up the profile and run the test): bloat/setupbloattest.py bloat/runtest.py common/setupcommonmailnews.p...
NSPR Poll Method
the prototype of the poll method is print16 poll_method(prfiledesc *fd, print16 in_flags, print16 *out_flags); the purpose of the poll method is to allow a layer to modify that flags that will ultimately be used in the call to the underlying network transport's select (or equivalent) function, and to indicate that a layer is already able to make progress in the manner suggested by the polling flags.
I/O Functions
the purpose of a pollable event is to combine event waiting with i/o waiting in a single pr_poll call.
Interval Timing
this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
Locks
in general, a monitor is a conceptual entity composed of a mutex, one or more condition variables, and the monitored data.
Named Shared Memory
security considerations on unix platforms, depending on implementation, contents of the backing store for the shared memory can be exposed via the file system.
PL_HashString
a general-purpose hash function for character strings.
PRExplodedTime
note that it starts from 1 as opposed to 0.
PR_Interrupt
description the purpose of pr_interrupt is to request that a thread performing some task stop what it is doing and return to some control point.
PR_NormalizeTime
for example, suppose you want to compute the day of week for 3 march 1998.
PR_SetErrorText
clients may use it for their own purposes.
PR_Sleep
if ticks is not pr_interval_no_wait, pr_sleep uses an existing lock, but has to create a new condition for this purpose.
NSS FAQ
MozillaProjectsNSSFAQ
openssl is an open source project that implements server-side ssl, tls, and a general-purpose cryptography library.
Introduction to Network Security Services
only on 64-bit cpus, not on 32-bit cpus) or that doesn't use the more efficient 64-bit code on 64-bit cpus, which defeats the purpose of having these shared libraries.
NSS_3.12.1_release_notes.html
bug 67890: create self-signed cert with existing key that signed csr bug 129303: nss needs to expose interfaces to deal with multiple token sources of certs.
NSS 3.12.5 release_notes
if the string parameter is null (as opposed to empty, zero length), then the softoken default is used.
NSS 3.14.1 release notes
note that this code is used primarily for purposes of testing.
NSS 3.15.4 release notes
implemented ocsp server functionality for testing purposes (httpserv utility).
NSS 3.16.1 release notes
notable changes in nss 3.16.1 imposed name constraints on the french government root ca anssi (dciss).
NSS 3.35 release notes
as a reminder, debug builds should not be used for production purposes.
NSS 3.40 release notes
mozilla::pkix apis are not exposed in the libraries nss builds.
NSS 3.43 release notes
't installed, try running a local clang-format as a fallback bug 1531267 - enable fips mode automatically if the system fips mode flag is set bug 1528262 - add a -j option to the strsclnt command to specify sigschemes bug 1513909 - add manual for nss-policy-check bug 1531074 - fix a deref after a null check in seckey_setpublicvalue bug 1517714 - properly handle esni with hrr bug 1529813 - expose hkdf-expand-label with mechanism bug 1535122 - align tls 1.3 hkdf trace levels bug 1530102 - use getentropy on compatible versions of freebsd.
NSS 3.44 release notes
ogus.com) 1538479 - post-handshake messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to nspr 1543545 - allow to build nss as a static library 1487597 - early data that arrives before the handshake completes can be read afterwards 1548398 - freebl_gtest not building on linux/mac 1548722 - fix some coverity warnings 1540652 - softoken/sdb.c: logically dead code 1549413 - android log lib is not included in build 1537...
NSS 3.45 release notes
bug 1550579 - replace arm32 curve25519 implementation with one from fiat-crypto bug 1551129 - support static linking on windows bug 1552262 - expose a function pk11_findrawcertswithsubject for finding certificates with a given subject on a given slot bug 1546229 - add ipsec ike support to softoken bug 1554616 - add support for the elbrus lcc compiler (<=1.23) bug 1543874 - expose an external clock for ssl this adds new experimental functions: ssl_settimefunc, ssl_createantireplaycontext, ssl_setantireplaycontext, and ssl_releaseantir...
NSS Sample Code Sample1
the example here shows how to create a permanent (token) // rsa key for this purpose.
NSS Sample Code sample4
for example purposes, this function hardcodes the password.
NSS Sample Code sample6
for example purposes, this function hardcodes the password.
nss tech note1
the following is not an attempt to explain asn.1 tags or their purposes.
NSS PKCS11 Functions
the third parameter to the password callback function is application-defined and can be used for any purpose.
FIPS mode of operation
general-purpose functions fc_getfunctionlist fc_initialize fc_finalize fc_getinfo slot and token management functions fc_getslotlist fc_getslotinfo fc_gettokeninfo fc_waitforslotevent fc_getmechanismlist fc_getmechanisminfo fc_inittoken fc_initpin fc_setpin session management functions fc_opensession fc_closesession fc_closeallsessions fc_getsessioninfo fc_getoperationstate fc_setoperationstate fc_login fc_logout object management functions these functions manage certificates and keys.
NSS tools : certutil
validation can also be used to ensure that the certificate is only used for the purposes it was initially issued for.
NSS tools : modutil
the purpose of %temp% is to hold executable files (such as setup programs) or files that are used by these programs.
NSS reference
the proposed chapters below are based on the chapters of the ssl reference and the categories of functions in nss public functions.
pkfnc.html
the third parameter to the password callback function is application-defined and can be used for any purpose.
sslintro.html
other apis that may be exposed in the header files are not supported for application use.
NSS Tools certutil
if a ca key pair is not available, you can create a self-signed certificate (for purposes of illustration) with the -x argument.
NSS Tools modutil
the purpose of "%temp%" is to hold executable files (such as setup programs) or files that are used by these programs.
certutil
validation can also be used to ensure that the certificate is only used for the purposes it was initially issued for.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
the purpose of %temp% is to hold executable files (such as setup programs) or files that are used by these programs.
Pork Tool Development
for terminology, suppose "my_foo" --> "foo".
Rhino JavaScript compiler
the string packagename must be composed of valid identifier characters optionally separated by periods.
Rhino license
* * this software is provided by the copyright holders and contributors "as * is" and any express or implied warranties, including, but not limited to, * the implied warranties of merchantability and fitness for a particular * purpose are disclaimed.
Rhino scopes and contexts
this is a large topic in itself, but for our purposes it gives us an easy way to share a set of read-only variables across multiple scopes.
SpiderMonkey compartments
this invariant is very useful for security purposes.
FOSS
http://javalikescript.free.fr/ - a general-purpose javascript platform that aims to provide an extensible tooling framework http://www.synchro.net/ - a telnet/ssh bulletin board system (bbs) and internet server (http/smtp/ftp) with extra internet services written in javascript (irc, imap, gopher, and many more) https://github.com/mindbit/libjssql/wiki - a library that aims to provide a generic sql api for javascript that is as similar...
GCIntegration - SpiderMonkey Redirect 1
for the purposes of this article, a weak pointer is one that is not traced during gc.
Functions
suppose a function reads some variables from enclosing functions but is not algol-like.
Exact Stack Rooting
the purpose of js::mutablehandlet is to allow out-parameters for rooted gcthings.
Garbage collection
in other words, it is an updatable pointer to a gc thing (it is essentially a cell** that the gc knows about.) root a starting point to the gc graph traversal, a root is known to be alive for some external reason (one other than being reachable by some other part of the gc heap.) weak pointer in common cs terminology, a weak pointer is one that doesn't keep the pointed-to value live for gc purposes.
Invariants
the locking is going away regardless.) compartments suppose obj = js_getscopechain(cx) is not null.
Self-hosted builtins in SpiderMonkey
some general-purpose functions provided in this way are: the abstract operations toobject, tointeger, and iscallable specified in the ecmascript language specification.
SpiderMonkey Internals
this code is compiled in a special compilation mode that gives it access to functionality that's not normally exposed to js code, but that's required for safe and specification-conformant implementation of built-in functions.
JS::Add*Root
typically name is a static string constant, identifying the source location of the call to js::addnamed*root for debugging purposes.
JS::AutoVectorRooter
js::autoscriptvector autovectorrooter<jsscript *> see also mxr id search for js::autovectorrooter mxr id search for js::autovaluevector mxr id search for js::autoidvector mxr id search for js::autoobjectvector mxr id search for js::autofunctionvector mxr id search for js::autoscriptvector js::autovaluearray&lt;n&gt; - fixed-size array of js::value bug 677079 bug 868580 - expose js::autoobjectvector bug 848592 - added js::autofunctionvector bug 676281 - added js::autoscriptvector ...
JS::Value
spidermonkey 1.8.5 made jsval into a c struct and exposed it in c++ through the full-fledged js::value class.
JSClass.call
// suppose this object has jsclass.call and jsclass.construct hooks.
JSClass
le: /* spidermonkey 38 */ static jsclass robot_class = { "robot", /* name */ 0 /* flags */ }; /* spidermonkey 31 or older */ static jsclass robot_class = { "robot", /* name */ 0, /* flags */ js_propertystub, js_propertystub, js_propertystub, js_propertystub, js_enumeratestub, js_resolvestub, js_convertstub, null, jsclass_no_optional_members }; to expose this class to scripts, and to attach methods and properties to it, use js_initclass.
JSExtendedClass.wrappedObject
a wrapper object that wraps an array is considered an array for the purpose of array.prototype.concat and array.concat (which treat array arguments differently from other arguments, per ecma 262-3 §15.4.4.4).
JSNewEnumerateOp
jsenumerate_init_all used identically to jsenumerate_init, but exposes all properties of the object regardless of enumerability.
JSNewResolveOp
jsresolve_detecting obsolete since jsapi 20 the property is being used in code like "if (o.p)...", or a similar idiom where the apparent purpose of the property access is to detect whether the property exists.
JSObjectOps.dropProperty
a single, built-in jsobjectops implementation is used for most spidermonkey objects that are exposed to scripts.
JSPrincipalsTranscoder
each script function is associated with principals, which poses a problem for xdr.
JSPropertyOp
this is typically the value of the left-hand side after assignment, as opposed to the value of the right-hand side, as required by ecma 262-3 §11.13.
JSVAL_IS_GCTHING
this macro exposes javascript engine implementation details and usually isn't what the application really means.
JSVAL_TO_GCTHING
this macro is exposed in jsapi.h because other jsapi macros make use of it.
JS_Add*Root
typically name is a static string constant, identifying the source location of the call to js_addnamedroot for debugging purposes.
JS_CompareStrings
this function imposes a total order on all javascript strings, the same order imposed by the javascript string comparison operators (<, <=, >, >=), as described in ecma 262-3 § 11.8.5.
JS_ConvertArguments
(the purpose is to ensure gc safety.) format const char * null-terminated string describing the types of the out parameters and how to convert the values in argv.
JS_DefineOwnProperty
descriptor is supposed to be a property descriptor, this means you need to create an object with properties such as value, writable, get or set.
JS_GetCompartmentPrivate
description each jscompartment has a field of type void * which the application may use for any purpose.
JS_GetContextPrivate
description each jscontext has two fields of type void * which the application may use for any purpose.
JS_GetGlobalObject
the context's global object field serves two purposes.
JS_GetRuntimePrivate
description each jsruntime has a field of type void * which the application may use for any purpose.
JS_NewScriptObject
so a script object can be used to expose a jsscript to javascript code, but the code can't do much of anything with it.
JS_SetGCZeal
description js_setgczeal sets the level of additional garbage collection to perform for a runtime, for the purpose of finding or reproducing bugs.
JS_SetPrivate
description if a jsclass has the jsclass_has_private flag, each object of that class has a private field of type void * which the application may use for any purpose.
JS_SetPropertyAttributes
it is the bitwise or of zero or more of the following values: flag purpose jsprop_enumerate property is visible in for and in loops.
Stored value
stored values are strong references for the purpose of garbage collection.
JSDBGAPI
js_connectshark js_disconnectshark js_startchudremote js_stopchudremote the following jsnative functions can be used to expose the above four apis to scripts.
SpiderMonkey 45
1216819) js::getsavedframeline (bug 1216819) js::getsavedframecolumn (bug 1216819) js::getsavedframefunctiondisplayname (bug 1216819) js::getsavedframeasynccause (bug 1216819) js::getsavedframeasyncparent (bug 1216819) js::getsavedframeparent (bug 1216819) js::buildstackstring (bug 1133191) js::flushperformancemonitoring (bug 1181175) js::resetperformancemonitoring (bug 1181175) js::disposeperformancemonitoring (bug 1208747) js::setstopwatchismonitoringcpow (bug 1156264) js::getstopwatchismonitoringcpow (bug 1156264) js::setstopwatchismonitoringjank (bug 1156264) js::getstopwatchismonitoringjank (bug 1156264) js::isstopwatchactive (bug 674779) js::getperfmonitoringtestcpurescheduling (bug 1181175) js::addcpowperformancedelta (bug 1181175) js::setstopwatchstartcallback (bug 1...
Shell global objects
the absence of a principal is treated as if its bits were 0xffff, for subsumption purposes.
Exploitable crashes
do this before making comments or taking actions that expose exploitability publicly.
Signing Mozilla apps for Mac OS X
while testing and debugging for test and debug purposes, the easiest way to get a signing certificate is to use apple's keychain feature to create one.
Gecko events
changes to text that is exposed through the iaccessibletext and iaccessibleeditabletext interfaces.
Gecko states
state_selfvoicing the object or child uses text-to-speech (tts) technology for description purposes.
Implementation Details
cific pages to get information of supported relations for interested at api: gecko msaa ia2 at-spi attributes object attributes refer to specific pages to get information of supported object attributes for interested at api: gecko msaa ia2 at-spi text attributes refer to specific pages to get information of supported text attributes for interested at api: gecko msaa - doesn't have a way to expose text attributes, use ia2 ia2 at-spi document attributes refer to specific pages to get information of supported document attributes for interested at api: gecko/msaa/ia2 - document attributes are not exposed.
XForms Accessibility
in general, when elements are similar to html elements, they are exposed to msaa/atk in a similar way.
XUL Accessibility
<description value="it's label for control" control="control" /> <hbox role="grouping" id="control" /> get tooltiptext attribute value if the aria role is used and it allows to have accessible value then aria-valuetext or aria-valuenow are used if the element is xlink then value is generated from link location actions if the element is xlink then jump action is exposed if the element has registered click event handler then click action is exposed xul elements notification used to display an informative message.
Places utilities for JavaScript
these are: qi_node qi_node(anode, aiid) runs a query interface on a bookmark node to expose the interface available to that type.
Preferences API
interfaces the preferences api is exposed as a set of xpcom components and interfaces: nsiprefservice, nsiprefbranch.
Accessing the Windows Registry Using XPCOM
the functionality is exposed in the nsiwindowsshellservice interface.
XPCOM changes in Gecko 2.0
this was necessary in order to ensure that any components that should no longer be available are disposed of properly, and to re-register everything, loading any new components that may be needed.
Component Internals
the main purpose of the api at this point is to change which components directory xpcom searches when it looks for xpcom components.
Setting up the Gecko SDK
i used a different firefox profile for testing purposes called extensions.
Using XPCOM Components
xul is just one way to expose the functionality of the cookiemanager component-but it's a particularly useful one in the mozilla world.
Making cross-thread calls using runnables
#include "nsthreadutils.h" class piresulttask : public nsrunnable { public: piresulttask(picallback callback, const nsacstring& result) : mcallback(callback) , mresult(result) , mworkerthread(do_getcurrentthread()) { moz_assert(!ns_ismainthread()); // this should be running on the worker thread } ns_imethod run() { moz_assert(ns_ismainthread()); // this method is supposed to run on the main thread!
XPCOM hashtable guide
floats - nsdatahashtable<nsuint32hashkey, float> a hashtable that maps nsisupports pointers to reference counted cacheentrys - nsrefptrhashtable<nsisupportshashkey, cacheentry> a hashtable that maps jscontext pointers to a contextinfo struct - nsclasshashtable<nsptrhashkey<jscontext>, contextinfo> a hashset of strings - nsthashtable<nsstringhashkey> hashtable api the hashtable classes all expose the same basic api.
Interfacing with the XPCOM cycle collector
for example, suppose your class nsfoo has field msomeobj: private: ...
Components.classes
"] .createinstance(components.interfaces.nsisupportsarray); which is a shortcut to var obj = components.classes["@mozilla.org/supports-array;1"] .createinstance(); obj.queryinterface(components.interfaces.nsisupportsarray); if you don't provide a specific interface to createinstance(), it will return an xpconnect wrapper for the component, which only exposes the methods of the nsisupports interface (and under certain circumstances the special wrappedjsobject property).
Components.stack
this can be used for various diagnostic purposes.
Components.utils.cloneInto
suppose the page script defines a function like this: // page script function foo(greeting) { console.log("they said: " + greeting.message); } the add-on script can define an object, clone it, and pass it into this function: // add-on script var addonscriptobject = {"message" : "hello from add-on"}; contentwindow.foo(cloneinto(addonscriptobject, contentwindow)); // "they said: hello from add-on" cl...
Components.utils
serves the same purpose as xpcnativewrapper.
Components.utils.unwaiveXrays
example suppose a page script adds an expando to its global window: // page script foo = "i'm an expando"; by default, chrome code won't see foo, because it sees the content window with xray vision, but the chrome code can waive xray protection.
Components.utils.waiveXrays
example suppose a page script adds an expando to its global window: // page script foo = "i'm an expando"; by default, chrome code won't see foo, because it sees the content window with xray vision, but the chrome code can waive xray protection: // chrome code // contentwindow is an xray var isxray = components.utils.isxraywrapper(gbrowser.contentwindow); // true // expandos are not visible in xrays var foo...
Components object
serves the same purpose as xpcnativewrapper.
Observer Notifications
for example, suppose you've loaded a frame script into a tab using a browser message manager, and the user closes the tab.
nsACString
« xpcom api reference summary the nsacstring abstract class represents a character string composed of single-byte storage units.
nsAString
« xpcom api reference summary the nsastring abstract class represents a character string composed of double-byte storage units.
nsSupportsWeakReference
}; remarks in addition to inheriting from this class, you will need to ensure that your nsisupports::queryinterface implementation exposes nsisupportsweakreference as a supported interface.
IAccessibleAction
an at such as an on screen keyboard might not expose these bindings but provide alternative means of activation.
IAccessibleHyperlink
startindex() and endindex() are indices with respect to the text exposed by iaccessibletext.
imgIEncoder
dispose=[none|background|previous] -- default: "none" what to do with the image's canvas before rendering the next frame.
mozIPlacesAutoComplete
toolkit/components/places/public/moziplacesautocomplete.idlscriptable this interface provides some constants used by the places autocomplete search provider as well as methods to track opened pages for autocomplete purposes.
mozIStorageAsyncStatement
(mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread.
mozIStorageStatementParams
for example, say you create a statement like so: var statement = dbconn.createstatement("select * from table_name where id = :item_id"); this object would have one property, item_id, that you can use to bind a value to that named parameter like so: statement.params.item_id = 2; for more details on why you should bind parameters as opposed to hard-coding them into your statement, please see the overview document about binding parameters.
nsIAbCard
converttobase64encodedxml() string converttobase64encodedxml() return value converttoxmlprintdata() astring converttoxmlprintdata() return value converttoescapedvcard() string converttoescapedvcard() return value generatename() generate a name from the card for display purposes.
nsIAccessNode
uniqueid voidptr a unique id calculated for this dom node, for the purposes of caching and referencing this object.
nsIAccessible
attributes many accessibles exposes attributes to provide more details that cannot be fit into existing api methods, please refer to attributes documentation for more information.
nsIAccessibleHyperText
accessible/public/nsiaccessiblehypertext.idlscriptable this interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other documents.
nsIAccessibleStates
state_selfvoicing 0x00080000 the object or child uses text-to-speech (tts) technology for description purposes.
nsIAuthPrompt
netwerk/base/public/nsiauthprompt.idlscriptable this interface allows the networking layer to pose a user/password prompt to obtain the values needed for authentication.
nsIChannel
in earlier versions callers could get the "content-length" property as 64-bit value by queryinterfacing the channel to nsipropertybag2, if that interface is exposed by the channel.
nsICommandLineHandler
example: category entry value command-line-handler b-jsdebug @mozilla.org/venkman/clh;1 command-line-handler c-extensions @mozilla.org/extension-manager/clh;1 command-line-handler m-edit @mozilla.org/composer/clh;1 command-line-handler m-irc @mozilla.org/chatzilla/clh;1 command-line-handler y-final @mozilla.org/browser/clh-final;1 method overview void handle(in nsicommandline acommandline); attributes attribute type description helpinfo autf8string when the a...
nsICurrentCharsetListener
to create an instance, use: var currentcharsetlistener = components.classes["@mozilla.org/intl/currentcharsetlistener;1"] .createinstance(components.interfaces.nsicurrentcharsetlistener); method overview void setcurrentcharset(in wstring charset); void setcurrentcomposercharset(in wstring charset); void setcurrentmailcharset(in wstring charset); methods setcurrentcharset() void setcurrentcharset( in wstring charset ); parameters charset setcurrentcomposercharset() void setcurrentcomposercharset( in wstring charset ); parameters charset setcurrentmailcharset() void setcurrentmailcharset( in wstring charset ); parameters charset ...
nsIDOMJSWindow
page composed by sebastian gurin <sgurin@(nospam)montevideo.com.uy ...
nsIDOMParser
supposedly, if you want to create objects that some particular set of unprivileged code will be able to access (see discussion in bug 565480).
nsIDOMWindowUtils
the displayport will be used as the window's visible region for the purposes of invalidation and painting.
nsIFaviconService
this should be determined via privatebrowsingutils.iswindowprivate(somerelatedwindow) if the favicon may expose the user's private browsing data by performing a network request, otherwise favicon_load_non_private may be used.
nsIGlobalHistory3
implementations should generally add the uri for aoldchannel to history for link coloring, but are advised not to expose it in the history user interface.
nsIHttpChannelInternal
using features exposed by this interface is not recommended, as it will change in unpredictable ways.
nsIIDNService
the resulting string is useful for display purposes, and ensures that the encoding is consistent with nsiuri.gethost().
nsIJSON
to create an instance, use: var nativejson = components.classes["@mozilla.org/dom/json;1"] .createinstance(components.interfaces.nsijson); method overview note: the idl file has portions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue.
nsIJetpack
individual lines of the form //@line 1 "foo.js" can be used to specify filename and line number information for debugging purposes.
nsILoginManager
it should not be used for any other purpose.
nsILoginManagerCrypto
it is not recommended for general purpose encryption/decryption.
nsIMessageListener
objects an object whose properties are any cross process object wrappers exposed by the sender as the third argument to the message-sending function.
nsIMessageWakeupService
currently, services must expose a wrappedjsobject in order to support this; however, once bug 593407 is fixed, the service to be woken up must implement nsiframemessagelistener.
nsIMsgCompFields
void convertbodytoplaintext ( ); attachment handling methods void addattachment ( in nsimsgattachment attachment ); void removeattachment ( in nsimsgattachment attachment ); void removeattachments ( ); header methods void setheader(char* name, char* value); references this interface is the type of the following properties: nsimsgcompose.compfields, nsimsgcomposeparams.composefields this interface is passed as an argument to the following methods: nsimsgcomposesecure.begincryptoencapsulation, nsimsgcomposesecure.requirescryptoencapsulation, nsimsgsend.createandsendmessage, nsimsgsend.sendmessagefile, nsismimejshelper.getnocertaddresses, nsismimejshelper.getrecipientcertsinfo ...
nsIMsgHeaderParser
removealiasestome allows the address parser to use the preference which contains regular expressions which also mean 'me' for the purpose of stripping the user's email address(es) out of addrs string removeduplicateaddresses( in string addrs, in string other_addrs, in prbool removealiasestome ); parameters addrs the addresses to remove duplicates from.
nsIMsgProtocolInfo
showcomposemsglink boolean true if compose ui actions should be enabled for the account type.
nsINavHistoryQueryOptions
this is because sorting by title requires us to sort after using locale-sensetive sorting (as opposed to letting the database do it for us).
Component; nsIPrefBranch
these cycles generally occur because an object both registers itself as an observer (causing the branch to hold a reference to the observer) and holds a reference to the branch object for the purpose of getting/setting preference values.
nsIPrefBranch2
these cycles generally occur because an object both registers itself as an observer (causing the branch to hold a reference to the observer) and holds a reference to the branch object for the purpose of getting/setting preference values.
nsIProfileLock
localdirectory nsilocalfile a directory corresponding to the main profile directory, which exists for the purpose of storing data on the local filesystem, including cache files or other data files that may not represent critical user data.
nsIScriptError
that subclass offered the nsiscripterror.initwithwindowid() method for that purpose; that method is now available in this interface, however.
nsIStreamConverter
inherits from: nsistreamlistener last changed in gecko 1.7 suppose you had code that converted plain text into html.
nsISupportsPriority
xpcom/threads/nsisupportspriority.idlscriptable this interface exposes the general notion of a scheduled object with an integral priority value.
nsITaskbarWindowPreview
this interface's primary purpose is to let gecko applications take control over parts of the preview; however, certain parts of the preview are not controlled using this interface.
nsITelemetry
see also bug 649502 - expose histograms to js bug 585196 - telemetry infrastructure bug 668312 - report only probes defined in histograms.json bug 1069874 - add keyed histogram types bug 1426453 - documentation of nsitelemetry not up to date ...
nsITextInputProcessor
so, js-ime shouldn't continue to compose the string.
nsITransport
the name "transport" is meant to connote the inherent data transfer implied by this interface (that is, data is being transfered in some fashion via the streams exposed by this interface).
nsIURI
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) see the following rfcs for details: rfc3490: internationalizing domain names in applications (idna) rfc3986: uniform resource identifier (uri): generic syntax rfc3987: internationalized resource identifiers subclasses of nsiuri, such as nsiurl, impose further structure on the uri.
nsIURIFixup
methods createexposableuri() converts an internal uri (for example a wysiwyg uri) into one which we can expose to the user, for example on the url bar.
nsIURL
obsolete since gecko 9.0 note: this was removed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) because the semicolon is not actually valid for this purpose and should not have been specially handled.
nsIURLFormatter
toolkit/components/urlformatter/public/nsiurlformatter.idlscriptable this interface exposes methods to substitute variables in url formats.
nsIUploadChannel
history here is that we need to support both streams that already have headers (for example, content-type and content-length) information prepended to the stream (by plugins) as well as clients (composer, uploading application) that want to upload data streams without any knowledge of protocol specifications.
nsIWeakReference
do not hold on to the produced interface permanently; that would defeat the purpose of using a non-owning nsiweakreference in the first place.
nsIWebNavigationInfo
docshell/base/nsiwebnavigationinfo.idlscriptable exposes a way to get information on the capabilities of gecko web navigation objects.
nsIWebProgressListener
astate a value composed of the security state flags and the security strength flags listed above.
nsIWebSocketChannel
1000 close_normal normal closure; the connection successfully completed whatever purpose for which it was created.
nsIWinTaskbar
widget/public/nsiwintaskbar.idlscriptable represents a service that exposes the apis provided by the microsoft windows taskbar.
nsIWindowWatcher
note: this method may examine the javascript context stack for purposes of determining the security context to use for the search for a given window named aname.
nsIWindowsRegKey
key hkey this attribute exposes the native hkey and is available to provide c++ consumers with the flexibility of making other windows registry api calls that are not exposed via this interface.
nsIXULTemplateResult
other values may be used for application specific purposes.
nsIZipReader
to create an instance, use: var zipreader = components.classes["@mozilla.org/libjar/zip-reader;1"] .createinstance(components.interfaces.nsizipreader); about character sets and code pages note: nsizipreader has a code page problem; that is, in the zip specification, filenames are supposed to use 7-bit ascii; however, most modern filesystems use 8 bit code pages, such as utf-8.
nsIAbCard/Thunderbird3
an implementation may impose additional semantic constraints for certain properties.
Frequently Asked Questions
for debugging purposes you can write printf("%x\n", mynscomptr.get()); how do i...
Using the Gecko SDK
linking (link line, version script to only expose nsgetmodule, etc.) ...
Working with Multiple Versions of Interfaces
for expository purposes we will do this in two stages; buoyed by the fact that it is the actual route we took.
wrappedJSObject
suppose we register the component below with the @myself.com/my-component;1 contract.
XPIDL Syntax
MozillaTechXPIDLSyntax
purpose of this document this document is not an introduction to xpidl or idl in general.
xpidl
MozillaTechXPIDLxpidl
for testing purposes, or one-off interface compilation, xpidl can be run from the command line: usage: ./xpidl -m mode [-w] [-v] [-t version number] [-d filename.pp] [-i path] [-o basename | -e filename.ext] filename.idl -a emit annotations to typelib -w turn on warnings (recommended) -v verbose mode (nyi) -t create a typelib of a specific version number -i add entry to ...
Xray vision
for example: window.confirm() is a dom api that's supposed to ask the user to confirm an action, and return a boolean depending on whether they clicked "ok" or "cancel".
Creating a gloda message query
import gloda gloda's api is exposed in the "gloda" object that is contributed to your namespace.
Events
compose-send-message a message gets sent compose-window-close a compose window gets closed compose-window-init a compose window has been opened compose-window-reopen a cached compose window has been reopened.
LDAP Support
mail compose typedown in mail compose, when typing a partial mail address, a typedown window appears listing possible matches against address books and ldap directories.
MailNews fakeserver
there are added in alphabetical order, which may help for purposes that rely on article key orders.
The libmime module
pizzarro <rhp@netscape.com> this module, libmime, implements a general-purpose mime parser.
Thunderbird API documentation
activity manager address book sync client design buddy icons in mail composition composition back end in mail cached compose window faq filelink providers new!
Thunderbird Binaries
they should only be used for testing purposes.
Create Custom Column
the customdbheaders preference article provides information on a preference setting that exposes custom header data for use in a custom column within thunderbird's main view.
Using JS in Mozilla code
arraybuffer.transfer() proposed for es2016 no, nightly-only for now sharedarraybuffer, sharedint8array..., atomics proposed for es2016 no, nightly-only for now typedobject proposed for es2016 no, nightly-only for now simd proposed for es2016 no, nightly-only for now ...
Using Objective-C from js-ctypes
*/ // struct is seen here in docs: http://clang.llvm.org/docs/block-abi-apple.html var block_literal_1 = ctypes.structtype('block_literal_1', [ { isa: ctypes.voidptr_t }, { flags: ctypes.int32_t }, { reserved: ctypes.int32_t }, { invoke: ctypes.voidptr_t }, { descriptor: block_descriptor_1.ptr } ]); var block_const = { block_has_copy_dispose: 1 << 25, block_has_ctor: 1 << 26, block_is_global: 1 << 28, block_has_stret: 1 << 29, block_has_signature: 1 << 30 }; // based on work from here: https://github.com/trueinteractions/tint2/blob/f6ce18b16ada165b98b07869314dad1d7bee0252/modules/bridge/core.js#l370-l394 var bl = block_literal_1(); // set the class of the instance bl.isa = _nsconcreteglobalblock; // global flags bl.f...
Declaring types
primitive types primitive types are those types that represent a single value in memory, as opposed to arrays, structures, or functions.
Memory Management
it is usually best to expose a freeing function from the binary.
js-ctypes reference
these objects have two main purposes.
Memory - Plugins
for example, suppose that the plug-in calls newgworld, and that the call fails because of insufficient memory.
Plug-in Basics - Plugins
<param name="pluginspage" value="http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash"/> </object> </object> </object> </p></body> </html> the outermost object element defines the classid; the first nested object uses the type value application/x-shockwave-flash to load the adobe flash plug-in, and the innermost object exposes a download page for users that do not already have the necessary plug-in.
Scripting plugins - Plugins
how the dom handles scripting the mozilla dom code now checks if a plugin supports this new scriptability api and if it exposes a scriptable object through this new mechanism.
URLs - Plugins
to do this, use npn_posturlnotify for this purpose.
Debugger.Source - Firefox Developer Tools
for the purposes of these accessors, assignments to accessor properties are treated as function calls.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
(we will probably revise the allocation log to present such allocations in a way that is more informative, and that exposes less of firefox's internal structure.) as expected, the onclick handler is responsible for all allocation done by the page's own code.
Debugger-API - Firefox Developer Tools
(firefox’s builtin tools have a protocol defined for this purpose.) in gecko, the debugger api is available to chrome code only.
Debugger.Object - Firefox Developer Tools
a typical javascript embedding provides "host objects" to expose application-specific functionality to scripts.
Index - Firefox Developer Tools
3 accessibility inspector accessibility, accessibility inspector, devtools, guide, tools the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
All keyboard shortcuts - Firefox Developer Tools
from firefox 33 onwards, the key binding preference is exposed in the editor preferences section of the developer tools settings, and you can set it there instead of about:config.
Network monitor recording - Firefox Developer Tools
this is useful in situations where, for example, you are trying to get a stable view of a page for debugging purposes, but under normal circumstances the view keeps evolving due to persistent network requests.
Network request details - Firefox Developer Tools
the browser imposes a limit on the number of simultaneous connections that can be made to a single server.
Examine and edit HTML - Firefox Developer Tools
shadow roots any shadow roots present in the dom are exposed in the html page in the same manner as the regular dom.
Style Editor - Firefox Developer Tools
from firefox 33 onwards, the key binding preference is exposed in the editor preferences section of the developer tools settings, and you can set it there instead of about:config.
View Source - Firefox Developer Tools
tree builder errors relating to text (as opposed to tags, comments, or doctypes) aren't reported.
The JavaScript input interpreter - Firefox Developer Tools
(): you can pass the iframe dom element: var frame = document.getelementbyid("frame1"); cd(frame); you can pass a css selector that matches the iframe: cd("#frame1"); you can pass the iframe's global window object: var frame = document.getelementbyid("frame1"); cd(frame.contentwindow); to switch the context back to the top-level window, call cd() with no arguments: cd(); for example, suppose we have a document that embeds an iframe: <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <iframe id="frame1" src="static/frame/my-frame1.html"></iframe> </body> </html> the iframe defines a new function: <!doctype html> <html> <head> <meta charset="utf-8"> <script> function whoareyou() { return "i'm frame1"; } </script> </...
Web Console remoting - Firefox Developer Tools
the new networkeventupdate packet is sent for this purpose.
AnalyserNode.getByteFrequencyData() - Web APIs
the frequency data is composed of integers on a scale from 0 to 255.
Animation.pause() - Web APIs
WebAPIAnimationpause
var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // doesn't actually need to be eaten until a click event, so pause it initially: nommingcake.pause(); additionally, when resetting : // an all-purpose function to pause the animations on alice, the cupcake, and the bottle that reads "drink me." var stopplayingalice = function() { alicechange.pause(); nommingcake.pause(); drinking.pause(); }; // when the user releases the cupcake or the bottle, pause the animations.
Animation.timeline - Web APIs
a timeline is a source of time values for synchronization purposes, and is an animationtimeline-based object.
Attr.localName - Web APIs
WebAPIAttrlocalName
note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html attributes in html doms (as opposed to xhtml attributes in xml doms).
AuthenticatorAttestationResponse.attestationObject - Web APIs
note that in authenticatorassertionresponse, the authenticatordata is exposed as a property in a javascript object while in authenticatorattestationresponse, the authenticatordata is a property in a cbor map.
AuthenticatorAttestationResponse.getTransports() - Web APIs
the elements of this array are supposed to be in lexicographical order.
Background Tasks API - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
BaseAudioContext.createAnalyser() - Web APIs
the createanalyser() method of the baseaudiocontext interface creates an analysernode, which can be used to expose audio time and frequency data and create data visualisations.
BaseAudioContext - Web APIs
baseaudiocontext.createanalyser() creates an analysernode, which can be used to expose audio time and frequency data and for example to create data visualisations.
Blob - Web APIs
WebAPIBlob
click the link to see the decoded object url.</p> javascript the main piece of this code for example purposes is the typedarraytourl() function, which creates a blob from the given typed array and returns an object url for it.
Bluetooth.getDevices() - Web APIs
the getdevices() method of bluetooth interface of web bluetooth api exposes the bluetooth devices this origin is allowed to access.
Body - Web APIs
WebAPIBody
properties body.body read only a simple getter used to expose a readablestream of the body contents.
CSSVariableReferenceValue - Web APIs
this object functionality is sometimes called a "css variable" and serves the same purpose as the var() function.
Using the CSS Typed Object Model - Web APIs
the css typed object model api exposes css values as typed javascript objects to allow their performant manipulation.
Cache - Web APIs
WebAPICache
note that the cache interface is exposed to windowed scopes as well as workers.
CacheStorage - Web APIs
note: chrome and safari only expose `cachestorage` to the windowed context over https.
CanvasGradient - Web APIs
properties as an opaque object, there is no exposed property.
CanvasPattern - Web APIs
properties as an opaque object, this has no exposed property.
CanvasRenderingContext2D.globalAlpha - Web APIs
we begin by drawing a solid background composed of four differently colored squares.
Basic usage of canvas - Web APIs
the rendering context the <canvas> element creates a fixed-size drawing surface that exposes one or more rendering contexts, which are used to create and manipulate the content shown.
Drawing shapes with canvas - Web APIs
luckily, we have an assortment of path drawing functions which make it possible to compose very complex shapes.
Optimizing canvas - Web APIs
don’t scale images in drawimage cache various sizes of your images on an offscreen canvas when loading as opposed to constantly scaling them in drawimage().
Clipboard - Web APIs
WebAPIClipboard
the system clipboard is exposed through the global navigator.clipboard property.
CloseEvent - Web APIs
1000 normal closure normal closure; the connection successfully completed whatever purpose for which it was created.
CompositionEvent.data - Web APIs
syntax mydata = compositionevent.data value a domstring representing the event data: for compositionstart events, this is the currently selected text that will be replaced by the string being composed.
console - Web APIs
WebAPIConsole
it's exposed as window.console, and can be referenced as simply console.
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.
CredentialsContainer.get() - Web APIs
it can contain the following properties: password: a boolean indicating that returned credential instances should include user (as opposed to federated) credentials.
CredentialsContainer - Web APIs
the credentialscontainer interface of the the credential management api exposes methods to request credentials and notify the user agent when events such as successful sign in or sign out happen.
Crypto.getRandomValues() - Web APIs
the pseudo-random number generator algorithm (prng) may vary across user agents, but is suitable for cryptographic purposes.
DOMImplementation - Web APIs
this function is unreliable and kept for compatibility purpose alone: except for svg-related queries, it always returns true.
Binary strings - Web APIs
WebAPIDOMStringBinary
its purpose however is not to represent characters, but binary data.
DedicatedWorkerGlobalScope - Web APIs
this is mainly useful for debugging purposes.
Detecting device orientation - Web APIs
it is different from the deviceorientationevent because it is listening for changes in acceleration as opposed to orientation.
Document.execCommand() - Web APIs
when an html document has been switched to designmode, its document object exposes an execcommand method to run commands that manipulate the current editable region, such as form inputs or contenteditable elements.
Document.getElementById() - Web APIs
note that the id parameter is case-sensitive, so document.getelementbyid("main") will return null instead of the element <div id="main"> because "m" and "m" are different for the purposes of this method.
Document.requestStorageAccess() - Web APIs
grant the document access to cookies and other site storage and store that fact for the purposes of future calls to document.hasstorageaccess() and requeststorageaccess().
Document.visibilityState - Web APIs
'prerender' the page content is being prerendered and is not visible to the user (considered hidden for purposes of document.hidden).
Using the W3C DOM Level 1 Core - Web APIs
a simple example suppose the author wants to change the header of the above document and write two paragraphs instead of one.
DynamicsCompressorNode.reduction - Web APIs
intended for metering purposes, it returns a value in db, or 0 (no gain reduction) if no signal is fed into the dynamicscompressornode.
EXT_float_blend - Web APIs
this ensures that content written before ext_float_blend was exposed by webgl will function as expected.
EXT_sRGB - Web APIs
WebAPIEXT sRGB
constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods.
EXT_texture_filter_anisotropic - Web APIs
the ext_texture_filter_anisotropic extension is part of the webgl api and exposes two constants for anisotropic filtering (af).
EffectTiming.endDelay - Web APIs
for now, its main purpose is to represent the value of the svg min attribute.
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
px; padding-bottom: 4px; color: white; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } #text { width: 160px; padding: 10px; position: relative; text-align: center; align-self: center; color: white; font: bold 2em "lucida grande", "open sans", sans-serif; } while there's other css involved in this example, the part that really matters for our purposes is the css that styles the "box" element that we'll be animating.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
<div class="box"> <div><strong>log:</strong></div> <div class="log"></div> </div> the <div> with the class "box" is just a container for layout purposes, presenting the contents with a box around it.
Element.localName - Web APIs
WebAPIElementlocalName
the local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partner> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html elements in html doms (as opposed to xhtml elements in xml doms).
Element: msContentZoom event - Web APIs
zoomed elements can expose their zoom level through mscontentzoom (ie.
Element.msZoomTo() - Web APIs
WebAPIElementmsZoomTo
zoomed elements can expose their zoom level through mscontentzoom (ie.
Element.tabStop - Web APIs
WebAPIElementtabStop
this property was proposed to add tab functionality for custom elements.
Element - Web APIs
WebAPIElement
element.computedname read only returns a domstring containing the label exposed to accessibility.
Event() - Web APIs
WebAPIEventEvent
composed optional a boolean indicating whether the event will trigger listeners outside of a shadow root (see event.composed for more details).
Event.currentTarget - Web APIs
it always refers to the element to which the event handler has been attached, as opposed to event.target, which identifies the element on which the event occurred and which may be its descendant.
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); } ...
FederatedCredential - Web APIs
a federated identity provider is an entity that a website trusts to correctly authenticate a user, and that provides an api for that purpose.
Using Fetch - Web APIs
this is not exposed to the web, but it affects which mutation operations are allowed on the headers object.
Using files from web applications - Web APIs
in firefox, to have the pdf appear embedded in the iframe (rather than proposed as a downloaded file), the preference pdfjs.disabled must be set to false .
FileError - Web APIs
WebAPIFileError
use the flag only for testing purposes.
FileSystem.name - Web APIs
WebAPIFileSystemname
this usvstring is unique among all file systems currently exposed by the file and directory entries api.
FileSystem - Web APIs
this name is unique among the entire list of exposed file systems.
FileSystemDirectoryReader.readEntries() - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FileSystemDirectoryReader - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FileSystemEntry - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FileSystemEntrySync - Web APIs
it exposes a new url scheme—filesystem:—that you can use to fill src or href attributes.
FileSystemFileEntry - Web APIs
draft draft of proposed api browser compatibility the compatibility table on this page is generated from structured data.
FileSystemSync - Web APIs
the name must be unique across the list of exposed file systems.
File and Directory Entries API - Web APIs
metadata specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FormDataEvent() - Web APIs
composed: a boolean indicating whether the event will trigger listeners outside of a shadow root (see event.composed for more details).
Gamepad - Web APIs
WebAPIGamepad
experimental extensions to gamepad the following interfaces are defined in the gamepad extensions specification, and provide access to experimental features like haptic feedback and webvr controller pose information.
Using the Gamepad API - Web APIs
in firefox, gamepads are only exposed to a page when the user interacts with one with the page visible.
HTMLAnchorElement - Web APIs
the value represent the proposed name of the file.
HTMLAreaElement - Web APIs
the value represent the proposed name of the file.
msAudioCategory - Web APIs
msaudiocategory specifies the purpose of the audio or video media, such as background audio or alerts.
HTMLCanvasElement - Web APIs
the purpose of mozprintcallback is to obtain a higher resolution rendering of the canvas at the resolution of the printer being used.
HTMLCollection - Web APIs
usage in javascript htmlcollection also exposes its members directly as properties by both name and index.
HTMLDocument - Web APIs
cs/web/api/htmldocument" target="_top"><rect x="386" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="446" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldocument</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} for the purposes of web development, you can generally think of htmldocument as an alias for document, upon which htmldocument is based.
HTMLElement: beforeinput event - Web APIs
bubbles yes cancelable yes interface inputevent event handler property none sync / async sync composed yes default action update the dom element examples this example logs current value of the element immediately before replacing that value with the new one applied to the <input> element.
inert - Web APIs
WebAPIHTMLElementinert
according to the spec: when a node is inert, then the user agent must act as if the node was absent for the purposes of targeting user interaction events, may ignore the node for the purposes of text search user interfaces (commonly known as "find in page"), and may prevent the user from selecting text in that node.
HTMLElement - Web APIs
htmlelement.inert is a boolean indicating whether the user agent must act as though the given node is absent for the purposes of user interaction events, in-page text searches ("find in page"), and text selection.
HTMLImageElement.name - Web APIs
important: this property is deprecated and is only in the specification still for backward compatibility purposes.
HTMLKeygenElement - Web APIs
the <keygen> elements expose the htmlkeygenelement interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of keygen elements.
HTMLLIElement - Web APIs
the htmllielement interface exposes specific properties and methods (beyond those defined by regular htmlelement interface it also has available to it by inheritance) for manipulating list elements.
HTMLMediaElement.captureStream() - Web APIs
the stream can then be used for other purposes—like a source for streaming over webrtc, to allow sharing prerecorded videos with another person during a video call.
HTMLMediaElement.play() - Web APIs
exceptions the promise's rejection handler is called with an exception name passed in as its sole input parameter (as opposed to a traditional exception being thrown).
HTMLMeterElement - Web APIs
the html <meter> elements expose the htmlmeterelement interface, which provides special properties and methods (beyond the htmlelement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <meter> elements.
HTMLOrForeignElement.nonce - Web APIs
in later implementations, elements only expose their nonce attribute to scripts (and not to side-channels like css attribute selectors).
HTMLPreElement - Web APIs
the htmlpreelement interface exposes specific properties and methods (beyond those of the htmlelement interface it also has available to it by inheritance) for manipulating a block of preformatted text (<pre>).
HTMLTableElement - Web APIs
htmltableelement.summary is a domstring containing a description of the purpose or the structure of the table.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
the event loop, then, drives everything that happens in the browser as it pertains to the interaction with the user, but more importantly for our purposes here, it is responsible for the scheduling and execution of every piece of code that runs within its thread.
The HTML DOM API - Web APIs
html dom target audience the features exposed by the html dom are among the most commonly-used apis in the web developer's arsenal.
History.pushState() - Web APIs
WebAPIHistorypushState
because firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object.
Ajax navigation example - Web APIs
this is an example of an ajax website composed only of three pages (first_page.php, second_page.php and third_page.php).
History API - Web APIs
it exposes useful methods and properties that let you navigate back and forth through the user's history, and manipulate the contents of the history stack.
IdleDeadline.didTimeout - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
IdleDeadline.timeRemaining() - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
IdleDeadline - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
ImageBitmap - Web APIs
methods imagebitmap.close() disposes of all graphical resources associated with an imagebitmap.
Basic concepts - Web APIs
the security boundary imposed on indexeddb prevents applications from accessing data with a different origin.
Using IndexedDB - Web APIs
for example, suppose that you are using indexeddb to store a list of items that you allow the user to edit.
IntersectionObserver.IntersectionObserver() - Web APIs
rootmargin a string which specifies a set of offsets to add to the root's bounding_box when calculating intersections, effectively shrinking or growing the root for calculation purposes.
IntersectionObserver.root - Web APIs
syntax var root = intersectionobserver.root; value a element or document object whose bounding box is used as the bounds of the viewport for the purposes of determining how much of the target element is visible.
IntersectionObserver - Web APIs
intersectionobserver.rootmargin read only an offset rectangle applied to the root's bounding box when calculating intersections, effectively shrinking or growing the root for calculation purposes.
InterventionReportBody - Web APIs
this typically matches the message a browser will display in its devtools console when an intervention is imposed, if one is available.
KeyboardEvent.code - Web APIs
the keyboardevent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key).
LocalFileSystemSync - Web APIs
the global methods in the window object requestfilesystemsync() and resolvelocalfilesystemsyncurl() methods are exposed to the worker's global scope.
Location - Web APIs
WebAPILocation
examples // create anchor element and use href property for the purpose of this example // a more correct alternative is to browse to the url and use document.location or window.location var url = document.createelement('a'); url.href = 'https://developer.mozilla.org:8080/search?q=url#search-results-close-container'; console.log(url.href); // https://developer.mozilla.org:8080/search?q=url#search-results-close-container console.log(url.protocol); // https: cons...
LockManager.request() - Web APIs
in the indexeddb api, this is exposed as "readonly" and "readwrite" transactions which have the same semantics.
MediaDeviceInfo.groupId - Web APIs
this might be used to produce a user interface that gathers associated devices together for presentation purposes, or to make it easy for the user to choose to use the built-in camera and microphone on the same display at the same time.
MediaDevices - Web APIs
getdisplaymedia() prompts the user to select a display or portion of a display (such as a window) to capture as a mediastream for sharing or recording purposes.
MediaQueryList.addListener() - Web APIs
this is basically an alias for eventtarget.addeventlistener(), for backwards compatibility purposes.
MediaQueryList.onchange - Web APIs
the event object is a mediaquerylistevent instance, which is recognised as a medialistquery instance in older browsers, for backwards compatibility purposes.
MediaQueryList.removeListener() - Web APIs
this is basically an alias for eventtarget.removeeventlistener(), for backwards compatibility purposes — in older browsers you could use removeeventlistener() instead.
MediaStreamAudioSourceNode - Web APIs
track ordering for the purposes of the mediastreamtrackaudiosourcenode interface, the order of the audio tracks on the stream is determined by taking the tracks whose kind is audio, then sorting the tracks by their id property's values, in unicode code point order (essentially, in alphabetical or lexicographical order, for ids which are simple alphanumeric strings).
Recording a media element - Web APIs
not very pretty but it gets the job done for our purposes.
MediaTrackConstraints.displaySurface - Web APIs
this is used to specify the type or types of display surfaces which getdisplaymedia() will let the user select among for sharing purposes.
MediaTrackConstraints.latency - Web APIs
in most cases, low latency is desirable for performance and user experience purposes, but when power consumption is a concern, or delays are otherwise acceptable, higher latency might be acceptable.
MediaTrackSettings.groupId - Web APIs
however, it can be used to ensure that audio input and output are both being performed on the same headset, for example, or to ensure that the built-in camera and microphone on a phone are being used for video conferencing purposes.
MessagePort: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples suppose a script creates a messagechannel and sends one of the ports to a different browsing context, such as another <iframe>, using code like this: const channel = new messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const messagecontrol = document.queryselector('#message'); const channelmessagebutton = document.queryselector('#channel-message'); channelmessagebutton.addeventlistener('click', () => { myport.postmessage(messagecontrol.value); }) targetframe.postmessa...
MessagePort: messageerror event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessageerror examples suppose a script creates a messagechannel and sends one of the ports to a different browsing context, such as another <iframe>, using code like this: const channel = new messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const messagecontrol = document.queryselector('#message'); const channelmessagebutton = document.queryselector('#channel-message'); channelmessagebutton.addeventlistener('click', () => { myport.postmessage(messagecontrol.value); ...
Metadata - Web APIs
WebAPIMetadata
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
Microdata DOM API - Web APIs
microdata becomes even more useful when scripts can use it to expose information to the user, for example offering it in a form that can be used by other applications.
MouseEvent.clientX - Web APIs
the clientx read-only property of the mouseevent interface provides the horizontal coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
MouseEvent.clientY - Web APIs
the clienty read-only property of the mouseevent interface provides the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
MutationEvent - Web APIs
mutation observers are the proposed replacement for mutation events in dom4.
Navigator.battery - Web APIs
WebAPINavigatorbattery
the battery read-only property returns a batterymanager which provides information about the system's battery charge level and whether the device is charging and exposes events that fire when these parameters change.
Navigator.credentials - Web APIs
the credentials property of the navigator interface returns the credentialscontainer interface, which exposes methods to request credentials.
Navigator.getBattery() - Web APIs
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: securityerror the user agent does not expose battery information to insecure contexts and this method was called from insecure context.
Navigator.mediaCapabilities - Web APIs
the navigator.mediacapabilities read-only property returns a mediacapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities as defined by the media capabilities api.
NavigatorID.appCodeName - Web APIs
this property is kept only for compatibility purposes.
NavigatorID.appName - Web APIs
this property is kept only for compatibility purposes.
NavigatorID.product - Web APIs
this property is kept only for compatibility purposes.
NavigatorID.userAgent - Web APIs
the user agent string is built on a formal structure which can be decomposed into several pieces of info.
NavigatorPlugins.plugins - Web APIs
(var i = 0; i < pluginslength; i++) { let newrow = table.insertrow(); newrow.insertcell().textcontent = navigator.plugins[i].name; newrow.insertcell().textcontent = navigator.plugins[i].filename; newrow.insertcell().textcontent = navigator.plugins[i].description; newrow.insertcell().textcontent = navigator.plugins[i].version?navigator.plugins[i].version:""; } notes the plugin object exposes a small interface for getting information about the various plugins installed in your browser.
Node.localName - Web APIs
WebAPINodelocalName
he local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partners> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html elements in html doms (as opposed to xhtml elements in xml doms).
OES_standard_derivatives - Web APIs
constants this extension exposes one new constant, which can be used in the hint() and getparameter() methods.
OES_texture_float - Web APIs
the oes_texture_float extension is part of the webgl api and exposes floating-point pixel types for textures.
OVR_multiview2 - Web APIs
constants this extension exposes 4 constants that can be used in getparameter() or getframebufferattachmentparameter().
PaymentAddress.region - Web APIs
however, the address should still be acceptable to use for its intended purpose (e.g., to ship a product).
PaymentRequest - Web APIs
paymentrequest.shippingaddress read only secure context if requested via payment options, returns the shipping address chosen by the user for the purposes of calculating shipping.
PerformanceNavigationTiming - Web APIs
if there was no redirect, or if the redirect was from another origin, and that origin does not permit it's timing information to be exposed to the current origin then the value will be 0.
PerformanceObserverEntryList.getEntries() - Web APIs
this method is exposed to window and worker interfaces.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
this method is exposed to window and worker interfaces.
PerformanceObserverEntryList.getEntriesByType() - Web APIs
this method is exposed to window and worker interfaces.
PerformanceObserverEntryList - Web APIs
note: this interface is exposed to window and worker.
PushEvent.PushEvent() - Web APIs
note that the this constructor is exposed only to a service worker context.
RTCConfiguration.iceServers - Web APIs
the rtcconfiguration dictionary's iceservers property is an array of rtciceserver objects, each of which describes a single stun or turn server to use for negotiation purposes.
RTCDTMFSender - Web APIs
the primary purpose for webrtc's dtmf support is to allow webrtc-based communication clients to be connected to a public-switched telephone network (pstn) or other legacy telephone service, including extant voice over ip (voip) services.
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
this can be also useful for logging and debugging purposes.
RTCIceCandidate - Web APIs
when starting a webrtc peer connection, typically a number of candidates are proposed by each end of the connection, until they mutually agree upon one which describes the connection they decide will be best.
RTCIceCandidatePairStats - Web APIs
nominated optional a boolean value which, if true, indicates that the candidate pair described by this object is one which has been proposed for use, and will be (or was) used if its priority is the highest among the nominated candidate pairs.
RTCInboundRtpStreamStats.pliCount - Web APIs
however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues.
RTCOutboundRtpStreamStats.pliCount - Web APIs
however, the primary purpose of a pli packet is to allow the rtcrtpsender for which this rtcoutboundrtpstreamstats object provides statistics to consider techniques to mitigate network performance issues.
RTCPeerConnection.close() - Web APIs
all rtcrtpsender objects are considered to be stopped once this returns (they may still be in the process of stopping, but for all intents and purposes, they're stopped).
RTCPeerConnection.pendingLocalDescription - Web APIs
syntax sessiondescription = rtcpeerconnection.pendinglocaldescription; return value if a local description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
RTCPeerConnection.pendingRemoteDescription - Web APIs
syntax sessiondescription = rtcpeerconnection.pendingremotedescription; return value if a remote description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
RTCPeerConnection.setRemoteDescription() - Web APIs
answer); }) .then(function() { // send the answer to the remote peer using the signaling server }) .catch(handlegetusermediaerror); } after creating our rtcpeerconnection and saving it as mypeerconnection, we pass the description included in the received offer message, msg, directly into setremotedescription() to tell the user agent's webrtc layer what configuration the caller has proposed using.
RTCPeerConnection - Web APIs
ise, and should then be sent to the source of the offer to continue the negotiation process.createdatachannel() the createdatachannel() method on the rtcpeerconnection interface creates a new channel linked with the remote peer, over which any kind of data may be transmitted.createoffer()the createoffer() method of the rtcpeerconnection interface initiates the creation of an sdp offer for the purpose of starting a new webrtc connection to a remote peer.generatecertificate()the generatecertificate() method of the rtcpeerconnection interface creates and stores an x.509 certificate and corresponding private key then returns an rtccertificate, providing access to it.getconfiguration() the rtcpeerconnection.getconfiguration() method returns an rtcconfiguration object which indicates the current c...
RTCPeerConnectionIceErrorEvent.address - Web APIs
if the local ip address isn't exposed as part of a local candidate, the value of address is null.
RTCPeerConnectionIceErrorEvent - Web APIs
properties the rtcpeerconnectioniceerrorevent interface includes the properties found on the event interface, as well as the following properties: address read only a domstring providing the local ip address used to communicate with the stun or turn server being used to negotiate the connection, or null if the local ip address has not yet been exposed as part of a local ice candidate.
RTCRtpContributingSource.rtpTimestamp - Web APIs
this value may be useful for sequencing and synchronization purposes.
RTCRtpSender.replaceTrack() - Web APIs
examples switching video cameras // example to change video camera, suppose selected value saved into window.selectedcamera navigator.mediadevices .getusermedia({ video: { deviceid: { exact: window.selectedcamera } } }) .then(function(stream) { let videotrack = stream.getvideotracks()[0]; pcs.foreach(function(pc) { var sender = pc.getsenders().find(function(s) { return s.track.kind == videotrack.kind; }); ...
RTCRtpStreamStats.pliCount - Web APIs
however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues.
RTCRtpStreamStats - Web APIs
their primary purpose is to examine the error resiliency of the connection, as they provide information about lost packets, lost frames, and how heavily compressed the data is.
Reporting API - Web APIs
the reporting api's purpose is to provide a consistent reporting mechanism that can be used to make such information available to developers in the form of reports represented by javascript objects.
Request.destination - Web APIs
the destination is used by the user agent to, for example, help determine which set of rules to follow for cors purposes, or how to navigate any complicated code paths that affect how specific types of request get handled.
Request.mode - Web APIs
WebAPIRequestmode
only a limited set of headers are exposed in the response, but the body is readable.
Request - Web APIs
WebAPIRequest
request implements body, so it also inherits the following properties: body read only a simple getter used to expose a readablestream of the body contents.
Response.error() - Web APIs
WebAPIResponseerror
note: an "error" response never really gets exposed to script: such a response to a fetch() would reject the promise.
SVGAltGlyphElement - Web APIs
æ, ß, etc ), special-purpose fonts (e.g.
SVGAngle - Web APIs
WebAPISVGAngle
every svgangle object operates in one of two modes: reflect the base value of a reflected animatable attribute (being exposed through the baseval member of an svganimatedangle), be detached, which is the case for svgangle objects created with svgsvgelement.createsvgangle().
SVGGraphicsElement - Web APIs
the svggraphicselement interface represents svg elements whose primary purpose is to directly render graphics into a group.
SVGMatrix - Web APIs
WebAPISVGMatrix
many of svg's graphics operations utilize 2x3 matrices of the form: [a c e] [b d f] which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become: [a c e] [b d f] [0 0 1] an svgmatrix object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
Screen.availHeight - Web APIs
since screen is exposed on the window interface's window.screen property, you access availheight using window.screen.availheight.
Selection.selectionLanguageChange() - Web APIs
selection.selectionlanguagechange() method is a gecko/firefox internal method that was exposed to web pages until firefox 29.
Sensor APIs - Web APIs
the sensor apis are a set of interfaces built to a common design that expose device sensors in a consistent way to the web platform.
ServiceWorkerContainer - Web APIs
most importantly, it exposes the serviceworkercontainer.register() method used to register service workers, and the serviceworkercontainer.controller property used to determine whether or not the current page is actively controlled.
ServiceWorkerGlobalScope - Web APIs
the service worker can optionally send a response back via the messageport exposed in event.data.port, corresponding to the controlled page.
Using Service Workers - Web APIs
if you leave it out, it will default to this value anyway, but we specified it here for illustration purposes.
Service Worker API - Web APIs
for development purposes.
SharedWorkerGlobalScope - Web APIs
this is mainly useful for debugging purposes.
SpeechRecognitionEvent.emma - Web APIs
the exact contents can vary across user agents and recognition engines, but all supporting implementations will expose a valid xml document complete with an emma namespace.
StorageEstimate - Web APIs
these values are only estimates for several reasons, including both performance and preventing storage capacity data from being used for fingerprinting purposes.
Using readable streams - Web APIs
bytestreams will be covered separately in a future tutorial, as they are somewhat different in purpose and use case to regular (default) streams.
SubtleCrypto.deriveBits() - Web APIs
essentially derivekey() is composed of derivebits() followed by importkey().
SubtleCrypto.unwrapKey() - Web APIs
the inverse of unwrapkey() is subtlecrypto.wrapkey(): while unwrapkey is composed of decrypt + import, wrapkey is composed of encrypt + export.
SubtleCrypto.wrapKey() - Web APIs
the inverse of wrapkey() is subtlecrypto.unwrapkey(): while wrapkey is composed of export + encrypt, unwrapkey is composed of import + decrypt.
Text.wholeText - Web APIs
WebAPITextwholeText
syntax str = textnode.wholetext; notes and example suppose you have the following simple paragraph within your webpage (with some whitespace added to aid formatting throughout the code samples here), whose dom node is stored in the variable para: <p>thru-hiking is great!
TextRange - Web APIs
WebAPITextRange
selection compatibility the document.selection object is the primary purpose of textrange.
TextTrack.mode - Web APIs
WebAPITextTrackmode
while the track's presence is exposed in the dom, the user agent is otherwise ignoring it.
TextTrack - Web APIs
WebAPITextTrack
texttrack.label read only a human-readable domstring which contains the text track's label, if one is present; otherwise, this is an empty string (""), in which case a custom label may need to be generated by your code using other attributes of the track, if the track's label needs to be exposed to the user.
TimeRanges - Web APIs
the timeranges interface is used to represent a set of time ranges, primarily for the purpose of tracking which portions of media have been buffered when loading it for use by the <audio> and <video> elements.
Touch events - Web APIs
alternatively, some frameworks have taken to refiring touch events as mouse events for this same purpose.
TrackEvent() - Web APIs
composed optional a boolean indicating whether or not the event will trigger listeners outside of a shadow root; see event.composed for more details.
sourceCapabilities - Web APIs
for example, many user agents allow a window to be resized with a mouse or a keyboard, but this detail is not exposed to the web platform in any way, and so the sourcecapabilities of a resize event will typically be null.
USBDevice.deviceClass - Web APIs
the deviceclass read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
USBDevice.deviceClass - Web APIs
the deviceclass read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
USBDevice.deviceProtocol - Web APIs
the deviceprotocol read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
USBDevice.deviceSubclass - Web APIs
the devicesubclass read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
WEBGL_debug_renderer_info - Web APIs
the webgl_debug_renderer_info extension is part of the webgl api and exposes two constants with information about the graphics driver for debugging purposes.
WEBGL_debug_shaders - Web APIs
the webgl_debug_shaders extension is part of the webgl api and exposes a method to debug shaders from privileged contexts.
WEBGL_lose_context - Web APIs
the webgl_lose_context extension is part of the webgl api and exposes functions to simulate losing and restoring a webglrenderingcontext.
WakeLock - Web APIs
WebAPIWakeLock
the system wake lock is exposed through the global navigator.wakelock property.
WebGLRenderingContext.bufferData() - Web APIs
usage a glenum specifying the intended usage pattern of the data store for optimization purposes.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
some vertex attribute indices may have predefined purposes, depending on the platform and/or the gpu.
WebGLShader - Web APIs
these example are for illustration purposes only.
Data in WebGL - Web APIs
WebAPIWebGL APIData
glsl data types <<document the basic types, vectors, etc; see data type (glsl) on the khronos webgl wiki>> glsl variables there are three kinds of "variable" or data storage available in glsl, each of which with its own purpose and use cases: attributes, varyings, and uniforms.
Matrix math for the web - Web APIs
transformation = rotate * translate * scale composing multiple transformations the function that we will be using to compose our matrices is multiplyarrayofmatrices(), which is part of the set of utility functions introduced near the top of this article.
Getting started with WebGL - Web APIs
its purpose is to set up the webgl context and start rendering content.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
this lets webrtc know what the proposed configuration of the other peer is.
WebRTC API - Web APIs
webrtc concepts and usage webrtc serves multiple purposes; together with the media capture and streams api, they provide powerful multimedia capabilities to the web, including support for audio and video conferencing, file exchange, screen sharing, identity management, and interfacing with legacy telephone systems including support for sending dtmf (touch-tone dialing) signals.
Writing a WebSocket server in C# - Web APIs
for our purposes, we'll just build a simple response.
WebXR application life cycle - Web APIs
if your scene is complex, you should consider creating a worker—or using one that you've previously created for this purpose—to perform the computations needed for each frame to be rendered.
Starting up and shutting down a WebXR session - Web APIs
start rendering the scene referencespace = await worlddata.session.requestreferencespace("unbounded"); worlddata.referencespace = referencespace.getoffsetreferencespace( new xrrigidtransform(worlddata.playerspawnposition, worlddata.playerspawnorientation)); worlddata.animationframerequestid = worlddata.session.requestanimationframe(ondrawframe); return worlddata; } for the purposes of this example, an object named worlddata gets created to encapsulate data about the world and rendering environment.
Web Animations API Concepts - Web APIs
(see animating like you just don’t care with element.animate.) in some instances, it may negate the need for a fully fledged library entirely in the same way vanilla javascript can be used without jquery for many purposes.
Web Audio API best practices - Web APIs
if you have buttons that switch audio on and off, using the aria role="switch" attribute on them is a good option for signalling to assistive technology what the button's exact purpose is, and therefore making the app more accessible.
Migrating from webkitAudioContext - Web APIs
note that these bounds are not enforced by the engine, and are merely used for informational purposes.
Example and tutorial: Simple synth keyboard - Web APIs
function setup() { notefreq = createnotetable(); volumecontrol.addeventlistener("change", changevolume, false); mastergainnode = audiocontext.creategain(); mastergainnode.connect(audiocontext.destination); mastergainnode.gain.value = volumecontrol.value; // create the keys; skip any that are sharp or flat; for // our purposes we don't need them.
Web Authentication API - Web APIs
credentialscontainer exposes methods to request credentials and notify the user agent when events such as successful sign in or sign out happen.
Web NFC API - Web APIs
a message is composed of metadata and ndef records.
Using the Web Speech API - Web APIs
speechrecognition.onnomatch seems to be supposed to handle the first case mentioned, although note that at the moment it doesn't seem to fire correctly; it just returns whatever was recognised anyway: recognition.onnomatch = function(event) { diagnostic.textcontent = 'i didnt recognise that color.'; } speechrecognition.onerror handles cases where there is an actual error with the recognition successfully — the speechrecognitionerror.erro...
Functions and classes available to Web Workers - Web APIs
customevent the customevent interface represents events initialized by an application for any purpose.
window.cancelIdleCallback() - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
Window.console - Web APIs
WebAPIWindowconsole
these methods are intended for debugging purposes only and should not be relied on for presenting information to end users.
Window.crypto - Web APIs
WebAPIWindowcrypto
syntax var cryptoobj = window.crypto || window.mscrypto; // for ie 11 value an instance of the crypto interface, providing access to general-purpose cryptography and a strong random-number generator.
Window.getComputedStyle() - Web APIs
however, the two objects have different purposes: the object from getcomputedstyle is read-only, and should be used to inspect the element's style — including those set by a <style> element or an external stylesheet.
Window.getDefaultComputedStyle() - Web APIs
specifications proposed to the css working group.
Window.isSecureContext - Web APIs
syntax var issecure = window.issecurecontext examples feature detection you can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean which is exposed on the global scope.
Window: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples suppose a script sends a message to a different browsing context, such as another <iframe>, using code like this: const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const windowmessagebutton = document.queryselector('#window-message'); windowmessagebutton.addeventlistener('click', () => { targetframe.postmessage('hello there', targetorigin); }); the receiver can listen for the message using addeventlistener() with code like this: window.addeventlis...
Obsolete features - Web APIs
forcing fullscreen onto other users is also extremely unpopular and is considered an outright rude attempt to impose web author's viewing preferences onto users.
Window.performance - Web APIs
syntax performancedata = window.performance; value a performance object offering access to the performance and timing-related information offered by the apis it exposes.
window.postMessage() - Web APIs
the arguments passed to window.postmessage() (i.e., the “message”) are exposed to the receiving window through the event object.
window.requestIdleCallback() - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
Window - Web APIs
WebAPIWindow
a global variable, window, representing the window in which the script is running, is exposed to javascript code.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
if you want to work on it with browsers that natively do not support this feature, use one of the methods proposed above.
Worker() - Web APIs
WebAPIWorkerWorker
name: a domstring specifying an identifying name for the dedicatedworkerglobalscope representing the scope of the worker, which is mainly useful for debugging purposes.
WorkerGlobalScope.console - Web APIs
example this property allows you to have access to a browser console for debugging purposes, inside a worker.
WorkerGlobalScope - Web APIs
this change was made to stop close() being available on service workers, as it isn't supposed to be used there and always throws an exception when called (see bug 1336043).
XMLHttpRequest() - Web APIs
const request = new xmlhttprequest(paramsdictionary); parameters (non-standard) objparameters there are two flags you can set: mozanon boolean: setting this flag to true will cause the browser not to expose the origin and user credentials when fetching resources.
XRBoundedReferenceSpace.boundsGeometry - Web APIs
in order to reduce the risk of the room boundaries being used for fingerprinting purposes, each point in the boundsgeometry array may be rounded or adjusted by some amount.
XRInputSource.targetRayMode - Web APIs
function updateinputsources(session, frame, refspace) { for (let source of session.getinputsources()) { let targetraypose = frame.getpose(inputsource.targetrayspace, refspace); if (targetraypose) { if (source.targetraymode == "tracked-pointer") { myrendertargetrayasbeam(targetraypose); } } /* ...
XRInputSourceArray.entries() - Web APIs
specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceArray.forEach() - Web APIs
specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceArray.keys() - Web APIs
specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceArray.values() - Web APIs
specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceEvent() - Web APIs
xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
applymousemovement() should be called when drawing a frame, immediately before fetching the viewer's pose using getviewerpose(), and the rendering should be performed in this reference space.
XRReferenceSpace: reset event - Web APIs
handling discontinuities you can handle jumps in the viewer's position by watching the boolean xrpose property emulatedposition.
XRRigidTransform - Web APIs
the transform of an xrpose.
XRSession.onselect - Web APIs
xrsession.onselect = event => { let source = event.inputsource; if (source.handedness == user.handedness) { if (source.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(source.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose); } } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onselect' in that specification.
XRSession.onsqueezeend - Web APIs
xrsession.onsqueezeend = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace; if (user.heldobject) { cancelobjectdrag(user.heldobject); } } }; this code presumes that if the user actually intentionally completed the drag, user.heldobject will be null here.
XRSession.onsqueezestart - Web APIs
xrsession.onsqueezestart = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace; if (targetraypose) { user.heldobject = findobjectusingray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezestart' in that specification.
XRSpace - Web APIs
WebAPIXRSpace
numeric values such as pose positions are thus coordinates in the corresponding xrspace, relative to that space's origin.
XRTargetRayMode - Web APIs
function updateinputsources(session, frame, refspace) { for (let source of session.getinputsources()) { let targetraypose = frame.getpose(inputsource.targetrayspace, refspace); if (targetraypose) { if (source.targetraymode == "tracked-pointer") { myrendertargetrayasbeam(targetraypose); } } /* ...
XSLTProcessor - Web APIs
properties non-web-exposed properties the following properties are [chromeonly] and not exposed to web content: [chromeonly] attribute unsigned long xsltprocessor.flags flags that tweak the behavior of the processor.
Web APIs
WebAPI
venttarget xmlhttprequestresponsetype xmlserializer xpathevaluator xpathexception xpathexpression xpathnsresolver xpathresult xrboundedreferencespace xrenvironmentblendmode xreye xrframe xrframerequestcallback xrhandedness xrinputsource xrinputsourcearray xrinputsourceevent xrinputsourceeventinit xrinputsourceschangeevent xrinputsourceschangeeventinit xrpermissiondescriptor xrpermissionstatus xrpose xrreferencespace xrreferencespaceevent xrreferencespaceeventinit xrreferencespacetype xrrenderstate xrrenderstateinit xrrigidtransform xrsession xrsessionevent xrsessioneventinit xrsessioninit xrsessionmode xrspace xrsystem xrtargetraymode xrview xrviewerpose xrviewport xrvisibilitystate xrwebgllayer xrwebgllayerinit xsltprocessor ...
ARIA live regions - Accessibility
aria live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies.
ARIA Screen Reader Implementors Guide - Accessibility
here is how wai-aria live regions are exposed in firefox 3.
Using the alert role - Accessibility
possible effects on user agents and assistive technology when the alert role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having an alert role in the operating system's accessibility api.
Using the aria-label attribute - Accessibility
since there is nothing indicating that the purpose of the button is to close the dialog, the aria-label attribute is used to provide the label to any assistive technologies.
Using the article role - Accessibility
possible effects on user agents and assistive technology when the user navigates an element assigned the role of article, assistive technologies that typically intercept standard keyboard events should switch to document browsing mode, as opposed to passing keyboard events through to the web application.
Using the group role - Accessibility
possible effects on user agents and assistive technology when the group role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a group role in the operating system's accessibility api.
Using the link role - Accessibility
possible effects on user agents and assistive technology when the link role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a link role in the operating system's accessibility api.
Using the log role - Accessibility
possible effects on user agents and assistive technology when the log role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a log role in the operating system's accessibility api.
Using the presentation role - Accessibility
for example, a table used for layout purposes could have the presentation role applied to the table element to remove any semantic meaning from the table element and any of its table related children elements, such as table headers and table data elements.
Using the status role - Accessibility
possible effects on user agents and assistive technology when the status role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a status role in the operating system's accessibility api.
Using ARIA: Roles, states, and properties - Accessibility
addition of aria semantics only exposes extra information to a browser's accessibility api, and does not affect a page's dom.
ARIA: application role - Accessibility
aria-label used to provide the name of the application or purpose of the widget that is being exposed.
ARIA: Complementary role - Accessibility
this label will allow an assistive technology user to be able to quickly understand the purpose of each landmark.
ARIA: contentinfo role - Accessibility
this label will allow assitive technology users to quickly understand the purpose of each landmark.
ARIA: grid role - Accessibility
even though both data grids and layout grids employ the same aria roles, states, and properties, differences in their content and purpose surface factors that are important to consider in keyboard interaction design.
ARIA: List role - Accessibility
so, the li elements are not exposed to assistive technologies, but elements contained inside of those li elements, including nested lists, are visible to assistive technologies.
ARIA: Mark role - Accessibility
the mark landmark role semantically denotes html elements containing text that is marked/highlighted for reference purposes.
ARIA: search role - Accessibility
this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
ARIA: Suggestion role - Accessibility
the suggestion landmark role semantically denotes a single proposed change to an editable document.
ARIA: tab role - Accessibility
parent .queryselectorall('[role="tabpanel"]') .foreach(p => p.setattribute("hidden", true)); // show the selected panel grandparent.parentnode .queryselector(`#${target.getattribute("aria-controls")}`) .removeattribute("hidden"); } best practices it is recommended to use a button element with the role tab for their built-in functional and accessible features instead, as opposed to needing to add them yourself.
ARIA: heading role - Accessibility
the aria-level attribute, in addition, determines what level of heading is being exposed.
Web applications and ARIA FAQ - Accessibility
browsers expose aria-enabled elements to the assistive technology api as if they were native widgets.
Basic form hints - Accessibility
<button aria-describedby="descriptionrevert">revert</button> <div id="descriptionrevert">reverting will undo any changes that have been made since the last save.</div> note: the aria-describedby attribute is used for other purposes, in addition to form controls.
Keyboard-navigable JavaScript widgets - Accessibility
these widgets are typically composed of <div> and <span> elements that do not, by nature, offer the same keyboard functionality that their desktop counterparts do.
Web accessibility for seizures and physical reactions - Accessibility
because of this condition, their brain will produce seizure-like discharges when exposed to this type of visual stimulation gamma oscillations and photosensitive epilepsy current biology volume 27, issue 9, 8 may 2017, pages r336-r338 certain visual images, even in the absence of motion or flicker, can trigger seizures in patients with photosensitive epilepsy.
Robust - Accessibility
when using semantic elements correctly for their intended purpose, this criterion should be passed automatically.
Understandable - Accessibility
this is essential for purposes like making sure the reader has arrived at a page written in a language suitable for them.
Understanding the Web Content Accessibility Guidelines - Accessibility
this set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the w3c web content accessibility guidelines 2.0 or 2.1 (or just wcag, for the purposes of this writing).
-moz-image-rect - CSS: Cascading Style Sheets
these four segments are all contained within a larger <div> block whose primary purpose is to receive click events and dispatch them to our javascript code.
-moz-user-focus - CSS: Cascading Style Sheets
a similar property, user-focus, was proposed in early drafts of a predecessor of the css3 ui specification, but was rejected by the working group.
speak-as - CSS: Cascading Style Sheets
do not rely on it to convey information critical to understanding the page's purpose.
unicode-range - CSS: Cascading Style Sheets
description the purpose of this descriptor is to allow the font resources to be segmented so that a browser only needs to download the font resource needed for the text content of a particular page.
marks - CSS: Cascading Style Sheets
WebCSS@pagemarks
working draft initial definition this css property was initially proposed in css level 2, but was dropped from css level 2 (revision 1).
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
in the example below, a container with a single item inside has been turned into a flex container for the purpose of being able to use the alignment properties.
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
every box is composed of four parts (or areas), defined by their respective edges: the content edge, padding edge, border edge, and margin edge.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
our bigger item ends up bigger because it started from a bigger size, even though it has the same amount of spare space assigned to it as the others: if what you actually want is three equally-sized items, even if they start out at different sizes, you should use this: flex: 1 1 0; here we are saying that the size of the item for the purposes of our space distribution calculation is 0 — all the space is up for grabs and as all of the items have the same flex-grow factor, they each get an equal amount of space distributed.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
for the purposes of box generation and layout, the element must be treated as if it had been replaced with its children and pseudo-elements in the document tree.” this value of display controls box generation, and whether the element should generate a box that we can style and see on the page, or whether instead the box it would normally create should be removed and the child elements essentially moved up to...
Introduction to formatting contexts - CSS: Cascading Style Sheets
in addition, it is potentially not very readable for a future developer, as it may not be obvious why you used overflow for this purpose.
OpenType font features guide - CSS: Cascading Style Sheets
in addition to broad feature sets like ligatures or lining figures (numerals that line up evenly as opposed to 'oldstyle', which look more like lower-case letters), there are also very specific ones such as stylistic sets (which might include several specific variants of glyphs meant to be used together), alternates (which might be one or more variants of the letter 'a'), or even language-specific alterations for east asian languages.
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
this spec details how we can use these different writing modes in css, not just for the support of languages that have a different writing mode to english, but also for creative purposes.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
if you want gutters that act more like regular tracks you can of course define a track for the purpose instead.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
for the purposes of box generation and layout, the element must be treated as if it had been replaced with its children and pseudo-elements in the document tree.” if you set an item to display: contents the box it would normally create disappears, and the boxes of the child elements appear as if they have risen up a level.
Implementing image sprites in CSS - CSS: Cascading Style Sheets
implementation suppose an image is given to every item with class toolbtn: .toolbtn { background: url(myfile.png); display: inline-block; height: 20px; width: 20px; } a background position can be added either as two x, y values after the url()() in the background, or as background-position.
Consistent list indentation - CSS: Cascading Style Sheets
we can ignore <li> altogether for these purposes.
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
start and end as opposed to left and right/top and bottom.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
logical property purpose inset-inline sets both of the above inset values for the inline dimension simultaneously.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
property purpose border-block sets border-color, border-style, and border-width for both block borders.
Using CSS transitions - CSS: Cascading Style Sheets
you can control the individual components of the transition with the following sub-properties: (note that these transitions loop infinitely only for the purpose of our examples; css transitions only visualize a property change from start to finish.
CSS Writing Modes - CSS: Cascading Style Sheets
reference properties direction glyph-orientation-horizontal text-combine-upright text-orientation unicode-bidi writing-mode specifications specification status comment css writing modes module level 3 proposed recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
some browsers use actual style sheets for this purpose, while others simulate them in code, but the end result is the same.
Card - CSS: Cascading Style Sheets
the proposed subgrid feature of grid level 2 would give a solution to this issue.
Shorthand properties - CSS: Cascading Style Sheets
its purpose is to change the properties' inheritance model to one of: css provides four special universal property values for controlling inheritance.
align-content - CSS: Cascading Style Sheets
stretch if the combined size of the items along the cross axis is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container along the cross axis.
align-self - CSS: Cascading Style Sheets
stretch if the combined size of the items along the cross axis is less than the size of the alignment container and the item is auto-sized, its size is increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size of all auto-sized items exactly fills the alignment container along the cross axis.
all - CSS: Cascading Style Sheets
WebCSSall
for purposes of revert, the author origin includes the override and animation origins.
animation-name - CSS: Cascading Style Sheets
this identifier is composed of a combination of case-sensitive letters a to z, numbers 0 to 9, underscores (_), and/or dashes (-).
background-image - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
background-size - CSS: Cascading Style Sheets
in firefox 43, as opposed to chrome 52, an explicit background-size causes preserveaspectratio to be ignored.
background - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
border-image - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
notes the edge of the box designated the start for alignment purposes depends on the box's orientation: horizontal top vertical left the edge opposite to the start is designated the end.
box-direction - CSS: Cascading Style Sheets
notes the edge of the box designated the start for layout purposes depends on the box's orientation: horizontal left vertical top the edge opposite to the start is designated the end.
box-pack - CSS: Cascading Style Sheets
WebCSSbox-pack
notes the edge of the box designated the start for packing purposes depends on the box's orientation and direction: normal reverse horizontal left right vertical top bottom the edge opposite to the start is designated the end.
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
max() allows you set a minimum value, which in cases like this is useful for accessibility purposes.
color-adjust - CSS: Cascading Style Sheets
usage notes there are a number of reasons a browser might wish to deviate from the specified appearance, such as: the content uses text and background colors that will be too similar on the output device for legibility purposes.
<color> - CSS: Cascading Style Sheets
these system colors are exposed by the following keywords, which can be used to ensure that the rest of the page integrates well with the restricted palette.
conic-gradient() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
content - CSS: Cascading Style Sheets
WebCSScontent
if the content conveys information that is critical to understanding the page's purpose, it is better to include it in the main document.
cross-fade() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
direction - CSS: Cascading Style Sheets
WebCSSdirection
proposed recommendation no change.
<display-inside> - CSS: Cascading Style Sheets
these keywords are used as values of the display property, and can be used for legacy purposes as a single keyword, or as defined in the level 3 specification alongside a value from the <display-outside> keywords.
<display-outside> - CSS: Cascading Style Sheets
these keywords are used as values of the display property, and can be used for legacy purposes as a single keyword, or as defined in the level 3 specification alongside a value from the <display-inside> keywords.
flex - CSS: Cascading Style Sheets
WebCSSflex
description for most purposes, authors should set flex to one of the following values: auto, initial, none, or a positive unitless number.
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
in order to calculate the em equivalent for any pixel value required, you can use this formula: em = desired element pixel value / parent element font-size in pixels for example, suppose the font-size of the body of the page is set to 16px.
font-variant-alternates - CSS: Cascading Style Sheets
you can find a few free versions for testing purposes, for example from fontsgeek.com.
font-weight - CSS: Cascading Style Sheets
if a font-family has more weights available, they are ignored for the purposes of relative weight calculation.
grid-template - CSS: Cascading Style Sheets
use grid (as opposed to grid-template) to prevent these values from cascading in seperately.
image-rendering - CSS: Cascading Style Sheets
pixelated when scaling the image up, the nearest-neighbor algorithm must be used, so that the image appears to be composed of large pixels.
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
<image> - CSS: Cascading Style Sheets
WebCSSimage
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
image() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
during the css3 values cycle there was a lot of discussion about setting a minimum range to support: the latest decision, in april 2012 during the lc phase, was [-227-1; 227-1], but other values like 224-1 and 230-1 were also proposed.
justify-content - CSS: Cascading Style Sheets
stretch if the combined size of the items along the main axis is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container along the main axis.
justify-items - CSS: Cascading Style Sheets
stretch if the combined size of the items is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container.
justify-self - CSS: Cascading Style Sheets
stretch if the combined size of the items is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container.
place-content - CSS: Cascading Style Sheets
stretch if the combined size of the items is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container formal definition initial valuenormalapplies tomulti-line flex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'align-content'> <'justify-content'>?
place-items - CSS: Cascading Style Sheets
stretch if the combined size of the items is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container.
place-self - CSS: Cascading Style Sheets
stretch if the combined size of the items along the cross axis is less than the size of the alignment container and the item is auto-sized, its size is increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size of all auto-sized items exactly fills the alignment container along the cross axis.
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
for the purpose of finding the number of auto-repeated tracks, the user agent floors the track size to a user agent specified value (e.g., 1px), to avoid division by zero.
repeating-conic-gradient() - CSS: Cascading Style Sheets
if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
shape-image-threshold - CSS: Cascading Style Sheets
any pixels whose alpha component's value is greater than the threshold are considered to be part of the shape for the purposes of determining its boundaries.
<string> - CSS: Cascading Style Sheets
WebCSSstring
syntax the <string> data type is composed of any number of unicode characters surrounded by either double (") or single (') quotes.
text-combine-upright - CSS: Cascading Style Sheets
proposed recommendation initial definition ...
text-decoration-skip - CSS: Cascading Style Sheets
this only has an effect on decorations imposed by an ancestor; a decorating box never draws over its own box decoration.
<transform-function> - CSS: Cascading Style Sheets
thus, each coordinate changes based on the values in the matrix: ac bd xy = ax+cy bx+dy it is even possible to apply several transformations in a row: a1 c1 b1 d1 a2 c2 b2 d2 = a1 a2 + c1 b2 a1 c2 + c1 d2 b1 a2 + d1 b2 b1 c2 + d1 d2 with this notation, it is possible to describe, and therefore compose, most common transformations: rotations, scaling, or skewing.
unicode-bidi - CSS: Cascading Style Sheets
proposed recommendation added plaintext, isolate, and isolate-override keywords.
user-modify - CSS: Cascading Style Sheets
a similar property, user-focus, was proposed in early drafts of a predecessor of the css3 ui specification, but was rejected by the working group.
writing-mode - CSS: Cascading Style Sheets
proposed recommendation initial definition ...
Getting Started - Developer guides
httprequest = new xmlhttprequest(); } else if (window.activexobject) { // ie 6 and older httprequest = new activexobject("microsoft.xmlhttp"); } note: for illustration purposes, the above is a somewhat simplified version of the code to be used for creating an xmlhttp instance.
WAI ARIA Live Regions/API Support - Developer guides
firefox 3 contains important improvements to the way the mozilla engine exposes live changes in a document.
Audio and Video Delivery - Developer guides
other tips for audio/video stopping the download of media while stopping the playback of media is as easy as calling the element's pause() method, the browser keeps downloading the media until the media element is disposed of through garbage collection.
Block formatting context - Developer guides
in addition, it is potentially not readable for a future developer, as it might not be obvious why you used overflow for this purpose.
Challenge solutions - Developer guides
this page provides solutions to the challenges posed in the css getting started tutorial.
Creating and triggering events - Developer guides
such events are commonly called synthetic events, as opposed to the events fired by the browser itself.
Mutation events - Developer guides
mutation observers are the proposed replacement for mutation events in dom4.
Event developer guide - Developer guides
WebGuideEvents
such events are commonly called synthetic events, as opposed to the events fired by the browser itself.dom on-event handlersthe web platform provides several ways to get notified of dom events.
Content categories - Developer guides
form-associated content form-associated content comprises elements that have a form owner, exposed by a form attribute.
Rich-Text Editing in Mozilla - Developer guides
executing commands when an html document has been switched to designmode, the document object exposes the document.execcommand method which allows one to run commands to manipulate the contents of the editable region.
Constraint validation - Developer guides
all newlines are normalized to a single character (as opposed to crlf pairs) for <textarea>.
Localizations and character encodings - Developer guides
unfortunately, this means that the web-exposed functionality of firefox differs by locale and it is hard to read legacy content across locales with different fallback encodings.
Separate sites for mobile and desktop - Developer guides
for starters, you are now maintaining two different pages for every page on your site that you would like to expose to mobile users.
HTML attribute: pattern - HTML: Hypertext Markup Language
relying on the title attribute for the visual display of text content is generally discouraged as many user agents do not expose the attribute in an accessible manner.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
this protects users from having private data exposed by using images to pull information from remote web sites without permission.
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
usage notes it used to be the case that an <address> element was only supposed to be used to represent the contact information of the document's author.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
see this proposed specification for more information.
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
implicit aria role document permitted aria roles no role permitted dom interface htmlbodyelement the <body> element exposes the htmlbodyelement interface.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
however, it is worth noting that leaving the button text visually apparent can aid people who may not be familiar with the icon's meaning or understand the button's purpose.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
canvas content is not exposed to accessibility tools as semantic html is.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
the <ins> element can be used for the opposite purpose: to indicate text that has been added to the document.
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
this can be useful when using microdata, or when global attributes apply to a whole group, or for styling purposes.
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
text/plain: introduced by html5 for debugging purposes.
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
however, given that a key purpose of the <hgroup> element is to affect how headings are displayed by the outline algorithm defined in the html specification—but the html outline algorithm is not implemented in any browsers—then the <hgroup> semantics are in practice only theoretical.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
value the value attribute is one which all <input>s share; however, it serves a special purpose for inputs of type checkbox: when a form is submitted, only checkboxes which are currently checked are submitted to the server, and the reported value is the value of the value attribute.
<input type="datetime-local"> - HTML: Hypertext Markup Language
for example, the date.toisostring() method can be used for this purpose.
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
improving website security hidden inputs are also used to store and submit security tokens or secrets, for the purposes of improving website security.
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
note: it's crucial to remember that a user can tinker with your html behind the scenes, so your site must not use simple client-side validation for any security purposes.
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
value the value attribute is one which all <input>s share; however, it serves a special purpose for inputs of type radio: when a form is submitted, only radio buttons which are currently checked are submitted to the server, and the reported value is the value of the value attribute.
<input type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
adding a tooltip to the button (using the title attribute) can also help, although it's not a complete solution for accessibility purposes.
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
" id="mysearch" name="q" placeholder="search the site..."> <button>search</button> </div> </form> you can see how the placeholder is rendered below: search form labels and accessibility one problem with search forms is their accessibility; a common design practice is not to provide a label for the search field (although there might be a magnifying glass icon or similar), as the purpose of a search form is normally fairly obvious for sighted users due to placement (this example shows a typical pattern).
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
adding a tooltip to the button (using the title attribute) can also help, although it's not a complete solution for accessibility purposes.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
tional pre-defined autocomplete options max the latest time to accept, in the syntax described under time value format min the earliest time to accept as a valid input readonly a boolean attribute which, if present, indicates that the contents of the time input should not be user-editable step the stepping interval to use both for user interfaces purposes and during constraint validation unlike many data types, time values have a periodic domain, meaning that the values reach the highest possible value, then wrap back around to the beginning again.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
note: it's also crucial to remember that a user can tinker with your html behind the scenes, so your site must not use this validation for any security purposes.
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
the html <nav> element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents.
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
do not use the <section> element as a generic container; this is what <div> is for, especially when the sectioning is only for styling purposes.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
it is given an id attribute to enable it to be associated with a <label> for accessibility purposes, as well as a name attribute to represent the name of the associated data point submitted to the server.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
each string is composed of: one url specifying an image.
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
it can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang.
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
usage notes the <sub> element should be used only for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
usage notes the <sup> element should only be used for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
</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.
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
the above example demonstrates a number of features of <textarea>: an id attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes a name attribute to set the name of the associated data point submitted to the server when the form is submitted.
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
accessibility concerns it is important to provide a title value that describes the page's purpose.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
the element points to a source file containing timed text that the browser exposes when the user requests additional data.
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementtt
this element was created for the purpose of rendering text as it would be displayed on a fixed-width display such as a teletype, text-only screen, or line printer.
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
usage notes related elements other elements that are used in contexts in which <var> is commonly used include: <code>: the html code element <kbd>: the html keyboard input element <samp>: the html sample output element if you encounter code that is mistakenly using <var> for style purposes rather than semantic purposes, you should either use a <span> with appropriate css or, an appropriate semantic element among the following: <em> <i> <q> default style most browsers apply font-style to "italic" when rendering <var>.
accesskey - HTML: Hypertext Markup Language
because of these issues, it is generally advised not to use accesskeys for most general-purpose websites and web apps.
class - HTML: Hypertext Markup Language
though the specification doesn't put requirements on the name of classes, web developers are encouraged to use names that describe the semantic purpose of the element, rather than the presentation of the element.
id - HTML: Hypertext Markup Language
its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with css).
style - HTML: Hypertext Markup Language
this attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes.
x-ms-acceleratorkey - HTML: Hypertext Markup Language
x-ms-acceleratorkey exposes a notification in the accessibility tree, for screen readers and other assistive technologies, that an accelerator key exists for that element.
Microdata - HTML: Hypertext Markup Language
for some purposes, an ad-hoc vocabulary is adequate.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
other resource preloading mechanisms other preloading features exist, but none are quite as fit for purpose as <link rel="preload">: <link rel="prefetch"> has been supported in browsers for a long time, but it is intended for prefetching resources that will be used in the next navigation/page load (e.g.
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
in html5, the only purpose of the doctype is to activate full standards mode.
Data URLs - HTTP
syntax data urls are composed of four parts: a prefix (data:), a mime type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data> the mediatype is a mime type string, such as 'image/jpeg' for a jpeg image file.
Evolution of HTTP - HTTP
since 2005, the set of apis available to web pages greatly increased and several of these apis created extensions, mostly new specific http headers, to the http protocol for specific purposes: server-sent events, where the server can push occasional messages to the browser.
Identifying resources on the Web - HTTP
a url is composed of different parts, some mandatory and others are optional.
Reason: CORS request not HTTP - HTTP
resources in the same directory and its subdirectories were treated as having the same origin for purposes of the cors same-origin rule.
Compression in HTTP - HTTP
engineers designed the optimized compression algorithm used by file formats designed for this specific purpose.
Content negotiation - HTTP
over the years, other content negotiation proposals, like transparent content negotiation and the alternates header, have been proposed.
Cross-Origin Resource Policy (CORP) - HTTP
history the concept was originally proposed in 2012 (as from-origin), but resurrected in q2 of 2018 and implemented in safari and chromium.
Feature Policy - HTTP
this allows you to lock in best practices, even as the codebase evolves over time — as well as to more safely compose third-party content — by limiting which features are available.
Content-Disposition - HTTP
most browsers will propose to save it under the cool.html filename (by default).
Content-Encoding - HTTP
the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes.
ETag - HTTP
WebHTTPHeadersETag
etags are therefore similar to fingerprints, and might also be used for tracking purposes by some servers.
Forwarded - HTTP
this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
Server-Timing - HTTP
rver-timing: missedcache // single metric with value server-timing: cpu;dur=2.4 // single metric with description and value server-timing: cache;desc="cache read";dur=23.2 // two metrics with value server-timing: db;dur=53, app;dur=47.2 // server-timing as trailer trailer: server-timing --- response body --- server-timing: total;dur=123.4 privacy and security the server-timing header may expose potentially sensitive application and infrastructure information.
Server - HTTP
WebHTTPHeadersServer
however, exposed apache versions helped browsers work around a bug those versions had with content-encoding combined with range.
Set-Cookie - HTTP
browsers block frontend javascript code from accessing the set cookie header, as required by the fetch spec, which defines set-cookie as a forbidden response-header name that must be filtered out from any response exposed to frontend code.
Strict-Transport-Security - HTTP
now your private data is exposed to the hacker.
Transfer-Encoding - HTTP
the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes.
Vary - HTTP
WebHTTPHeadersVary
directives * each request for a url is supposed to be treated as a unique and uncacheable request.
X-Forwarded-For - HTTP
this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
X-Forwarded-Host - HTTP
this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
Link prefetching FAQ - HTTP
chrome uses "x-purpose: prefetch" or "purpose: prefetch" header.
POST - HTTP
WebHTTPMethodsPOST
ary="boundary" --boundary content-disposition: form-data; name="field1" value1 --boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifications specification title rfc 7231, section 4.3.3: post hypertext transfer protocol (http/1.1): semantics and content rfc 2046, section 5.1.1: common syntax multipurpose internet mail extensions (mime) part two: media types ...
An overview of HTTP - HTTP
WebHTTPOverview
clients and servers communicate by exchanging individual messages (as opposed to a stream of data).
308 Permanent Redirect - HTTP
WebHTTPStatus308
note: some web applications may use the 308 permanent redirect in a non-standard way and for other purposes.
HTTP response status codes - HTTP
WebHTTPStatus
304 not modified this is used for caching purposes.
A re-introduction to JavaScript (JS tutorial) - JavaScript
calling var bill = trivialnew(person, 'william', 'orange'); is therefore almost equivalent to var bill = new person('william', 'orange'); apply() has a sister function named call, which again lets you set this but takes an expanded argument list as opposed to an array.
Closures - JavaScript
for instance, suppose we want to add buttons to a page to adjust the text size.
JavaScript data types and data structures - JavaScript
keep in mind the only valuable purpose of typeof operator usage is checking the data type.
Equality comparisons and sameness - JavaScript
es2015 simply proposes to expose this algorithm through object.is.
Control flow and error handling - JavaScript
while it is common to throw numbers or strings as errors, it is frequently more effective to use one of the exception types specifically created for this purpose: ecmascript exceptions domexception and domerror throw statement use the throw statement to throw an exception.
Numbers and dates - JavaScript
these methods use integers to represent these values as follows: seconds and minutes: 0 to 59 hours: 0 to 23 day: 0 (sunday) to 6 (saturday) date: 1 to 31 (day of the month) months: 0 (january) to 11 (december) year: years since 1900 for example, suppose you define the following date: var xmas95 = new date('december 25, 1995'); then xmas95.getmonth() returns 11, and xmas95.getfullyear() returns 1995.
Regular expression syntax cheatsheet - JavaScript
for example, /e?le?/ matches the "el" in "angel" and the "le" in "angle." if used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times).
Quantifiers - JavaScript
for example, /e?le?/ matches the "el" in "angel" and the "le" in "angle." if used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times).
Regular expressions - JavaScript
writing a regular expression pattern a regular expression pattern is composed of simple characters, such as /abc/, or a combination of simple and special characters, such as /ab*c/ or /chapter (\d+)\.\d*/.
Inheritance and the prototype chain - JavaScript
all of the examples listed below create exactly the same resulting inst object (thus logging the same results to the console), except in different ways for the purpose of illustration.
JavaScript language resources - JavaScript
ascript 2019 language specification ecma-262 9th edition pdf, html, working draft, repository 2018 ecmascript 2018 language specification ecma-402 5th edition working draft, repository 2018 ecmascript 2018 internationalization api specification obsolete/historical editions ecma-262 pdf june 1997 ecmascript: a general purpose, cross-platform programming language.
Public class fields - JavaScript
both public and private field declarations are an experimental feature (stage 3) proposed at tc39, the javascript standards committee.
Classes - JavaScript
class rectangle { constructor(height, width) { this.height = height; this.width = width; } } static (class-side) data properties and prototype data properties must be defined outside of the classbody declaration: rectangle.staticwidth = 20; rectangle.prototype.prototypewidth = 25; field declarations public and private field declarations are an experimental feature (stage 3) proposed at tc39, the javascript standards committee.
TypeError: "x" is not a constructor - JavaScript
examples invalid cases var car = 1; new car(); // typeerror: car is not a constructor new math(); // typeerror: math is not a constructor new symbol(); // typeerror: symbol is not a constructor function* f() {}; var obj = new f; // typeerror: f is not a constructor a car constructor suppose you want to create an object type for cars.
Functions - JavaScript
like the program itself, a function is composed of a sequence of statements called the function body.
Array.prototype.forEach() - JavaScript
let words = ['one', 'two', 'three', 'four'] words.foreach((word) => { console.log(word) if (word === 'two') { words.shift() //'one' will delete from array } }) // one // two ​​​​// four console.log(words); //['two', 'three',​​​​ 'four'] flatten an array the following example is only here for learning purpose.
Array.prototype.reverse() - JavaScript
description the reverse method transposes the elements of the calling array object in place, mutating the array, and returning a reference to the array.
ArrayBuffer.prototype.slice() - JavaScript
if either begin or end is negative, it refers to an index from the end of the array, as opposed to from the beginning.
ArrayBuffer - JavaScript
if either begin or end is negative, it refers to an index from the end of the array, as opposed to from the beginning.
Atomics - JavaScript
returns true if an atomic operation on arrays of the given element size will be implemented using a hardware atomic operation (as opposed to a lock).
BigInt64Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
BigUint64Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
FinalizationRegistry - JavaScript
}); then you register any objects you want a cleanup callback for by calling the `register` method, passing in the object and a *held value* for it: registry.register(theobject, "some value"); the registry does not keep a strong reference to the object, as that would defeat the purpose (if the registry held it strongly, the object would never be reclaimed).
Float32Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Float64Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Generator.prototype.throw() - JavaScript
for debugging purposes, it is useful to make it an instanceof error.
Int16Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Int32Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Int8Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Intl.DateTimeFormat() constructor - JavaScript
hour12 whether to use 12-hour time (as opposed to 24-hour time).
JSON.stringify() - JavaScript
space optional a string or number object that's used to insert white space into the output json string for readability purposes.
Math.clz32() - JavaScript
now, inversing the bits reveals the lowest bits return 32 - clz(~integer) |0; // `|0` ensures integer coercion } function ctron(integer){ // count trailing ones // no shift-filling-in-with-ones operator is available in // javascript, so the below code is the fastest return ctrz(~integer); /* alternate implementation for demonstrational purposes: // 1.
Number.parseFloat() - JavaScript
(its purpose is modularization of globals.) see parsefloat() for more detail and examples.
Number.parseInt() - JavaScript
polyfill if (number.parseint === undefined) { number.parseint = window.parseint } examples number.parseint vs parseint this method has the same functionality as the global parseint() function: number.parseint === parseint // true and is part of ecmascript 2015 (its purpose is modularization of globals).
Object.getOwnPropertyNames() - JavaScript
the ordering of the enumerable properties in the array is consistent with the ordering exposed by a for...in loop (or by object.keys()) over the properties of the object.
Object.prototype.toLocaleString() - JavaScript
this method is meant to be overridden by derived objects for locale-specific purposes.
Object.prototype.valueOf() - JavaScript
suppose you have an object type mynumbertype and you want to create a valueof method for it.
Promise.reject() - JavaScript
for debugging purposes and selective error catching, it is useful to make reason an instanceof error.
handler.set() - JavaScript
for example: suppose a script does obj.name = "jen", and obj is not a proxy, and has no own property .name, but it has a proxy on its prototype chain.
Proxy - JavaScript
me: 'firefox', type: 'browser' } console.log(products['chrome']); // undefined console.log(products.browser); // [{ name: 'firefox', type: 'browser' }, { name: 'seamonkey', type: 'browser' }] console.log(products.types); // ['browser', 'mailer'] console.log(products.number); // 3 a complete traps list example now in order to create a complete sample traps list, for didactic purposes, we will try to proxify a non-native object that is particularly suited to this type of operation: the doccookies global object created by the "little framework" published on the document.cookie page.
SharedArrayBuffer.prototype.slice() - JavaScript
if either begin or end is negative, it refers to an index from the end of the array, as opposed to from the beginning.
SharedArrayBuffer - JavaScript
if either begin or end is negative, it refers to an index from the end of the array, as opposed to from the beginning.
String.fromCharCode() - JavaScript
in utf-16, supplementary characters are represented by two 16-bit code units, known as surrogates, that were reserved for this purpose.
Symbol.unscopables - JavaScript
description the @@unscopables symbol (symbol.unscopables) can be defined on any object to exclude property names from being exposed as lexical variables in with with environment bindings.
Uint16Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Uint32Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Uint8Array() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
Uint8ClampedArray() constructor - JavaScript
the byteoffset and length parameters specify the memory range that will be exposed by the typed array view.
WeakSet - JavaScript
weaksets are ideal for this purpose: // execute a callback on everything stored inside an object function execrecursively(fn, subject, _refs = null){ if(!_refs) _refs = new weakset(); // avoid infinite recursion if(_refs.has(subject)) return; fn(subject); if("object" === typeof subject){ _refs.add(subject); for(let key in subject) execrecursively(fn, subject[key], _refs); } } const foo = { foo: "foo", bar: {...
WebAssembly.Module.customSections() - JavaScript
(read high level structure for information on section structures, and how normal sections ("known sections") and custom sections are distinguished.) this provides developers with a way to include custom data inside wasm modules for other purposes, for example the name custom section, which allows developers to provide names for all the functions and locals in the module (like "symbols" in a native build).
encodeURIComponent() - JavaScript
the encodeuricomponent() function encodes a uri by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
parseInt() - JavaScript
for arithmetic purposes, the nan value is not a number in any radix.
undefined - JavaScript
var x; if (x === undefined) { // these statements execute } else { // these statements do not execute } note: the strict equality operator (as opposed to the standard equality operator) must be used here, because x == undefined also checks whether x is null, while strict equality doesn't.
new.target - JavaScript
examples new.target in function calls in normal function calls (as opposed to constructor function calls), new.target is undefined.
async function - JavaScript
the purpose of async/await is to simplify the syntax necessary to consume promise-based apis.
for...in - JavaScript
it may be most practically used for debugging purposes, being an easy way to check the properties of an object (by outputting to the console or otherwise).
import.meta - JavaScript
the import.meta object exposes context-specific metadata to a javascript module.
Strict mode - JavaScript
yet because of its historical functionality, arguments.caller for a strict mode function is also a non-deletable property which throws when set or retrieved: 'use strict'; function fun(a, b) { 'use strict'; var v = 12; return arguments.caller; // throws a typeerror } fun(1, 2); // doesn't expose v (or a or b) paving the way for future ecmascript versions future ecmascript versions will likely introduce new syntax, and strict mode in ecmascript 5 applies some restrictions to ease the transition.
categories - Web app manifests
type array of strings mandatory no the categories member is an array of strings defining the names of categories that the application supposedly belongs to.
<semantics> - MathML
the rules of determining the visible child in a <semantics> element are the following: if no rule other rule applies: by default only the first child is rendered, which is supposed to be presentation markup.
MathML element reference - MathML
the term presentation markup is used to describe the layout structure of mathematical notation whereas content markup provides the underlying mathematical meaning and is not supposed to be rendered by the mathml parser (see bug 276028).
Image file type and format guide - Web media technologies
while lossless webp is ideal for this purpose, support is not widespread yet, so png is a better choice unless you offer a fallback.
Codecs used by WebRTC - Web media technologies
other requirements for the purposes of supporting switching between portrait and landscape orientations, there are two methods that can be used.
Web media technologies
while autoplay serves a purpose, it should be used carefully.
OpenSearch description format
note: for icons loaded remotely (that is, from https:// uris as opposed to data: uris), firefox will reject icons larger than 10 kilobytes.
Performance fundamentals - Web Performance
for example, the financial times uses a library called fastclick for that purpose, which is available for you to use.
Privacy, permissions, and information security
modern browsers take steps to help prevent fingerprinting-based attacks by either not allowing information to be accessed or, where the information must be made available, by introducing variations that prevent it from being used for identification purposes.
Introduction to progressive web apps - Progressive web apps (PWAs)
discoverability the eventual aim is that web apps should have better representation in search engines, be easier to expose, catalog and rank, and have metadata usable by browsers to give them special capabilities.
Mobile first - Progressive web apps (PWAs)
therefore we should try to simplify things on mobile, keeping each view cut down to a single, simple purpose where possible, and reducing the amount of typing users are expected to do.
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
they let svg markup and its resulting dom share information that standard attributes can't, usually for scripting purposes.
direction - SVG: Scalable Vector Graphics
proposed recommendation definition in css scalable vector graphics (svg) 2the definition of 'direction' in that specification.
display - SVG: Scalable Vector Graphics
WebSVGAttributedisplay
it has implications for the <tspan>, <tref>, and <altglyph> elements, event processing, for bounding box calculations and for calculation of clipping paths: if display is set to none on a <tspan>, <tref>, or <altglyph> element, then the text string is ignored for the purposes of text layout.
unicode-bidi - SVG: Scalable Vector Graphics
proposed recommendation svg 2 only refers to css writing modes.
writing-mode - SVG: Scalable Vector Graphics
proposed recommendation definition in css writing modes 3 scalable vector graphics (svg) 2the definition of 'writing-mode' in that specification.
<feBlend> - SVG: Scalable Vector Graphics
WebSVGElementfeBlend
the <feblend> svg filter primitive composes two objects together ruled by a certain blending mode.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
to illustrate, suppose you have a input image which is 5 pixels by 5 pixels, whose color values for one of the color channels are as follows: 0 20 40 235 235 100 120 140 235 235 200 220 240 235 235 225 225 255 255 255 225 225 255 255 255 and you define a 3-by-3 convolution kernel as follows: 1 2 3 4 5 6 7 8 9 let's focus on the color value at the second row and second column of the image (source pixel value i...
SVG element reference - SVG: Scalable Vector Graphics
WebSVGElement
they are listed here for informational purposes only.
SVG as an Image - SVG: Scalable Vector Graphics
many browsers support svg images in: html <img> or <svg> elements css background-image gecko-specific contexts additionally, gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) introduced support for using svg in these contexts: css list-style-image css content svg <image> element svg <feimage> element canvas drawimage function restrictions for security purposes, gecko places some restrictions on svg content when it's being used as an image: javascript is disabled.
Positions - SVG: Scalable Vector Graphics
a quote from the svg 1.1 specification illustrates this: [...] suppose that the user agent can determine from its environment that "1px" corresponds to "0.2822222mm" (i.e., 90dpi).
SVG and CSS - SVG: Scalable Vector Graphics
but you can use css for general-purpose xml documents, where there is no predefined way to display the elements.
SVG fonts - SVG: Scalable Vector Graphics
the font-weight and font-style attributes have the same purpose as the equivalent descriptors in css.
Tools for SVG - SVG: Scalable Vector Graphics
usage of headless browsers such as slimerjs and phantomjs are also popular for this purpose, as the image produced is closer to what the svg will look like in the browser.
Mixed content - Web security
the risk involved with mixed content does depend on the type of website the user is visiting and how sensitive the data exposed to that site may be.
Secure contexts - Web security
sources that are not local, to be considered secure, must meet the following criteria: must be served over https:// or wss:// urls the security properties of the network channel used to deliver the resource must not be considered deprecated feature detection pages can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean, which is exposed on the global scope.
How to turn off form autocompletion - Web security
note that the wcag 2.1 success criterion 1.3.5: identify input purpose does not require that autocomplete/autofill actually work - merely that form fields that relate to specific personal user information are programmatically identified.
Subdomain takeovers - Web security
suppose you control the domain example.com.
Subresource Integrity - Web security
<script src="https://example.com/example-framework.js" integrity="sha384-oqvuafxrkap7fdgccy5uykm6+r9gqq8k/uxy9rx7hnqlgyl1kpzqho1wx4jwy8wc" crossorigin="anonymous"></script> note: for more details on the purpose of the crossorigin attribute, see cors settings attributes.
Using shadow DOM - Web Components
think for example of a <video> element, with the default browser controls exposed.
XML introduction - XML: Extensible Markup Language
displaying xml xml is usually used for descriptive purposes, but there are ways to display xml data.
Introduction to using XPath in JavaScript - XPath
specifying the return type the returned variable xpathresult from document.evaluate can either be composed of individual nodes (simple types), or a collection of nodes (node-set types).
XPath snippets - XPath
this article provides some xpath code snippets—simple examples of how to a few simple utility functions based on standard interfaces from the dom level 3 xpath specification that expose xpath functionality to javascript code.
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementnumber
this is a quick way to format a user-supplied number (as opposed to a node sequence number) in any of the standard <xsl:number> formats.
WebAssembly Concepts - WebAssembly
given a webassembly instance, javascript code can synchronously call its exports, which are exposed as normal javascript functions.
Index - WebAssembly
6 converting webassembly text format to wasm webassembly, assembly, conversion, text format, wabt, wasm, wast2wasm, wat2wasm webassembly has an s-expression-based textual representation, an intermediate form designed to be exposed in text editors, browser developer tools, etc.
Converting WebAssembly text format to wasm - WebAssembly
webassembly has an s-expression-based textual representation, an intermediate form designed to be exposed in text editors, browser developer tools, etc.