Search completed in 0.93 seconds.
2617 results for "before":
Your results are loading. Please wait...
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
in css, ::before creates a pseudo-element that is the first child of the selected element.
... /* add a heart before links */ a::before { content: "♥"; } note: the pseudo-elements generated by ::before and ::after are contained by the element's formatting box, and thus don't apply to replaced elements such as <img>, or to <br> elements.
... syntax /* css3 syntax */ ::before /* css2 syntax */ :before note: css3 introduced the ::before notation (with two colons) to distinguish pseudo-classes from pseudo-elements.
...And 10 more matches
break-before - CSS: Cascading Style Sheets
the break-before css property sets how page, column, or region breaks should behave before a generated box.
... /* generic break values */ break-before: auto; break-before: avoid; break-before: always; break-before: all; /* page break values */ break-before: avoid-page; break-before: page; break-before: left; break-before: right; break-before: recto; break-before: verso; /* column break values */ break-before: avoid-column; break-before: column; /* region break values */ break-before: avoid-region; break-before: region; /* global values */ break-before: inherit; break-before: initial; break-before: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element...
...if more than one of them are such a break, the one of the element that appears the latest in the flow is taken (i.e., the break-before value has precedence over the break-after value, which itself has precedence over the break-inside value).
...And 21 more matches
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
the node.insertbefore() method inserts a node before a reference node as a child of a specified parent node.
... if the given node already exists in the document, insertbefore() moves it from its current position to the new position.
... (that is, it will automatically be removed from its existing parent before appending it to the specified new parent.) this means that a node cannot be in two locations of the document simultaneously.
...And 14 more matches
page-break-before - CSS: Cascading Style Sheets
this property has been replaced by the break-before property.
... the page-break-before css property adjusts page breaks before the current element.
... /* keyword values */ page-break-before: auto; page-break-before: always; page-break-before: avoid; page-break-before: left; page-break-before: right; page-break-before: recto; page-break-before: verso; /* global values */ page-break-before: inherit; page-break-before: initial; page-break-before: unset; syntax values auto initial value.
...And 12 more matches
WindowEventHandlers.onbeforeunload - Web APIs
the onbeforeunload property of the windoweventhandlers mixin is the eventhandler for processing beforeunload events.
... note: to combat unwanted pop-ups, some browsers don't display prompts created in beforeunload event handlers unless the page has been interacted with.
... syntax window.addeventlistener("beforeunload", function(event) { ...
...And 6 more matches
BeforeInstallPromptEvent - Web APIs
the beforeinstallpromptevent is fired at the window.onbeforeinstallprompt handler before a user is prompted to "install" a web site to a home screen on mobile.
...75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/beforeinstallpromptevent" target="_top"><rect x="116" y="1" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="236" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">beforeinstallpromptevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} cons...
...tructor beforeinstallpromptevent() creates a new beforeinstallpromptevent.
...And 4 more matches
Window: beforeunload event - Web APIs
the beforeunload event is fired when the window, the document and its resources are about to be unloaded.
... bubbles no cancelable yes interface event event handler property onbeforeunload this event enables a web page to trigger a confirmation dialog asking the user if they really want to leave the page.
... to combat unwanted pop-ups, browsers may not display prompts created in beforeunload event handlers unless the page has been interacted with, or may even not display them at all.
...And 4 more matches
WindowEventHandlers.onbeforeprint - Web APIs
the onbeforeprint property of the windoweventhandlers mixin is the eventhandler for processing beforeprint events for the current window.
... these events are raised before the print dialog window is opened.
... the beforeprint and afterprint events allow pages to change their content before printing starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed.
...And 4 more matches
ChildNode.before() - Web APIs
WebAPIChildNodebefore
the childnode.before() method inserts a set of node or domstring objects in the children list of this childnode's parent, just before this childnode.
... syntax [throws, unscopable] void childnode.before((node or domstring)...
... examples inserting an element var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendchild(child); var span = document.createelement("span"); child.before(span); console.log(parent.outerhtml); // "<div><span></span><p></p></div>" inserting text var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendchild(child); child.before("text"); console.log(parent.outerhtml); // "<div>text<p></p></div>" inserting an element and text var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendch...
...And 3 more matches
ReferenceError: can't access lexical declaration`X' before initialization - JavaScript
the javascript exception "can't access lexical declaration `variable' before initialization" occurs when a lexical variable was accessed before it was initialized.
... this happens within any block statement, when let or const declarations are accessed before they are defined.
... message referenceerror: use before delaration (edge) referenceerror: can't access lexical declaration `x' before initialization (firefox) referenceerror: 'x' is not defined (chrome) error type referenceerror what went wrong?
...And 3 more matches
::-ms-ticks-before - Archive of obsolete content
the ::-ms-ticks-before css pseudo-element is a microsoft extension that applies one or more styles to the tick marks that appear before the track of a slider control.
... it is possible to use the ::-ms-ticks-after, ::-ms-ticks-before, and ::-ms-track pseudo-elements together.
... allowable properties only the following css properties can be used in a rule with ::-ms-ticks-before in its selector.
...lock, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-ticks-before ...
PR_INSERT_BEFORE
inserts an element before another element in a circular list.
... syntax #include <prclist.h> pr_insert_before ( prclist *elemp1 prclist *elemp2); parameters elemp1 a pointer to the element to be inserted.
... elemp2 a pointer to the element before which elemp1 is to be inserted.
... description pr_insert_before inserts the element specified by elemp1 into the circular list, before the element specified by elemp2.
about:debugging (before Firefox 68) - Firefox Developer Tools
before firefox 48 if you change files that are loaded on demand, like content scripts or popups, then changes you make are picked up automatically, and you'll see them the next time the content script is loaded or the popup is shown.
... note that before firefox 48, loading the add-on again by pressing "load temporary add-on" without restarting firefox does not work.
... firefox 48 onwards from firefox 48 onwards: as before: if you change files that are loaded on demand, like content scripts or popups, then changes you make are picked up automatically, and you'll see them the next time the content script is loaded or the popup is shown.
...as soon as a worker is registered, the listing is updated: before firefox 47, service workers were only shown when they were actually running.
BeforeUnloadEvent - Web APIs
the beforeunload event is fired when the window, the document and its resources are about to be unloaded.
...75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/beforeunloadevent" target="_top"><rect x="116" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="201" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">beforeunloadevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} bubbles ...
... no cancelable yes target objects defaultview interface event examples window.addeventlistener("beforeunload", function( event ) { event.returnvalue = "\o/"; }); // is equivalent to window.addeventlistener("beforeunload", function( event ) { event.preventdefault(); }); webkit-derived browsers don't follow the spec for the dialog box.
... window.addeventlistener("beforeunload", function (e) { var confirmationmessage = "\o/"; (e || window.event).returnvalue = confirmationmessage; // gecko + ie return confirmationmessage; /* safari, chrome, and other * webkit-derived browsers */ }); specifications specification status comment html living standardthe definition of 'beforeunloadevent' in that specification.
Range.setEndBefore() - Web APIs
the range.setendbefore() method sets the end position of a range relative to another node.
... syntax range.setendbefore(referencenode); parameters referencenode the node to end the range before.
... example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setendbefore(referencenode); specifications specification status comment domthe definition of 'range.setendbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setendbefore()' in that specification.
Range.setStartBefore() - Web APIs
the range.setstartbefore() method sets the start position of a range relative to another node.
... syntax range.setstartbefore(referencenode); parameters referencenode the node before which the range should start.
... example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartbefore(referencenode); specifications specification status comment domthe definition of 'range.setstartbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstartbefore()' in that specification.
Window.onbeforeinstallprompt - Web APIs
the window.onbeforeinstallprompt property is an event handler for processing a beforeinstallprompt, which is dispatched on devices when a user is about to be prompted to "install" a web application.
... syntax window.addeventlistener("beforeinstallprompt", function(event) { ...
... }); window.onbeforeinstallprompt = function(event) { ...}; example the following example uses the beforeinstallprompt event to make an install button operable, by using the event inside a click handler.
... window.addeventlistener("beforeinstallprompt", function(beforeinstallpromptevent) { beforeinstallpromptevent.preventdefault(); // prevents immediate prompt display // shows prompt after a user clicks an "install" button installbutton.addeventlistener("click", function(mouseevent) { // you should not use the mouseevent here, obviously beforeinstallpromptevent.prompt(); }); installbutton.hidden = false; // make button operable }); ...
-webkit-border-before - CSS: Cascading Style Sheets
the -webkit-border-before css property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet.
... /* border values */ -webkit-border-before: 1px; -webkit-border-before: 2px dotted; -webkit-border-before: medium dashed blue; /* global values */ -webkit-border-before: inherit; -webkit-border-before: initial; -webkit-border-before: unset; -webkit-border-before can be used to set the values for one or more of: -webkit-border-before-width, -webkit-border-before-style, and -webkit-border-before-color.
...nd:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritedyespercentagesas each of the properties of the shorthand:-webkit-border-before-width: logical-width of containing blockcomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or...
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples applying a border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; -webkit-border-before: 5px dashed blue; } result specifications not part of any standard, but it relates to the standards-track border-block-start property.
SyntaxError: missing ; before statement - JavaScript
the javascript exception "missing ; before statement" occurs when there is a semicolon (;) missing somewhere and can't be added by automatic semicolon insertion (asi).
... message syntaxerror: expected ';' (edge) syntaxerror: missing ; before statement (firefox) error type syntaxerror.
...for example: var foo = 'tom's bar'; // syntaxerror: missing ; before statement you can use double quotes, or escape the apostrophe: var foo = "tom's bar"; var foo = 'tom\'s bar'; declaring properties with var you cannot declare properties of an object or array with a var declaration.
... var obj = {}; var obj.foo = 'hi'; // syntaxerror missing ; before statement var array = []; var array[0] = 'there'; // syntaxerror missing ; before statement instead, omit the var keyword: var obj = {}; obj.foo = 'hi'; var array = []; array[0] = 'there'; bad keywords if you come from another programming language, it is also common to use keywords that don't mean the same or have no meaning at all in javascript: def print(info){ console.log(info); }; // syntaxerror missing ; before statement instead, use function instead of def: function print(info){ console.log(info); }; ...
substring-before - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the substring-before function returns a string that is the part of a given string before a given substring.
... syntax substring-before(haystack ,needle ) arguments haystack the string to be evaluated.
...everything before the first occurrence ofneedle inhaystack will be returned.
... examples xpath example output substring-before('aa-bb','-') aa substring-before('aa-bb','a') (empty string) substring-before('aa-bb','b') aa- substring-before('aa-bb','q') (empty string) defined xpath 1.0 4.2 gecko support supported.
MozBeforePaint
once you've called this, the mozbeforepaint event will be fired one time, when it's time for animations to be updated for the window's next animation frame.
... frame rate control mozbeforepaint won't fire more than a fixed number of times per second, e.g.
...d="d" style="width:100px; height:100px; background:lime; position:relative;"></div> <script> var d = document.getelementbyid("d"); var start = window.mozanimationstarttime; function step(event) { var progress = event.timestamp - start; d.style.left = math.min(progress/10, 200) + "px"; if (progress < 2000) { window.mozrequestanimationframe(); } else { window.removeeventlistener("mozbeforepaint", step, false); } } window.addeventlistener("mozbeforepaint", step, false); window.mozrequestanimationframe(); </script> </body> </html> as you can see, each time the mozbeforepaint event fires, our step() method is called.
BeforeInstallPromptEvent.prompt() - Web APIs
the prompt() method of the beforeinstallpromptevent interface allows a developer to show the install prompt at a time of their own choosing.
... syntax beforeinstallpromptevent.prompt() parameters none.
... example var istoosoon = true; window.addeventlistener("beforeinstallprompt", function(e) { if (istoosoon) { e.preventdefault(); // prevents prompt display // prompt later instead: settimeout(function() { istoosoon = false; e.prompt(); // throws if called more than once or default not prevented }, 10000); } // the event was re-dispatched in response to our request // ...
HTMLElement: beforeinput event - Web APIs
the dom beforeinput event fires when the value of an <input>, <select>, or <textarea> element is about to be modified.
... 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.
... html <input placeholder="enter some text" name="name"/> <p id="values"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('values'); input.addeventlistener('beforeinput', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status ui eventsthe definition of 'beforeinput event' in that specification.
Window.onmozbeforepaint - Web APIs
summary an event handler for the mozbeforepaint event.
... syntax window.onmozbeforepaint = funcref; funcref is the handler function.
... notes this event fires immediately before the browser window is repainted, if the event has been requested by one or more scripts calling window.mozrequestanimationframe().
Document.onbeforescriptexecute - Web APIs
syntax document.onbeforescriptexecute = funcref; funcref is a function reference, called when the event is fired.
... example function starting(e) { logmessage("starting script with id: " + e.target.id); } document.addeventlistener("beforescriptexecute", starting, true); view live examples specification html5 ...
NodeIterator.pointerBeforeReferenceNode - Web APIs
the nodeiterator.pointerbeforereferencenode read-only property returns a boolean flag that indicates whether the nodefilter is anchored before (if this value is true) or after (if this value is false) the anchor node indicated by the nodeiterator.referencenode property.
... syntax flag = nodeiterator.pointerbeforereferencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); flag = nodeiterator.pointerbeforereferencenode; specifications specification status comment domthe definition of 'nodeiterator.pointerbeforereferencenode' in that specification.
Window: beforeprint event - Web APIs
the beforeprint event is fired when the associated document is about to be printed or previewed for printing.
... bubbles no cancelable no interface event event handler property onbeforeprint examples using addeventlistener(): window.addeventlistener('beforeprint', (event) => { console.log('before print'); }); using the onbeforeprint event handler property: window.onbeforeprint = (event) => { console.log('before print'); }; specifications specification status html living standard living standard ...
MozBeforeResize - Archive of obsolete content
the mozbeforeresize event is executed before a browser window is resized.
beforecopy - Archive of obsolete content
the beforecopy event was part of copy logic override, a feature of the clipboard api added in january 2014 and removed in april 2016.
beforecut - Archive of obsolete content
the beforecut event was part of copy logic override, a feature of the clipboard api added in january 2014 and removed in april 2016.
beforepaste - Archive of obsolete content
the beforepaste event was part of copy logic override, a feature of the clipboard api added in january 2014 and removed in april 2016.
beforeselected - Archive of obsolete content
« xul reference home beforeselected type: boolean this is set to true if the tab is immediately before the currently selected tab.
insertbefore - Archive of obsolete content
« xul reference home insertbefore type: id when an element is in an overlay, the insertbefore attribute specifies the id of the element in the base window that the element should appear before.
onbeforeaccept - Archive of obsolete content
« xul reference home onbeforeaccept type: script code the code in this attribute is called when the ok button is pressed or the acceptdialog method is called.
resizebefore - Archive of obsolete content
« xul reference home resizebefore type: one of the values below this attribute indicates which element to the left or above the splitter should be resized when the splitter is repositioned.
Element: beforescriptexecute event - Web APIs
the beforescriptexecute event is fired when a script is about to be executed.
Index - Web APIs
WebAPIIndex
a fetch request) before it has completed.
...this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss.
...requests are guaranteed to be initiated before a page is unloaded and they are run to completion, without requiring a blocking request (for example xmlhttprequest).
...And 101 more matches
Observer Notifications
final-ui-startup triggered just before the first window for the application is displayed.
... profile-before-change called just before the profile is lost.
... profile-before-change-qm called to shut down the quotamanager; this is separated from profile-before-change to allow everything inside profile-before-change to continue using it.
...And 20 more matches
Index - Archive of obsolete content
as a result, if, for example, c++ code called a javascript component, which threw an exception, that exception would be logged to the console before control was returned to the c++ caller.
...the namespace currently lives in the future and must be imported before it is used: 512 settings the jetpack.storage.settings namespace allows jetpacks to specify user-configurable settings.
...browsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks.
...And 16 more matches
sslfnc.html
before calling nss_init, your program must call pr_init.
... before calling nss_initreadwrite, your program must call pr_init.
... before calling nss_nodb_init, your program must call pr_init.
...And 16 more matches
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("menu"); menus all menus in jetpack are jetpack.menu objects, including both built-in firefox menus and menus that features create.
... properties property type description beforehide function a function invoked just before the menu is hidden.
... if the menu is a context menu, it is called as beforehide(menu, context) and otherwise as beforehide(menu).
...And 15 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
the sender encrypts, or scrambles, information before sending it.
... to get a driver's license, you typically apply to a government agency, such as the department of motor vehicles, which verifies your identity, your ability to drive, your address, and other information before issuing the license.
... to get a student id, you apply to a school or college, which performs different checks (such as whether you have paid your tuition) before issuing the id.
...And 14 more matches
WebRequest.jsm
usage to import webrequest, use code like: let {webrequest} = cu.import("resource://gre/modules/webrequest.jsm", {}); the webrequest object has the following properties, each of which corresponds to a specific stage in executing a web request: onbeforerequest onbeforesendheaders onsendheaders onheadersreceived onresponsestarted oncompleted each of these objects defines two functions: addlistener(callback, filter, opt_extrainfospec) removelistener(callback) adding listeners use addlistener to add a listener to a particular event.
... in particular, "blocking" may be passed to several event types, and will make the event dispatch synchronous, so the browser will wait for the event listener to return before continuing with the request.
...this tells the browser to wait for your event listener to return before continuing with the request.
...And 14 more matches
NSS environment variables
before 3.0 nss_allow_weak_signature_alg boolean (any non-empty value to enable) enables the use of md2 and md4 inside signatures.
... this was allowed by default before nss 3.12.3.
... 3.4 nss_strict_nofork string ("1", "disabled", or any other non-empty value) it is an error to try to use a pkcs#11 crypto module in a process before it has been initialized in that process, even if the module was initialized in the parent process.
...And 14 more matches
Drawing graphics - Learn web development
getting the canvas context and final setup we need to do one final thing before we can consider our canvas template finished.
... let's do one last thing before we move on.
... before calling fill(), we draw a line to the center of the circle.
...And 13 more matches
Animated PNG graphics
MozillaTechAPNG
conceptually, each frame is constructed in the output buffer before being composited onto the canvas.
... error handling apng is designed to allow incremental display of frames before the entire image has been read.
...a decoder which detects an error before the animation has started should display the default image.
...And 12 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
executes a specified block of code before the browser next repaints the display, allowing an animation to be run at a suitable framerate regardless of the environment it is being run in.
... it's important to know that you can (and often will) run other code before a settimeout() call executes, or between iterations of setinterval().
... settimeout() as we said before, settimeout() executes a particular block of code once after a specified time has elapsed.
...And 11 more matches
nsIHttpChannel
this attribute may only be set before the channel is opened.
... this attribute may only be set before the channel is opened.
... this attribute may only be set before the channel is opened.
...And 11 more matches
Using IndexedDB - Web APIs
if you need to save that information, you should read it out and save it somewhere else before upgrading the database.) trying to create an object store with a name that already exists (or trying to delete an object store with a name that does not already exist) will throw an error.
... objectstore.createindex("email", "email", { unique: true }); // use transaction oncomplete to make sure the objectstore creation is // finished before adding data into it.
... adding, retrieving, and removing data before you can do anything with your new database, you need to start a transaction.
...And 11 more matches
nsIContentPolicy - Archive of obsolete content
these types are mapped to type_subdocument before being passed into the implementation of the content policy and should not be used outside gecko code.
... important: this type is mapped to type_script before being passed to content policy implementations, and should not be used outside gecko core code.
... important: this type is mapped to type_script before being passed to content policy implementations, and should not be used outside gecko core code.
...And 10 more matches
WebIDL bindings
if you also inherit from nsisupports, make sure the nsisupports comes before the nswrappercache in your list of parent classes.
...this comes after all idl arguments, but before the errorresult&, if any, for the method.
...this comes after all idl arguments, but before the errorresult&, if any, for the method.
...And 10 more matches
Box-shadow generator - CSS: Cascading Style Sheets
ype="move-up"> </div> <div class="button" data-type="move-down"> </div> </div> <div id="stack_container"></div> </div> <div id="preview_zone"> <div id="layer_menu" class="col span_12"> <div class="button" id="element" data-type="subject" data-title="element"> element </div> <div class="button" id="before" data-type="subject" data-title=":before"> :before <span class="delete" data-type="disable"></span> </div> <div class="button" id="after" data-type="subject" data-title=":after"> :after <span class="delete" data-type="disable"></span> </div> <div class="u...
...i-checkbox" data-topic='before' data-label=":before"></div> <div class="ui-checkbox" data-topic='after' data-label=":after"></div> </div> <div id="preview"> <div id="obj-element"> <div class="content"> </div> <div id="obj-before"> </div> <div id="obj-after"> </div> </div> </div> </div> </div> <div id="controls" class="group section"> <div class="wrap-left"> <div class="colorpicker category"> <div class="title"> </div> <div id="colorpicker" class="group"> <div id="gradient" class="gradient"> <div id="gradient_picker"> </div> ...
...s="menu"></div> <div class="title"> css code </div> <div class="group" style="border-top-left-radius: 0;"> <div class="output" data-topic="element" data-name="element" data-prop="width height background-color position=[relative] box-shadow"> </div> <div class="output" data-topic="before" data-name="element:before" data-prop="content=[&quot;&quot;] position=[absolute] width height top left z-index background-color box-shadow transform -webkit-transform -ms-transform"> </div> <div class="output" data-topic="after" data-name="element:after" data-prop="content=[&quot;&quot;] position=[absolute] w...
...And 10 more matches
Event reference
beforeunload the window, the document and its resources are about to be unloaded.
... transitionrun a css transition has begun running (fired before any delay starts).
... form events event name fired when reset the reset button is pressed submit the submit button is pressed printing events event name fired when beforeprint the print dialog is opened afterprint the print dialog is closed text composition events event name fired when compositionstart the composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
...And 10 more matches
UI pseudo-classes - Learn web development
styling inputs based on whether they are required or not one of the most basic concepts with regards to client-side form validation is whether a form input is required (it has to be filled in before the form can be submitted) or optional.
... <input>, <select>, and <textarea> elements have a required attribute available which, when set, means that you have to fill in that control before the form will successfully submit.
... the idea is that we can use the ::before and ::after pseudo-elements along with the content property to make a chunk of content appear before or after the affected element.
...And 9 more matches
AsyncShutdown.jsm
for instance, at the end of phase profilebeforechange, no service is permitted to write to the profile directory (with the exception of telemetry).
... consequently, if any service has requested i/o to the profile directory before or during phase profilebeforechange, the system must be informed that these requests need to be completed before the end of phase profilebeforechange.
... example at some point during shutdown, the add-on manager needs to ensure that all add-ons have safely written their data to disk, before writing its own data.
...And 9 more matches
CustomizableUI.jsm
onwidgetbeforedomchange(anode, anextnode, acontainer, aisremoval) fired before a widget's dom node is acted upon by customizableui (to add, move or remove it).
... anode is the dom node changed, anextnode the dom node (if any) before which a widget will be inserted, acontainer the actual dom container (could be an overflow panel in case of an overflowable toolbar), and awasremoval is true iff the action about to happen is the removal of the dom node.
... onwidgetafterdomchange(anode, anextnode, acontainer, awasremoval) like onwidgetbeforedomchange, but fired after the change to the dom node of the widget.
...And 9 more matches
Index
please read these instructions carefully before attempting to build.
... usage and examples creating database files before any operations can be performed, there must be a set of security databases available.
...files destined for the temporary directory are guaranteed to be in place before any executable file is run; they are not deleted until all executable files have finished.
...And 9 more matches
Bytecode Descriptions
subsequent initprop instructions must fill in all slots of the new object before it is used in any other way.
...this is the last thing an async function does before suspending for an await expression.
...(if this async call hasn't awaited before, the caller may be user code.
...And 9 more matches
Window - Web APIs
WebAPIWindow
window.onbeforeinstallprompt an event handler property dispatched before a user is prompted to save a web site to a home screen on mobile.
... window.onmozbeforepaint an event handler property for the mozbeforepaint event, which is sent before repainting the window if the event has been requested by a call to the window.mozrequestanimationframe() method.
... windoweventhandlers.onbeforeprint called when the print dialog box is opened.
...And 9 more matches
Splitters - Archive of obsolete content
you can place a splitter anywhere you want and it will allow resizing of the elements that come before it and the elements that come after it in the same box.
... the syntax of a splitter is as follows: <splitter id="identifier" state="open" collapse="before" resizebefore="closest" resizeafter="closest"> the attributes are as follows: id the unique identifier of the splitter.
...set this to before for the element before the splitter, or after for the element after the splitter.
...And 8 more matches
What is JavaScript? - Learn web development
if the javascript loads and tries to run before the html and css it is affecting has been loaded, errors can occur.
... note: this is a very common error — you need to be careful that the objects referenced in your code exist before you try to do stuff to them.
...you don't have to transform the code into a different form before the browser runs it.
...And 8 more matches
Handling common JavaScript problems - Learn web development
fixing general javascript problems as we said in the previous article on html/css, you should make sure your code is working generally, before going on to concentrate on the cross-browser issues.
... if you are not already familiar with the basics of troubleshooting javascript, you should study that article before moving on.
...when clicked, each one should alert a message containing its number (the value of i at the time it was created), however each one reports i as 11, because for loops do all their iterating before nested functions are invoked.
...And 8 more matches
content - CSS: Cascading Style Sheets
WebCSScontent
annot be combined with other values */ content: normal; content: none; /* <image> values */ content: url("http://www.example.com/test.png"); content: linear-gradient(#e66465, #9198e5); /* alt text for generated content, added in the level 3 specification */ content: url("http://www.example.com/test.png") / "this is the alt text"; /* values below can only be applied to generated content using ::before and ::after */ /* <string> value */ content: "prefix"; /* <counter> values */ content: counter(chapter_counter); content: counters(section_counter, "."); /* attr() value linked to the html attribute value */ content: attr(value string); /* language- and position-dependent keywords */ content: open-quote; content: close-quote; content: no-open-quote; content: no-close-quote; /* except for nor...
... normal computes to none for the ::before and ::after pseudo-elements.
... accessibility support for css generated content – tink explanation of wcag, guideline 1.3 – mdn understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valuenormalapplies to::before and ::after pseudo-elementsinheritednocomputed valueon elements, always computes to normal.
...And 8 more matches
Template and Tree Listeners - Archive of obsolete content
the primary use of this listener is to store some state before the template is rebuilt and restore it afterwards.
...the willrebuild method of any listeners will be called before the content is removed, and didrebuild method will be called when the content has been regenerated.
... this listener will also work for tree builders, and will call the appropriate methods before and after the tree has been generated.
...And 7 more matches
How to build custom form controls - Learn web development
design, structure, and semantics before building a custom control, you should start by figuring out exactly what you want.
...creating new controls is not that easy, especially if you are creating something that has not been done before, and therefore which nobody has the slightest idea of what the expected behaviors and interactions are.
... at least select has been done before, so we know how it should behave!
...And 7 more matches
Index - Learn web development
for example, take the following line of content: 40 how the web works beginner, client, dns, http, ip, infrastructure, learn, server, tcp, l10n:priority this theory is not essential to writing web code in the short term, but before long you'll really start to benefit from understanding what's happening in the background.
... assets, beginner, composing, content, deprecated, design, fonts, learn, simple, l10n:priority, step by step before doing anything, you need some ideas.
...you should understand these concepts before working through the other articles in the module.
...And 7 more matches
Shell global objects
before returning, fun is called with the return value of the interrupt handler.
...if fun is not careful, hook could be asked to retrieve the source code for compilations that occurred long before it was set, and that it knows nothing about.
...when abouttooverflow is true, marks the store buffer as about-to-overflow before collecting.
...And 7 more matches
IAccessibleText
this enum is used in textbeforeoffset(), textatoffset(), and textafteroffset().
...startoffset, [in] long endoffset, [out] bstr text ); [propget] hresult textafteroffset([in] long offset, [in] enum ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); [propget] hresult textatoffset([in] long offset, [in] enum ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); [propget] hresult textbeforeoffset([in] long offset, [in] enum ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); methods addselection() adds a text() selection().
...three" and a child text() object containing "two" and if the caret is in the descendant object just before the 'o' in "two", then: the caretoffset for the "one ?
...And 7 more matches
splitter - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element which should appear before or after an element inside a container.
... attributes collapse, resizeafter, resizebefore, state, substate style classes tree-splitter examples <!-- this bar has some styling associated with it.
... before when the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
...And 6 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
(firefox os was also often called boot2gecko before the project had an official name.) 38 bootstrap bootstrap, css, glossary, intro, framework bootstrap is a free, open source html, css, and javascript framework for quickly building responsive websites.
...gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before sending them, and browsers can uncompress files upon receiving them.
...opera uses blink as its layout engine since 2013 (before that, presto).
...And 6 more matches
Pseudo-classes and pseudo-elements - Learn web development
article p:first-child::first-line { font-size: 120%; font-weight: bold; } generating content with ::before and ::after there are a couple of special pseudo-elements, which are used along with the content property to insert content into your document using css.
...you could also change the ::before pseudo-element to ::after and see the text inserted at the end of the element instead of the beginning.
... in this next example, we have added an empty string using the ::before pseudo-element.
...And 6 more matches
Drawing and Event Handling - Plugins
npn_invalidaterect: invalidate an area in a windowless plug-in before repainting or refreshing.
... npn_invalidateregion: invalidate a region in a windowless plug-in before repainting or refreshing.
...in this case, before the browser displays any print dialog boxes, npp_print is called with printinfo->mode equal to np_full.
...And 6 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
a microtask is a short function which is executed after the function or program which created it exits and only if the javascript execution stack is empty, but before returning control to the event loop being used by the user agent to drive the script's execution environment.
...this lets the given function run without the risk of interfering with another script's execution, yet also ensures that the microtask runs before the user agent has the opportunity to react to actions taken by the microtask.
... second, if a microtask adds more microtasks to the queue by calling queuemicrotask(), those newly-added microtasks execute before the next task is run.
...And 6 more matches
test/utils - Archive of obsolete content
usage before and after helper functions before() and after() are available for running a function before or after each test in a suite.
... they're useful when you need to guarantee a particular state before running a test, and to clean up after your test.
... let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.testcountbookmarks = function (assert, done) { search().on('end', function (results) { assert.equal(results, 0, 'should be no bookmarks'); done(); }); }; before(exports, function (name, assert) { removeallbookmarks(); }); require('sdk/test').run(exports); both before and after may be asynchronous.
...And 5 more matches
create fancy boxes - Learn web development
before we start getting into the practical side of it, make sure you are familiar with the css box model.
... its pseudo-element: ::before and ::after and some aside properties like: box-shadow, transform, outline, etc.
... before we jump to some practical examples, let's step back a bit as there are two things you should know about backgrounds.
...And 5 more matches
Looping code - Learn web development
a condition — as mentioned before, this defines when the loop should stop looping.
... exiting loops with break if you want to exit a loop before all the iterations have been completed, you can use the break statement.
... we store the value entered into the text input in a variable called searchname, before then emptying the text input and focusing it again, ready for the next search.
...And 5 more matches
Focus management with Vue refs - Learn web development
you might now be thinking "hey, don’t we set isediting=false before we try to access the ref, so therefore shouldn't the v-if now be displaying the button?” this is where the virtual dom comes into play.
...this lifecycle spans from all the way before elements are created and added to the vdom (mounted), until they are removed from the vdom (destroyed).
...this can be useful for things like data fetching, where you may need to get your data before your component renders, or after a property changes.
...And 5 more matches
IME handling guide
it handles native key events before or after focused application (depending on the platform) and creates a composition string (a.k.a.
... mranges representing dom event ecompositionstart selected string before starting composition textcomposition nullptr compositionstart ecompositionupdate new composition string textcomposition nullptr compositionupdate ecompositionend commit string textcomposition nullptr compositionend ecompositionchange new composition string widget (or textcomposition) must not be nullptr text ecomposi...
... and before dispatching ecomposition* events, this class removes ascii control characters from dispatching composition event's data in the default settings.
...And 5 more matches
OS.File for the main thread
using os.file from a jsm to import os.file into your chrome code, add the following line at the start of your script: components.utils.import("resource://gre/modules/osfile.jsm") promises before using os.file from the main thread, you need some understanding of the promise library.
... append if true, the file will be opened for appending, meaning the equivalent of .setposition(0, pos_end) is executed before each write.
... file.close(); this example is from stackoverflow: os.file check last modified date before os.read os.file.openunique() creates and opens a file with a unique name.
...And 5 more matches
NSS Tools modutil
files destined for the temporary directory are guaranteed to be in place before any executable file is run; they are not deleted until all executable files have finished.
...if communicator iscurrently running, you should exit communicator before continuing thisoperation.
...if communicator iscurrently running, you should exit communicator before continuing thisoperation.
...And 5 more matches
TPS Bookmark Lists
before: the title of the bookmark item expected to be found before this bookmark; used only in verify and modify actions.
...before: the title of the bookmark item expected to be found before this livemark; used only in verify and modify actions.
...before: the title of the bookmark item expected to be found before this folder; used only in verify and modify actions.
...And 5 more matches
Index
MozillaTechXPCOMIndex
an nscomptr always calls release before letting go, whether the nscomptr is letting go so that it can point to a different object, or because the nscomptr is going out of scope.
...if you've never use nscomptrs before, you might want to read the getting started guide first.
...if the referent object is destroyed before the weak reference, the pointer inside the weak reference is set to nsnull.
...And 5 more matches
nsITreeView
method overview boolean candrop(in long index, in long orientation, in nsidomdatatransfer datatransfer); boolean candropbeforeafter(in long index, in boolean before); obsolete since gecko 1.8 boolean candropon(in long index); obsolete since gecko 1.8 void cyclecell(in long row, in nsitreecolumn col); void cycleheader(in nsitreecolumn col); void drop(in long row, in long orientation, in nsidomdatatransfer datatransfer); astring getcellproperties(in long row, in nsitreecolumn co...
... constants constant value description progress_normal 1 note: renamed from progressnormal in gecko 1.8 progress_undetermined 2 note: renamed from progressundetermined in gecko 1.8 progress_none 3 note: renamed from progressnone in gecko 1.8 drop_before -1 drop_on 0 drop_after 1 indropbefore 0 obsolete since gecko 1.8 indropon 1 obsolete since gecko 1.8 indropafter 2 obsolete since gecko 1.8 methods candrop() methods used by the drag feedback code to determine if a drag is allowable at the current location.
... candropbeforeafter() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method used by the drag feedback code to determine if a drag is allowable at the current location.
...And 5 more matches
PerformanceResourceTiming - Web APIs
performanceresourcetiming.workerstartread only returns a domhighrestimestamp immediately before dispatching the fetchevent if a service worker thread is already running, or immediately before starting the service worker thread if it is not already running.
... performanceresourcetiming.fetchstartread only a domhighrestimestamp immediately before the browser starts to fetch the resource.
... performanceresourcetiming.domainlookupstartread only a domhighrestimestamp immediately before the browser starts the domain name lookup for the resource.
...And 5 more matches
SVGLengthList - Web APIs
note: starting in gecko 5.0,the svglengthlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svglength initialize(in svglength newitem) svglength getitem(in unsigned long index) svglength insertitembefore(in svglength newitem, in unsigned long index) svglength replaceitem(in svglength newitem, in unsigned long index) svglength removeitem(in unsigned long index) svglength appenditem(in svglength newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) pro...
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list.
... insertitembefore(in svglength newitem, in unsigned long index) svglength inserts a new item into the list at the specified position.
...And 5 more matches
SVGNumberList - Web APIs
interface overview also implement none methods void clear() svgnumber initialize(in svgnumber newitem) svgnumber getitem(in unsigned long index) svgnumber insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber replaceitem(in svgnumber newitem, in unsigned long index) svgnumber removeitem(in unsigned long index) svgnumber appenditem(in svgnumber newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) ...
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list.
... insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber inserts a new item into the list at the specified position.
...And 5 more matches
SVGPathSegList - Web APIs
interface overview also implement none methods void clear() svgpathseg initialize(in svgpathseg newitem) svgpathseg getitem(in unsigned long index) svgpathseg insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg replaceitem(in svgpathseg newitem, in unsigned long index) svgpathseg removeitem(in unsigned long index) svgpathseg appenditem(in svgpathseg newitem) properties readonly unsigned long numberofitems ...
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list.
... insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg inserts a new item into the list at the specified position.
...And 5 more matches
SVGPointList - Web APIs
interface overview also implement none methods void clear() svgpoint initialize(in svgpoint newitem) svgpoint getitem(in unsigned long index) svgpoint insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint replaceitem(in svgpoint newitem, in unsigned long index) svgpoint removeitem(in unsigned long index) svgpoint appenditem(in svgpoint newitem) properties readonly unsigned long numberofitems n...
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list.
... insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint inserts a new item into the list at the specified position.
...And 5 more matches
SVGStringList - Web APIs
interface overview also implement none methods void clear() domstring initialize(in domstring newitem) domstring getitem(in unsigned long index) domstring insertitembefore(in domstring newitem, in unsigned long index) domstring replaceitem(in domstring newitem, in unsigned long index) domstring removeitem(in unsigned long index) domstring appenditem(in domstring newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) ...
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list.
... insertitembefore(in domstring newitem, in unsigned long index) domstring inserts a new item into the list at the specified position.
...And 5 more matches
SVGTransformList - Web APIs
note: starting in gecko 9.0,the svgtransformlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svgtransform initialize(in svgtransform newitem) svgtransform getitem(in unsigned long index) svgtransform insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform createsvgtransformfrommatrix(in svgmatrix) svgtransform consolidate() properties readonly unsigned long numbe...
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list.
... insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform inserts a new item into the list at the specified position.
...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.
...it describes bold, thin <length>, bold thin <length>, or thin <length> bold but not <length> bold thin as bold, if not omitted, must be placed before or after the whole thin && <length> component.
... but not: smaller, as bold is juxtaposed, and must appear before any smaller keyword.
...And 5 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
change your preferences for more efficient development before you get to work developing your extension, you’ll want to change some of your firefox preferences.
...the insertbefore attribute determines where the element gets added.
... listing 3: additional content for overlay.xul <?xml version="1.0"?> <overlay id="helloworldoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="menu_toolspopup"> <menuitem id="helloworldmenuitem" label="hello, world!" insertbefore="sanitizeseparator" oncommand="window.opendialog('chrome://helloworld/content/clock.xul','clock','chrome,centerscreen,modal');"/> </menupopup> </overlay> phase 2: adding a function to display the time in phase 2, we will make it so that selecting the hello world menu item we created in phase 1 will display a window with the time (figure 6).
...And 4 more matches
Positioning - Archive of obsolete content
for instance: <menupopup id="edititems" position="end_before"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> <label value="clipboard" popup="edititems"/> in this example, a menupopup is attached to a label via the popup attribute, which will cause the popup to appear when the label is left-clicked.
... the position attribute is used to specify that the popup should appear at the 'end_before' location, which will cause the popup to appear to the right of the label aligned along the top edge.
... single word alignment values example before_start the left side of the popup is aligned with the left side of the anchor, and the bottom of the popup is aligned along the top of the anchor.
...And 4 more matches
Client-side storage - Learn web development
next, add the following to the bottom of your code: window.onload = function() { }; we will write all of our subsequent code inside this window.onload event handler function, called when the window's load event fires, to make sure we don't try to use indexeddb functionality before the app has completely finished loading (it could fail if we don't).
...this is equivalent to the line db = request.result; inside the onsuccess handler, but we need to do this separately here because the onupgradeneeded handler (if needed) will run before the onsuccess handler, meaning that the db value wouldn't be available if we didn't do this.
...this creates a request object, in the same fashion as we've seen before.
...And 4 more matches
Componentizing our React app - Learn web development
before we can make it do things, we need to break it apart into manageable, descriptive components.
... make a <todo /> before we can make a component, we should create a new file for it.
...make sure you're in the root of your app before you run these!
...And 4 more matches
Command line crash course - Learn web development
before you go any further, open your terminal program!
... we’ve alluded to this before, but to be clear — you need to be careful with the terminal.
... simple commands do not carry too much danger, but as you start putting together more complex commands, you need to think carefully about what the command will do, and try testing them out first before you finally run them in the intended directory.
...And 4 more matches
Introducing a complete toolchain - Learn web development
in addition, you should include tests before you deploy to your production server to ensure your software works as intended — this already sounds like a necessary toolchain.
...however, this project has only 4 svg images, which were manually minified using svgo before adding them to the project.
...let's take this opportunity to make sure we are set up with them before we continue.
...And 4 more matches
HTML parser threading
parser termination is checked before each tree op for an early return, because, unfortunately, gecko expects parsers to be able to terminate immediately.
...if too much time has been spent, a runnable for calling runflushloop() again is dispatched and an early return made before all tree ops have been executed.
...the line number and the snapshot are also added to the tree op that attempts to execute scripts (before flushing it).
...And 4 more matches
Download
whether partial data can actually be retained depends on the saver and the download source, and may not be known before the download is started.
...the default value is null before the download starts.
... totalbytes read only number when hasprogress is true, this indicates the total number of bytes to be transferred before the download finishes; this value can be zero if the file is empty.
...And 4 more matches
NSS tools : signtool
for example, if you are a software developer, you should test your code to make sure it is virus-free before signing it.
... similarly, if you are a network administrator, you should make sure, before signing any code, that it comes from a reliable source and will run correctly with the software installed on the machines to which you are distributing it.
... before you can use netscape signing tool to sign files, you must have an object-signing certificate, which is a special certificate whose associated private key is used to create digital signatures.
...And 4 more matches
Index
ation will then be retried (and may still fail.) 68 js::setoutofmemorycallback jsapi reference, reference, référence(2), spidermonkey unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
... if the large-allocation-failure callback is called at all (not all allocation sites call the large-allocation-failure callback on failure), it is called before the out-of-memory callback; the out-of-memory callback is only called if the allocation still fails after the large-allocation-failure callback has returned.
... 96 jsenumerateop jsapi reference, spidermonkey jsenumerateop is called just before an object is enumerated (via a for...in statement, an array comprehension, or a call to js_enumerate).
...And 4 more matches
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
if the key produces a character key that would result in a character being inserted into possibly an <input>, <textarea> or an element with htmlelement.contenteditable set to true, the beforeinput and input event types are fired in that order.
...g'), btnclearconsole = document.getelementbyid('btn-clear-console'); function logmessage(message) { document.getelementbyid("console-log").innerhtml += message + "<br>"; } textarea.addeventlistener('keydown', (e) => { if (!e.repeat) logmessage(`key "${e.key}" pressed [event: keydown]`); else logmessage(`key "${e.key}" repeating [event: keydown]`); }); textarea.addeventlistener('beforeinput', (e) => { logmessage(`key "${e.data}" about to be input [event: beforeinput]`); }); textarea.addeventlistener('input', (e) => { logmessage(`key "${e.data}" input [event: input]`); }); textarea.addeventlistener('keyup', (e) => { logmessage(`key "${e.key}" released [event: keyup]`); }); btnclearconsole.addeventlistener('click', (e) => { let child = consolelog.firstchild; while...
... (child) { consolelog.removechild(child); child = consolelog.firstchild; } }); result note: on browsers that don't fully implement the inputevent interface which is used for the beforeinput and input events, you may get incorrect output on those lines of the log output.
...And 4 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
the key here is connecting the graph correctly, and also starting both oscillators: lfo.connect(amp.gain); osc.connect(amp).connect(audioctx.destination); lfo.start(); osc.start(); osc.stop(audioctx.currenttime + pulsetime); note: we also don't have to use the default wave types for either of these oscillators we're creating — we could use a wavetable and the periodic wave method as we did before.
...one will change the tone and the other will change how the pulse modulates the first wave: <label for="hz">hz</label> <input name="hz" id="hz" type="range" min="660" max="1320" value="880" step="1" /> <label for="lfo">lfo</label> <input name="lfo" id="lfo" type="range" min="20" max="40" value="30" step="1" /> as before, we'll vary the parameters when the range input values are changed by the user.
... wiring this up is the same as we've seen before.
...And 4 more matches
Cognitive accessibility - Accessibility
timers options for adjusting time requirements include: allowing the user to turn off or adjust the time to at least 10 times the original limit before encountering it.
...before re-authenticating, encode the data as hidden or encrypted.
...also be sure to provide a submit button to initiate the change of context, and describe what will happen before the change is made.
...And 4 more matches
Proxy Auto-Configuration (PAC) file - HTTP
examples shexpmatch("http://home.netscape.com/people/ari/index.html" , "*/ari/*"); // returns true shexpmatch("http://home.netscape.com/people/montulli/index.html", "*/ari/*"); // returns false weekdayrange() syntax weekdayrange(wd1, wd2, [gmt]) note: (before firefox 49) wd1 must be less than wd2 if you want the function to evaluate these parameters as a range.
... the order of the days matters; before firefox 49, weekdayrange("sun", "sat") will always evaluate to true.
... daterange(<day> | <month> | <year>, [gmt]) // ambiguity is resolved by assuming year is greater than 31 daterange(<day1>, <day2>, [gmt]) daterange(<month1>, <month2>, [gmt]) daterange(<year1>, <year2>, [gmt]) daterange(<day1>, <month1>, <day2>, <month2>, [gmt]) daterange(<month1>, <year1>, <month2>, <year2>, [gmt]) daterange(<day1>, <month1>, <year1>, <day2>, <month2>, <year2>, [gmt]) note: (before firefox 49) day1 must be less than day2, month1 must be less than month2, and year1 must be less than year2 if you want the function to evaluate these parameters as a range.
...And 4 more matches
Expressions and operators - JavaScript
a binary operator requires two operands, one before the operator and one after the operator: operand1 operator operand2 for example, 3+4 or x*y.
... a unary operator requires a single operand, either before or after the operator: operator operand or operand operator for example, x++ or ++x.
... note that the return values are always based on the operands’ values before the operation.
...And 4 more matches
String.prototype.replace() - JavaScript
let str = 'twas the night before xmas...'; let newstr = str.replace(/xmas/i, 'christmas'); console.log(newstr); // twas the night before christmas...
... this logs 'twas the night before christmas...'.
... using an inline function that modifies the matched characters in this example, all occurrences of capital letters in the string are converted to lower case, and a hyphen is inserted just before the match location.
...And 4 more matches
Add to Home screen - Progressive web apps (PWAs)
also, be aware that chrome requires this before it will display the install banner, whereas firefox doesn't require it for showing the home-with-a-plus icon.
...when this happens, supporting browsers will fire a beforeinstallprompt event.
... we can then use a handler like the one below to handle the installation: window.addeventlistener('beforeinstallprompt', (e) => { // prevent chrome 67 and earlier from automatically showing the prompt e.preventdefault(); // stash the event so it can be triggered later.
...And 4 more matches
alignment-baseline - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following four elements: <tspan>, <tref>, <altglyph>, and <textpath> usage notes value auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | top | center | bottom default value auto animatable yes auto the value is the dominant-baseline of the script to which the character belongs - i.e., use the dominant-baseline of the parent.
... before-edge the alignment-point of the object being aligned is aligned with the "before-edge" baseline of the parent text content element.
... text-before-edge the alignment-point of the object being aligned is aligned with the "text-before-edge" baseline of the parent text content element.
...And 4 more matches
panel - Archive of obsolete content
a panel's content is loaded as soon as it is created, before the panel is shown, and the content remains loaded when a panel is hidden, so it is possible to keep a panel around in the background, updating its content as appropriate in preparation for the next time it is shown.
... content scripts specified by this property are loaded before those specified by the contentscript property.
... stylesheets specified by this property are loaded before those specified by the contentstyle property.
...And 3 more matches
lang/functional - Archive of obsolete content
let { defer } = require("sdk/lang/functional"); let fn = defer(function myevent (event, value) { console.log(event + " : " + value); }); fn("click", "#home"); console.log("done"); // this will print 'done' before 'click : #home' since // we deferred the execution of the wrapped `myevent` // function, making it non-blocking and executing on the // next event loop parameters fn : function the function to be deferred.
... wrap(fn, wrapper) returns the first function passed as an argument to the second, allowing you to adjust arguments, run code before and after, and conditionally execute the original function.
... let { wrap } = require("sdk/lang/functional"); let wrappedhello = wrap(hello, function (fn, name) { return "before, " + fn(name) + "after"; }); wrappedhello("moe"); // "before, hello: moe, after" function hello (name) { return "hello: " + name; } parameters fn : function the function to be passed into the wrapper function.
...And 3 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
note: with the modern jit javascript engine in gecko and js-ctypes more extension code can be written only in javascript than ever before.
... please consider all of your options carefully before deciding to use native code (c++) in your extension.
... note that before actually building anything, the mozilla build system invokes a configuration process that generates the actual makefiles used for the build from makefile templates called makefile.in.
...And 3 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
tooltips are very important for users that want to know what a button does before clicking it.
... <window id="main-window"> <toolbox id="navigator-toolbox"> <toolbar id="xulschoolhello-toolbar" toolbarname="&xulschoolhello.toolbarname.label;" accesskey="&xulschoolhello.toolbar.accesskey;" customizable="true" mode="icons" context="toolbar-context-menu" defaultset="xulschoolhello-hello-world-button" insertbefore="personaltoolbar" /> </toolbox> </window> (note for mac os x: <window id="main-window"> and </window> are not required) our toolbar is added as a child of the toolbox element in the main browser window.
... finally, the insertbefore attribute places our toolbar above the bookmarks toolbar.
...And 3 more matches
Intercepting Page Loads - Archive of obsolete content
there are better ways to intercept page loads before any content is downloaded, and before the user sees anything in the tab.
...you can also use these in conjunction with nsitraceablechannel to get and modify the response text before it gets to the original requester.
... you won't be able to make dom modifications like with the load events, since these notifications are triggered before the response arrives and is parsed into dom tree, so this is not the best approach for the typical greasemonkey-style extensions.
...And 3 more matches
MMgc - Archive of obsolete content
// before sweeping we check for missing write barriers bool gc::incrementalvalidation = false; // check for missing write barriers at every alloc bool gc::incrementalvalidationpedantic = false; if you suspect you have missing write barriers, turn these switches on in a debug build.
...even with an incremental collector that doesn't have big pauses, a gc sweep only kicks in every so often, so memory usage can grow very quickly to a high peak before the gc collects unused objects.
...the other scenarios we don't care about: gray written to black/gray/white - since the object is gray its on the queue and will be marked before we sweep white written to gray - the white object will be marked as reachable when the gray object is marked white written to white - the referant will either eventually become gray if its reachable or not in which case both objects will get marked black written to black/gray/white - its black, its already been marked so a write barrier needs to be inserted anywhere we could possibly store a poi...
...And 3 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
28 beforeselected xul attributes, xul reference no summary!
... 162 insertbefore xul attributes, xul reference no summary!
... 216 onbeforeaccept xul attributes, xul reference no summary!
...And 3 more matches
PopupEvents - Archive of obsolete content
popupshowing this event is fired on a menupopup, panel or tooltip just before it is made visible.
... the popupshowing event just before a popup is about to be displayed, a popupshowing event will fired on the popup.
...within the listener for the popupshowing event, you can append to or modify the menu as needed before it is displayed.
...And 3 more matches
Static Content - Archive of obsolete content
predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <menupopup> <menuitem uri="?country" label="?countrytitle" value="?country"/> </menupopup> </action> </template> </menulist> the only difference between the previous example and this one is that the menulist element has some additional content added before the template.
...that is, before the template is examined, the menulist would have one item in it, with the label 'all'.
... the template generates two results as before, one for each country, and appends a menuitem for each one.
...And 3 more matches
Audio for Web games - Game development
buffering and preloading likely as an attempt to mitigate runaway mobile network data use, we also often find that buffering is disabled before playback has been initiated.
...however, preloading is still useful — without it, there would always need to be some client-server communication required before playing can commence.
...playing="false" aria-describedby="clavi-play-label"> <span id="clavi-play-label">play</span> </button> </li> </ul> <p class="sourced">all tracks sourced from <a href="http://jplayer.org/">jplayer.org</a></p> </section> all of these tracks are the same tempo and are designed to be synchronized with each other, so we need to make sure they are loaded and available to the api before we are able to play them.
...And 3 more matches
Styling web forms - Learn web development
before we do that however, we'd like to say a few words about specific aspects of form styling that are worth knowing about.
...as before, however, browsers rely on the system default styles when displaying these widgets.
...before we start coding, we need three additional assets: the postcard background — download this image and save it in the same directory as your working html file.
...And 3 more matches
Front-end web developer - Learn web development
each section includes exercises and assessments to test your understanding before you move forward.
... if you are not sure if front-end web development is for you, and/or you want a gentle introduction before starting a longer and more complete course, work through our getting started with the web module first.
... modules introduction to html (15–20 hour read/exercises) multimedia and embedding (15–20 hour read/exercises) html tables (5–10 hour read/exercises) styling and layout with css time to complete: 90–120 hours prerequisites it is recommended that you have basic html knowledge before starting to learn css.
...And 3 more matches
Video and audio content - Learn web development
note: before you begin here, you should also know that there are quite a few ovps (online video providers) like youtube, dailymotion, and vimeo, and online audio providers like soundcloud.
...as we talked about before, different browsers support different video and audio formats, and different container formats (like mp3, mp4, and webm, which in turn can contain different types of video and audio).
... poster the url of an image which will be displayed before the video is played.
...And 3 more matches
Graceful asynchronous programming with Promises - Learn web development
there are certain steps that you have to take for your order to be successful, which doesn't really make sense to try to execute out of order, or in order but before each previous step has quite finished: you choose what toppings you want.
... }) .then(function(pizza) { eatpizza(pizza); }) .catch(failurecallback); this is much better — it is easier to see what is going on, we only need a single .catch() block to handle all the errors, it doesn't block the main thread (so we can keep playing video games while we wait for the pizza to be ready to collect), and each operation is guaranteed to wait for previous operations to complete before running.
...as we said before, this object represents an intermediate state that is initially neither success nor failure — the official term for a promise in this state is pending.
...And 3 more matches
Basic math in JavaScript — numbers and operators - Learn web development
you may have encountered these numbers before when setting colors in css.
... before you start to get worried about your brain melting, stop right there!
... first of all, let's declare a couple of variables and initialize them with an integer and a float, respectively, then type the variable names back in to check that everything is in order: let myint = 5; let myfloat = 6.667; myint; myfloat; number values are typed in without quote marks — try declaring and initializing a couple more variables containing numbers before you move on.
...And 3 more matches
Inheritance in JavaScript - Learn web development
nstructor function the first thing we need to do is create a teacher() constructor — add the following below the existing code: function teacher(first, last, age, gender, interests, subject) { person.call(this, first, last, age, gender, interests); this.subject = subject; } this looks similar to the person constructor in many ways, but there is something strange here that we've not seen before — the call() function.
... we need to do one more thing before we move on.
... we can now instantiate object instances using the new operator, in just the same way as we did before: let han = new person('han', 'solo', 25, 'male', ['smuggling']); han.greeting(); // hi!
...And 3 more matches
Aprender y obtener ayuda - Learn web development
it isn't however very good at getting an understanding of "the big picture", and unlocking new neural pathways when you are trying to understand new subjects or solve new problems that you haven't come across before.
...this is the opposite of focus — you let your brain wander around the wider landscape, searching around for connections you didn't have before, touching on new things (or new combinations of things) that you can then focus on later, to strengthen them and start to really understand what they mean.
... this is why it is usually good to read some introductory material first to get a high-level understanding of an area before you leap into the specific details.
...And 3 more matches
Website security - Learn web development
these defenses are typically located before or in the web server (they are not part of the web application itself).
...the solution is to sanitize input before using it.
...the solution is to sanitize input before using it.
...And 3 more matches
TypeScript support in Svelte - Learn web development
note: remember that you can run npx degit opensas/mdn-svelte-tutorial/07-typescript-support svelte-todo-typescript to get the complete to-do list application in javascript before you start porting it to typescript.
... as we said before, typescript is a superset of javascript, so your application will run without modifications.
... now from todos.svelte, we will instantiate a todo component with a literal object as its parameter before the call to the moreactions component, like this: <hr /> <todo todo={ { name: 'a new task with no id!', completed: false } } /> <!-- moreactions --> <moreactions {todos} add the lang='ts' to the <script> tag of the todos.svelte component, so that it knows to use the type checking we have specified.
...And 3 more matches
Setting up your own test automation environment - Learn web development
so here we've done the test as before, except that this time we've wrapped it inside a function, searchtest().
...for example, above we used this construct to tab out of the form input before submitting it: driver.sleep(1000).then(function() { driver.findelement(by.name('q')).sendkeys(webdriver.key.tab); }); waiting for something to complete there are times where you'll want to make webdriver wait for something to complete before carrying on.
... for example if you load a new page, you'll want to wait for the page's dom to finish loading before you try to interact with any of its elements, otherwise the test will likely fail.
...And 3 more matches
Deploying our app - Learn web development
note: cache busting is a new term that we haven't met before in the module.
... this remote location needs to be added to our local git repository before we can push it up there, otherwise it won't be able to find it.
... now we're ready to push our code to github; run the following command now: git push github master at this point you'll be prompted to enter a username and password before git will allow the push to be sent.
...And 3 more matches
Performance best practices for Firefox front-end engineers
note that requestanimationframe() lets you queue up javascript to run right before the style flush occurs.
... this allows you to put all of your dom writes (most importantly, anything that could change the size or position of things in the dom) just before the style and layout steps of the pipeline, combining all the style and layout calculations into a single batch so it all happens once, in a single frame tick, instead of across multiple frames.
...if you must read style information, do so at the very beginning of the frame, before any changes have been made to the dom since the last time a style flush occurred.
...And 3 more matches
Sqlite.jsm
before you can use this module, you need to import it into your scope: components.utils.import("resource://gre/modules/sqlite.jsm") obtaining a connection sqlite.jsm exports the sqlite symbol.
...therefore, caution should be exercised before calling this function.
...the next time this same sql statement is executed (the sql argument is identical to one passed in before), the old statement object is reused.
...And 3 more matches
Mozilla internal string guide
.insert(string, position) - inserts the given string before the code unit at position.
...calling setcapacity() before beginwriting() does not affect what the previous sentence says.
... to make the string longer, call setlength() before beginwriting() or use the bulkwrite() api described below.
...And 3 more matches
nsINavBookmarkObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) method overview void onbeforeitemremoved(in long long aitemid, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onendupdatebatch(); void onfolderadded(in print64 folder, in print64 parent, in print32 index); obsolete since gecko 1.9 void onfolderchanged(in print64 folder, in acstring property); obsolete since gecko 1.9 void onfoldermoved(in print64 folde...
...ted(in long long aitemid, in long long avisitid, in prtime atime, in unsigned long atransitiontype, in nsiuri auri, in long long aparentid, in acstring aguid, in acstring aparentguid); void onseparatoradded(in print64 parent, in print32 index); obsolete since gecko 1.9 void onseparatorremoved(in print64 parent, in print32 index); obsolete since gecko 1.9 methods onbeforeitemremoved() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note: this method was removed in gecko 21.0 as part of bug 826409.
...it is called before the actual removal takes place.
...And 3 more matches
nsITextInputProcessor
in other words, when you need to specify modifier key state of dispatching keyboard events, you need to dispatch modifier key events before and after that.
... begininputtransaction() this must be called before starting composition every time.
... begininputtransactionfortests() this must be called before starting composition for automated tests every time.
...And 3 more matches
nsITransactionListener
willbeginbatch() called before a nsitransactionmanager begins a batch.
... return value willdo() called before a nsitransactionmanager calls a transaction's nsitransaction.dotransaction() method.
... return value willendbatch() called before a nsitransactionmanager ends a batch.
...And 3 more matches
Using images - Web APIs
be sure you've drawn something to the source canvas before using it in your target canvas.
... if you try to call drawimage() before the image has finished loading, it won't do anything (or, in older browsers, may even throw an exception).
... so you need to be sure to use the load event so you don't try this before the image has loaded: var img = new image(); // create new img element img.addeventlistener('load', function() { // execute drawimage statements here }, false); img.src = 'myimage.png'; // set source path if you're only using one external image this can be a good approach, but once you need to track more than one we need to resort to something more clever.
...And 3 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
</h1> this source code contains a couple of line feeds after the doctype and a bunch of space characters before, after, and inside the <h1> element, but the browser doesn’t seem to care at all and just shows the words "hello world!" as if these characters didn’t exist at all: this is so that whitespace characters don't impact the layout of your page.
... inside this context, whitespace character processing can be summarized as follows: first, all spaces and tabs immediately before and after a line break are ignored so, if we take our example markup from before and apply this first rule, we get: <h1>◦◦◦hello⏎ <span>◦world!</span>⇥◦◦</h1> next, all tab characters are handled as space characters, so the example becomes: <h1>◦◦◦hello⏎ <span>◦world!</span>◦◦◦</h1> next, line breaks are converted to spaces: <h1>◦◦◦hello�...
...we've marked the whitespace characters as before.
...And 3 more matches
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
the web animations api's effecttiming dictionary's fill property specifies a fill mode, which defines how the element to which the animation is applied should look when the animation sequence is not actively running, such as before the time specified by iterationstart or after animation's end time.
...in this case, we have just two keyframes; the first defines what affect is applied to the element immediately after the animation first begins to play, and the second defines the effect applied to the element in the last moment before it ends.
... var boxrotationtiming = { duration: 2000, iterations: 1, fill: "none" }; the boxrotationtiming object describes how long the animation should take to run, how many times it should run, what state the element should be in before the animation begins and after it ends, and so forth.
...And 3 more matches
Element.insertAdjacentElement() - Web APIs
syntax targetelement.insertadjacentelement(position, element); parameters position a domstring representing the position relative to the targetelement; must match (case-insensitively) one of the following strings: 'beforebegin': before the targetelement itself.
... 'afterbegin': just inside the targetelement, before its first child.
... 'beforeend': just inside the targetelement, after its last child.
...And 3 more matches
Element.insertAdjacentText() - Web APIs
syntax element.insertadjacenttext(position, element); parameters position a domstring representing the position relative to the element; must be one of the following strings: 'beforebegin': before the element itself.
... 'afterbegin': just inside the element, before its first child.
... 'beforeend': just inside the element, after its last child.
...And 3 more matches
EventTarget.addEventListener() - Web APIs
the available options are: capture a boolean indicating that events of this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree.
... usecapture optional a boolean indicating whether events of this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree.
... before using a particular value in the options object, it's a good idea to ensure that the user's browser supports it, since these are an addition that not all browsers have supported historically.
...And 3 more matches
HTMLSelectElement.add() - Web APIs
syntax collection.add(item[, before]); parameters item is an htmloptionelement or htmloptgroupelement before is optional and an element of the collection, or an index of type long, representing the item item should be inserted before.
... opt1 = document.createelement("option"); var opt2 = document.createelement("option"); opt1.value = "1"; opt1.text = "option: value 1"; opt2.value = "2"; opt2.text = "option: value 2"; sel.add(opt1, null); sel.add(opt2, null); /* produces the following, conceptually: <select> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> */ the before parameter is optional.
... /* takes the existing following select object: <select id="existinglist"> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> and changes it to: <select id="existinglist"> <option value="1">option: value 1</option> <option value="2">option: value 2</option> <option value="3">option: value 3</option> </select> */ the before parameter is optional.
...And 3 more matches
PerformanceNavigationTiming - Web APIs
the interface also supports the following properties: performancenavigationtiming.domcomplete read only a domhighrestimestamp representing a time value equal to the time immediately before the browser sets the current document readiness of the current document to complete.
... performancenavigationtiming.domcontentloadedeventstart read only a domhighrestimestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
... performancenavigationtiming.dominteractive read only a domhighrestimestamp representing a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
...And 3 more matches
Using Service Workers - Web APIs
using a service worker you can easily set an app up to use cached assets first, thus providing a default experience even when offline, before then getting more data from the network (commonly known as offline first).
... sync try { const value = myfunction(); console.log(value); } catch(err) { console.log(err); } async myfunction().then((value) => { console.log(value); }).catch((err) => { console.log(err); }); in the first example, we have to wait for myfunction() to run and return value before any more of the code can execute.
... now for a real example — what if we wanted to load images dynamically, but we wanted to make sure the images were loaded before we tried to display them?
...And 3 more matches
Writing WebSocket servers - Web APIs
section 10 discusses security and you should definitely peruse it before exposing your server.
...in the handshake, details of the connection are negotiated, and either party can back out before completion if the terms are unfavorable.
... note: regular http status codes can be used only before the handshake.
...And 3 more matches
Rendering and the WebXR frame animation callback - Web APIs
before you can render the virtual environment, you need to establish a webxr session by creating an xrsession using the navigator.xr.requestsession() method; you also need to associate the session with a framebuffer and perform other setup tasks.
...as a result, you wind up with the visual effect of the top part of the screen showing the new frame, while the bottom part of the frame shows some combination of the previous frame and possibly even the frame before that one.
...by simply having your computations and data ready before the frame is actually called for, you can make your site or app render much more efficiently, improving main thread performance and generally making the user experience better.
...And 3 more matches
Starting up and shutting down a WebXR session - Web APIs
before you can begin to render your augmented or virtual reality scenario, you need to create and set up the webxr session, and you should know how to shut it down properly as well.
...it also lets you perform some basic testing before taking your code to a real device.
...again, carefully read the readme file and make sure you're aware of the limitations before you begin.
...And 3 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
we'll have to wait and see how good the msaa support in longhorn is, before we can call this one.
...it is not "plug and play", and will take a lot of testing/refinement before your solution works with any product.
... solution: create a "shutdown" method for each internal accessible object, to remove any references to other internal objects before any of your dll's are unloaded.
...And 3 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -o-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background-color: #f00; } .ui-color-picker .picker { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 1px solid #fff; position: absolute; top: 45%; left: 45%; } .ui-color-picker .picker:before { width: 8px; height: 8px; content: ""; position: absolute; border: 1px solid #999; border-radius: 50%; } .ui-color-picker .hue, .ui-color-picker .alpha { width: 198px; height: 28px; margin: 5px; border: 1px solid #fff; float: left; } .ui-color-picker .hue { background: url("images/hue_mask.png"); background: -moz-linear-gradient(left, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, ...
...c="hexa"] > input { width: 90px; height: 24px; padding: 2px 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } /* preview color */ .ui-color-picker .preview { width: 95px; height: 53px; margin: 5px; margin-top: 10px; border: 1px solid #ddd; background-image: url("images/alpha.png"); float: left; position: relative; } .ui-color-picker .preview:before { height: 100%; width: 50%; left: 50%; top: 0; content: ""; background: #fff; position: absolute; z-index: 1; } .ui-color-picker .preview-color { width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.5); position: absolute; z-index: 1; } .ui-color-picker .switch_mode { width: 10px; height: 20px; position: relative; border-radius: 5px 0 0 5px; border: 1px solid #ddd; ...
...rue'] { opacity: 1; z-index: 1; } .gradient-axis:after { content: ""; width: 25px; height: 100%; background-color: #ccc; position: absolute; left: 0; top: 0; } .gradient-axis .gradient-line { width: 80%; height: 100%; margin: 0px auto; position: relative; } .gradient-axis .gradient-line:hover { cursor: pointer; } .gradient-axis .gradient-line:after, .gradient-axis .gradient-line:before { content: ""; width: 1px; height: 100px; background-color: #ccc; position: absolute; top: -48px; } .gradient-axis .gradient-line:after { left: -1px; } .gradient-axis .gradient-line:before { right: -1px; } .gradient-axis .gradient-point { width: 16px; height: 16px; margin: 0 0 0 -8px; top: -7px; border-radius: 50%; background-color: #fff; border: 1px solid #999; position: absol...
...And 3 more matches
String.prototype.localeCompare() - JavaScript
the localecompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
... return value a negative number if referencestr occurs before comparestring; positive if the referencestr occurs after comparestring; 0 if they are equivalent.
... description returns an integer indicating whether the referencestr comes before, after or is equivalent to the comparestring.
...And 3 more matches
Strict mode - JavaScript
strict mode for scripts to invoke strict mode for an entire script, put the exact statement "use strict"; (or 'use strict';) before any other statements.
... strict mode for functions likewise, to invoke strict mode for a function, put the exact statement "use strict"; (or 'use strict';) in the function's body before any other statements.
...ble: false }); obj1.x = 9; // throws a typeerror // assignment to a getter-only property var obj2 = { get x() { return 17; } }; obj2.x = 5; // throws a typeerror // assignment to a new property on a non-extensible object var fixed = {}; object.preventextensions(fixed); fixed.newprop = 'ohai'; // throws a typeerror third, strict mode makes attempts to delete undeletable properties throw (where before the attempt would simply have no effect): 'use strict'; delete object.prototype; // throws a typeerror fourth, strict mode prior to gecko 34 requires that all properties named in an object literal be unique.
...And 3 more matches
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
this change means that the aspect ratio of the image is calculated by the browser early on and can then be used to correct the size needed to display the image before it has loaded, if css has been applied that causes problems with its display size.
... a new way of sizing images before loading completes recognizing the problem, a wicg community group formed to propose an intrinsicsize attribute.
... due to this work, browsers are working on adding a new mechanism for sizing images before the actual image is loaded.
...And 3 more matches
Navigation and resource timings - Web Performance
this moment is before the check to any application cache.
... domcontentloadedeventstart right before the parser sent the domcontentloaded event, that is right after all the scripts that need to be executed right after parsing have been executed.
... navigation timing when a user requests a web site or application, to populate the browser the user agent goes through a series of steps, including a dns lookup, tcp handshake, and ssl negotiation, before the user agent makes the actual request and the servers return the requested assets.
...And 3 more matches
Understanding WebAssembly text format - WebAssembly
there is another issue here — using numeric indices to refer to items can be confusing and annoying, so the text format allows you to name parameters, locals, and most other items simply by including a name prefixed by a dollar symbol ($) just before the type declaration.
... (note that when this text gets converted to binary, though, the binary will contain only the integer.) stack machines before we can write a function body, we have to talk about one more thing: stack machines.
... our first function body as mentioned before, the function body is simply a list of instructions that are followed as the function is called.
...And 3 more matches
Using the WebAssembly JavaScript API - WebAssembly
these methods don't directly access the byte code, so require an extra step to turn the response into an arraybuffer before compiling/instantiating the wasm module.
... make a local copy of memory.wasm in the same directory as before.
... go back to your memory.html sample file, and fetch, compile, and instantiate your wasm module as before — add the following to the bottom of your script: webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(results => { // add code here }); since this module exports its memory, given an instance of this module called instance we can use an exported function accumulate() to create and populate an input array directly in the module instance’s linear memory (mem).
...And 3 more matches
The Essentials of an Extension - Archive of obsolete content
<em:name>xul school hello world</em:name> <em:description>welcome to xul school!</em:description> <em:version>0.1</em:version> <em:creator>appcoast</em:creator> <em:homepageurl>https://developer.mozilla.org/docs/xul_school</em:homepageurl> this is the data that is displayed before and after the extension is installed, that you can see in the add-ons manager.
...the file you opened before, downloads.xul, has the code that defines the downloads window.
... one recommended location for menus in the classic menu vase is under the tools menu, so the code should really look like this: <menupopup id="menu_toolspopup"> <menu id="xulschoolhello-hello-menu" label="&xulschoolhello.hello.label;" accesskey="&xulschoolhello.hellomenu.accesskey;" insertbefore="devtoolsendseparator"> <menupopup> <menuitem id="xulschoolhello-hello-menu-item" label="&xulschoolhello.hello.label;" accesskey="&xulschoolhello.helloitem.accesskey;" oncommand="xulschoolchrome.browseroverlay.sayhello(event);" /> </menupopup> </menu> </menupopup> we're overlaying the menu that is deeper into the xul tree, but it doesn't matter because ...
...And 2 more matches
Making it into a static overlay - Archive of obsolete content
because our extension modifies an existing file in the mozilla distribution, before we package it up we need to separate the modifications into a different file and add them back in at run time via a dynamic xul overlay.
...e://navigator/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://navigator/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> tinderstatusoverlay.xul starts with an xml processing instruction that identifies the file as xml (all xul files need to include this).
...note that we've added a new attribute to the statusbarpanel element: insertbefore.
...And 2 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
browsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks.
... before i go into the differences between mozilla and internet explorer, i'll cover some basic ways you can make a web application extensible in order to add new browser support later.
... insertbefore( anewnode, achildnode ) inserts anewnode before achildnode, which must be a child of the current node.
...And 2 more matches
Extensions - Archive of obsolete content
for instance: <menubar id="main-menubar"> <menu label="search" insertbefore="tools-menu"> <menupopup> <menuitem label="web"/> <menuitem label="mail"/> </menupopup> </menu> </menubar> this menu is added to the main menu bar just before the tools menu.
... the insertbefore attribute is set to 'tools-menu' to ensure that the new menu is added at the right place.
...because of this, the new item might not appear at the end of the menu but before a menuitem added by another extension, depending on the order in which the overlays are applied.
...And 2 more matches
panel - Archive of obsolete content
ArchiveMozillaXULpanel
norestorefocus type: boolean if false, the default value, then when the panel is hidden, the keyboard focus will be restored to whatever had the focus before the panel was opened.
... onpopupshowing type: script code this event is sent to a popup just before it is opened.
... valid single-word values are after_start, after_end, before_start, before_end, end_after, end_before, start_after, start_before, overlap, at_pointer or after_pointer.
...And 2 more matches
toolbar - Archive of obsolete content
methods insertitem( id, beforenode, wrapper, beforepermanent ) not in seamonkey 1.x return type: element add an item with the given id to the toolbar.
... the new item is added just before the item given by the second argument.
... if the second argument is null, but the beforepermanent argument is true, the item is added to the beginning of the toolbar before the first permanent item.
...And 2 more matches
Using IO Timeout And Interrupt On NT - Archive of obsolete content
due to a limitation of the present implementation of nspr io on nt, programs must follow the following guideline: if a thread calls an nspr io function on a file descriptor and the io function fails with <tt>pr_io_timeout_error</tt> or <tt>pr_pending_interrupt_error</tt>, the file descriptor must be closed before the thread exits.
...if the io operation cannot complete before the specified timeout, the io function returns with <tt>pr_io_timeout_error</tt>.
... io timeout and interrupt however, nspr may wake up the thread in two other situations: if the overlapped io request is not completed before the specified timeout.
...And 2 more matches
XForms Input Element - Archive of obsolete content
mozilla extensions labelposition - only for boolean types: show the label before or after the checkbox (see below) type restrictions the input element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
...characteristics used when the instance node is of type xsd:boolean or a type derived from it analogous widgets are <xhtml:input type="checkbox"/> and <xul:checkbox/> the corresponding label can be displayed before or after the checkbox by using the labelposition attribute.
...this attribute is optional, possible values are before and after.
...And 2 more matches
Anatomy of a video game - Game development
that callback function will be executed at a suitable time before the next repaint.
... here is an example of a simple main loop: window.main = function () { window.requestanimationframe( main ); // whatever your main loop needs to do }; main(); // start the cycle note: in each of the main() methods discussed here, we schedule a new requestanimationframe before performing our loop contents.
...before we discuss ways to change it, let us discuss what it already does well.
...And 2 more matches
Cascade and inheritance - Learn web development
we encourage you to work through this section carefully, and check that you understand the concepts before moving on.
...it's a convenient way to undo changes made to styles so that you can get back to a known starting point before beginning new changes.
...ctor thousands hundreds tens ones total specificity h1 0 0 0 1 0001 h1 + p::first-letter 0 0 0 3 0003 li > a[href*="en-us"] > .inline-warning 0 0 2 2 0022 #identifier 0 1 0 0 0100 no selector, with a rule inside an element's style attribute 1 0 0 0 1000 before we move on, let's look at an example in action.
...And 2 more matches
Advanced form styling - Learn web development
fferent browsers handle this in many different, often ugly ways: browser rendering firefox 71 (macos) firefox 57 (windows 10) chrome 77 (macos), safari 13, opera chrome 63 (windows 10) internet explorer 11 (windows 10) edge 16 (windows 10) using appearence: none on radios/checkboxes as we showed before, you can remove the default appearance of a checkbox or radio button altogether with appearance:none; let's take this example html: <form> <fieldset> <legend>fruit preferences</legend> <p> <label> <input type="checkbox" name="fruit-1" value="cherry"> i like cherry </label> </p> <p> <label> <input type="checkbox" name="fruit-2" value="b...
... :disabled pseudo-classes to change the appearance of our custom checkbox as its state changes: input[type="checkbox"] { position: relative; width: 1em; height: 1em; border: 1px solid gray; /* adjusts the position of the checkboxes on the text baseline */ vertical-align: -2px; /* set here so that windows' high-contrast mode can override */ color: green; } input[type="checkbox"]::before { content: "✔"; position: absolute; font-size: 1.2em; right: -1px; top: -0.3em; visibility: hidden; } input[type="checkbox"]:checked::before { /* use `visibility` instead of `display` to avoid recalculating layout */ visibility: visible; } input[type="checkbox"]:disabled { border-color: black; background: #ddd; color: gray; } you'll find more out about such pseudo-class...
...we put an extra wrapper around the control, because ::before/::after don't work on <select> elements (this is because generated content is placed relative to an element's formatting box, but form inputs work more like replaced elements — their display is generated by the browser and put in place — and therefore don't have one): <div class="select-wrapper"><select id="select" name="select"> <option>banana</option> <option>cherry</option> <option>...
...And 2 more matches
Tips for authoring fast-loading HTML pages - Learn web development
too much time spent querying the last modified time of the referenced files can delay the initial display of the web page, since the browser must check the modification time for each of these files, before rendering the page.
... any dynamic features that require the page to complete loading before being used, should be initially disabled, and then only enabled after the page has loaded.
...consider compressing your images before adding them to your page, using compression features built into image-manipulation tools such as photoshop, or using a specialized tool such as compress jpeg or tiny png,.
...And 2 more matches
Choosing the right approach - Learn web development
single delayed operation repeating operation multiple sequential operations multiple simultaneous operations yes yes (recursive timeouts) yes (nested timeouts) no code example here the browser will wait two seconds before executing the anonymous function, then will display the alert message (see it running live, and see the source code): let mygreeting = settimeout(function() { alert('hello, mr.
...ion to setinterval(), using code like this: let i = 1; settimeout(function run() { console.log(i); i++; settimeout(run, 100); }, 100); there is a difference between recursive settimeout() and setinterval(): recursive settimeout() guarantees at least the specified amount of time (100ms in this example) will elapse between the executions; the code will run and then wait 100 milliseconds before it runs again.
... further information cooperative asynchronous javascript: timeouts and intervals, in particular requestanimationframe() requestanimationframe() reference promises promises are a javascript feature that allows you to run asynchronous operations and wait until it is definitely complete before running another operation based on its result.
...And 2 more matches
Arrays - Learn web development
for example: let sequence = [1, 1, 2, 3, 5, 8, 13]; let random = ['tree', 795, [0, 1, 2]]; before proceeding, create a few example arrays.
...try this: shopping[0] = 'tahini'; shopping; // shopping will now return [ "tahini", "milk", "cheese", "hummus", "noodles" ] note: we've said it before, but just as a reminder — computers start counting from 0!
...for example, to access one of the items inside the array that is the third item inside the random array (see previous section), we could do something like this: random[2][2]; try making some more modifications to your array examples before moving on.
...And 2 more matches
Adding features to our bouncing balls demo - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
... hints and tips a couple of pointers before you get started.
...read the whole assessment before you start coding, and take each step slowly and carefully.
...And 2 more matches
Accessibility in React - Learn web development
when we switch between templates in our <todo /> component, we completely remove the elements that were there before to replace them with something else.
...however, you may have noticed a new problem — the "edit" button in the final <todo /> component is focussed immediately on page load, before we even interact with the app!
...using pseudocode, our logic should be something like this: if (wasnoteditingbefore && iseditingnow) { focusoneditfield() } if (waseditingbefore && isnoteditingnow) { focusoneditbutton() } the react team had discussed ways to get a component’s previous state, and has provided an example custom hook we can use for the job.
...And 2 more matches
React interactivity: Events and state - Learn web development
handling events if you've only written vanilla javascript before now, you might be used to having a separate javascript file, where you query for some dom nodes and attach listeners to them.
... const [name, setname] = usestate(''); reading user input before we can change the value of name, we need to capture a user's input as they type.
... add this inside your app() definition, before the return statement: const headingtext = `${tasklist.length} tasks remaining`; hrm.
...And 2 more matches
Styling Vue components with CSS - Learn web development
styling vue components with css before we move on to add more advanced features to our app, we should add some basic css to make it look better.
... add the following contents to the reset.css file: /*reset.css*/ /* resets */ *, *::before, *::after { box-sizing: border-box; } *:focus { outline: 3px dashed #228bec; } html { font: 62.5% / 1.15 sans-serif; } h1, h2 { margin-bottom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height: normal; -webkit-font-smoothing: inh...
...the images below show the look of the app before and after the reset is applied.
...And 2 more matches
Creating Sandboxed HTTP Connections
for cookies, the two topics are: http-on-modify-request - happens after the cookie data has been loaded into the request, but before the request is sent.
... http-on-examine-response - happens after the response is received, but before the cookies are processed whether to hold a weak reference to the observer argument.
... these methods provide all the required functionality needed to modify cookies before they are processed/sent, allowing for sandboxed cookie connections that don't affect the user's cookies.
...And 2 more matches
The Firefox codebase: CSS Guidelines
before adding more css it is good practice to check if the css that is being written is needed, it can be the case that a common component has been already written could be reused with or without changes.
... formatting spacing & indentation 2 spaces indentation is preferred add a space after each comma, except within color functions: linear-gradient(to bottom, black 1px, rgba(255,255,255,0.2) 1px) always add a space before !important.
... using descendant selectors is good practice for performance when possible: for example: .autocomplete-item[selected] > .autocomplete-item-title would be more efficient than .autocomplete-item[selected] .autocomplete-item-title overriding css before overriding any css rules, check whether overriding is really needed.
...And 2 more matches
Localizing with Koala
before you can use them, you need to create a new koala project.
... note how koala is smart enough to insert this entity before searchendcap.label.
...to make sure you're always translating the most recent en-us reference, you should update the source repository before you start working.
...And 2 more matches
Mozilla DOM Hacking Guide
before we begin the explanation of class info, i'd like to introduce quickly the javascript engine and xpconnect.
...if this method has been called before.
...specifically, due to some changes that happened around, april 2002, some things that were not possible before are now possible.
...And 2 more matches
Mozilla Development Strategies
it's your responsibility to find and fix the problems in your code before checking in.
...appreciate it even more if they find it before you ship.
... they're giving you a second chance to get it right before it becomes a bug that affects users.
...And 2 more matches
sslintro.html
must be called before any other nss functions.
...one of these functions must be called before any cryptographic operations can be performed with nss.
...for an ssl socket that is configured before it is connected, ssl figures this out when the application calls pr_connect or pr_accept.
...And 2 more matches
How to embed the JavaScript engine
s_enumeratestub, js_resolvestub, js_convertstub, }; int main(int argc, const char *argv[]) { jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
... nullptr, js_globalobjecttracehook }; int main(int argc, const char *argv[]) { js_init(); jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...nullptr, nullptr, nullptr, js_globalobjecttracehook }; int main(int argc, const char *argv[]) { js_init(); jsruntime *rt = js_newruntime(8l * 1024 * 1024); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...And 2 more matches
JSAPI User Guide
report->filename : "[no filename]", (unsigned int) report->lineno, message); } int run(jscontext *cx) { // enter a request before running anything in the context.
...each of these functions checks, just before it returns, to see if an exception is pending in the current jscontext.
...*/ char *filename; unsigned int lineno; /* * the return value comes back here -- if it could be a gc thing, you must * add it to the gc's "root set" with js_add*root(cx, &thing) where thing * is a jsstring *, jsobject *, or jsdouble *, and remove the root before * rval goes out of scope, or when rval is no longer needed.
...And 2 more matches
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.
... js_init is a new function which must be used to initialize the js engine before any jsruntimes are created or other jsapi methods are called.
... it must be called before js_init is called.
...And 2 more matches
Redis Tips
getting started with redis before you go any further in this document, make sure you have played with redis for at least 5 or 10 minutes.
... it sets the value of a key, and returns the value the key had before you changed it.
... and you'll probably find problems like that long before you go into production.
...And 2 more matches
Avoiding leaks in JavaScript XPCOM components
to understand closures a little better before examining how they can cause leaks, consider the following example, in which there are two pairs of function objects, and each pair has an instance of the private_data variable: // this function returns an array containing two functions.
...(var declarations inside javascript functions are function-scope, including the part of the function before the declaration.) this means that the value of iterator, the wrapper for the native tree walker, is reachable from the function.
... simply assigning iterator = null before the return is sufficient to fix the leak.
...And 2 more matches
nsIMessenger
savefirst if true, the attachment is saved using saveattachment() before it is deleted.
... withoutwarning if true, no warning is shown to the user before the delete.
... savefirst if true, the attachments are saved using saveallattachments() before being deleted.
...And 2 more matches
nsIXULTemplateQueryProcessor
the template builder must call initializeforbuilding() before the other methods, except for translateref().
...the template builder will call this method once for each query within the template, before any results can be generated using generateresults(), but after initializeforbuilding() has been called.
...this will be called before the rules are processed and whenever the template is rebuilt.
...And 2 more matches
Thunderbird Configuration Files
locate your profile folder before the configuration files are presented, you should know how to find your profile folder, which is where thunderbird saves all your settings on your hard drive.
...this folder does not exist by default, so you need to create it before you can start adding your preferences.
...as with userchrome.css, this folder does not exist by default, so you need to create it before you can start adding your preferences.
...And 2 more matches
Basic operations - Firefox Developer Tools
opening the memory tool before firefox 50, the memory tool is not enabled by default.
... to load a snapshot from an existing .fxsnapshot file, click the import button, which looks like a rectangle with an arrow rising from it (before firefox 49, this button was labeled with the text "import..."): you'll be prompted to find a snapshot file on disk.
... to create a diff, click the button that looks like a venn diagram next to the camera icon (before firefox 47, this looked like a "+/-" icon): you'll be prompted to select the snapshot to use as a baseline, then the snapshot to compare.
...And 2 more matches
HTMLTableElement - Web APIs
if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last child if there is no such element, and the first <thead> that is a child of this element is removed from the tree, if any.
...if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, a <colgroup>, nor a <thead>, or as the last child if there is no such element, and the first <tfoot> that is a child of this element is removed from the tree, if any.
...if none is found, a new one is created and inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last child if there is no such element.
...And 2 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
process of sending an offer, and making use of the updated setlocaldescription() method: let makingoffer = false; pc.onnegotiationneeded = async () => { try { makingoffer = true; await pc.setlocaldescription(); signaler.send({ description: pc.localdescription }); } catch(err) { console.error(err); } finally { makingoffer = false; } }; we set makingoffer immediately before calling setlocaldescription() in order to lock against interfering with sending this offer, and we don't clear it back to false until the offer has been sent to the signaling server (or an error has occurred, preventing the offer from being made).
...and these must both be completed before we can proceed with handling the received offer.
... since there isn't a single "roll back and use this offer instead", performing this change on the polite peer requires two steps, executed in the context of promise.all(), which is used to ensure that both statements execute completely before continuing to handle the received offer.
...And 2 more matches
Using XMLHttpRequest - Web APIs
regexp can be used if you always know the content of the xml document beforehand.
... regexp can be used if you always know the content of the html responsetext beforehand.
... note: you need to add the event listeners before calling open() on the request.
...And 2 more matches
Color picker tool - CSS: Cascading Style Sheets
inear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -o-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background-color: #f00; } .ui-color-picker .picker { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #fff; position: absolute; top: 45%; left: 45%; } .ui-color-picker .picker:before { width: 8px; height: 8px; content: ""; position: absolute; border: 1px solid #999; border-radius: 50%; } .ui-color-picker .hue, .ui-color-picker .alpha { width: 198px; height: 28px; margin: 5px; border: 1px solid #fff; float: left; } .ui-color-picker .hue { background: url("https://mdn.mozillademos.org/files/5701/hue.png") center; background: -moz-linear-gradient(left, #f00 0%, #f...
... height: 24px; padding: 2px 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } /* preview color */ .ui-color-picker .preview { width: 95px; height: 53px; margin: 5px; margin-top: 10px; border: 1px solid #ddd; background-image: url("https://mdn.mozillademos.org/files/5705/alpha.png"); float: left; position: relative; } .ui-color-picker .preview:before { height: 100%; width: 50%; left: 50%; top: 0; content: ""; background: #fff; position: absolute; z-index: 1; } .ui-color-picker .preview-color { width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.5); position: absolute; z-index: 1; } .ui-color-picker .switch_mode { width: 10px; height: 20px; position: relative; border-radius: 5px 0 0 5px; border: 1px solid #ddd; ...
...: url('https://mdn.mozillademos.org/files/6065/arrow.png') center no-repeat; width: 100%; height: 12px; top: -12px; z-index: 2; } #picker-samples #add-icon { width: 100%; height: 100%; position: relative; box-shadow: inset 0px 0px 2px 0px #ddd; } #picker-samples #add-icon:hover { cursor: pointer; border-color: #ddd; box-shadow: inset 0px 0px 5px 0px #ccc; } #picker-samples #add-icon:before, #picker-samples #add-icon:after { content: ""; position: absolute; background-color: #eee; box-shadow: 0 0 1px 0 #eee; } #picker-samples #add-icon:before { width: 70%; height: 16%; top: 42%; left: 15%; } #picker-samples #add-icon:after { width: 16%; height: 70%; top: 15%; left: 42%; } #picker-samples #add-icon:hover:before, #picker-samples #add-icon:hover:after { background-color...
...And 2 more matches
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
flex-basis: what is the size of the item before growing and shrinking happens?
... important concepts when working on the main axis there are a few concepts worth digging into before looking at how the flex properties work to control ratios along the main axis.
... these relate to the natural size of flex items before any growing or shrinking takes place, and to the concept of free space.
...And 2 more matches
WebKit CSS extensions - CSS: Cascading Style Sheets
a -webkit-animation-trigger -webkit-app-region -webkit-appearance* -webkit-aspect-ratio b -webkit-backdrop-filter -webkit-background-composite -webkit-border-after** -webkit-border-after-color** -webkit-border-after-style** -webkit-border-after-width** -webkit-border-before** -webkit-border-before-color** -webkit-border-before-style** -webkit-border-before-width** -webkit-border-end** -webkit-border-end-color** -webkit-border-end-style** -webkit-border-end-width** -webkit-border-fit -webkit-border-horizontal-spacing -webkit-border-start** -webkit-border-start-color** -webkit-border-start-style** -webkit-border-start-width** -webkit-border-vertical-spac...
...ing -webkit-box-align** -webkit-box-direction** -webkit-box-flex-group** -webkit-box-flex** -webkit-box-lines** -webkit-box-ordinal-group** -webkit-box-orient** -webkit-box-pack** -webkit-box-reflect** c -webkit-column-axis -webkit-column-break-after -webkit-column-break-before -webkit-column-break-inside -webkit-column-progression -webkit-cursor-visibility d-i -webkit-dashboard-region -webkit-font-size-delta -webkit-font-smoothing -webkit-highlight -webkit-hyphenate-character -webkit-hyphenate-limit-after -webkit-hyphenate-limit-before -webkit-hyphenate-limit-lines -webkit-initial-letter l -webkit-line-align -webkit-line-box-contain -webkit-line-clamp -webkit-line-grid -webkit-line-snap -webkit-locale -webkit-logical-height -webkit-logical-width m ...
... -webkit-margin-after-collapse -webkit-margin-after -webkit-margin-before-collapse -webkit-margin-before -webkit-margin-bottom-collapse -webkit-margin-collapse -webkit-margin-end** -webkit-margin-start** -webkit-margin-top-collapse -webkit-marquee-direction -webkit-marquee-increment -webkit-marquee-repetition -webkit-marquee-speed -webkit-marquee-style -webkit-marquee -webkit-mask-box-image-outset -webkit-mask-box-image-repeat -webkit-mask-box-image-slice -webkit-mask-box-image-source -webkit-mask-box-image-width -webkit-mask-box-image -webkit-mask-repeat-x -webkit-mask-repeat-y -webkit-mask-source-type -webkit-max-logical-height -webkit-max-logical-width -webkit-min-logical-height -webkit-min-logical-width n -webkit-nbsp-mode p -webkit-padding-after** -web...
...And 2 more matches
Cross-browser audio basics - Developer guides
so the ideal place to create a fallback or inform of incompatibility is before the closing </audio> tag.
... preload the preload attribute allows you to specify a preference for how the browser preloads the audio, in other words, which part of the file it downloads when the <audio> element is initialized, and before the play button is pressed.
... preload can take 3 different values: none: don't download anything before the play button is pressed.
...And 2 more matches
Printing - Developer guides
you want to adjust the user experience of printing, such as presenting a specially-formatted version of your content before printing begins.
... <link href="/path/to/print.css" media="print" rel="stylesheet" /> using media queries to improve layout detecting print requests some browsers (including firefox 6 and later and internet explorer) send beforeprint and afterprint events to let content determine when printing may have occurred.
... note: you can also use window.onbeforeprint and window.onafterprint to assign handlers for these events, but using eventtarget.addeventlistener() is preferred.
...And 2 more matches
Control flow and error handling - JavaScript
important: javascript before ecmascript2015 (6th edition) does not have block scope!
...for example: var x = 1; { var x = 2; } console.log(x); // outputs 2 this outputs 2 because the var x statement within the block is in the same scope as the var x statement before the block.
...the finally block executes after the try and catch blocks execute but before the statements following the try...catch statement.
...And 2 more matches
Using Promises - JavaScript
since most people are consumers of already-created promises, this guide will explain consumption of returned promises before explaining how to create them.
... guarantees unlike old-fashioned passed-in callbacks, a promise comes with some guarantees: callbacks will never be called before the completion of the current run of the javascript event loop.
...read the following example: new promise((resolve, reject) => { console.log('initial'); resolve(); }) .then(() => { throw new error('something failed'); console.log('do this'); }) .catch(() => { console.error('do that'); }) .then(() => { console.log('do this, no matter what happened before'); }); this will output the following text: initial do that do this, no matter what happened before note: the text do this is not displayed because the something failed error caused a rejection.
...And 2 more matches
var - JavaScript
description var declarations, wherever they occur, are processed before any code is executed.
... 'use strict'; function foo() { var x = 1; function bar() { var y = 2; console.log(x); // 1 (function `bar` closes over `x`) console.log(y); // 2 (`y` is in scope) } bar(); console.log(x); // 1 (`x` is in scope) console.log(y); // referenceerror in strict mode, `y` is scoped to `bar` } foo(); variables declared using var are created before any code is executed in a process known as hoisting.
... var hoisting because variable declarations (and declarations in general) are processed before any code is executed, declaring a variable anywhere in the code is equivalent to declaring it at the top.
...And 2 more matches
Web video codec guide - Web media technologies
aliasing aliasing is a general term for anything that upon being reconstructed from the encoded data does not look the same as it did before compression.
...these are due to the mathematics involved in the coding of the residual frames, and can be easily noticed before being repaired by the next key frame.
... the absolute minimum frame rate that a video can be before its contents are no longer perceived as motion by the human eye is about 12 frames per second.
...And 2 more matches
Populating the page: how browsers work - Web Performance
this mechanism is designed so that two entities attempting to communicate—in this case the browser and web server—can negotiate the parameters of the network tcp socket connection before transmitting data, often over https.
...this handshake, or rather the tls negotiation, determines which cipher will be used to encrypt the communication, verifies the server, and establishes that a secure connection is in place before beginning the actual transfer of data.
... this requires three more round trips to the server before the request for content is actually sent.
...And 2 more matches
Communicating With Other Scripts - Archive of obsolete content
page scripts if a page includes its own scripts using <script> tags, either embedded in the page or linked to it using the src attribute, there are a couple of ways a content script can communicate with it: using the dom postmessage() api using custom dom events using the dom postmessage api note that before firefox 31 code in content scripts can't use window to access postmessage() and addeventlistener() and instead must use document.defaultview.
... see the section below on using postmessage() before firefox 31.
... } </script> <button onclick="sendmessage()">send message</button> </body> </html> finally, the content script "listen.js" uses window.addeventlistener() to listen for messages from the page script: // listen.js window.addeventlistener('message', function(event) { console.log(event.data); // message from page script console.log(event.origin); }, false); using postmessage() before firefox 31 if your add-on is running in a version of firefox before firefox 31, then your content script can't access the postmessage() or addeventlistener() apis using window, but must access them using document.defaultview instead.
... before firefox 30 here's an example showing how to use custom dom events to send a message from a content script to a page script, before firefox 30.
Interacting with page scripts - Archive of obsolete content
communicating with page scripts there are two different ways a content script can communicate with a page script: using the dom postmessage() api using custom dom events using the dom postmessage api note that before firefox 31 code in content scripts can't use window to access postmessage() and addeventlistener() and instead must use document.defaultview.
... see the section below on using postmessage() before firefox 31.
...); } </script> <button onclick="sendmessage()">send message</button> </body> </html> finally, the content script "listen.js" uses window.addeventlistener() to listen for messages from the page script: // listen.js window.addeventlistener('message', function(event) { console.log(event.data); // message from page script console.log(event.origin); }, false); postmessage() before firefox 31 if your add-on is running in a version of firefox before firefox 31, then your content script can't access the postmessage() or addeventlistener() apis using window, but must access them using document.defaultview instead.
... before firefox 30 here's an example showing how to use custom dom events to send a message from a content script to a page script, before firefox 30.
widget - Archive of obsolete content
content scripts specified by this property are loaded before those specified by the contentscript property.
...this may take one of the following values: "start": load content scripts immediately after the document 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 this property is optional and defaults to "end".
...this may have one of the following values: "start": load content scripts immediately after the document 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.
...this may have one of the following values: "start": load content scripts immediately after the document element 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.
Forms related code snippets - Archive of obsolete content
date picker (before implementing it in a working environment, please read the note about the const statement compatibility) <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>datepicker example - mdn</title> <script type="text/javascript"> /*\ |*| |*| datepicker example mdndeveloper network |*| |*| https://developer.mozilla.org/docs/code_snippets/forms |*| https://developer.mozilla.org/user:fusionchess |*| |*| this snippet is released under the gnu public license, version 3 or later.
... this.writedays(); otarget.onclick = function () { if (otable.parentnode) { otable.parentnode.removechild(otable); return; } otable.style.zindex = nzindex++; otable.style.position = "absolute"; otable.style.left = otarget.offsetleft + "px"; otable.style.top = (otarget.offsettop + otarget.offsetheight) + "px"; otarget.parentnode.insertbefore(otable, otarget); }; ainstances.push(this); } datepicker.prototype.writedays = function () { const nendblanks = (this.current.getday() + bzeroismonday * 6) % 7, nend = amonthlengths[this.current.getmonth()] + nendblanks, ntotal = nend + ((7 - nend % 7) % 7); var otd, otr; if (this.otbody) { this.container.removechild(this.otbody); } thi...
... image preview before upload the filereader.prototype.readasdataurl() method can be useful, for example, to get a preview of an image before uploading it.[article] this example shows how to use it in this way.
... note: the filereader() constructor was not supported by internet explorer for versions before 10.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
before you learn how to develop extensions, let's learn about xul, the xml-based user-interface language, which is one of the building blocks for extensions.
... common attributes before we look at the various interface objects, let's look at some of their common attributes, especially the frequently used ones.
... <?xml version="1.0" encoding="utf-8"?> <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox id="box1" align="center" style="border: 1px solid; margin: 1em;"> <button label="button 1"/> <button label="button 2" insertbefore="label1"/> </hbox> <button label="button 3"/> </overlay> listing 25: substitute code for overlaydocument.xul let's open base.xul in a firefox window again.
... figure 20: output from listing 23 and 25 furthermore, following the declaration insertbefore="label1", the "button2" button now has been inserted before the element with the id "label1".
Appendix F: Monitoring DOM changes - Archive of obsolete content
often times, this must be used in combination with a slight delay, or even polling, via settimeout, for cases where the url change happens before the page is fully loaded.
...in particular, the ::before and ::after pseudo-elements, and pseudo-classes like :hover and :active can be used to achieve extremely complex dynamic behavior.
...variations on this method include modifying the arguments passed to the wrapped function, modifying its return value, and making changes both before and after the original method is called.
...for instance, if you need to know about attribute changes to a particular node, then you should replace its setattribute method with a function that calls the original setattribute function as originalsetattribute.apply(this, arguments) before running your necessary event code.
Session store API - Archive of obsolete content
this event is sent just before a tab is restored.
... firefox 3 note in firefox 3 and later, if you need to detect when a tab is about to be closed so that you can update data associated with the tab before it is closed, you can watch for the "sstabclosing" event, which is sent to the tab.
... if you want to set permissions or otherwise manipulate a restored tab before the page is loaded into it, you should watch sstabrestoring.
... starting in firefox 3.5, notifications are sent after reading session store data and before using it, as well as immediately before writing it back to disk.
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
var ldaphost = "example.com"; var ldapbase = "dc=company,dc=local"; if( userinfo.envuser ) { var ldapfilter = "samaccountname=" + userinfo.envuser; } else { throw("couldn't get uid from the environment"); } // ldap attributes to retrieve from the server var ldapattrs = new array( "cn", "mail", "samaccountname" ); // add more attributes here, if needed) // define how to process ldap results before we make the call function processldapvalues(queryresults) { if( queryresults ) { // build the userinfo object for later use for( var attr in ldapattrs ) { userinfo[ ldapattrs[attr] ] = getldapvalue( queryresults, ldapattrs[attr] ); } } else { throw( "no ldap results" ); } } // call upon ldap for the values in ldapattrs array, // uses the previous processldapvalues() ge...
...getldapattributes("ldap2.int-evry.fr", "ou=people,dc=int-evry,dc=fr", "uid=" +env_user, "uid,cn,mail"); } catch(e) { displayerror("lockedpref", e); } eop print $page; windows peculiarities without web base cgi file, beware that in windows, the original (before encoding) mozilla.js file must start with: //begin ce prefs , if not you'll get "failed to read configuration file..." message, and mozilla won't start :-( in windows environment variables like user or home, are username and homepath, that's why we must create a different pair of configuration files (cfg and cgi) for both systems (linux/windows).
... the shuffle function comes from here: http://www.mickweb.com/javascript/ar...reshuffle.html before publishing the code changes, please add this right before the shuffle function: /** * setup the shuffle method for an array, from mickweb script * factory at: * http://www.mickweb.com/javascript/arrays/pureshuffle.html */ here's how the ldap fail-over works: // 2) setup multiple ldap servers for fail-over var ldap_values; var ldap_servers = new array('ldap2.int-evry.fr', ...
...beware that in windows, that file is already there, so it must be saved before being replaced by ours, in order to come back to a normal state in case of problem.
Developing New Mozilla Features - Archive of obsolete content
learn the codebase and coding practices before you start your feature include learning time in your schedule.
...our cross-platform component model (“xpcom”) is similar to com, but you’ll want to make sure you use it well before going too far with your project.
... if it is not possible to submit your feature in manageable size patches and you submit a 500k patch, be prepared for several months of review and revision before the patch is ready to be checked in it may not take this long.
...we’ve opted to spend the time improving code consistency before check-in when the pain is limited to the developers and the reviewers rather than everyone in the tree.
Creating XPI Installer Modules - Archive of obsolete content
where before a single manifest.rdf file described the resources in an entire package directory or archive, now contents.rdf files can be used for as large or as small a part of your package description as you want; you can use several contents.rdf files in your package to describe the various parts (e.g., one for the skin of your package, another for the content, and so on), or you can use a single one, as wa...
...s common before.
...since we are not updating the mozilla ui to provide special access to this window (e.g., an item in the tasks menu or elsewhere), the measure of the success of the installation of the barley package is that the user can, as before, invoke our software by using a special startup option: mozilla -chrome chrome://barley/content this option tells mozilla to load a chrome other than the default, which is the main browser window.
...while you are developing these resources and before you have made them a package of their own, you can test the basic layout and functionality by opening barley.xul from within mozilla by using file -> open.
Attribute (XUL) - Archive of obsolete content
« xul reference home acceltext accessible accesskey activetitlebarcolor afterselected align allowevents allownegativeassertions alternatingbackground alwaysopenpopup attribute autocheck autocompleteenabled autocompletepopup autocompletesearch autocompletesearchparam autofill autofillaftermatch autoscroll beforeselected buttonaccesskeyaccept buttonaccesskeycancel buttonaccesskeydisclosure buttonaccesskeyextra1 buttonaccesskeyextra2 buttonaccesskeyhelp buttonalign buttondir buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed colo...
...xed flags flex focused forcecomplete grippyhidden grippytooltiptext group handlectrltab height helpuri hidden hidechrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreblurwhilesearching ignorecase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltiptext insertafter insertbefore instantapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left linkedpanel max maxheight maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatc...
...h norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onpopupshown onsearchcomplete onselect ontextcommand ontextentered ontextrevert ontextreverted onunload onwizardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent parsetype persist persistence phase pickertooltiptext placeholder popup position predicate preference preference-editable primary priority pr...
...operties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject substate suppressonselect tabindex tabscrolling targets template timeout title toolbarname tooltip tooltiptext tooltiptextnew top type uri useraction validate value var visuallyselected wait-cursor width windowtype wrap wraparound ...
Dynamically modifying XUL-based user interface - Archive of obsolete content
examples: using dom methods this section demonstrates the use of appendchild(), createelement(), insertbefore(), and removechild() dom methods.
...it uses document.createelementns() method to create the items, and insertbefore() with appendchild() to insert the created xml elements within the document.
... appendchild() appends the node after all other nodes, while insertbefore() inserts the node before the node referenced by its second parameter.
...abel) { const xul_ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var item = document.createelementns(xul_ns, "menuitem"); // create a new xul menuitem item.setattribute("label", alabel); return item; } var popup = document.getelementbyid("mypopup"); // a <menupopup> element var first = createmenuitem("first item"); var last = createmenuitem("last item"); popup.insertbefore(first, popup.firstchild); popup.appendchild(last); you can also use appendchild() and insertbefore() to move existing elements.
findbar - Archive of obsolete content
for example, the standard findbar in firefox 3.5 looks like this on the mac: you may attach a findbar to a particular browser element by either setting the findbar's browserid attribute to the id of the browser element before the findbar element is bound, or by setting the findbar's browser property to the browser element itself.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata close() return type: no return value ...
... if the findbar hasn't been used before, find_normal is the default.
... if the findbar hasn't been used before, find_normal is the default.
insertItem - Archive of obsolete content
« xul reference home insertitem( id, beforenode, wrapper, beforepermanent ) not in seamonkey 1.x return type: element add an item with the given id to the toolbar.
... the new item is added just before the item given by the second argument.
... if the second argument is null, but the beforepermanent argument is true, the item is added to the beginning of the toolbar before the first permanent item.
... otherwise, if the beforepermanent argument is false, the new item is added to the end of the toolbar.
Attribute Substitution - Archive of obsolete content
for instance, to include a prefix before a variable value, you can use: <label value="my name is ?name"/> the effect will be that the ?name part of the attribute will be replaced by the value of the variable ?name.
...recall that the template builder doesn't load the datasource before processing a template.
...thus, if you use a variable set in a binding, you must ensure the datasource is loaded before the template is built, or just rebuild the template.
... another possibilty is to rearrange the rdf such that the values, in this example, the descriptions, are specified before the containers.
textbox (Toolkit autocomplete) - Archive of obsolete content
timeout type: integer for autocomplete textboxes, the number of milliseconds before the textbox starts searching for completions.
...for search textboxes, the number of milliseconds before the timer fires a command event.
...for timed textboxes, the number of milliseconds before the timer fires a command event.
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata getsearchat( index ) return type: str...
Textbox (XPFE autocomplete) - Archive of obsolete content
timeout type: integer for autocomplete textboxes, the number of milliseconds before the textbox starts searching for completions.
...for search textboxes, the number of milliseconds before the timer fires a command event.
...for timed textboxes, the number of milliseconds before the timer fires a command event.
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata addsession( session ) obsolete since g...
Tree Widget Changes - Archive of obsolete content
for example, nsitreeview.getcellvalue() takes a row index and a nsitreecolumn as arguments, whereas before it took a row index and a column id.
... one feature that has been added is restorenaturalorder which may be used to restore the original order of the columns before the user moved them around.
... the constants below have been changed, and their integer values are different: nsitreeview.indropbefore -> nsitreeview.drop_before (-1) nsitreeview.indropon -> nsitreeview.drop_on (0) nsitreeview.indropafter -> nsitreeview.drop_after (1) nsitreeview.progressnormal -> nsitreeview.progress_normal (1) nsitreeview.progressundetermined -> nsitreeview.progress_undetermined (2) nsitreeview.progressnode -> nsitre...
...eview.progress_none (3) as well, the drag and drop methods candropon and candropbeforeafter have been replaced with a single method candrop(idx,orientation) which handles both.
Accesskey display rules - Archive of obsolete content
however, if the last character of the label is an ellipsis or a colon, the accesskey text is inserted before them.
...this is controled by "intl.menuitems.insertseparatorbeforeaccesskeys" pref value.
... if the value is "true" (string), a spece will be inserted before accesskey text.
...therefore, xul toolkit removes accesskey text before setting the label to the buttons.
Localization - Archive of obsolete content
this line is typically placed just before the window element.
...play: none;" flex="1"> <treecols> <treecol id="name" label="&results.filename;" flex="1"/> <treecol id="location" label="&results.location;" flex="2"/> <treecol id="size" label="&results.size;" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="mozilla"/> <treecell label="/usr/local"/> <treecell label="&bytes.before;2520&bytes.after;"/> </treerow> </treeitem> </treechildren> </tree> <splitter id="splitbar" resizeafter="grow" style="display: none;"/> <spacer class="titlespace"/> <hbox> <progressmeter id="progmeter" value="50%" style="display: none;"/> <spacer flex="1"/> <button id="find-button" label="&button.find;" oncommand="dofind()"/> <button id="cancel-button"...
...for example, the number might need to appear before the equivalent of 'bytes' instead of after.
...!entity findcriteria "search criteria"> <!entity type.name "name"> <!entity type.size "size"> <!entity type.date "date modified"> <!entity mode.is "is"> <!entity mode.isnot "is not"> <!entity casesensitive "case sensitive search"> <!entity matchfilename "match entire filename"> <!entity results.filename "filename"> <!entity results.location "location"> <!entity results.size "size"> <!entity bytes.before ""> <!entity bytes.after "bytes"> <!entity button.find "find"> <!entity button.cancel "cancel"> now, to add text for a new language all you need to do is create another dtd file.
Modifying a XUL Interface - Archive of obsolete content
three related functions are the insertbefore(), replacechild() and removechild functions.
... the syntax of these functions is as follows: parent.appendchild(child); parent.insertbefore(child, referencechild); parent.replacechild(newchild, oldchild); parent.removechild(child); it should be fairly straightforward from the function names what these functions do.
... the insertbefore() function inserts a new child node before an existing one.
...this is done recursively, so for large tree structures make sure that this is desired before passing true to the clonenode() function.
More Event Handlers - Archive of obsolete content
recall that the capturing phase occurs before the bubbling phase, so any capturing listeners will trigger before any bubbling listeners.
...for example, the 'popupshowing' event is sent to a popup just before it is displayed.
...load events the load event is sent to the document (the window tag) once the xul file has finished loading and just before the content is displayed.
... this event is commonly used to initialize fields and perform other tasks that need to be done before the user can use the window.
Popup Menus - Archive of obsolete content
before_start the popup appears above the element with the left edges of the element and the popup window aligned.
... before_end the popup appears above the element with the right edges of the element and the popup window aligned.
... end_before the popup appears to the right of the element with the top edges of the element and the popup window aligned.
... start_before the popup appears to the left of the element with the top edges of the element and the popup window aligned.
Using the Editor from XUL - Archive of obsolete content
editorstartup() does some other minor bits of setup before finally kicking off the url load, which the most important part here.
...we can't set that before xul parsing, so we have to force a load of the page we now want to edit.
...before each window is closed, javascript code in globaloverlay.js tries to call a trytoclose method on each window.
...these functions call beforeedit() and afteredit() on the current typing rules.
XUL element attributes - Archive of obsolete content
this attribute overrides the insertbefore attribute.
... insertbefore type: id when an element is in an overlay, the insertbefore attribute specifies the id of the element in the base window that the element should appear before.
...persistence will not remember the absence of an attribute, so for boolean attributes like checked where absence means false, you will need to explicitly set the attribute to false before the window closes (bug 15232).
...this attribute is ignored if either an insertbefore or insertafter attribute matches an element.
datepicker - Archive of obsolete content
dateleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the date when it is less than 10.
... monthleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the month when it is less than 10.
... yearleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the year when it is less than 1000.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsidomxulcontrole...
menupopup - Archive of obsolete content
onpopupshowing type: script code this event is sent to a popup just before it is opened.
... valid single-word values are after_start, after_end, before_start, before_end, end_after, end_before, start_after, start_before, overlap, at_pointer or after_pointer.
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata hidepopup() return type: ...
... position possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer.
prefwindow - Archive of obsolete content
attributes buttonalign, buttondir, buttonorient, buttonpack, buttons, defaultbutton, lastselected, onbeforeaccept, ondialogaccept, ondialogcancel, ondialogdisclosure, ondialoghelp, onload, onunload, title, type properties buttons, currentpane, defaultbutton, lastselected, preferencepanes, type methods acceptdialog, addpane, canceldialog, centerwindowonscreen, getbutton, opensubdialog, openwindow, showpane examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="te...
... onbeforeaccept type: script code the code in this attribute is called when the ok button is pressed or the acceptdialog method is called.
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata acceptdialog() return type...
...if you put other elements before the first <prefpane>, you possibly see strange behaviors about switching panes.
textbox - Archive of obsolete content
timeout type: integer for autocomplete textboxes, the number of milliseconds before the textbox starts searching for completions.
...for search textboxes, the number of milliseconds before the timer fires a command event.
...for timed textboxes, the number of milliseconds before the timer fires a command event.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following classes may...
timepicker - Archive of obsolete content
hourleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the hour when it is less than 10.
... minuteleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the minute when it is less than 10.
... secondleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the second when it is less than 10.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsidomxulcontrol...
tooltip - Archive of obsolete content
onpopupshowing type: script code this event is sent to a popup just before it is opened.
... valid single-word values are after_start, after_end, before_start, before_end, end_after, end_before, start_after, start_before, overlap, at_pointer or after_pointer.
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata hidepopup() return type: n...
... position possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer.
Archived Mozilla and build documentation - Archive of obsolete content
browsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks.
...it is good style to check for these unwanted regressions and fixing them before checkin rather than causing bugzilla avalanches.
... when working with mozilla, you tend to accumulate patches which need to be reviewed, super-reviewed, and/or approved before they can be committed to the trunk.
... when you have only a few uncommitted patches, you can get by using cvs diff, and just editing the output to remove other patches before submitting.
Sunbird Theme Tutorial - Archive of obsolete content
you can use this kind of zip tool if you rename each file before and after using the tool.
...before and after the at-sign, it can only contain the characters a-z, a-z, 0-9, full stop, hyphen and underscore.
... fixing bug 320823 if you are using the sunbird 0.3a1 release, or a test build before 2005-12-21, then you must apply a fix for bug 320823 to allow sunbird to use themes.
...in your <tt>chrome.manifest</tt> file, add lines like this: skin communicator testing chrome/communicator/ skin global testing chrome/global/ skin help testing chrome/help/ skin mozapps testing chrome/mozapps/ replacing <tt>testing</tt> with your theme's one-word internal name as before.
Browser Feature Detection - Archive of obsolete content
e bottom true true true captionside true false true clear true true true clip true true true content true false true counterincrement true false true counterreset true false true cue true false false cueafter true false false cuebefore true false false cursor true true true direction true true true elevation true false false emptycells true false true fontsizeadjust true false true fontstretch true false true left true true true markeroffset true false true marks tr...
... true ie7 only true orphans true false true outline true false true outlinecolor true false true outlinestyle true false true outlinewidth true false true overflow true true true page true false true pagebreakafter true true true pagebreakbefore true true true pagebreakinside true false true pause true false true pauseafter true false true pausebefore true false true pitch true false false pitchrange true false true playduring false false false position true true true quotes ...
... false}, {name: 'bottom', 'supported': false}, {name: 'captionside', 'supported': false}, {name: 'clear', 'supported': false}, {name: 'clip', 'supported': false}, {name: 'content', 'supported': false}, {name: 'counterincrement', 'supported': false}, {name: 'counterreset', 'supported': false}, {name: 'cue', 'supported': false}, {name: 'cueafter', 'supported': false}, {name: 'cuebefore', 'supported': false}, {name: 'cursor', 'supported': false}, {name: 'direction', 'supported': false}, {name: 'elevation', 'supported': false}, {name: 'emptycells', 'supported': false}, {name: 'fontsizeadjust', 'supported': false}, {name: 'fontstretch', 'supported': false}, {name: 'left', 'supported': false}, {name: 'markeroffset', 'supported': false}, {name: 'marks', 'supported'...
...'minwidth', 'supported': false}, {name: 'orphans', 'supported': false}, {name: 'outline', 'supported': false}, {name: 'outlinecolor', 'supported': false}, {name: 'outlinestyle', 'supported': false}, {name: 'outlinewidth', 'supported': false}, {name: 'overflow', 'supported': false}, {name: 'page', 'supported': false}, {name: 'pagebreakafter', 'supported': false}, {name: 'pagebreakbefore', 'supported': false}, {name: 'pagebreakinside', 'supported': false}, {name: 'pause', 'supported': false}, {name: 'pauseafter', 'supported': false}, {name: 'pausebefore', 'supported': false}, {name: 'pitch', 'supported': false}, {name: 'pitchrange', 'supported': false}, {name: 'playduring', 'supported': false}, {name: 'position', 'supported': false}, {name: 'quotes', 'supported'...
Index - Game development
it is assumed that before reading this you have read our 3d collision detection introductory article first, and have basic knowledge about three.js.
... 49 game over 2d, beginner, canvas, games, javascript, phaser, tutorial, game over to make the game more interesting we can introduce the ability to lose — if you don't hit the ball before it reaches the bottom edge of the screen it will be game over.
... 50 initialize the framework 2d, beginner, canvas, games, html, javascript, phaser, tutorial before we can start writing the game's functionality, we need to create a basic structure to render the game inside.
... 63 create the canvas and draw on it 2d, beginner, canvas, games, html, javascript, tutorial before we can start writing the game's functionality, we need to create a basic structure to render the game inside.
Building up a basic demo with Babylon.js - Game development
before reading on, copy this code to a new text file and save it in your working directory as index.html.
... initialising the babylon.js engine we have to create a babylon.js engine instance first (passing it the <canvas> element to render on) before we start developing our game.
...add these lines at the end of the <script> element, just before the closing </script>.
...define a helper variable — t — that we will use for animations, just before the renderloop, and decrement it on every frame inside the loop, like this: var t = 0; var renderloop = function () { scene.render(); t -= 0.01; // animation code goes here }; engine.runrenderloop(renderloop); the t variable will be incremented on every rendered frame.
Building up a basic demo with PlayCanvas editor - Game development
you can finish this before you continue our tutorial if you like.
... now follow the same steps as we did before when coloring the cube: create a new material using the add asset (plus) button.
...as you can see, the file contains some boilerplate code already: pc.script.create('boxanimation', function (app) { // creates a new boxanimation instance var boxanimation = function (entity) { this.entity = entity; }; boxanimation.prototype = { // called once after all resources are loaded and before the first update initialize: function () { }, // called every frame, dt is time in seconds since last update update: function (dt) { } }; return boxanimation; }); the most interesting part is the update() function, which is where we can put any code that we want repeated on every frame.
... add the coneanimation.js script to the cone object, as before.
Plug-in Development Overview - Gecko Plugin API Reference
drawing a plug-in instance before drawing itself on the page, the plug-in must provide information about itself, set the window or other target in which it draws, arrange for redrawing, and handle events.
... npn_invalidaterect: invalidate an area in a windowless plug-in before repainting or refreshing.
... npn_invalidateregion: invalidate an area in a windowless plug-in before repainting or refreshing.
... use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls.
Sizing items in CSS - Learn web development
the natural or intrinsic size of things html elements have a natural size, set before they are affected by any css.
...for example, if you want a full-page hero section to show before the rest of your content, making that part of your page 100vh high will push the rest of the content below the viewport, meaning that it will only appear once the document is scrolled.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: sizing.
...when you move onto css layout, sizing will become very important in mastering the different layout methods, so it is worth understanding the concepts here before moving on.
Flexbox - Learn web development
try adding the following declaration to your <section> rule: flex-direction: column; you'll see that this puts the items back in a column layout, much like they were before we added any css.
... before you move on, delete this declaration from your example.
... we'd like to encourage you to play with these values to see how they work before you continue.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: flexbox.
Grids - Learn web development
you can mix fr units and fixed length tracks — in such a case the space needed for the fixed tracks is taken away before the space is distributed to the other tracks.
...change your track listing to the following: .container { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 20px; } you will now get 3 1fr tracks just as before.
... .container { display: grid; grid-template-areas: "header header" "sidebar content" "footer footer"; grid-template-columns: 1fr 3fr; grid-gap: 20px; } header { grid-area: header; } article { grid-area: content; } aside { grid-area: sidebar; } footer { grid-area: footer; } reload the page and you will see that your items have been placed just as before without us needing to use any line numbers!
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: grids.
CSS layout - Learn web development
get started prerequisites before starting this module, you should already: have basic familiarity with html, as discussed in the introduction to html module.
...after studying this guide you can test your flexbox skills to check your understanding before moving on.
...this article will give you all you need to know to get started with page layout, then test your grid skills before moving on.
... legacy layout methods grid systems are a very common feature used in css layouts, and before css grid layout they tended to be implemented using floats or other layout features.
Using CSS generated content - Learn web development
examples text content css can insert text content before or after an element.
... to specify this, make a rule and add ::before or ::after to the selector.
... html a text where i need to <span class="ref">something</span> css .ref::before { font-weight: bold; color: navy; content: "reference "; } output the character set of a stylesheet is utf-8 by default, but it can also be specified in the link, in the stylesheet itself, or in other ways.
... image content to add an image before or after an element, you can specify the url of an image file in the value of the content property.
Fundamental text and font styling - Learn web development
note: if the above paragraph leaves you feeling confused, then no matter — go back and review our box model article, to brush up on the box model theory, before carrying on.
... text layout styles: text-indent: specify how much horizontal space should be left before the beginning of the first line of the text content.
... text-align-last: define how the last line of a block or a line, right before a forced line break, is aligned.
... this assessment tests all the knowledge discussed in this module, so you might want to read the other articles before moving on to it.
Learn to style HTML using CSS - Learn web development
get started prerequisites you should learn the basics of html before attempting any css.
... before starting this topic, you should also be familiar with using computers and using the web passively (i.e., just looking at it, consuming the content).
... it is recommended that you work through getting started with the web before proceeding with this topic.
... the aim here is to provide you with a toolkit for writing competent css and help you understand all the essential theory, before moving on to more specific disciplines like text styling and css layout.
Client-side form validation - Learn web development
previous overview: forms next before submitting data to the server, it is important to ensure all required form controls are filled out, in the correct format.
...we've seen many of these earlier in the course, but to recap: required: specifies whether a form field needs to be filled in before the form can be submitted.
...that means that even though the browser doesn't automatically check the validity of the form before sending its data, you can still do it yourself and style the form accordingly.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: form validation.
Images in HTML - Learn web development
fortunately, it wasn't too long before the ability to embed images (and other more interesting types of content) inside web pages was added.
... note: you should read a quick primer on urls and paths to refresh your memory on relative and absolute urls before continuing.
...you should use an image editor to put your image at the correct size before putting it on your webpage.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: html images.
Responsive images - Learn web development
in this case, before each comma we write: a media condition ((max-width:600px)) — you'll learn more about these in the css topic, but for now let's just say that a media condition describes a possible state that the screen can be in.
... in all cases, you must provide an <img> element, with src and alt, right before </picture>, otherwise no images will appear.
... when the browser starts to load a page, it starts to download (preload) any images before the main parser has started to load and interpret the page's css and javascript.
...the only thing to do now before moving on is to try our multimedia assessment, and see how you get on.
General asynchronous programming concepts - Learn web development
you should understand these concepts before working through the other articles in the module.
...each thread can only do a single task at once: task a --> task b --> task c each task will be run sequentially; a task has to complete before the next one can be started.
...now when you click the button, the browser is able to display the paragraph before the dates have finished calculating.
...the fetching of an image from the server), and then wait until the result has returned before running another operation: main thread: task a task b promise: |__async operation__| since the operation is happening somewhere else, the main thread is not blocked while the async operation is being processed.
Introducing asynchronous JavaScript - Learn web development
instead, you need your code to wait until the response is returned before it tries to do anything else to it.
...in this case the callback is waiting on the xhr call to finish downloading the resource (using the onload event handler) before it passes it to the callback.
...the following example is fairly similar to what we've seen before (see it live, and the source).
...you just can't guarantee that the async function will return before the browser has processed the sync block.
Build your own function - Learn web development
we've seen this before, but let's just refresh our memories.
... if you tried the last experiment, make sure to undo the last change before carrying on.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: functions.
... these tests require skills that are covered in the next article, so you might want to read those first before trying it.
Silly story generator - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
... replaces the default name "bob" in the story with a custom name, only if a custom name is entered into the "enter custom name" text field before the generate button is pressed.
... converts the default us weight and temperature quantities and units in the story into uk equivalents if the uk radio button is checked before the generate button is pressed.
...put it just before the closing </body> tag.
What went wrong? Troubleshooting JavaScript - Learn web development
the instance that stores the random number that we want to guess at the start of the game should be around line number 44: let randomnumber = math.floor(math.random()) + 1; and the one that generates the random number before each subsequent game is around line 113: randomnumber = math.floor(math.random()) + 1; to check whether these lines are indeed the problem, let's turn to our friend console.log() again — insert the following line directly below each of the above two lines: console.log(randomnumber); save and refresh, then play a few games — you'll see that randomnumber is equal to 1 at each point ...
... we need to multiply the random number by 100 before we round it down.
... syntaxerror: missing ; before statement this error generally means that you have missed a semicolon at the end of one of your lines of code, but it can sometimes be more cryptic.
... note: see our syntaxerror: missing ; before statement reference page for more details about this error.
Introducing JavaScript objects - Learn web development
get started prerequisites before starting this module, you should have some familiarity with html and css.
... you are advised to work through the introduction to html and introduction to css modules before starting on javascript.
... you should also have some familiarity with javascript basics before looking at javascript objects in detail.
... before attempting this module, work through javascript first steps and javascript building blocks.
Getting started with Ember - Learn web development
you'll need node and npm installed before you can install ember-cli.
...make sure you navigate to somewhere appropriate in the terminal before you run it.
... getting ready to build our ember project you'll need a code editor before continuing to interact with your brand new project.
... in ember-cli-build.js, find the following code: let app = new emberapp(defaults, { // add options here }); add the following lines underneath it before saving the file: app.import('node_modules/todomvc-common/base.css'); app.import('node_modules/todomvc-app-css/index.css'); for more information on what ember-cli-build.js does, and for other ways in which you can customize your build / pipeline, the ember guides have a page on addons and dependencies.
React interactivity: Editing, filtering, conditional rendering - Learn web development
first, import usestate into the todo component like we did before with the app component, by updating the first import statement to this: import react, { usestate } from "react"; we'll now use this to set an isediting state, the default state of which should be false.
...editingtemplate : viewtemplate}</li>; your browser should render all your tasks just like before.
...still in todo.js, put the following underneath the existing hook: const [newname, setnewname] = usestate(''); next, create a handlechange() function that will set the new name; put this underneath the hooks but before the templates: function handlechange(e) { setnewname(e.target.value); } now we'll update our editingtemplate's <input /> field, setting a value attribute of newname, and binding our handlechange() function to its onchange event.
...before we map over the tasks state, we should filter it (with array.prototype.filter()) to eliminate objects we don't want to render.
Beginning our React todo list - Learn web development
defining user stories before we begin our work will help us focus our work.
... implementing our styles paste the following css code into src/index.css so that it replaces what's currently there: /* resets */ *, *::before, *::after { box-sizing: border-box; } *:focus { outline: 3px dashed #228bec; outline-offset: 0; } html { font: 62.5% / 1.15 sans-serif; } h1, h2 { margin-bottom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height: normal; -webki...
...rem 0.8rem; border: 2px solid #565656; } .todo-text:focus { box-shadow: inset 0 0 0 2px; } /* checkbox styles */ .c-cb { box-sizing: border-box; font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; display: block; position: relative; min-height: 44px; padding-left: 40px; clear: left; } .c-cb > label::before, .c-cb > input[type="checkbox"] { box-sizing: border-box; top: -2px; left: -2px; width: 44px; height: 44px; } .c-cb > input[type="checkbox"] { -webkit-font-smoothing: antialiased; cursor: pointer; position: absolute; z-index: 1; margin: 0; opacity: 0; } .c-cb > label { font-size: inherit; font-family: inherit; line-height: inherit; display: inline-block; margin-bot...
...tom: 0; padding: 8px 15px 5px; cursor: pointer; touch-action: manipulation; } .c-cb > label::before { content: ""; position: absolute; border: 2px solid currentcolor; background: transparent; } .c-cb > input[type="checkbox"]:focus + label::before { border-width: 4px; outline: 3px dashed #228bec; } .c-cb > label::after { box-sizing: content-box; content: ""; position: absolute; top: 11px; left: 9px; width: 18px; height: 7px; transform: rotate(-45deg); border: solid; border-width: 0 0 5px 5px; border-top-color: transparent; opacity: 0; background: transparent; } .c-cb > input[type="checkbox"]:checked + label::after { opacity: 1; } save and look back at your browser, and your app should now have reasonable styling.
Starting our Svelte Todo list app - Learn web development
moreover, our editor can display this warning even before calling the compiler: you can tell svelte to ignore this warning for the next block of markup with a comment beginning with svelte-ignore, like this: <!-- svelte-ignore a11y-missing-attribute --> <img height="32" width="88" src="https://udn.realityripple.com/samples/b0/98dase3c7d.png"> note: with vscode you can automatically add this ignore comment by clicking on the quick fix...
...replace the contents of the file public/global.css with the following: /* resets */ *, *::before, *::after { box-sizing: border-box; } *:focus { outline: 3px dashed #228bec; outline-offset: 0; } html { font: 62.5% / 1.15 sans-serif; } h1, h2 { margin-bottom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height: normal; -webki...
...rem 0.8rem; border: 2px solid #565656; } .todo-text:focus { box-shadow: inset 0 0 0 2px; } /* checkbox styles */ .c-cb { box-sizing: border-box; font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; font-weight: 400; font-size: 1.6rem; line-height: 1.25; display: block; position: relative; min-height: 44px; padding-left: 40px; clear: left; } .c-cb > label::before, .c-cb > input[type="checkbox"] { box-sizing: border-box; top: -2px; left: -2px; width: 44px; height: 44px; } .c-cb > input[type="checkbox"] { -webkit-font-smoothing: antialiased; cursor: pointer; position: absolute; z-index: 1; margin: 0; opacity: 0; } .c-cb > label { font-size: inherit; font-family: inherit; line-height: inherit; display: inline-block; margin-bot...
...tom: 0; padding: 8px 15px 5px; cursor: pointer; touch-action: manipulation; } .c-cb > label::before { content: ""; position: absolute; border: 2px solid currentcolor; background: transparent; } .c-cb > input[type="checkbox"]:focus + label::before { border-width: 4px; outline: 3px dashed #228bec; } .c-cb > label::after { box-sizing: content-box; content: ""; position: absolute; top: 11px; left: 9px; width: 18px; height: 7px; transform: rotate(-45deg); border: solid; border-width: 0 0 5px 5px; border-top-color: transparent; opacity: 0; background: transparent; } .c-cb > input[type="checkbox"]:checked + label::after { opacity: 1; } with our markup styled, everything now looks better: the code so far git to see the state of the code as it should be...
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
to start with, add the following line at the beginning of the newtodo.svelte <script> section: import { onmount } from 'svelte' and these lines at the end of it: console.log('initializing:', nameel) onmount( () => { console.log('mounted:', nameel) }) now remove the if (autofocus) nameel.focus() line to avoid throwing the error we were seeing before.
... we could achieve all this in our todo component whenever we add or remove the <input> from the dom, but we would have to be very careful to add the event listener after the node has been added to the dom, and remove the listener before the node is removed from the dom.
... import selectonfocus() from actions.js in this file too, as before: import { selectonfocus } from '../actions.js' add the use:selectonfocus directive to the <input>, like this: <input bind:value={name} bind:this={nameel} use:selectonfocus type="text" id="todo-0" autocomplete="off" class="input input__lg" /> with a few lines of code we can add functionality to regular html elements, in a very reusable and declarative way.
... our onedit() function can now be much simpler: function onedit() { editing = true // enter editing mode } as a last example before we move on, let's go back to our todo.svelte component and give focus to the edit button after the user presses save or cancel.
Handling common accessibility problems - Learn web development
if you are inventing them yourself, you need to make sure that they are keyboard accessible; if you are using some kind of third-party framework, carefully review the options available to see how accessible they are before diving in.
...if you've not used vo before, you will be given a welcome screen where you can choose to start vo or not, and run through a rather useful tutorial to learn how to use it.
...you can choose whether to make a donation or download it for free; you'll also need to give them your e-mail address before you can download it.
...in the case of nvda, the modifier can either be insert (the default), or capslock (can be chosen by checking the first checkbox in the nvda welcome dialog before pressing ok).
Introduction to automated testing - Learn web development
with the in-built image editor, highlight your screenshot before you push it to your colleagues.
...use a different directory name than before, like sauce-test for example.
...use a different directory name than before, like bstack-test for example.
...use a different directory name than before, like tb-test for example.
Implementing feature detection - Learn web development
before we move on, we'd like to say one thing upfront — don't confuse feature detection with browser sniffing (detecting what specific browser is accessing the site) — this is a terrible practice that should be discouraged at all costs.
... next, add a <script></script> element at the bottom of your body (just before the closing </body> tag).
...this needs to be applied to the page before any css (or javascript) that might make use of it.
... finally, add another <script> element at the bottom of the html body (just before the </body> tag), and put the following script inside the tags: if (modernizr.geolocation) { navigator.geolocation.getcurrentposition(function(position) { let latlng = new google.maps.latlng(position.coords.latitude,position.coords.longitude); let myoptions = { zoom: 8, center: latlng, maptypeid: google.maps.maptypeid.terrain, disabledefaultui: true } ...
Handling common HTML and CSS problems - Learn web development
first things first: fixing general problems we said in the first article of this series that a good strategy to begin with is to test in a couple of modern browsers on desktop/mobile, to make sure your code is working generally, before going on to concentrate on the cross browser issues.
... in our debugging html and debugging css articles, we provided some really basic guidance on debugging html/css — if you are not familiar with the basics, you should definitely study these articles before carrying on.
... put the following code into the head of your html document, just before the opening <style> tag: <script type="text/javascript" src="mootools-core-1.6.0.js"></script> <!--[if (gte ie 6)&(lte ie 8)]> <script type="text/javascript" src="selectivizr-min.js"></script> <![endif]--> if you try running this in an old version of ie, it should work fine.
...you are advised to look and see if there is an answer to your question already, before posting a new question.
Introduction to cross browser testing - Learn web development
before you even get to cross browser issues, you should have already fixed out bugs in your code (see debugging html, debugging css, and what went wrong?
...no more new work done on them) a long time before a new feature was even invented.
...for example, if the e-commerce site owner wants a webgl-powered 3d tour of each product built into the product pages, they will need to accept that this just won't work in ie versions before 11.
...the most important thing is that you test each small part before committing it — don't leave all the testing till the end!
Client-side tooling overview - Learn web development
from time to time, even the most experienced of web developers get stuck on a tooling problem; it is possible to waste hours attempting to get a tooling pipeline working before even touching a single line of application code.
... bundlers/packagers these are tools that get your code ready for production, for example by “tree-shaking” to make sure only the parts of your code libraries that you are actually using are put into your final production code, or "minifying" to remove all the whitespace in your production code, making it as small as possible before it is uploaded to a server.
... testing tools these generally take the form of a tool that will automatically run tests against your code to make sure it is correct before you go any further (for example, when you attempt to push changes to a github repo).
... you’ll probably need a combination of the following things: experienced teachers, mentors, fellow students, or colleagues that have some experience, have solved such problems before, and can give advice.
Old Thunderbird build
building thunderbird before you start, make sure that the version you checked out is not busted.
... then just re-run the mach command above (you can do the addition before running mach for the first time).
...to run the executable from your comm-central working directory: windows: obj-.../dist/bin/thunderbird.exe linux: obj-.../dist/bin/thunderbird os x: obj-.../dist/daily.app/contents/macos/thunderbird how to update and build again in your comm-central directory, run the same command as before: python client.py checkout then just re-run the mach command above.
... if on windows you get link errors like "lnk1102: out of memory" or "lnk1318: unexpected pdb error; ok (0)", try deleting the largest .pdb files before rushing out the door to buy more ram.
Eclipse CDT Manual Setup
before you proceed any further, check that your changes to eclipse's memory limits have taken effect and are present in eclipse/help > about eclipse > installation details > configuration.
... whenever you create a new workspace for a mozilla source tree, you should be sure to turn off the following two settings in the workspace preferences (window > preferences, or eclipse > preferences) before creating a project in that workspace: in "general > workspace", disable "build automatically" in "c/c++ > indexer", disable "automatically update the index" turning off automatic indexing prevents the cpu intensive indexer from running at various stages during the steps below before we're ready.
...(if an "indexing" item starts after the "refreshing the workspace" item has finished, click the little red box beside that item to cancel it, since we want to configure the project before the indexer runs.) initial project properties so that the indexer will run faster and give better results, and so that eclipse doesn't give results for irrelevant files, you should add some resource filters to have eclipse ignore certain non-source files and directories.
... if the main object directory for your source tree is a fennec build: in the "cdt gcc build output parser", change the compiler command pattern to (.*gcc)|(.*[gc]\+\+)|(clang) (before this change it should have been "(gcc)|([gc]\+\+)|(clang)").
Experimental features in Firefox
you can test your web sites and applications before these features get released and ensure everything will still work with the latest web technology capabilities.
... nightly 73 no developer edition 73 no beta 73 no release 73 no preference name dom.webgpu.enabled html dom api global event: beforeinput the global beforeinput event is sent to an <input> element—or any element whose contenteditable attribute is enabled—immediately before the element's value changes.
... nightly 74 no developer edition 74 no beta 74 no release 74 no preference name dom.input_events.beforeinput.enabled htmlmediaelement method: setsinkid() htmlmediaelement.setsinkid() allows you to set the sink id of an audio output device on an htmlmediaelement, thereby changing where the audio is being output.
...we experiment with new ideas, add new features, and test them on the nightly and developer edition channels before letting them go through to beta and release.
DeferredTask.jsm
multiple attempts to run the same task before the delay will be coalesced.
...multiple attempts to run the task before the delay has passed are coalesced.
...it is, however, possible to arm the timer again during the execution of the task, in which case the task will need to finish before the timer is started again, thus guaranteeing a time of inactivity between executions that is at least equal to the provided delay.
... for example, during shutdown, you may want to ensure that any pending write is processed, using the latest version of the data if the timer is armed: asyncshutdown.profilebeforechange.addblocker( "example service: shutting down", () => savedeferredtask.finalize() ); instead, if you are going to delete the saved data from disk anyways, you might as well prevent any pending write from starting, while still ensuring that any write that is currently in progress terminates, so that the file is not in use any more: savedeferredtask.disarm(); savedeferredtask.finalize().
QA phase
/hg.mozilla.org/releases/mozilla-aurora )/ l10n-central (directory for l10n directories, one per l10n; often referred to as "l10n base")/ your-locale-code (a directory with your l10n files, in this example we'll use x-testing) example: root/mozilla-aurora & root/l10n-central/x-testing additionally, you will need to copy and translate the toolkit/defines.inc file directly from en-us before you can build.
...before a team becomes official, we like to get the localizers comfortable with the hg commands that allow for cloning, pulling, committing, and pushing work to an experimental repository.
... note: you must have mercurial configured before you begin.
... pushing to your repository there are a couple of things you should take note of before you push to your repository: make sure that your files have been encoded in unicode without bom (byte order mark).
SVN for Localizers
note: if you do not already have access to svn, visit this wiki page on how to get set up with an svn account before proceeding.
... you can also run svn status to check the list of modified files (they'll display a m before the name) you're about to commit.
...it's very important for you to update your working copy with the newest files from mozilla svn repository before you start making changes.
...as a general rule, you should at least do it before translating anything.
Localization sign-off reviews
does not need to be approved before revision merge between release channels, although it is recommended.
... how it all works a large part of the review process takes place before you even submit your request for a sign-off review.
...so before you request your sign-off review, be sure that it is as ready as it can be.
...once they are fixed, push your fix to your repo, attach it to the corresponding bug using the same mercurial revision number as before, and then request another review.
Localization technical reviews
more intl.properties checkpoints, cont we also check the plural rule for the locale, that the general.useragent.locale is set to the locale code, that accept-lang shows the locale code(s) (like ab, ab-cd,...) and is followed by en and en-us, and finally that intl.menuitems.insertseparatorbeforeaccesskeys = true, where "true" should be left untranslated.
...most locales should have the following: #filter substitution pref("general.useragent.locale", "@ab_cd@") how it all works a large part of the review process takes place before you even submit your request for a technical review.
...so before you request your technical review, be sure that it is as ready as it can be.
...once they are fixed, push your fix to your repo, attach it to the corresponding bug using the same mercurial revision number as before, and then request another review.
DMD
desktop firefox (linux) build build firefox with these options: ac_add_options --enable-dmd if building via try server, modify browser/config/mozconfigs/linux64/common-opt or a similar file before pushing.
... desktop firefox (mac) build build with these options: ac_add_options --enable-dmd if building via try server, modify browser/config/mozconfigs/macosx64/common-opt or a similar file before pushing.
...you can do this by running: adb push $objdir/dist/bin/libdmd.so /sdcard/ second, you will need to make an executable wrapper for fennec which sets an environment variable before launching it.
... launch launch fennec either by tapping on the icon as usual, or from the command line (as before, be sure to replace org.mozilla.fennec_$username with the app identifier as appropriate).
Gecko Profiler FAQ
in the end, you should have one big “before” profile and one big “after” profile.
...the only way that i’ve tried before is to use a “difference calltree”: in the regular call tree, each node of the calltree is assigned a weight which is just the number of samples that were under this call stack.
... in a difference call tree, each node’s weight instead is computed as <number of samples under this stack in the “after” profile> minus <number of samples under this stack in the “before” profile>.
... but the short answer is picking up real browser workloads, and finding ways to split out the overall cost contributed by the thing that your change is going to affect and compare things before and after.
pkfnc.html
this function will return the newest certificate that matches the subject, based on the notbefore / notafter fields of the certificate.
...if you want to preserve it, copy the string before freeing the slot.
...if you want to preserve it, copy the string before freeing the slot.
... several functions in the nss libraries use the password callback function to obtain the password before performing operations that involve the protected information.
NSS_3.12.3_release_notes.html
this was allowed by default before nss 3.12.3.
... nss_strict_nofork string ("1", "disabled", or any other non-empty value) it is an error to try to use a pkcs#11 crypto module in a process before it has been initialized in that process, even if the module was initialized in the parent process.
... nss_use_decoded_cka_ec_point boolean (any non-empty value to enable) tells nss to send ec key points across the pkcs#11 interface in the non-standard unencoded format that was used by default before nss 3.12.3.
...this behavior was the default before nss 3.12.3.
Hacking Tips
if you want to know at which lir the code is failing at, the js::ion::codegenerator::generatebody function can be intrumented to dump the lir id before each instruction.
...external programs such as iongraph, dot, and your png viewer are search into the path, otherwise custom one can either be configured with environment variables (gdb_iongraph, gdb_dot, gdb_pngviewer) before starting gdb, or with gdb parameters (set iongraph-bin <path>, set dot-bin <path>, set pngviewer-bin <path>) within gdb.
... using rr on a test get the command line for your test run using -s: ./jit_test.py -s $js_shell saved-stacks/async.js insert 'rr' before the shell invocation: rr $js_shell -f $js_src/jit-test/lib/prolog.js --js-cache $js_src/jit-test/.js-cache -e "const platform='linux2'; const libdir='$js_src/jit-test/lib/'; const scriptdir='$js_src/jit-test/tests/saved-stacks/'" -f $js_src/jit-test/tests/saved-stacks/async.js (note that the above is an example; simply setting js_shell and js_src will not work).
... dumping the javascript heap from the shell, you can call the dumpheap before firefox function to dump out all gc things (reachable and unreachable) that are present in the heap.
Garbage collection
if the allocation rate is high during incremental gc, the engine may run out of memory before finishing the incremental gc.
... the write barrier is a piece of code that runs just before a pointer store occurs and records just enough information to make sure that live objects don't get collected.
...live cells will be marked either because they're reachable or because they were marked by a pre-barrier before being removed from the graph.
...js::nativeobject::privatewritebarrierpre takes care of this by invoking the jsobject's class trace hook before the private field is set.
Secure Development Guidelines
bbv: stack overflow example: void foo(char *bar) { char c[12]; strcpy(c, bar); } int main(int argc, char **argv) { foo(argv[1]); } bbv: stack overflow before the stack overflow bbv: stack overflow after the stack overflow bbv: heap overflow dynamic memory malloc() calloc() heapalloc() mmap() not on the stack segment!
...o_something(); delete ptr1; do_something_else(); ptr2 = new char[-1] // oom } catch (...) { delete ptr1; delete ptr2; } new will throw an exception — ptr1 is already freed in the try block then freed again in the catch block freeing un-initialized data free data in the catch block assumption is that it’s initialized in the try block if the try block throws before the variable is initialized, the catch block will operate on un-intialized data freeing un-initialized data example: int main(){ char *ptr; try { ptr = new char[-1]; // oom } catch(...) { delete ptr; } } freeing un-initialized data: prevention be careful when freeing data in catch blocks make sure the try block can’t throw before data is initia...
...lized initialize variables when they’re declared; for example, set pointers to null memory leaks usually occur when memory is allocated in a try block after the allocation, something throws in the try block before memory is freed in the try block the catch block does not foresee this and doesn't free the memory freeing un-initialized data example: int main(){ char *p; try { p = new char [1000]; ...
... } } memory leaks: prevention any acquired resource in a try block should be freed in a catch block (if the try block throws before the resource is freed) might be helpful to initialize variables null for pointers -1 for file descriptors ...
mozIStorageStatement
you must call this method on every active statement before you try to call mozistorageconnection.close().
...this must be called before reusing the statement.
... note: the statement does not have to be reset before being reused.
... note: the statement must be reset before being reused.
nsIDOMEvent
if the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs.
... originaltarget nsidomeventtarget the original target of the event, before any retargetings.
...this method may only be called before the event has been dispatched via the dispatchevent method, though it may be called multiple times during that phase if necessary.
...the event will complete dispatch to all listeners on the current eventtarget before event flow stops.
nsIDocShell
forcedcharset nsiatom a character set to override the page's default character set while processing; this is tried before using any other character set during page loads.
... isinunload boolean find out whether the docshell is currently in the middle of a page transition (after the onunload event has fired, but before the new document has been set up) read only.
... busy_flags_before_page_load 2 returned by the busyflags attribute when the nsidocshell has started loading a document from the network, but no data has been received yet.
...called by the document before initiating an out of band document.write().
nsIJSON
don't forget to gcroot the result before using it.
...don't forget to gcroot the jsval before using it.
...don't forget to gcroot the result before using it.
...don't forget to gcroot the jsval before using it.
nsINavHistoryObserver
method overview void onbeforedeleteuri(in nsiuri auri, in acstring aguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onclearhistory(); void ondeleteuri(in nsiuri auri, in acstring aguid); void ondeletevisits(in nsiuri auri, in prtime avisittime, in acstring aguid); void onendupdatebatch(); void onpagechanged(in nsiuri auri, in unsigned long awhat, in astr...
... methods onbeforedeleteuri() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note: this method was removed in gecko 21.0 as part of bug 826409.
... note: see using onbeforedeleteuri() in gecko 1.9.1 for how to implement this in gecko 1.9.1 void onbeforedeleteuri( in nsiuri auri, in acstring aguid ); parameters auri the uri of the page about to be deleted.
... using onbeforedeleteuri() in gecko 1.9.1 if you wish to support onbeforedeleteuri() in applications based on gecko 1.9.1, you must implement your observer's queryinterface() method to match on both nsinavhistoryobserver and nsinavhistoryobserver_mozilla_1_9_1_additions, as shown below.
Setting HTTP request headers
in particular, to get the nsihttpchannel just before the http request is made we need to observe the "http-on-modify-request" topic.
...it is the same code we used before, earlier in this article, to add the http request header.
...we are saying we want httprequestobserver to be notified (by calling its observe method) when a "http-on-modify-request" topic takes place (which we know happens just before each http request).
...while the previous version we showed before was good for learning, in an actual real-world application, you'd probably want to code it more like the following.
Storage
the latter will allow all ongoing transactions to complete before closing the connection, and will optionally notify you via callback when the connection is closed.
...once all the parameters are set up, a single call to mozistoragestatement.bindparameters() will ensure that the parameters are bound before execution.
... you can then execute the statement asynchronously, and the statement will get each set of bindings bound to it before execution asynchronously.
...you should do this before you reuse the statement.
Getting Started Guide
if you have never used nscomptrs before, this section is for you.
...clients are expected to keep this reference count accurate by incrementing it when they acquire a reference to the interface, and decrementing it before they let go.
...if you were to use a raw pointer instead, your function couldn't know what ownership relationship the caller had to the input value, and hence, couldn't know whether to release it or not before assigning in the new value.
...an nscomptr always calls release before letting go, whether the nscomptr is letting go so that it can point to a different object, or because the nscomptr is going out of scope.
Plug-in Development Overview - Plugins
drawing a plug-in instance before drawing itself on the page, the plug-in must provide information about itself, set the window or other target in which it draws, arrange for redrawing, and handle events.
... npn_invalidaterect: invalidate an area in a windowless plug-in before repainting or refreshing.
... npn_invalidateregion: invalidate an area in a windowless plug-in before repainting or refreshing.
... use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls.
Streams - Plugins
in general, this mode is more expensive, because the entire stream must be downloaded to a temporary file before use unless the stream comes from a local file or an http server that supports the byte-range extension to http.
... finding out how much data the plug-in can accept after a call to npp_newstream and before writing data to the plug-in, the browser calls npp_writeready to determine the maximum number of bytes that the plug-in can consume.
...the browser calls npp_writeready before each call to npp_write.
...the browser must download the entire stream to a temporary file before it can be used, unless the stream comes from a local file or an http server that supports the byte-range extension to http.
Index - Firefox Developer Tools
38 aggregate view before firefox 48, this was the default view of a heap snapshot.
... after firefox 48, the default view is the tree map view, and you can switch to the aggregate view using the dropdown labeled "view:": 39 basic operations before firefox 50, the memory tool is not enabled by default.
... 83 allocations to enable the allocations view, you must check "record allocations" in the performance tool settings, before recording a profile.
... 158 about:debugging (before firefox 68) the about:debugging page provides a single place from which you can attach the firefox developer tools to a number of debugging targets.
Element.insertAdjacentHTML() - Web APIs
syntax element.insertadjacenthtml(position, text); parameters position a domstring representing the position relative to the element; must be one of the following strings: 'beforebegin': before the element itself.
... 'afterbegin': just inside the element, before its first child.
... 'beforeend': just inside the element, after its last child.
... visualization of position names <!-- beforebegin --> <p> <!-- afterbegin --> foo <!-- beforeend --> </p> <!-- afterend --> note: the beforebegin and afterend positions work only if the node is in the dom tree and has a parent element.
Comparison of Event Targets - Web APIs
event.explicitoriginaltarget event.webidl if the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs.
... event.originaltarget event.webidl the original target of the event, before any retargetings.
... event.composedtarget event.webidl the original non-native target of the event before composition from shadow dom.
... <td class="standard">target who's event listener is being processed <small>event.currenttarget</small></td> <td class="standard">identify other element (if any) involved in the event <small>event.relatedtarget</small></td> <td class="non-standard">if there was a retargetting of the event for some reason <small> event.explicitoriginaltarget</small> contains the target before retargetting (never contains anonymous targets)</td> <td class="non-standard">if there was a retargetting of the event for some reason <small> event.originaltarget</small> contains the target before retargetting (may contain anonymous targets)</td> </tr> </thead> <tr> <td id="target"></td> <td id="currenttarget"></td> <td id="relatedtarget"></td...
HTMLBodyElement - Web APIs
windoweventhandlers.onbeforeprint is an eventhandler representing the code to be called when the beforeprint event is raised.
... windoweventhandlers.onbeforeunload is an eventhandler representing the code to be called when the beforeunload event is raised.
... living standard technically, the event-related properties onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagechange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload, have been moved to windoweventhandlers.
... the following properties have been added: onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload.
Ajax navigation example - Web APIs
"</title>"; ?> </head> <body> <?php include "include/before_content.php"; ?> <p>this paragraph is shown only when the navigation starts from <strong>first_page.php</strong>.</p> <div id="ajax-content"> <?php } ?> <p>this is the content of <strong>first_page.php</strong>.</p> <?php if ($as_json) { echo json_encode(array("page" => $page_title, "content" => ob_get_clean())); } else { ?> </div> <p>this paragraph is shown only when the...
..."</title>"; ?> </head> <body> <?php include "include/before_content.php"; ?> <p>this paragraph is shown only when the navigation starts from <strong>second_page.php</strong>.</p> <div id="ajax-content"> <?php } ?> <p>this is the content of <strong>second_page.php</strong>.</p> <?php if ($as_json) { echo json_encode(array("page" => $page_title, "content" => ob_get_clean())); } else { ?> </div> <p>this paragraph is shown only when t...
..."</title>"; ?> </head> <body> <?php include "include/before_content.php"; ?> <p>this paragraph is shown only when the navigation starts from <strong>third_page.php</strong>.</p> <div id="ajax-content"> <?php echo $page_content; ?> </div> <p>this paragraph is shown only when the navigation starts from <strong>third_page.php</strong>.</p> <?php include "include/after_content.php"; echo "</body>\n</html>"; } ?> css/style.css: #aja...
...it is shared between all ajax pages.</p> include/before_content.php: <p> [ <a class="ajax-nav" href="first_page.php">first example</a> | <a class="ajax-nav" href="second_page.php">second example</a> | <a class="ajax-nav" href="third_page.php">third example</a> | <a class="ajax-nav" href="unexisting.php">unexisting page</a> ] </p> include/header.php: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascrip...
Basic concepts - Web APIs
in this case the complete event is fired after the os has been told to write the data but potentially before that data has actually been flushed to disk.
... the event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the os crashes or there is a loss of system power before the data is flushed to disk.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.) this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
...the key must be of a data type that has a number that is greater than the one before it.
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.
...persistent storage is storage that stays in the browser unless the app or the user removes it, but the user must grant you permission before you can use it.
...quest storage, you need to do something like the following: var requestedbytes = 1024*1024*10; // 10mb navigator.webkitpersistentstorage.requestquota ( requestedbytes, function(grantedbytes) { window.requestfilesystem(persistent, grantedbytes, oninitfs, errorhandler); }, function(e) { console.log('error', e); } ); your user must grant your app permission to store data locally before your app can use persistent storage.
...the user must grant permission before the app can use this type of storage.
NotificationEvent - Web APIs
or androidopera for androidsafari on iossamsung internetnotificationevent experimentalchrome full support 42edge full support ≤18firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie ?
...l support 4.0notificationevent() constructor experimentalchrome full support 42edge full support ≤18firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie ?
...droid full support 4.0action experimentalchrome full support 48edge full support ≤18firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie ?
... full support 5.0notification experimentalchrome full support 42edge full support ≤18firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie ?
PerformanceEventTiming - Web APIs
auxclick beforeinput click compositionend compositionstart compositionupdate contextmenu dblclick dragend dragenter dragleave dragover dragstart drop input keydown keypress keyup mousedown mouseenter mouseleave mouseout mouseover mouseup pointerover pointerenter pointerdown pointerup pointercancel pointerout pointerleave gotpointercapture lostpointercapture touchstart touchend touchcancel properties performanceeventtiming.processingstart returns the time at which event dispatch started.
... examples the following example shows how to use the api for all events: const observer = new performanceobserver(function(list) { const perfentries = list.getentries().foreach(entry => { // full duration const inputduration = entry.duration; // input delay (before processing event) const inputdelay = entry.processingstart - entry.starttime; // synchronous event processing time (between start and end dispatch).
... // keep track of whether (and when) the page was first hidden, see: // https://github.com/w3c/page-visibility/issues/29 // note: ideally this check would be performed in the document <head> // to avoid cases where the visibility state changes before this code runs.
...entries that occurred before calling `observe()` below.
Range - Web APIs
WebAPIRange
range.setstartbefore() sets the start position of a range relative to another node.
... range.setendbefore() sets the end position of a range relative to another node.
... range.comparenode() returns a constant representing whether the node is before, after, inside, or surrounding the range.
... range.comparepoint() returns -1, 0, or 1 indicating whether the point occurs before, inside, or after the range.
Resource Timing API - Web APIs
the first property in the processing model is starttime which returns the timestamp immediately before the resource loading process begins.
...the next stages are connectstart and connectend which are the timestamps immediately before and after connecting to the server, respectively.
... the last three timestamps are, in order: requeststart - the timestamp before the browser starts requesting the resource from the server; responsestart - the timestamp after the browser receives the first byte of the response from the server; and responseend - the timestamp after the browser receives the last byte of the resource.
... the encodedbodysize property returns the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
SVGSVGElement - Web APIs
svgsvgelement.usecurrentview the initial view (i.e., before magnification and panning) of the current innermost svg document fragment can be either the "standard" view, i.e., based on attributes on the <svg> element such as viewbox) or on a "custom" view (i.e., a hyperlink into a particular <view> or other element).
... svgsvgelement.currentview an svgviewspec defining the initial view (i.e., before magnification and panning) of the current innermost svg document fragment.
...if getcurrenttime() is called before the document timeline has begun (for example, by script running in a <script> element before the document's svgload event is dispatched), then 0 is returned.
...if setcurrenttime() is called before the document timeline has begun (for example, by script running in a <script> element before the document's svgload event is dispatched), then the value of seconds in the last invocation of the method gives the time that the document will seek to once the document timeline has begun.
Movement, orientation, and motion: A WebXR example - Web APIs
options this example has a number of options you can configure by adjusting the values of constants before you load it in the browser.
... starting up the webxr session the sessionstarted() function handles actually setting up and starting the session, by setting up event handlers, compiling and installing the glsl code for the vertex and fragment shaders, and attaching the webgl layer to the webxr session before kicking off the rendering loop.
... applying the user inputs the applyviewercontrols() function, which is called by drawframe() before beginning to render anything, takes the offsets in each of the three directions, the yaw offset, and the pitch offset as recorded by the handlekeydown() and handlepointermove() functions in response to the user pressing keys and dragging their mouse with the right mouse button pressed.
... loadshader() creates a shader object and loads the specified source code into it before compiling the code and checking to ensure that the compiler succeeded before returning the newly compiled shader to the caller.
Using the Web Audio API - Web APIs
autoplay policies typically require either explicit permission or a user engagement with the page before scripts can trigger audio to play.
...we have a play button that changes to a pause button when the track is playing: <button data-playing="false" role="switch" aria-checked="false"> <span>play/pause</span> </button> before we can play our track we need to connect our audio graph from the audio source/input node to the destination.
...we'll use the factory method in our code: const gainnode = audiocontext.creategain(); now we have to update our audio graph from before, so the input is connected to the gain, then the gain node is connected to the destination: track.connect(gainnode).connect(audiocontext.destination); this will make our audio graph look like this: the default value for gain is 1; this keeps the current volume the same.
...again let's use a range type input to vary this parameter: <input type="range" id="panner" min="-1" max="1" value="0" step="0.01"> we use the values from that input to adjust our panner values in the same way as we did before: const pannercontrol = document.queryselector('#panner'); pannercontrol.addeventlistener('input', function() { panner.pan.value = this.value; }, false); let's adjust our audio graph again, to connect all the nodes together: track.connect(gainnode).connect(panner).connect(audiocontext.destination); the only thing left to do is give the app a try: check out the final demo here on codepen...
Visualizations with Web Audio API - Web APIs
these methods copy data into a specified array, so you need to create a new array to receive the data before invoking one.
...oscilloscope to create the oscilloscope visualisation (hat tip to soledad penadés for the original code in voice-change-o-matic), we first follow the standard pattern described in the previous section to set up the buffer: analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep looping the drawing function once it has been started: var drawvisual = requestanimationframe(draw); next, we grab the time domain data and copy it into our array analyser.getbytetimedomaindata(dataarr...
...the only difference from before is that we have set the fft size to be much smaller; this is so that each bar in the graph is big enough to actually look like a bar rather than a thin strand.
... var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; as before, we now start a for loop and cycle through each value in the dataarray.
Using Web Workers - Web APIs
function declarations after the importscripts() method are also kept, since these are always evaluated before the rest of the code.
... the port connection needs to be started either implicitly by use of the onmessage event handler or explicitly with the start() method before any messages can be posted.
... sending messages to and from a shared worker now messages can be sent to the worker as before, but the postmessage() method has to be invoked through the port object (again, you'll see similar constructs in both multiply.js and square.js): squarenumber.onchange = function() { myworker.port.postmessage([squarenumber.value,squarenumber.value]); console.log('message posted to worker'); } now, on to the worker.
... example.html: (the main page): var myworker = new worker('my_task.js'); myworker.onmessage = function(oevent) { console.log('worker said : ' + oevent.data); }; myworker.postmessage('ali'); my_task.js (the worker): postmessage("i\'m working before postmessage(\'ali\')."); onmessage = function(oevent) { postmessage('hi ' + oevent.data); }; the structured cloning algorithm can accept json and a few things that json can't — like circular references.
Window.open() - Web APIs
WebAPIWindowopen
in addition to the toolbar buttons, firefox (before 76) will render the tab bar if it is visible, present in the parent window.
...therefore, before executing a script targeting a secondary window, the browser in the main window will verify that the secondary window has the same domain name.
...opening new browser windows, jakob nielsen, may 1999 when extreme changes in context are explicitly identified before they occur, then the users can determine if they wish to proceed or so they can be prepared for the change: not only they will not be confused or feel disoriented, but more experienced users can better decide how to open such links (in a new window or not, in the same window, in a new tab or not, in "background" or not).
...references "if your link spawns a new window, or causes another windows to 'pop up' on your display, or move the focus of the system to a new frame or window, then the nice thing to do is to tell the user that something like that will happen." world wide web consortium accessibility initiative regarding popups "use link titles to provide users with a preview of where each link will take them, before they have clicked on it." ten good deeds in web design, jakob nielsen, october 1999 using link titles to help users predict where they are going, jakob nielsen, january 1998 example "new window" icons & cursors always use the target attribute if javascript support is disabled or non-existent, then ...
Window.requestAnimationFrame() - Web APIs
the window.requestanimationframe() method tells the browser that you wish to perform an animation and requests that the browser calls a specified function to update an animation before the next repaint.
... the method takes a callback as an argument to be invoked before the repaint.
...this will request that your animation function be called before the browser performs the next repaint.
... element.style.transform = 'translatex(' + math.min(0.1 * elapsed, 200) + 'px)'; if (elapsed < 2000) { // stop the animation after 2 seconds window.requestanimationframe(step); } } window.requestanimationframe(step); notes edge versions below 17 and internet explorer do not reliably fire requestanimationframe before the paint cycle.
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
the microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the browser's event loop.
... this lets your code run without interfering with any other, potentially higher priority, code that is pending, but before the browser regains control over the execution context, potentially depending on work you need to complete.
... microtasks are especially useful for libraries and frameworks that need to perform final cleanup or other just-before-rendering tasks.
...enqueued microtasks are executed after all pending tasks have completed but before yielding control to the browser's event loop.
ARIA: listbox role - Accessibility
(for further details and a full list of aria states and properties see the aria listbox (role) documentation.) keyboard interactions when a single-select listbox receives focus: if none of the options are selected before the listbox receives focus, the first option receives focus.
... if an option is selected before the listbox receives focus, focus is set on the selected option.
... when a multi-select listbox receives focus: if none of the options are selected before the listbox receives focus, focus is set on the first option and there is no automatic change in the selection state.
... if one or more options are selected before the listbox receives focus, focus is set on the first option in the list that is selected.
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
elayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-countanimation-nameanimation-play-stateanimation-timing-function@annotationannotation()attr()b::backdropbackdrop-filterbackface-visibilitybackgroundbackground-attachmentbackground-blend-modebackground-clipbackground-colorbackground-imagebackground-originbackground-positionbackground-repeatbackground-size<basic-shape>::before (:before)bleed (@page)<blend-mode>block-sizeblur()borderborder-blockborder-block-colorborder-block-endborder-block-end-colorborder-block-end-styleborder-block-end-widthborder-block-startborder-block-start-colorborder-block-start-styleborder-block-start-widthborder-block-styleborder-block-widthborder-bottomborder-bottom-colorborder-bottom-left-radiusborder-bottom-right-radiusborder-bottom-stylebor...
...leftborder-left-colorborder-left-styleborder-left-widthborder-radiusborder-rightborder-right-colorborder-right-styleborder-right-widthborder-spacingborder-start-end-radiusborder-start-start-radiusborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottom@bottom-centerbox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counter>counter-incrementcounter-resetcounter-set@counter-stylecou...
...overflow-anchoroverflow-blockoverflow-inlineoverflow-wrapoverflow-xoverflow-yoverscroll-behavioroverscroll-behavior-blockoverscroll-behavior-inlineoverscroll-behavior-xoverscroll-behavior-yppad (@counter-style)paddingpadding-blockpadding-block-endpadding-block-startpadding-bottompadding-inlinepadding-inline-endpadding-inline-startpadding-leftpadding-rightpadding-top@pagepage-break-afterpage-break-beforepage-break-insidepaint()paint-orderpath()pc<percentage>perspectiveperspective()perspective-originplace-contentplace-itemsplace-self::placeholderpointer-eventspolygon()<position>positionprefix (@counter-style)ptpxqqquotesrradradial-gradient()range (@counter-style)<ratio>:read-only:read-writerect()remrepeat()repeating-linear-gradient()repeating-radial-gradient():requiredresize<resolution>revertrgb()...
... general sibling combinator a ~ b specifies that the elements selected by both a and b share the same parent and that the element selected by a comes before—but not necessarily immediately before—the element selected by b.
position - CSS: Cascading Style Sheets
WebCSSposition
xploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpositionchrome full support 1edge full support 12firefox full support 1notes full support 1notes notes before firefox 57, absolute positioning did not work correctly when applied to elements inside tables that have border-collapse applied to them (bug 1379306).notes before firefox 30, absolute positioning of table rows and row groups was not supported (bug 63895).ie full support 4opera full support 4safari ...
... full support 1webview android full support ≤37chrome android full support 18firefox android full support 4notes full support 4notes notes before firefox 57, absolute positioning did not work correctly when applied to elements inside tables that have border-collapse applied to them (bug 1379306).notes before firefox 30, absolute positioning of table rows and row groups was not supported (bug 63895).opera android full support 14safari ios full support 1samsung internet android f...
...t 11samsung internet android full support 6.0fixedchrome full support 1edge full support 12firefox full support 1notes full support 1notes notes before firefox 44, position: fixed didn't create a stacking context in most cases.
... 4safari full support 1webview android full support ≤37chrome android full support 18firefox android full support 4notes full support 4notes notes before firefox 44, position: fixed didn't create a stacking context in most cases.
will-change - CSS: Cascading Style Sheets
browsers may set up optimizations before an element is actually changed.
... these kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required.
...so it is a good practice to switch will-change on and off using script code before and after the change occurs.
...then the browser can choose to apply any ahead-of-time optimizations required for the property change before the property change actually happens.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
unlike <input type="email"> and <input type="url"> , the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world.
... here's a screenshot of what that might look like: validation as we've touched on before, it's quite difficult to provide a one-size-fits-all client-side validation solution for phone numbers.
... important: html form validation is not a substitute for server-side scripts that ensure the entered data is in the proper format before it is allowed into the database.
... in this example we'll use the same css as before, but our html is changed to look like this: <form> <div> <label for="telno">enter a telephone number (in the form xxx-xxx-xxxx): </label> <input id="telno" name="telno" type="tel" required pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}"> <span class="validity"></span> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; position: relative; ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
note: an element with the autofocus attribute may gain focus before the domcontentloaded event is fired.
...when autofocus is assigned, screen-readers "teleport" their user to the form control without warning them beforehand.
...while a screen reader will announce the label of the form control receiving focus, the screen reader will not announce anything before the label, and the sighted user on a small device will equally miss the context created by the preceding content.
... required required is a boolean attribute which, if present, indicates that the user must specify a value for the input before the owning form can be submitted.
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
this attribute allows the elimination of parser-blocking javascript where the browser would have to load and evaluate scripts before continuing to parse.
... defer this boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing domcontentloaded.
... this attribute allows the elimination of parser-blocking javascript where the browser would have to load and evaluate scripts before continuing to parse.
... notes scripts without async , defer or type="module" attributes, as well as inline scripts, are fetched and executed immediately, before the browser continues to parse the page.
A re-introduction to JavaScript (JS tutorial) - JavaScript
this is useful for checking for null objects before accessing their attributes: var name = o && o.getname(); or for caching values (when falsy values are invalid): var name = cachedname || (cachedname = getname()); javascript has a ternary operator for conditional expressions: var allowed = (age > 18) ?
... it is important to note that wherever the rest parameter operator is placed in a function declaration it will store all arguments after its declaration, but not before.
... 'this can now be reversed'.reversed(); // desrever eb won nac siht as mentioned before, the prototype forms part of a chain.
...we've seen this once before, with an earlier makeperson() function.
Array.prototype.forEach() - JavaScript
the range of elements processed by foreach() is set before the first invocation of callback.
...if existing elements of the array are changed or deleted, their value as passed to callback will be the value at the time foreach() visits them; elements that are deleted before being visited are not visited.
... converting a for loop to foreach const items = ['item1', 'item2', 'item3'] const copyitems = [] // before for (let i = 0; i < items.length; i++) { copyitems.push(items[i]) } // after items.foreach(function(item){ copyitems.push(item) }) printing the contents of an array note: in order to display the content of an array in the console, you can use console.table(), which prints a formatted version of the array.
... foreach() does not make a copy of the array before iterating.
Object.create() - JavaScript
adding the missing object-method directly from the standard-object does not work: ocn = object.create( null ); // create "null" object (same as before) ocn.tostring = object.tostring; // since new object lacks method then try assigning it directly from standard-object > ocn.tostring // shows "tostring() { [native code] }" -- missing method seems to be there now > ocn.tostring == object.tostring // shows "true" -- method seems to be same as the standard object-method > ocn.tostring() // error: function.prototype.tostring requires that 'this' ...
...be a function adding the missing object-method directly to new object's "prototype" does not work either, since the new object does not have a real prototype (which is really the cause of all these problems) and one cannot be directly added: ocn = object.create( null ); // create "null" object (same as before) ocn.prototype.tostring = object.tostring; // error: cannot set property 'tostring' of undefined ocn.prototype = {}; // try to create a prototype ocn.prototype.tostring = object.tostring; // since new object lacks method then try assigning it from standard-object > ocn.tostring() // error: ocn.tostring is not a function adding the missing object-method by using the standard-object as new object's prototype does not work either: ocn = object.create( null ...
...); // create "null" object (same as before) object.setprototypeof(ocn, object); // set new object's prototype to the standard-object > ocn.tostring() // error: function.prototype.tostring requires that 'this' be a function some ok solutions again, adding the missing object-method directly from the standard-object does not work.
... however, adding the generic method directly, does: ocn = object.create( null ); // create "null" object (same as before) ocn.tostring = tostring; // since new object lacks method then assign it directly from generic version > ocn.tostring() // shows "[object object]" > "ocn is: " + ocn // shows "ocn is: [object object]" ob={}; ob.pn=ocn; ob.po=oco; // create a compound object (same as before) > showproperties(ob) // display top-level properties - po: [object object] - pn: [object object] however, setting the generic prototype as the new object's prototype works even better: ocn = object.create( null ); // create "null" object (same as before) object.setprototypeof(ocn, object.prototype); // set new object's prototype to the "generic" object (not standard-object) (in ...
Digital audio concepts - Web media technologies
high-resolution (96 khz) audio is used in some high-end audio systems, and it and ultra-high resolution (192 khz) audio are useful for audio mastering, where you need as much quality as possible while manipulating and editing the sound before downsampling to the sample rate you will use for the final product.
... this is similar to how photographers will use high resolution images for editing and compositing before presenting the customer with a jpeg suitable for use on a web site.
... all of this means there is a fundamental question that has to be asked and answered before choosing a codec: given the content of the sound, the usage context, and the target audience, is it acceptable to lose some degree of audio fidelity, and if so, how much; or is it necessary that, upon decoding the data, the result be identical to the source audio?
...a sound coming from our right will arrive at our right ear before it arrives at our left ear.
Codecs used by WebRTC - Web media technologies
general codec requirements before looking at codec-specific capabilities and requirements, there are a few overall requirements that must be met by any codec configuration used with webrtc.
... preferred codecs for webrtc in major web browsers audio video chrome edge firefox vp9 (firefox 46 and later) vp8 opera safari choosing the right codec before choosing a codec that isn't one of the mandatory codecs (vp8 or avc for video and opus or pcm for audio), you should seriously consider the potential drawbacks: in particular, only these codecs can be generally assumed to be available on essentially all devices that support webrtc.
... licensing terms before choosing a video codec, make sure you're aware of any licensing requirements around the codec you select; you can find information about possible licensing concerns in our main guide to video codecs used on the web.
...be sure to confirm your exposure to liability before making any final decisions where potential exists for licensing issues.
Mobile first - Progressive web apps (PWAs)
in our planning your app article, we provided a high level look into the kinds of planning and functionality decisions you should make before you start coding an app, including some ideas for desktop and mobile design.
... first things first — mobile as a default you may think that concentrating on the mobile experience first sounds pointless, as we are more used to dealing with desktop sites, and we surely need to consider the full gamut of features for the overall experience across desktop, mobile, etc., before then paring it down to a mobile experience that is simpler, more streamlined, or whatever.
...then at implementation stage, we present the mobile layout and functionality as the default configuration provided, before additional information is loaded on top of that, whenever appropriate.
...for example: if you are serving different styling and layout information for different viewport sizes, etc., it makes more sense to include the narrow screen/mobile styling as the default styling before any media queries are encountered, rather than having desktop/wider screen styling first.
The building blocks of responsive design - Progressive web apps (PWAs)
border-box sizing the padding does not affect the overall width and height of the containers because we have set the box-sizing of all elements to border-box: *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } this basically means that width and height will now set the dimensions of an element all the way up to and including the border, not just the content.
...this is created using the css rules included at the top of the stylesheet, before any media queries are encountered.
...if you use the mobile first methodology, you will be creating your mobile layout inside your default css, before any media queries have been applied.
... mobify.js capturing a very clever technique from mozilla that allows you to capture the source of the page before it's parsed.
page-mod - Archive of obsolete content
var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*", contentscriptfile: [data.url("jquery.min.js"), data.url("my-script.js")] }); content scripts specified using this option are loaded before those specified by the contentscript option.
... the option takes a single string that may take any one of the following values: "start": load content scripts immediately after the document element 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) has been loaded, at the time the window.onload event fires var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*", contentscript: 'window.alert("...
...so you can rewrite the code above like this: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.org", contentstylefile: "./style.css" }); content styles specified by this option are loaded before those specified by the contentstyle option.
page-worker - Archive of obsolete content
content scripts specified by this option are loaded before those specified by the contentscript option.
...this may take one of the following values: "start": load content scripts immediately after the document 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 this property is optional and defaults to "end".
...this may have one of the following values: "start": load content scripts immediately after the document 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.
/loader - Archive of obsolete content
all other modules will be loaded by this module or its dependencies: let { main, loader } = require('toolkit/loader'); let loader = loader(options); let program = main(loader, './main'); a module can find out whether it was loaded as main: if (require.main === module) main(); it is possible to load other modules before a main one, but it's inherently harder to do.
...in order to load a module before a main one (for example to bootstrap an environment) the requirer must be created first: let { require, loader, module } = require('toolkit/loader'); let loader = loader(options); let requirer = module(requirerid, requireruri); let require = require(loader, requirer); let boostrap = require(bootstrapid); built-in modules each loader instance exposes the following built-in pseudo modules in addition to those passed via modules: chrome this pseudo module exposes everything that is typically available for js contexts with system principals under the components global.
...but sometimes you may want to prepare the environment using existing modules before doing that.
content/symbiont - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document 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 this property is optional and defaults to "end".
...content scripts specified by this property are loaded before those specified by the contentscript property.
...this may have one of the following values: "start": load content scripts immediately after the document 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.
Bootstrapped extensions - Archive of obsolete content
this feature was unavailable in firefox versions before 8.
... install your bootstrap script must include an install() function, which the application calls before the first call to startup() after the extension is installed, upgraded, or downgraded.
... uninstall this function is called after the last call to shutdown() before a particular version of an extension is uninstalled.
Miscellaneous - Archive of obsolete content
alse); } } function onfocusinput(focusevent) { focusedcontrol = focusevent.originaltarget; } function onblurinput(blurevent) { focusedcontrol = null; } or var element = document.commanddispatcher.focusedelement; inserting text at the cursor function inserttext(element, snippet) { var selectionend = element.selectionstart + snippet.length; var currentvalue = element.value; var beforetext = currentvalue.substring(0, element.selectionstart); var aftertext = currentvalue.substring(element.selectionend, currentvalue.length); element.value = beforetext + snippet + aftertext; element.focus(); //put the cursor after the inserted text element.setselectionrange(selectionend, selectionend); } inserttext(document.getelementbyid("example"), "the text to be inserted"); disa...
...reateinstance(ci.nsibinaryinputstream); stream.setinputstream(postdata); var postbytes = stream.readbytearray(stream.available()); var poststr = string.fromcharcode.apply(null, postbytes); //do anything to your poststr alert(poststr); getting a string from the input stream is made somewhat simpler in firefox 4, by the addition of netutil.readinputstreamtostring() getting postdata of a request before the request is sent the above code will get the postdata for a page that has already loaded.
... to see what the postdata looks like before the request is even sent, use the 'http-on-modify-request' observer topic: observerservice.addobserver(observer, 'http-on-modify-request', false); where "observer" is an object that has a method "observe": function observe(subject, topic, data) { subject.queryinterface(components.interfaces.nsiuploadchannel); postdata = subject.uploadstream; } here again, postdata is not a string, but an nsiinputstream, so you can use the last code snippet of the previous section to get the data as a string.
Enhanced Extension Installation - Archive of obsolete content
if the item is found incompatible, a version update check is performed as before.
... finalization on the next startup, the startup system discovers the .autoreg file (as before) and starts the extension system with the dirty flag, which causes the system to scan for items to be installed as before.
...the startup process discovered the .autoreg file, before pending operations are finalized the extension system reads the extensions-startup.manifest and scans all of the install locations looking for items that match the following criteria: item in install location is not listed in startup manifest (new item being installed by just appearing in the install location).
Extension Versioning, Update and Compatibility - Archive of obsolete content
as a rough overview this is a version string split by periods, some examples: 2.0 1.0b1 3.0pre1 5.0.1.2 note: before firefox 1.5 the more basic firefox version format was used: major.minor.release.build[+] where only digits were allowed.
... note: before firefox 1.5 the preference app.extensions.version could be used to override the version that the application believed itself to be to allow normally incompatible extensions to install.
... the technical details of the signing mechanism are beyond the scope of this document however the basics are as follows: step 1 - done once, before you publish your add-on the target: adding updatekey in install.rdf the add-on author creates a public/private rsa cryptographic key pair.
Listening to events in Firefox extensions - Archive of obsolete content
if a page uses an unload or beforeunload handler, it fires when the user navigates away from the page.
...if the page contains frames, then when the cached page is loaded: pageshow events from each frame fire before the pageshow event in the main document fires.
... when the user navigates away from the cached page, the pagehide event from each frame fires before the pagehide event in the main document.
Appendix A: Add-on Performance - Archive of obsolete content
the problem with the onload event is that it runs before the main window becomes visible, so all handlers need to complete before the user can see the window.
... luckily, minimizing your startup time is easy, if you follow these guidelines: do not load or run code before it’s needed.
...if there's anything you can unload before shutdown, or if there's anything you can do to unload things more efficiently, then it's important that you do.
User Notifications and Alerts - Archive of obsolete content
they interrupt the user's workflow, demanding immediate action before anything else can be done.
... the notificationbox element you have probably seen these before.
... an easy way to display alerts is to include a hidden box in your overlay, which you can fill with any content you need before removing the hidden attribute so that it is displayed to the user.
Setting up an extension development environment - Archive of obsolete content
(note that the extension manager automatically restarts the application at startup sometimes, which may mean you won't have time to see the messages logged before the automatic restart happens.
... to see them, prevent the automatic restart by setting the environment no_em_restart to 1 before starting the application.) nglayout.debug.disable_xul_fastload = true.
... note: if you already installed the extension via xpi, you should uninstall it first before creating the pointer file.
Exception logging in JavaScript - Archive of obsolete content
as a result, if, for example, c++ code called a javascript component, which threw an exception, that exception would be logged to the console before control was returned to the c++ caller.
...if the javascript in frame 2 either receives an exception from frame 3 or generates its own exception, and that exception remains unandled, then the exception will always be logged to the error console before control returns to the c++ in frame 1.
... in other words, all unhandled javascript exceptions (except those in rules 3 and 4 above) will be logged before control returns to the outermost c++ caller.
Style System Overview - Archive of obsolete content
mapruleinfointo implementations must check that the property is not filled in before filling it in.
... managing style contexts style contexts must (in most cases) be created before frames are constructed, to determine what frame to create.
... resolvepseudostylecontextfor: for pseudo-elements (:first-letter, :before, etc.) resolvestylecontextfornonelement: skips rule matching and uses root rule node (text frame optimization) managing style contexts style context resolving functions will walk the rule processors in stylesetimpl::filerules, find the correct rule node, and find a current child of the parent (“sibling sharing”) or create a new child.
JavaScript Client API - Archive of obsolete content
before starting before you start learning the javascript api, you should spend some time on http://docs.services.mozilla.com/ reading about how the sync service operates.
...before developing against the javascript api, it is recommended to speak to developers of the api.
...reason for this is, weave will iterate through the registerengines preference and try to instantiate each engine it has there before you the line mentioned above ever has a chance to execute.this means the constructor to your engine is not ready when weave tries to instantiate it.
Simple Storage - Archive of obsolete content
the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("storage.simple"); methods sync()as described above, the jetpack.storage.simple object is automatically written to disk, but a feature may force flush by calling jetpack.storage.simple.sync().
... notes : [{ label: "(empty)", disabled: true }]) });}// modify the page's context menu by sneaking in before it's shown.
...:(jetpack.menu.context.page.beforeshow = function (menu) { menu.reset(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } });};// initialize the jetpack menu with the current notes.updatejetpackmenu(); see also settings jep 11 ...
Simple Storage - Archive of obsolete content
the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("storage.simple"); methods sync()as described above, the jetpack.storage.simple object is automatically written to disk, but a feature may force flush by calling jetpack.storage.simple.sync().
... notes : [{ label: "(empty)", disabled: true }]) }); } // modify the page's context menu by sneaking in before it's shown.
...:( jetpack.menu.context.page.beforeshow = function (menu) { menu.reset(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } }); }; // initialize the jetpack menu with the current notes.
Scripting - Archive of obsolete content
it can contain the following functions: startup when the app starts, before the user interface is displayed.
...preload just before the user interface is displayed.
...shutdown just before the application terminates.
Frequently Asked Questions - Archive of obsolete content
the native svg support must be turned off before mozilla will look to see if there's an svg plugin installed.
...tim is working on implementing <filter> and working on items that need to be done before turning on svg by default.
...jonathan is working on various bugs, especially those that need to be fixed before svg can be enabled in the official builds.
Space Manager Detailed Design - Archive of obsolete content
ft, nscoord atop, nscoord aright, nscoord abottom, nsiframe*); bandrect(nscoord aleft, nscoord atop, nscoord aright, nscoord abottom, nsvoidarray*); ~bandrect(); // list operations bandrect* next() const {return (bandrect*)pr_next_link(this);} bandrect* prev() const {return (bandrect*)pr_prev_link(this);} void insertbefore(bandrect* abandrect) {pr_insert_before(abandrect, this);} void insertafter(bandrect* abandrect) {pr_insert_after(abandrect, this);} void remove() {pr_remove_link(this);} // split the band rect into two vertically, with this band rect becoming // the top part, and a new band rect being allocated and returned for the // bottom part // // does not insert the ne...
... starting at the head of the list of bandrects, check for intersection with the rect passed in: case #1: the rect is totally above the current band rect, so insert a new band rect before the current bandrect cases #2 and #7: the rect is partially above the band rect, so it is divided into two bandrects, one entirely above the band, and one containing the remainder of the rect.
... insert the part that is totally above the bandrect before the current bandrect, as in case #1 above, and adjust the other band rect to exclude the part already added.
Elements - Archive of obsolete content
the part before the colon is a namespace prefix so you must declare the xul namespace as well.
... a field no longer changes the value of a property set on the object itself (rather than a proto) before binding attachment.
... any - this causes the filter to ignore the state of any modifiers that occur before the any keword.
Windows Install - Archive of obsolete content
note the disk space verification, the editing of the windows registry, the writing to the installation log, and the error checking before either performinstall or cancelinstall is called.
... spacerequired) { logcomment("insufficient disk space: " + dirpath); logcomment(" required : " + spacerequired + " k"); logcomment(" available: " + spaceavailable + " k"); return(false); } return(true); } function updatewinreg4ren8dot3() { var fprogram = getfolder("program"); var ftemp = getfolder("temporary"); //notes: // can't use a double backslash before subkey // - windows already puts it in.
... // subkeys have to exist before values can be put in.
execute - Archive of obsolete content
blocking a boolean value that specifies whether the installation should wait for the execution of the file to finish before it resumes.
...the blocking parameter is not available as part of this method in versions of netscape before 6.1/mozilla 0.9.3.
...the optional blocking argument, when set to true, specifies that the installation should wait for this executable to finish before processing the next queued install command.
timeout - Archive of obsolete content
« xul reference home timeout type: integer for autocomplete textboxes, the number of milliseconds before the textbox starts searching for completions.
...for search textboxes, the number of milliseconds before the timer fires a command event.
...for timed textboxes, the number of milliseconds before the timer fires a command event.
XUL Events - Archive of obsolete content
attribute: onpopuphiding popupshowing this event is sent to a popup just before it is popped open.
...for user changes, the checkboxstatechange event is sent before the command event.
...for user changes, the radiostatechange event is sent before the command event.
Special per-platform menu considerations - Archive of obsolete content
menu_filequitseparator the separator just before the quit/exit item.
... menu_prefsseparator the separator just before the preferences/options item.
... aboutseparator the separator just before the about item.
Multiple Queries - Archive of obsolete content
here are the results that would be generated by the first query above, before any bindings are applied: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg, then, the builder adds the three results generated from the second query: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xu...
...the template builder removes any duplicate items before generating content.
...the builder hasn't put all the matches for the first query before the matches for the second query.
XUL accessibility guidelines - Archive of obsolete content
to prevent this, move the focus to the next element before disabling, hiding, or destroying the focus element.
... the following example shows a javascript function that can be called before destroying an element to check for focus and move it if necessary.
...if flickering or flashing is necessary then warn the user before it is displayed.
XUL Event Propagation - Archive of obsolete content
very often, the event raised by the element is heard by the element itself and handled right there before it bubbles up any higher.
...where event bubbling propagates an event from its target up higher into the node hiearchy, event capturing intercepts an event before it is received by other elements, even by the event target itself.
...any node above the event-raising element in the node hierarchy), you can use event capturing to handle the event in the ancestor before it is heard in the target itself or any of the intervening nodes.
iframe - Archive of obsolete content
warning: the type attribute must be set before the element is inserted into the document.
...this can be used to workaround things like bug 540911 inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related nsiaccessibleprovider ...
progressmeter - Archive of obsolete content
this is used when the length of time to complete an operation is not known beforehand.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprov...
tab - Archive of obsolete content
ArchiveMozillaXULtab
attributes accesskey, afterselected, beforeselected, command, crop, disabled, first-tab, image, label, last-tab, linkedpanel, oncommand, pending, pinned, selected, tabindex, unread, validate, value properties accesskey, accessibletype, command, control, crop, disabled, image, label, linkedpanel, selected, tabindex, value examples (example needed) attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... beforeselected type: boolean this is set to true if the tab is immediately before the currently selected tab.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata notes note: prior to gecko 1.9, disabl...
where - Archive of obsolete content
ArchiveMozillaXULwhere
less the numeric value of the subject must be less than the value greater the numeric value of the subject must be greater than the value before the string value of subject must come before value alphabetically after the string value of subject must come after value alphabetically startswith the value of subject must start with the value endswith the value of subject must end with the value contains the value of subject must contain the value as a substring subject type: string the variable or string to comp...
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex,...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
Getting started with XULRunner - Archive of obsolete content
here is mine: pref("toolkit.defaultchromeuri", "chrome://myapp/content/main.xul"); /* debugging prefs, disable these before you deploy your application!
... mac on the mac, before you can run a xulrunner application with everything intact, you must install it using the --install-app xulrunner commandline flag.
...before you get too far into things you might want to read the xulrunner tips article.
Mozilla release FAQ - Archive of obsolete content
if you're new to the mozilla newsgroups, you probably should be reading the newsgroup for a few days regularly before you post anything.
...for example, if you were to make a proposal to compress whole webpages before sending them, devise a new protocol to do so, research how http works, how html works, and think about all the good *and* bad points of reworking things.
...i would suggest that before you devote much time and effort to your port, you consider: how many users the os has that are likely to use mozilla does the os support multitasking well enough for mozilla does the os have a sufficiently evolved gui for mozilla to work does the os have sufficient networking support for mozilla is the os typically run on systems that have the resources to run mozilla does gcc or som...
Introduction to SSL - Archive of obsolete content
before continuing with the session, red hat servers can be configured to check that the client's certificate is present in the user's entry in an ldap directory.
...it is the client's responsibility to take step 4 before step 5.
...red hat servers may optionally be configured to perform step 5 before step 6.
-ms-hyphenate-limit-chars - Archive of obsolete content
if the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated.
... initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values auto corresponds to a value of 5 2 2, indicating a 5-character word limit, 2 characters required before a hyphenation break, and 2 characters required following a hyphenation break.
... <integer>{1,3} one to three integer values, corresponding to the word limit, the minimum number of characters required before a hyphenation break, and the minimum number of characters required following a hyphenation break, respectively.
Examples - Archive of obsolete content
</p> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="valid xhtml 1.0!" height="31" width="88" /></a> </p> </body> </html> before testing this example by yourself, please read this.
... </p> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="valid xhtml 1.0!" height="31" width="88" /></a> </p> </body> </html> before testing this example by yourself, please read this.
... </p> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="valid xhtml 1.0!" height="31" width="88" /></a> </p> </body> </html> before testing this example by yourself, please read this.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
and just like before, it's the mozilla team that's at the core of this latest evolution of the web.
...this gives you added control to interrogate and manage the document structure before it's pushed to the client.
... listing 7 - manipulating the dom server-side <script runat="server"> window.onserverload = function() { document.getelementbyid( "out-logger" ).innerhtml = jaxer.file.read( "dump.txt" ); } </script> the code in listing 7 is executed server-side and takes advantage of the onserverload event which ensures that we have a complete dom before trying to access it.
Writing JavaScript for XHTML - Archive of obsolete content
before processing the file, all comments will be stripped from the document, so enclosing your script in them is like throwing your lunch in a piranha pool.
...for name comparisons, first convert to lower case before doing the comparison (e.g., "el.nodename.tolowercase() === 'html'").
...now you can't do this as easily as before.
Building Mozilla XForms - Archive of obsolete content
before you can start building the xforms extension, you should check your mozilla build environment by doing a regular firefox build.
...for xforms, you will need to add the following line: ac_add_options --enable-extensions="default,xforms" # if you're using a mozilla source before 2010-11-06 (e.g.
...$topsrcdir/browser/config/mozconfig mk_add_options moz_co_project=browser mk_add_options moz_objdir=@topsrcdir@/obj-@config_guess@ ac_add_options --enable-extensions="default,xforms" ac_add_options --enable-debug ac_add_options --disable-optimize ac_add_options --disable-tests building now that you have everything ready, you can rebuild mozilla with the same command you used before to build firefox without xforms.
Mozilla's DOCTYPE sniffing - Archive of obsolete content
almost standards mode was created after 1.0 and 1.1alpha, but before 1.0.1 and 1.1beta.
... before almost standards mode was created these doctypes triggered full standards mode.
... the system identifier "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" (before 1.5b and 1.4.2, this triggered almost standards mode).
Bounding volume collision detection with THREE.js - Game development
it is assumed that before reading this you have read our 3d collision detection introductory article first, and have basic knowledge about three.js.
...keep in mind that in order for this property to be defined, you need to manually call geometry.computeboundingbox beforehand.
...sphere in a similar fashion as before, there is a sphere.intersectssphere method to perform this test.
Bounce off the walls - Game development
all bouncing off the top edge, so now let's think about the bottom edge: if(y + dy > canvas.height) { dy = -dy; } if the ball's y position is greater than the height of the canvas (remember that we count the y values from the top left, so the top edge starts at 0 and the bottom edge is at 320 pixels, the canvas' height), then bounce it off the bottom edge by reversing the y axis movement as before.
...it is very similar actually, all you have to do is to repeat the statements for x instead of y: if(x + dx > canvas.width || x + dx < 0) { dx = -dx; } if(y + dy > canvas.height || y + dy < 0) { dy = -dy; } at this point you should insert the above code block into the draw() function, just before the closing curly brace.
...we have another problem however — when the ball hits each wall it sinks into it slightly before changing direction: this is because we're calculating the collision point of the wall and the center of the ball, while we should be doing it for its circumference.
Buttons - Game development
you only want the ball to move when the button is pressed, not before!
... keeping the paddle still before the game starts it works as expected, but we can still move the paddle when the game hasn't started yet, which looks a bit silly.
...to do that, adjust the update() function like so: function update() { game.physics.arcade.collide(ball, paddle, ballhitpaddle); game.physics.arcade.collide(ball, bricks, ballhitbrick); if(playing) { paddle.x = game.input.x || game.world.width*0.5; } } that way the paddle is immovable after everything is loaded and prepared, but before the start of the actual game.
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical example one of the advantages of javascript putting function declarations into memory before it executes any code segment is that it allows you to use a function before you declare it in your code.
...now, let's see what happens when we call the function before we write it: catname("chloe"); function catname(name) { console.log("my cat's name is " + name); } /* the result of the code above is: "my cat's name is chloe" */ even though we call the function in our code first, before the function is written, the code still works.
...the variables can be initialized and used before they are declared.
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
i=0; i < xincludes.length; i++) { var xinclude = xincludes[i]; var href = xinclude.getattribute('href'); var parse = xinclude.getattribute('parse'); var xpointer = xinclude.getattribute('xpointer'); var encoding = xinclude.getattribute('encoding'); // e.g., utf-8 // "text/xml or application/xml or matches text/*+xml or application/*+xml" before encoding (then utf-8) var accept = xinclude.getattribute('accept'); // header "accept: "+x var acceptlanguage = xinclude.getattribute('accept-language'); // "accept-language: "+x var xifallback = xinclude.getelementsbytagnamens('http://www.w3.org/2001/xinclude', 'fallback')[0]; // only one such child is allowed if (href === '' || href === null) { //...
...ll-formed document response responsenodes = [response.documentelement]; // put in array so can be treated the same way as the above } // prepend any node(s) (as xml) then remove xinclude for (j=0; j < responsenodes.length ; j++) { xincludeparent.insertbefore(responsenodes[j], xinclude); } xincludeparent.removechild(xinclude); } else if (responsetype === 'responsetext') { if (encname) { var encodingtype = response.match(pattern); if (encodingtype) { ...
...h response now (as plain text or xml) } } } catch (e) { // use xi:fallback if xinclude retrieval above failed var xifallbackchildren = xifallback.childnodes; // prepend any node(s) then remove xinclude for (j=0; j < xifallbackchildren.length ; j++) { xincludeparent.insertbefore(xifallbackchildren[j], xinclude); } xincludeparent.removechild(xinclude); } } } return docu; } ...
WAI-ARIA basics - Learn web development
for example, html5 introduced a number of semantic elements to define common page features (<nav>, <footer>, etc.) before these were available, developers would simply use <div>s with ids or classes, e.g.
...before you continue, you should get a screenreader testing setup put in place, so you can test some of the examples as you go through.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: wai-aria.
Fundamental CSS comprehension - Learn web development
the final step before you move on is to attempt the assessment for the module — this involves a number of related exercises that must be completed in order to create the final design — a business card/gamer card/social media profile.
... prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
...using any technique that you know, track these down and fix them before moving on.
Introduction to CSS layout - Learn web development
going back to our original non-positioned example, we could add the following css rule to implement absolute positioning: .positioned { position: absolute; top: 30px; left: 30px; } here we give our middle paragraph a position value of absolute, and the same top and left properties as before.
... table layout html tables are fine for displaying tabular data, but many years ago — before even basic css was supported reliably across browsers — web developers used to also use tables for entire web page layouts — putting their headers, footers, different columns, etc.
... 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.
Legacy layout methods - Learn web development
previous overview: css layout next grid systems are a very common feature used in css layouts, and before css grid layout they tended to be implemented using floats or other layout features.
... layout and grid systems before css grid layout it may seem surprising to anyone coming from a design background that css didn’t have an inbuilt grid system until very recently, and instead we seemed to be using a variety of sub-optimal methods to create grid-like designs.
...if we wanted to leave an empty column space before the first container — or between containers — we would need to create an offset class to add a left margin to our site to push it across the grid visually.
Normal Flow - Learn web development
prerequisites: the basics of html (study introduction to html), and an idea of how css works (study introduction to css.) objective: to explain how browsers layout web pages by default, before we begin to make changes.
... before digging deeper into different layout methods, it is worth revisiting some of the things you will have studied in previous modules with regard to normal document flow.
... if two adjacent elements both have the margin set on them and the two margins touch, the larger of the two remains, and the smaller one disappears — this is called margin collapsing, and we have met this before too.
Styling links - Learn web development
the outline is a useful accessibility aid, so think carefully before turning it off; you should at least double up the styles given to the link hover state on the focus state too.
...we'll skip over most of the css, as it's just the same information you've looked at before.
... this assessment tests all the knowledge discussed in this module, so you might want to read the next article before moving on to it.
Basic native form controls - Learn web development
here is a basic single line text field example: <input type="text" id="comment" name="comment" value="i'm a text field"> single line text fields have only one true constraint: if you type text with line breaks, the browser removes those line breaks before sending the data to the server.
...address), so the data is encrypted before it is sent.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: basic controls.
How to structure a web form - Learn web development
for example, some screen readers such as jaws and nvda will speak the legend's content before speaking the label of each control.
...the rule must be included before it is used so that sighted users and users of assistive technologies such as screen readers can learn what it means before they encounter a required element.
...you can find a further test to verify that you've retained this information before you move on — see test your skills: form structure.
The web and web standards - Learn web development
don't break the web another phrase you'll hear around open web standards is "don't break the web" — the idea is that any new web technology that is introduced should be backwards compatible with what went before it (i.e.
... there are another class of languages called back-end (or server-side) languages, meaning that they are run on the server before the result is then sent to the browser to be displayed.
... a typical use for a server-side language is to get some data out of a database and generate some html to contain the data, before then sending the html over to the browser to display it to the user.
Creating hyperlinks - Learn web development
block level links as mentioned before, almost any content can be made into a link, even block-level elements.
...find details on our <a href="contacts.html">contacts page</a>.</p> moving down into subdirectories: if you wanted to include a hyperlink inside index.html (the top level index.html) pointing to projects/index.html, you would need to go down into the projects directory before indicating the file you want to link to.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: links.
HTML text fundamentals - Learn web development
emove all the seeds and stalk from the pepper, and chop coarsely.</li> <li>add all the ingredients into a food processor.</li> <li>process all the ingredients into a paste.</li> <li>if you want a coarse "chunky" hummus, process it for a short time.</li> <li>if you want a smooth hummus, process it for a longer time.</li> </ol> since the last two bullets are very closely related to the one before them (they read like sub-instructions or choices that fit below that bullet), it might make sense to nest them inside their own unordered list, and put that list inside the current fourth bullet.
...elements like this, which only affect presentation and not semantics, are known as presentational elements and should no longer be used, because as we've seen before, semantics is so important to accessibility, seo, etc.
...you can find some further tests to verify that you've retained this information before you move on—see test your skills: html text basics.
Making asynchronous programming easier with async and await - Learn web development
you'll note that we've wrapped the code inside a function, and we've included the async keyword before the function keyword.
...instead of needing to chain a .then() block on to the end of each promise-based method, you just need to add an await keyword before the method call, and then assign the result to a variable.
... async/await class methods as a final note before we move on, you can even add async in front of class/object methods to make them return promises, and await promises inside them.
Asynchronous JavaScript - Learn web development
get started prerequisites asynchronous javascript is a fairly advanced topic, and you are advised to work through javascript first steps and javascript building blocks modules before attempting this.
...you should understand these concepts before working through the other articles in the module.
...the former allows standard functions to implicitly behave asynchronously with promises, whereas the latter can be used inside async functions to wait for promises before the function continues.
Introduction to web APIs - Learn web development
note: if you are not already familiar with how objects work, you should go back and work through our javascript objects module before continuing.
...if you are not already familiar with how client-side web api events work, you should go and read this article first before continuing.
...at the time of writing, our web audio api example wouldn't work locally on google chrome — we had to upload it to github before it would work.
Video and Audio APIs - Learn web development
icons: @font-face { font-family: 'heydingscontrolsregular'; src: url('fonts/heydings_controls-webfont.eot'); src: url('fonts/heydings_controls-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/heydings_controls-webfont.woff') format('woff'), url('fonts/heydings_controls-webfont.ttf') format('truetype'); font-weight: normal; font-style: normal; } button:before { font-family: heydingscontrolsregular; font-size: 20px; position: relative; content: attr(data-icon); color: #aaa; text-shadow: 1px 1px 0px black; } first of all, at the top of the css we use a @font-face block to import a custom web font.
... next we use generated content to display an icon on each button: we use the ::before selector to display the content before each <button> element.
... first of all, add the following lines inside the stopmedia() function — anywhere will do: rwd.classlist.remove('active'); fwd.classlist.remove('active'); clearinterval(intervalrwd); clearinterval(intervalfwd); now add the same lines again, at the very start of the playpausemedia() function (just before the start of the if statement).
Handling text — strings in JavaScript - Learn web development
"missing; before statement").
...in javascript, we do this by putting a backslash just before the character.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: strings.
Useful string methods - Learn web development
now, before your brain starts melting, don't worry!
...this can be useful for example if you want to normalize all user-entered data before storing it in a database.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: strings.
JavaScript First Steps - Learn web development
in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript.
... get started prerequisites before starting this module, you don't need any previous javascript knowledge, but you should have some familiarity with html and css.
... you are advised to work through the following modules before starting on javascript: getting started with the web (which includes a really basic javascript introduction).
Object prototypes - Learn web development
note: before ecmascript 2015, there wasn't officially a way to access an object's prototype directly — the "links" between the items in the chain are defined in an internal property, referred to as [[prototype]] in the specification for the javascript language (see ecmascript).
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: object-oriented javascript.
... note that this set of tests relies on some of the knowledge taught in the next article, so you might want to read that first before you try them.
JavaScript — Dynamic client-side scripting - Learn web development
before attempting to learn javascript, you are strongly advised to get familiar with at least these two technologies first, and perhaps others as well.
... javascript first steps in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript.
... client-side web apis when writing client-side javascript for web sites or applications, you won't go very far before you start to use apis — interfaces for manipulating different aspects of the browser and operating system the site is running on, or even data from other web sites or services.
Properly configuring server MIME types - Learn web development
for perl cgi, you should have the line print "content-type: text/html\n\n"; before any other output lines.
... for php, you should have the line header('content-type: text/html'); before any other output lines.
... for asp, you should have the line response.contenttype = "text/html"; before any other output lines.
Getting started with React - Learn web development
before the return statement of app, add const subject = 'react';.
...go ahead and do that before the return statement, like so: function app(props) { console.log(props); return ( // return statement ); } save your file and check your browser's javascript console.
...before we do that, however, let's recap some of the things we’ve learned.
Dynamic behavior in Svelte: working with variables and props - Learn web development
find the <h2> heading with an id of list-heading and replace the hardcoded number of active and completed tasks with dynamic expressions: <h2 id="list-heading">{completedtodos} out of {totaltodos} items completed</h2> go to the app, and you should see the "2 out of 3 items completed" message as before, but this time the information is coming from the todos array.
... <todos {todos} /> at this point your todos should render just like they did before, except that now we're passing them in from the app.svelte component.
...in this case, the preventdefault modifier tells svelte to generate the code to call event.preventdefault() before running the handler.
Adding a new todo form: Vue events, methods, and models - Learn web development
add a blank <template> and a <script> tag like before: <template></template> <script> export default {}; </script> let's add in an html form that lets you enter a new todo item and submit it into the app.
...the first, .trim, will remove whitespace from before or after the input.
... let's make a further improvement before we move on.
Tools and testing - Learn web development
get started prerequisites you should really learn the basics of the core html, css, and javascript languages first before attempting to use many the tools detailed here.
... for example, you'll need to know the fundamentals of these languages before you start debugging problems in complex web code, making effective use of javascript frameworks, or writing tests and running them against your code using test runners.
...this module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones.
Testopia
if you are upgrading, please reverse the existing version's patch before installing.
...you can then merge your changes before deleting the old version.
... as always please backup your installation before attempting to install or upgrade.
Chrome registration
note: versions of gecko before gecko 1.8.0.13 and gecko 1.8.1.5 contained a bug where if you use the comparisons <, > or =, the version string had be two or more characters long.
...this is very helpful when trying to write a chrome.manifest file as you can inspect where the files are being mapped from (jar files, local directory, etc.) old-style contents.rdf manifests before the plaintext manifests were introduced (which happened in firefox 1.5, toolkit 1.8), rdf manifests named "contents.rdf" were used to register chrome.
... this format is deprecated; however, seamonkey versions before version 2 do not support the plaintext manifest format yet, so contents.rdf manifests are required for extensions that wish to maintain backwards compatibility with firefox 1.0 or the suite.
Creating reftest-based unit tests
in order to test invalidation it is important that invalidation tests let the document completely finish loading and displaying before making the changes for which invalidation and repainting is to be tested.
... making the changes before the document has completely finished loading and painting would mean that the test may not actually test the browser's invalidation logic, since the changed parts of the document may end up displaying correctly purely due to a pending post-load paint.
...the 'mozreftestinvalidate' event is designed to fire as soon after the initial rendering of the document is finished as possible, but never before.
Debugging on Mac OS X
disabling sip has system security implications that should be understood before taking this step.
... creating an xcode project if you try to create a new xcode project in an existing directory then xcode will delete its existing contents (xcode will warn you beforehand).
... before going any further, close the project (file > close project) and open finder.
Configuring Build Options
please read the following directions carefully before building, and follow them in order.
... other options mk_add_options autoclobber=1 if a clobber would be required before a build, this will cause mach to clobber and continue with the build instead of asking the user to manually clobber and exiting.
...this can be useful since certain warnings coincide with reviewbot lints which must be fixed before merging.
Simple Instantbird build
windows build prerequisites gnu/linux build prerequisites mac os x build prerequisites tip: after completing setup for your os, and before you get the source, you can opt to add the progressextension to your mercurial.ini (for windows) or .hgrc (for *nix / mac) file.
... then just re-run the mach command above (you may need to clobber (see below), or you can do the addition before running make for the first time).
... upstream changes to fetch the latest upstream changes, in your comm-central directory, run the same command as before: python client.py checkout problems building?
Eclipse CDT
before you use eclipse with the mozilla source you must increase its memory limits.
...(if you're thinking of adding tips, please first consider how widely useful they'll be before adding to this already lengthy page.) for further documentation see the official eclipse user guide and eclipse cdt user guide.
...update 2017-11-04 by jwatt: ticking the "index all header variants" option caused eclipse to blow through the 12 gb of ram i'd given it while indexing before it ran out of memory and crashed.) there are parser errors it is expected that eclipse will show parser errors even for a known-good copy of the mozilla source.
Error codes returned by Mozilla APIs
these components usually provide an initialization method, often called init, which must be called before other methods are used.
...use nsifile.exists() to check if the file exists beforehand.
...for example, an attempt was made to use the element.insertbefore method to insert a node before one that is not a child.
Storage access policy: Block cookies from trackers
as described above, note that nightly may include additional protections that end up getting removed or changed before they reach our release users.
... as mentioned before, the way to know that you will be able to use storage as a third-party going forward will be using the storage access api.
...depending on the type of integration, the user may have to take some action to interact with the social content provider before the provider is given access to their cookies.
HTTP Cache
the response payload) to write to the cache entry, it must open the output stream on it before it calls metadataready.
...the data will be available as the writer writes data to the cache entry's output stream immediately, even before the output stream is closed.
... lifetime of an existing entry that doesn't pass server revalidation such a cache entry is first examined in the nsicacheentryopencallback.oncacheentrycheck callback, where the consumer finds out it must be revalidated with the server before use.
Extending a Protocol
it's quite involved and, unfortunately, all steps need to be done before we can successfully recompile.
... we need to add the following things: at the top of the file: include protocol pecho; after "manager pbrowser or pinprocess;", add: manages pecho; finally, under parent: add async pecho(); - this is the "constructor" part we talked about before, which will allow us to eventually send messages.
... defining echoparent.h like before, create ./dom/ipc/echoparent.h, and code it as follows - the inline comments describe what's going on.
Bootstrapping a new locale
(you should "cd" to the directory before beginning.) in the terminal, type the following command: $ hg clone http://hg.mozilla.org/releases/mozilla-x.x.x/ where "x.x.x" is the existing release branch version.
... before you run the copy commands, you need to make the locale directory at the same level as the mozilla-1.9.x/ you just cloned from above.
... working with bit bucket before a team becomes official, we like to get the localizers comfortable with the hg commands that allow for cloning, pulling, committing, and pushing work to an experimental repository.
Localizing without a specialized tool
before we start, did you make sure to install mercurial and confirm that you have set up the proper build environment on your local machine?
... you can do this by typing: cd ../../ where each ".." represents the prior sub directory before the main directory where you want to be.
... you can do this by typing: cd ../../ where each ".." represents the prior sub directory before the main directory where you want to be.
Release phase
configuration before you try pushing, you need to tell ssh which username you wish to use for connecting with hg.mozilla.org.
...the output will look something like this: comparing with ssh://hg.mozilla.org/releases/l10n-central/x-testing searching for changes changeset: 0:7c543e8f3a6a tag: tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings make sure this output is accurate before continuing.
... sign-offs do not need to be approved before revision merge between release channels, although it is recommended.
Creating localizable web applications
in general though, we should consider implementing such decorations as css images (background-image or ::after's/::before's content) and then select them with "html[dir="rtl"] > ...".
...bad: <div class="tut_didyouknow"> <img src="/static/img/question-64.png" class="tut_icon"> <?printf (_("did you know you can test a persona before you submit it?
...good: css: div.tut_didyouknow { background: url(/static/img/question-64.png) no-repeat 0 0; padding-left: 64px; } html[dir='rtl'] div.tut_didyouknow { background-image: url(/static/img/question-64.png); background-position: 100% 0; padding-left: 0; padding-right: 64px; } html/php: <div class="tut_didyouknow"> <?printf (_("did you know you can test a persona before you submit it?
Profiling with the Firefox Profiler
it's a good idea to search bugzilla before filing a bug about a performance problem in firefox but sometimes it's hard to find issues that have already been reported.
...this example is for firefox nightly (package name is org.mozilla.fennec_aurora), and you have to allow storage access on permission settings before launching it.
...cleopatra doesn't currently understand this prefix, so it needs to be removed before pasting.
Reporting a Performance Problem
wait until the "symbolicating call stacks" notification disappears before sharing the profile.
...before uploading, the publish button asks you what data you'd like to publish to our servers.
...before you do this, please share the performance profile with the addon authors through a bug report.
Introduction to NSPR
pr_cleanup waits for the last user thread to exit before returning, whereas it ignores system threads when determining when a process should exit.
...the thread must also reinstate the monitored invariant before exiting the monitor.
...this assumption implies that the monitored invariant must be reinstated before calling pr_waitcondvar.
PR_WaitCondVar
timeout the value pr_interval_no_timeout requires that a condition be notified (or the thread interrupted) before it will resume from the wait.
... description before the call to pr_waitcondvar, the lock associated with the condition variable must be held by the calling thread.
...to detect the expiration of the specified interval, call pr_intervalnow before and after the call to pr_waitcondvar and compare the elapsed time with the specified interval.
NSS PKCS11 Functions
if you want to preserve it, copy the string before freeing the slot.
...if you want to preserve it, copy the string before freeing the slot.
...several functions in the nss libraries use the password callback function to obtain the password before performing operations that involve the protected information.
Python binding for NSS
if a python unicode object is passed to a nss/nspr function it will be encoded as utf-8 first before being passed to nss/nspr.
...depercated elements will persist for a least two releases before being removed from the api entirely.
...thus a socket object behaves like a file object and must be closed once for each makefile() call before it's actually closed.
Invariants
a jsnative or other callback may move cx to another compartment, as long as it returns cx to the script's compartment before returning.
...so code must check js_validcontextpointer(ownercx) before dereferencing it.
...(taken together, ecma 262-3 §11.13.1 and ecma 262-3 §10.1.4 specify that in an assignment such as x = f(), the name lookup for x occurs before f is called.
Property cache
when recording a getprop, the jit needs to know the result type before the interpreter executes the instruction.
... ↓ o ----> o ----> o ----> o ^global ^x' (----> indicates proto as before; downward arrows ↓ indicate the parent relation) method guarantee — if at time t0 the object x has shape s; and x has an own property p that is a method property (transparently joined function); and at time t1 an object y has shape s; and no shape-regenerating gc occurred; then at time t1 y's own property p is the same method property.
...(informally: changing an object's prototype changes its shape and the shape of every object that was on its prototype chain before the change.
Tracing JIT
frame reconstruction is necessary because a trace may inline a number of function calls, and may exit before those function calls return.
...when a guard bails, it means that there is no logic in the trace to handle the failed guard, and so the exit condition encodes the state of the interpreter before the guarded condition.
...a deep bail is special only insofar as it requires flushing the full set of deferred writes in the trace if it occurs (and further, requires that all registers holding temporary trace operands have flushed to the native stack before execution).
JS_ClearContextThread
before transferring a jscontext from thread a to thread b, thread a must call js_clearcontextthread.
... before thread b uses the jscontext, it must call js_setcontextthread.
... this is the first thing thread b does with the context, before beginning a request.
JS_NewGlobalObject
this api provides a way for consumers to set slots atomically (immediately after the global is created), before any debugger hooks are fired.
... if callers have no additional state on the global to set up, they may pass fireonnewglobalhook to js_newglobalobject, which causes that function to fire the hook as its final act before returning.
...but otherwise, callers must take care to fire the hook exactly once before compiling any script in the global's scope (we have assertions in place to enforce this).
TPS Tests
one alternative is to put underscores before the "disabled" preferences, e.g.
...this will cause tps to set the firstsync pref to the relevant value before syncing, so that the described actionwill take place logger.loginfo(msg) logs the given message to the tps log.
...the sync_wipe_server argument causes tps to set the firstsync="wipeserver" pref before syncing, in case the sync account already contains data (this is typically unnecessary, and done largely as an example).
Handling Mozilla Security Bugs
we understand and acknowledge the concerns of those who believe that too-hasty disclosure of exploit details can provide a short-term advantage to potential attackers, who can exploit a problem before most end users become aware of its existence.
... to establish, for each bug, the amount of information a distributor can reveal immediately (before a fix is available) without putting other distributors and their customers at risk.
... however, we will ask all individuals and organizations reporting security bugs through bugzilla to follow the voluntary guidelines below: before making a security bug world-readable, please provide a few days notice to the mozilla security bug group by sending an email to the private security bug group mailing list.
Gecko object attributes
margin-left specifies how much horizontal space there will be before the beginning of each line of content in a text accessible (see the css margin-left property).
... margin-top specifies how much vertical space there will be before the top of the first line of content in a text accessible (see the css margin-top property).
... text-indent specifies how much horizontal space should be left before beginning of the first line of the text content of an text accessible (see the css text-indent property).
Mork
MozillaTechMork
a minus before the table id indicates that all the rows currently stored in the table should be removed before adding more rows.
... a minus sign before a row or rowreference indicates that said row should be removed from the table.
...the presence of an initial minus means to delete all cells before adding new cells.
Places Expiration
on shutdown most of the times the adaptive algorithm will ensure the database is clean before shutdown, so the only task executed on shutdown will be removal of session data (like session annotations).
... in some cases, like when a clear history is executed just before shutdown, a larger step is executed instead.
... places.history.expiration.max_pages: the maximum number of pages that may be retained in the database before starting to expire.
Accessing the Windows Registry Using XPCOM
second, you must call open() on the key before attempting to read a value.
... opening registry keys before doing anything with a registry key you must first open the key you are interested in.
...e demonstrates writing a new string value: var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.create(wrk.root_key_current_user, "software\\mdc\\test", wrk.access_write); wrk.writestringvalue("testvalue", "hello world!"); wrk.close(); checking the existence of keys and values before you attempt to read a value or open a child key, you should check to see whether it exists first.
An Overview of XPCOM
instead all exceptions must be handled within a given component, before crossing interface boundaries.
... ns_if_addref same as above but checks for null before calling addref.
... ns_if_release same as above but check for null before calling release.
Creating the Component Code
component registration all xpcom components - whether they're stored in shared libraries (dlls, dsos, dylibs), javascript files, or otherwise - need to be registered before they can be used.
... onion peel view of xpcom component creation before we begin looking at the various parts of the component and how they'll be implemented in the source, let's look at the module in weblock.cpp to see where we're going.
...pports *aouter, const nsiid & iid, void * *result) { if (!result) return ns_error_invalid_arg; sample* sample = new sample(); if (!sample) return ns_error_out_of_memory; nsresult rv = sample->queryinterface(iid, result); if (ns_failed(rv)) { *result = nsnull; delete sample; } return rv; } weblock1.cpp before any of the improvements and xpcom tools we describe in the following chapter are brought in, the source code for the weblock component that implements all the necessary interfaces looks like this.
Finishing the Component
before attempting to use unfrozen interfaces, you should contact the developers who are responsible for the code you're trying to use (i.e., module owners) and ask them how best to do what you are trying to do.
... the method that handles the check before page loading and the only method we care about in our own implementation of nsicontentpolicy is shouldload().
...this ensures that the urls are canonical before they are compared.
Introduction to XPCOM for the DOM
in the first case, if we forget to addref the object, the object may delete itself before we are done using the pointer, which would cause a crash when dereferencing it.
...you should however be absolutely sure of what you are doing before coding such a cast.
...from my own experience unfortunately it sometimes necessary to build "distclean" before it works.
imgILoader
this means that callers of loadimage should make sure to cancel() the resulting request before the observer goes away.
...this means that callers of loadimagewithchannel should make sure to cancel() the resulting request before the observer goes away.
...this must already be opened before this method is called, and there must have been no ondataavailable calls for it yet.
nsIAccessibleText
tafteroffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); astring gettextatoffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); nsipersistentproperties gettextattributes(in boolean includedefattrs, in long offset, out long rangestartoffset, out long rangeendoffset); astring gettextbeforeoffset(in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset); void removeselection(in long selectionnum); void scrollsubstringto(in long startindex, in long endindex, in unsigned long scrolltype); void scrollsubstringtopoint(in long startindex, in long endindex, in unsigned long coordinatetype, in long x, in long y); void setselectionbounds(i...
... return value exceptions thrown missing exception gettextbeforeoffset() string methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars.
...astring gettextbeforeoffset( in long offset, in nsaccessibletextboundary boundarytype, out long startoffset, out long endoffset ); parameters offset boundarytype startoffset endoffset return value removeselection() void removeselection( in long selectionnum ); parameters selectionnum scrollsubstringto() makes a specific part of string visible on screen.
nsIBrowserSearchService
to access this service, use: var browsersearchservice = components.classes["@mozilla.org/browser/search-service;1"] .getservice(components.interfaces.nsibrowsersearchservice); attempting to use any method or attribute of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization.
... confirm a boolean value indicating whether the user should be asked for confirmation before this engine is added to the list.
... attempting to call any method of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization.
nsIChannel
setting contentcharset before the channel has been opened provides a hint to the channel on what the charset should be.
... setting contenttype before the channel has been opened provides a hint to the channel as to what the mime type is.
... if the nsirequest object passed to the stream listener's methods is not this channel, an appropriate onchannelredirect notification needs to be sent to the notification callbacks before onstartrequest is called.
nsIFilePicker
this should be set before calling open() or show().
...this should be set this before calling open() or show() to specify a starting point.
...if you would like to use another you must append it separately before the others you want to go into the drop down list.
nsIHttpServer
ady_initialized * if this server is already started * @throws ns_error_not_available * if the server is not started and cannot be started on the desired port * (perhaps because the port is already in use or because the process does * not have privileges to do so) * @note * behavior is undefined if this method is called after stop() has been * called on this but before the provided callback function has been * called.
... */ void start(in long port); /** * shuts down this server if it is running (including the period of time after * stop() has been called but before the provided callback has been called).
... * * @param path * the path on the server (beginning with a "/") which is to be handled by * handler; this path must not include a query string or hash component; it * also should usually be canonicalized, since most browsers will do so * before sending otherwise-matching requests * @param handler * an object which will handle any requests for the given path, or null to * remove any existing handler; if while the server is running the handler * throws an exception while responding to a request, an http 500 response * will be returned * @throws ns_error_invalid_arg * if path does not begin with a "/" */ ...
nsINavHistoryResultViewObserver
olumn column); void oncyclecell(in long row, in nsitreecolumn column); void onselectionchanged(); void onperformaction(in wstring action); void onperformactiononrow(in wstring action, in long row); void onperformactiononcell(in wstring action, in long row, in nsitreecolumn column); constants constant value description drop_before -1 the drag operation wishes to insert the dragged item before the indicated row.
... orientation whether the drag target is before, after, or on the indicated row.
... orientation drop_before, drop_on, or drop_after, indicating whether the drop destination is before, on, or after the target row.
nsIRequest
by default, cached content is automatically validated if necessary before reuse.
... note: these flags are intended for normal browsing, and they should therefore not apply to content that must be validated before each use.
...according to rfc2616, this response must be validated before it can be taken from a cache.
nsIWebBrowser
the embedder must associate the two by setting this property to point to the chrome object before creating the browser window via the browser's nsibasewindow interface.
...the embedder must explicitly set this value back to nsnull if the chrome object is destroyed before the browser object.
...in that case, the embedder should explicitly set this value back to null if the parent content listener is destroyed before the browser object.
nsIXPConnect
if the caller intends to use the return value from this call, the caller is responsible for rooting the jsval before making a call to this method.
...it is a good idea to transfer the jsobject to some equally protected place before releasing the holder (i.e., use js_setproperty to make this object a property of some other jsobject).
... this method will never wrap the jsobject involved in an xpcnativewrapper before returning.
Reference Manual
if you've never use nscomptrs before, you might want to read the getting started guide first.
...we just failed to release p before putting a new pointer into it.
...getter_addrefs releases and clears out p before you assign into it, i.e., before getnext is called.
Initialization and Destruction - Plugins
initialization the browser calls np_initialize when a plug-in is loaded and before the first instance is created.
...this table is filled out by the browser before the initialization call.
...it is called once after the last instance of the plug-in is destroyed, before releasing the plug-in library itself.
All keyboard shortcuts - Firefox Developer Tools
before firefox 55, the keyboard shortcut was ctrl + shift + q (cmd + opt + q on a mac).
...before firefox 66, the letter in this shortcut was s.
... note: before firefox 66, the combination ctrl + shift + s on windows and linux or cmd + opt + s on macos would open/close the debugger.
Aggregate view - Firefox Developer Tools
before firefox 48, this was the default view of a heap snapshot.
... because tracing allocations has a runtime cost, it must be explicitly enabled by checking "record call stacks" before you allocate the memory in the snapshot.
...for example, dom event objects are allocated before the javascript is run and event handlers are called.
Examine and edit HTML - Firefox Developer Tools
::before and ::after you can inspect pseudo-elements added using ::before and ::after: custom element definition when you open the inspector on a page that includes custom elements, you can view the class definition for the custom element in the debugger: inspect the element click on the word custom the source for the element's class will be displayed in the debugger.
...e modification attribute modification node removal use in console show dom properties show accessibility properties change pseudo-class hover active focus focus-within visited screenshot node scroll into view copy inner html outer html css selector css path xpath image data-url attribute paste inner html outer html before after as first child as last child expand all collapse all open link in new tab * open file in debugger * open file in style-editor * copy link address * * these options only appear in certain contexts, for example the "open file in style-editor" option only appears when you context-click over the top of a link to a css file.
... (paste) before paste the clipboard contents into the document immediately before this node.
about:debugging - Firefox Developer Tools
before you connect: enable developer settings on your android device.
...next, disable every debugging setting already activated and repeat the steps described before.
... you don't have to package or sign the extension before loading it, and it stays installed until you restart firefox.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaudiobuffersourcenode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before version 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
Beacon API - Web APIs
requests are guaranteed to be initiated before a page is unloaded and they are run to completion, without requiring a blocking request (for example xmlhttprequest).
... the beacon interface addresses the needs of analytics and diagnostics code that typically attempts to send data to a web server before unloading the document.
...to solve this problem, analytics and diagnostics code will typically make a synchronous xmlhttprequest in an unload or beforeunload handler to submit the data.
BiquadFilterNode() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbiquadfilternode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42notes full support 42notes notes before o...
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42notes full support 42notes notes before opera 46, the default values were not supported.safari ios ...
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
Basic animations - Web APIs
if we need to move it we have to redraw it and everything that was drawn before it.
... restore the canvas state if you've saved the state, restore it before drawing a new frame.
... requestanimationframe(callback) tells the browser that you wish to perform an animation and requests that the browser call a specified function to update an animation before the next repaint.
Transformations - Web APIs
saving and restoring state before we look at the transformation methods, let's look at two other methods which are indispensable once you start generating ever more complex drawings.
... when the second restore() statement is called, the original state (the one we set up before the first call to save) is restored and the last rectangle is once again drawn in black.
... it's a good idea to save the canvas state before doing any transformations.
DelayNode() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdelaynode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before version 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
DisplayMediaStreamConstraints - Web APIs
processing information is specified using mediatrackconstraints objects providing options which are applied to the track after the media data is received but before it is made available on the mediastream.
...if a mediatrackconstraints object is provided here, an audio track is included in the stream, but the audio is processed to match the specified constraints after being retrieved from the hardware but before being added to the mediastream.
...optionally, a mediatrackconstraints object may be given, providing options specifying processing to be performed on the video data before adding it to the stream.
Document.createElement() - Web APIs
when called on an html document, createelement() converts tagname to lower case before creating the element.
... examples basic example this creates a new <div> and inserts it before the element with the id "div1".
...reate a new div element const newdiv = document.createelement("div"); // and give it some content const newcontent = document.createtextnode("hi there and greetings!"); // add the text node to the newly created div newdiv.appendchild(newcontent); // add the newly created element and its content into the dom const currentdiv = document.getelementbyid("div1"); document.body.insertbefore(newdiv, currentdiv); } web component example the following example snippet is taken from our expanding-list-web-component example (see it live also).
DynamicsCompressorNode() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdynamicscompressornode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
...— 17notes notes before firefox 17, a call to this method after the dispatching of the event raised an exception instead of doing nothing.ie full support yesopera full support yessafari full support yeswebview android full support yeschrome an...
...— 17notes notes before firefox 17, a call to this method after the dispatching of the event raised an exception instead of doing nothing.opera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full supportdeprecated.
Event - Web APIs
WebAPIEvent
animationevent audioprocessingevent beforeinputevent beforeunloadevent blobevent clipboardevent closeevent compositionevent cssfontfaceloadevent customevent devicelightevent devicemotionevent deviceorientationevent deviceproximityevent domtransactionevent dragevent editingbeforeinputevent errorevent fetchevent focusevent gamepadevent hashchangeevent idbversionchangeevent inputevent keyboardevent mediastreamevent me...
...setting its value to true before returning from an event handler prevents propagation of the event.
... event.explicitoriginaltarget read only the explicit original target of the event (mozilla-specific.) event.originaltarget read only the original target of the event, before any retargetings.
GainNode() - Web APIs
WebAPIGainNodeGainNode
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgainnode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
it then runs any pending javascript tasks, then any pending microtasks, then performs any needed rendering and painting before looping again to check for pending tasks.
...in other words, microtasks can enqueue new microtasks and those new microtasks will execute before the next task begins to run, and before the end of the current event loop iteration.
... microtasks are another solution to this problem, providing a finer degree of access by making it possible to schedule code to run before the next iteration of the event loop begins, instead of having to wait until the next one.
IDBDatabase.transaction() - Web APIs
in firefox 40+ the complete event is fired after the os has been told to write the data but potentially before that data has actually been flushed to disk.
... the complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the os crashes or there is a loss of system power before the data is flushed to disk.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.) this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
IDBTransaction.oncomplete - Web APIs
in firefox 40+ the complete event is fired after the os has been told to write the data but potentially before that data has actually been flushed to disk.
... the complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the os crashes or there is a loss of system power before the data is flushed to disk.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.) this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
IDBTransaction - Web APIs
in firefox 40+ the complete event is fired after the os has been told to write the data but potentially before that data has actually been flushed to disk.
... the complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the os crashes or there is a loss of system power before the data is flushed to disk.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.
IIRFilterNode() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetiirfilternode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before version 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
Intersection Observer API - Web APIs
this set of values serves to grow or shrink each side of the root element's bounding box before computing intersections.
... the intersection root and root margin before we can track the intersection of an element with a container, we need to know what that container is.
... similarly, if the intersectionratio is going down, we use the string decreasingcolor and replace the word "ratio" in that with the intersectionratio before setting the target element's background-color.
MutationObserver.observe() - Web APIs
there are some caveats to note: if you call observe() on a node that's already being observed by the same mutationobserver, all existing observers are automatically removed from all targets being observed before the new observer is activated.
...if you begin watching a subtree of nodes, and a portion of that subtree is detached and moved elsewhere in the dom, you continue to watch the detached segment of nodes, receiving the same callbacks as before the nodes were detached from the original subtree.
...this prevents you from missing changes that occur after the connection is severed and before you have a chance to specifically begin monitoring the moved node or subtree for changes.
Navigator.sendBeacon() - Web APIs
description this method is for analytics and diagnostics that send data to a server before the document is unloaded, where sending the data any sooner may miss some possible data collection.
... for example, which link the user clicked before navigating away and unloading the page.
... historically, this was addressed with some of the following workarounds to delay the page unload long enough to send data to some url: submitting the data with a blocking synchronous xmlhttprequest call in unload or beforeunload event handlers.
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetofflineaudiocompletionevent() constructorchrome full support 57notes full support 57notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 57notes full support 57notes notes before version 59, the default values were not supported.chrome android full support 57notes full support 57notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
ParentNode.prepend() - Web APIs
the parentnode.prepend() method inserts a set of node objects or domstring objects before the first child of the parentnode.
... syntax parentnode.prepend(...nodestoprepend); parameters nodestoprepend one or more nodes to insert before the first child node currently in the parentnode.
...argitem : document.createtextnode(string(argitem))); }); this.insertbefore(docfrag, this.firstchild); } }); }); })([element.prototype, document.prototype, documentfragment.prototype]); specification specification status comment domthe definition of 'parentnode.prepend()' in that specification.
Using the Payment Request API - Web APIs
paymentrequest.canmakepayment() can be used to check whether the paymentrequest object is capable of making a payment before you start the payment process.
... checking before all prices are known if the checkout flow needs to know whether paymentrequest.canmakepayment() will return true even before all line items and their prices are known, you can instantiate paymentrequest with dummy data and pre-query .canmakepayment().
... }).catch(function(error) { console.log(error); if (fallbacktolegacyonpaymentrequestfailure) { window.location.href = '/legacy-web-form-checkout'; } else { showcheckouterrortouser(); } }); } else { window.location.href = '/legacy-web-form-checkout'; } } note: see our checking user can make payments before prices are known demo for the full code.
PerformanceResourceTiming.encodedBodySize - Web APIs
the encodedbodysize read-only property represents the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
... if the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content-codings.
... syntax resource.encodedbodysize; return value a number representing the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
PerformanceResourceTiming.fetchStart - Web APIs
the fetchstart read-only property represents a timestamp immediately before the browser starts to fetch the resource.
... if there are http redirects the property returns the time immediately before the user agent starts to fetch the final resource in the redirection.
... syntax resource.fetchstart; return value a domhighrestimestamp immediately before the browser starts to fetch the resource.
PushEvent - Web APIs
WebAPIPushEvent
full support 17firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support nochrome android full support ...
... full support 17firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support nochrome android full support ...
... full support 17firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 44safari no support nowebview android no support nochrome android full support ...
Web Push API Notifications best practices - Web APIs
say your program manager found a hiccup in the approvals and wants to get your feedback on something before she proceeds.
...every push notification should be useful and time-sensitive, and the user should always be asked for permission before sending the first one, and be offered an easy way to opt out of getting more in the future.
...for example, safari 12.1 now requires—and other browsers either already do, or are planning[1] to do so—that the user interact with the page in some way before the page can request permission to perform push notifications.
ReadableStream.cancel() - Web APIs
var searchterm = "service workers"; // chars to show either side of the result in the match var contextbefore = 30; var contextafter = 30; var caseinsensitive = true; var url = 'https://html.spec.whatwg.org/'; console.log(`searching '${url}' for '${searchterm}'`); fetch(url).then(response => { console.log('received headers'); var decoder = new textdecoder(); var reader = response.body.getreader(); var tomatch = caseinsensitive ?
... searchterm.tolowercase() : searchterm; var buffersize = math.max(tomatch.length - 1, contextbefore); var bytesreceived = 0; var buffer = ''; var matchfoundat = -1; return reader.read().then(function process(result) { if (result.done) { console.log('failed to find match'); return; } bytesreceived += result.value.length; console.log(`received ${bytesreceived} bytes of data so far`); buffer += decoder.decode(result.value, {stream: true}); // already found match & just context-gathering?
...buffer.tolowercase() : buffer).indexof(tomatch); } if (matchfoundat === -1) { buffer = buffer.slice(-buffersize); } else if (buffer.slice(matchfoundat + tomatch.length).length >= contextafter) { console.log("here's the match:") console.log(buffer.slice( math.max(0, matchfoundat - contextbefore), matchfoundat + tomatch.length + contextafter )); console.log("cancelling fetch"); reader.cancel(); return; } else { console.log('found match, but need more context…'); } // keep reading return reader.read().then(process); }); }).catch(err => { console.log("something went wrong.
Using the Screen Capture API - Web APIs
motion the cursor should only be visible while moving, and, at the discretion of the user agent, for a brief time before after moving.
... before starting a project that will require sharing of audio, be sure to check the browser compatibility in mediadevices.getdisplaymedia() to see if the browsers you wish compaibility with have support for audio in captured screen streams.
... authorizing capture of display contents before streaming of captured screen contents can begin, the user agent will ask the user to confirm the sharing request, and to select the content to share.
Streams API concepts - Web APIs
if you want another reader to start reading your stream, you typically need to cancel the first reader before you do anything else (although you can tee streams, see the teeing section below) note that there are two different types of readable stream.
...if you want another writer to start writing to your stream, you typically need to abort it before you then attach another writer to it.
...this means that up to 3 chunks can be enqueued before the high water mark is reached and backpressure is applied.
WaveShaperNode.WaveShaperNode() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwaveshapernode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
... samsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend full support full support no support no support compatibility unknown compatibility unknownsee implementation notes.see implementation notes.
WaveShaperNode.oversample - Web APIs
oversampling is a technique for creating more samples (up-sampling) before applying a distortion effect to the audio signal.
... '2x' double the amount of samples before applying the shaping curve.
... '4x' multiply by 4 the amount of samples before applying the shaping curve.
WebGLRenderingContext.pixelStorei() - Web APIs
glint 0 0 to infinity opengl es 3.0 gl.pack_skip_pixels number of pixel locations skipped before the first pixel is written into memory.
... glint 0 0 to infinity opengl es 3.0 gl.pack_skip_rows number of rows of pixel locations skipped before the first pixel is written into memory glint 0 0 to infinity opengl es 3.0 gl.unpack_row_length number of pixels in a row.
... glint 0 0 to infinity opengl es 3.0 gl.unpack_image_height image height used for reading pixel data from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_pixels number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures with...
Basic scissoring - Web APIs
the reason for this distinction is that fragment color (and other fragment values, such as depth) may be manipulated and changed several times during graphics operations before finally being written to the screen.
...scissoring is a distinct stage in the webgl/opengl graphics pipeline (it occurs after color clearing, but before color masking).
... before the actual pixels are updated, fragments must go through the scissor test.
Adding 2D content to a WebGL context - Web APIs
drawing the scene the most important thing to understand before we get started is that even though we're only rendering a square plane object in this example, we're still drawing in 3d space.
...ss around const programinfo = { program: shaderprogram, attriblocations: { vertexposition: gl.getattriblocation(shaderprogram, 'avertexposition'), }, uniformlocations: { projectionmatrix: gl.getuniformlocation(shaderprogram, 'uprojectionmatrix'), modelviewmatrix: gl.getuniformlocation(shaderprogram, 'umodelviewmatrix'), }, }; creating the square plane before we can render our square plane, we need to create the buffer that contains its vertex positions and put the vertex positions in it.
... function drawscene(gl, programinfo, buffers) { gl.clearcolor(0.0, 0.0, 0.0, 1.0); // clear to black, fully opaque gl.cleardepth(1.0); // clear everything gl.enable(gl.depth_test); // enable depth testing gl.depthfunc(gl.lequal); // near things obscure far things // clear the canvas before we start drawing on it.
Lifetime of a WebRTC session - Web APIs
it’s so big that years ago, smart people saw how big it was, how fast it was growing, and the limitations of the 32-bit ip addressing system, and realized that something had to be done before we ran out of addresses to use, so they started working on designing a new 64-bit addressing system.
...these need to be agreed upon before the webrtc session can begin.
... if you need to change the configuration of the connection in some way (such as changing to a different set of ice servers), you can do so before restarting ice by calling rtcpeerconnection.setconfiguration() with an updated rtcconfiguration dictionary before restarting ice.
Web Video Text Tracks Format (WebVTT) - Web APIs
optional cue settings with at least one space before the first and between each setting.
...any text before the active text in the payload is previous text .
...before start, it must be noted that you can make use of a notepad and then save the file as ‘.vtt’ file.
Fundamentals of WebXR - Web APIs
in this guide, we provide a fundamental overview of what webxr is and how it works, as well as providing a foundation for what you'll need to know before you even begin to learn to develop augmented reality and virtual reality experiences for the web.
... basic concepts before getting into too much detail, let's consider some basic concepts that you need to know before you learn how to develop xr code.
...webxr doesn't generally care which type of device you're using, and the rendering process is almost exactly the same as for vr, except you don't erase the background or skybox before rendering each frame.
WebXR Device API - Web APIs
foundations and basics fundamentals of webxr before diving into the details of how to create content using webxr, it may be helpful to read this overview of the technology, which includes introductions to terminology that may be unfamiliar to you, or which may be used in a new way.
... creating a mixed reality experience starting up and shutting down a webxr session before actually presenting a scene using an xr device such as a headset or goggles, you need to create a webxr session bound to a rendering layer that draws the scene for presentation in each of the xr device's displays so that the 3d effect can be presented to the user.
... permissions and security for webxr the webxr device api has several areas of security to contend with, from establishing feature-policy to ensuring the user intends to use the mixed reality presentation before activating it.
Web Audio API - Web APIs
you need to create an audiocontext before you do anything else, as everything happens inside a context.
...it is an audionode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output.
... obsolete: script processor nodes before audio worklets were defined, the web audio api used the scriptprocessornode for javascript-based audio processing.
Window: popstate event - Web APIs
it happens after the new location has loaded (if needed), displayed, made visible, and so on, after the pageshow event is sent, but before the persisted user state information is restored and the hashchange event is sent.
... if new-entry doesn't currently contain an existing document, fetch the content and create its document before continuing.
... if the browser has state information it wishes to store with the current-entry before navigating away from it, it then does so.
WindowEventHandlers - Web APIs
windoweventhandlers.onbeforeprint is an eventhandler representing the code to be called when the beforeprint event is raised.
... windoweventhandlers.onbeforeunload is an eventhandler representing the code to be called when the beforeunload event is raised.
...creation of windoweventhandlers (properties where on the target before it).
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
delay optional the time, in milliseconds (thousandths of a second), the timer should wait before the specified function or code is executed.
... html <p>live example</p> <button onclick="delayedalert();">show an alert box after two seconds</button> <p></p> <button onclick="clearalert();">cancel alert before it happens</button> javascript var timeoutid; function delayedalert() { timeoutid = window.settimeout(window.alert, 2*1000, 'that was really slow!'); } function clearalert() { window.cleartimeout(timeoutid); } result see also cleartimeout() example.
...currently-executing code must complete before functions on the queue are executed, thus the resulting execution order may not be as expected.
WritableStreamDefaultWriter.close() - Web APIs
the underlying sink will finish processing any previously-written chunks, before invoking the close behavior.
... return value a promise, which fulfills with the undefined if all remaining chunks were successfully written before the close, or rejects with an error if a problem was encountered during the process.
...ed = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
WritableStreamDefaultWriter.ready - Web APIs
the first uses ready to ensure that the writablestream is done writing and thus able to receive data before sending a binary chunk.
... the second also checks whether the the writablestream is done writing, but this time because the writing must be finished before the writer can be closed.
... defaultwriter.ready .then(function() { defaultwriter.write(chunk) .then(function() { console.log("chunk written to sink.); }) .catch(function(err) { console.log("chunk error: " + err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
XMLHttpRequest - Web APIs
it must be called before any other method calls.
... xmlhttprequest.timeout is an unsigned long representing the number of milliseconds a request can take before automatically being terminated.
...you must call setrequestheader()after open(), but before send().
XRSession - Web APIs
WebAPIXRSession
the select event is sent after the selectstart event is sent and immediately before the selectend event is sent.
... if select is not sent, then the select action was aborted before being completed.
...it is sent immediately before the squeezeend event is sent to indicate that the squeeze action is over.
ARIA live regions - Accessibility
including an aria-live attribute or a specialized live region role (such as role="alert") on the element you want to announce changes to works as long as you add the attribute before the changes occur — either in the original markup, or dynamically using javascript.
...because the live region has aria-live="polite", the screen reader will wait until the user pauses before announcing the update.
... <ul id="roster" aria-live="polite" aria-relevant="additions removals"> <!-- use javascript to add remove users here--> </ul> breakdown of aria live properties: aria-live="polite" indicates that the screen reader should wait until the user is idle before presenting updates to the user.
ARIA annotations - Accessibility
</li> <li><label>orange: <input type="radio" name="fruit" value="orange"></label></li> <li><label>banana: <input type="radio" name="fruit" value="banana"></label></li> </ul> </form> </section> insertions and deletions a common wish in online document systems like google docs is to be able to track changes, to see what reviewers or editors have suggested as changes to the text, before the managing editor or author accepts or rejects those changes.
...<mark> is a suitable element for this purpose (a comment is a reference annotation), so the annotation could look like this: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> note: if for some reason you can’t use the <mark> element in your application, you could also use <span role="mark"></span>.
... since aria-details can now accept multiple ids, we can associate multiple comments with the same annotation, like so: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1 thread-2">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> <div role="comment" id="thread-2" data-author="chris"> <h3>marcus said</h3> <p class="comment-text">the guitar solo could do with a touch more chorus, and a slightly lower volume.</p> <p><time datetime="2019-03-29t15:35">march 29 2019, 15:35</time></p> </div> ...
ARIA: feed role - Accessibility
to ensure good user experience, avoid inserting or removing articles in the middle of a feed, load new articles before the user has reached the end of the feed, and provide keyboard commands for moving focus among articles so that keyboard users can navigate through your feed.
... providing reading mode keys for moving the reading cursor and dom focus past the end and before the start of the feed.
... control + home: move focus to the first focusable element before the feed.
Understandable - Accessibility
for example, focusing a navigation menu option should not change the displayed page — it should be activated before the display changes.
...the user should be warned/advised of the impending change before it occurs.
... a mechanism is available for confirming and correcting information before final submission.
CSS Animations tips and tricks - CSS: Cascading Style Sheets
our callback gets executed just before the next repaint of the document.
... the problem for us is that because it's before the repaint, the style recomputation hasn't actually happened yet!
...this time, the callback is run before the next repaint, which is after the style recomputation has occurred.
Handling content breaks in multicol - CSS: Cascading Style Sheets
breaks before and after boxes, which would include our heading example above.
... breaks before and after boxes the break-before and break-after properties are used to control breaks before and after elements.
... they take the following values when in a multicol context: auto avoid avoid-column column in this next example, we are forcing a column break before an h2 element.
Typical use cases of Flexbox - CSS: Cascading Style Sheets
this pattern, as basic as it seems, was difficult to achieve before flexbox.
...you could also use flex-start to place the space at the end of the items, flex-end to place it before them, or center to centre the navigation items.
... center item before flexbox, developers would joke that the hardest problem in web design was vertical centering.
Layout using named grid lines - CSS: Cascading Style Sheets
before defining the 1fr size of the column track i am also defining a line name of [col-start].
... this means that we will end up with a grid that has 12 column lines all named col-start before a 1fr width column.
...i don’t need to do any calculations, grid automatically removed my 10 pixel gutter track before assigning the space to the 1fr column tracks.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
as these are new properties check browser support before using.
...as these are new properties check browser support before using.
... .box { border-block: 2px solid green; border-inline-width: 4px; border-inline-style: dotted; border-inline-color: rebeccapurple; } note: these two value shorthands shipped in firefox 66, check browser support before using as other browsers may not have implemented them yet.
Using CSS transitions - CSS: Cascading Style Sheets
before we look at code snippets, you might want to take a look at the live demo (assuming your browser supports transitions).
...the easy way to overcome this limitation is to apply a window.settimeout() of a handful of milliseconds before changing the css property you intend to transition to.
... as usual, you can use the addeventlistener() method to monitor for this event: el.addeventlistener("transitionend", updatetransition, true); you detect the beginning of a transition using transitionrun (fires before any delay) and transitionstart (fires after any delay), in the same kind of fashion: el.addeventlistener("transitionrun", signalstart, true); el.addeventlistener("transitionstart", signalstart, true); note: the transitionend event doesn't fire if the transition is aborted before the transition is completed because either the element is made display: none or the animating property's value is cha...
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
to simplify the development process, web developers often use a css reset style sheet, forcing common properties values to a known state before beginning to make alterations to suit their specific needs.
...no declaration is marked as !important, so the precedence order is author style sheets before user style sheets or user-agent stylesheet.
...therefore, it is the last one that is then selected: margin-left: 3px note that the declaration defined in the user css, though having a greater specificity, is not chosen as the cascade algorithm is applied before the specificity algorithm.
Specificity - CSS: Cascading Style Sheets
selector types the following list of selector types increases by specificity: type selectors (e.g., h1) and pseudo-elements (e.g., ::before).
... some rules of thumb: always look for a way to use specificity before even considering !important only use !important on page-specific css that overrides foreign css (from external libraries, like bootstrap or normalize.css).
...by indicating one or more elements before the element you're selecting, the rule becomes more specific and gets higher priority: <div id="test"> <span>text</span> </div> div#test span { color: green; } div span { color: blue; } span { color: red; } no matter the order, text will be green because that rule is most specific.
animation-delay - CSS: Cascading Style Sheets
the animation-delay css property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation.
... formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples.
... 43 full support 43 full support 3prefixed prefixed implemented with the vendor prefix: -webkit-edge full support 12firefox full support 16notes full support 16notes notes before firefox 57, firefox does not repaint elements outside the viewport that are animated into the viewport with a delay.
counters() - CSS: Cascading Style Sheets
WebCSScounters
check the browser compatibility table carefully before using this in production.
... </ol> </li> <li></li> <li></li> <li> <ol> <li></li> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> </ol> </li> </ol> css ol { counter-reset: listcounter; } li { counter-increment: listcounter; } li::marker { content: counters(listcounter, '.', upper-roman) ') '; } li::before { content: counters(listcounter, ".") " == " counters(listcounter, ".", lower-roman) ; } result decimal-leading-zero compared to lower-alpha html <ol> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> <li></li> <li></li> <li> <ol> <li></li> <li> <ol> <li></li> <li></li> ...
... <li></li> </ol> </li> </ol> </li> </ol> css ol { counter-reset: count; } li { counter-increment: count; } li::marker { content: counters(count, '.', upper-alpha) ') '; } li::before { content: counters(count, ".", decimal-leading-zero) " == " counters(count, ".", lower-alpha); } result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
Challenge solutions - Developer guides
solution add this rule to your stylesheet: p:before{ content: url("yellow-pin.png"); } lists lower roman numerals challenge add a rule to your stylesheet, to number the oceans using roman numerals from i to v.
... solution add a rule to the body element (parent of the headings) to reset a new counter, and one to display and increment the counter on the headings: /* numbered headings */ body {counter-reset: headnum;} h3:before { content: "(" counter(headnum, upper-latin) ") "; counter-increment: headnum; } boxes ocean border challenge add one rule to your stylesheet, making a wide border all around the oceans in a color that reminds you of the sea.
... solution the following rule achieves this effect: ul { border: 10px solid lightblue; width: 100px; } layout default image position fixed image position challenge change your sample document, doc2.html, adding this tag to it near the end, just before </body>: <img id="fixed-pin" src="yellow-pin.png" alt="yellow map pin"> predict where the image will appear in your document.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
the shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore.
... the shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore.
...modulepreload links can ensure network fetching is done with the module ready (but not evaluated) in the module map before it is necessarily needed.
<input type="datetime-local"> - HTML: Hypertext Markup Language
some browsers may resort to a text-only input element that validates that the results are legitimate date/time values before letting them be delivered to the server, as well, but you shouldn't rely on this behavior since you can't easily predict it.
...after the year 10,000, those numbers will just be a little bit bigger than before, so many servers will not see issues with forms submitted after the year 10,000.
...f(dayselect.value === "") { dayselect.value = previousday - 1; } if(dayselect.value === "") { dayselect.value = previousday - 2; } if(dayselect.value === "") { dayselect.value = previousday - 3; } } } function populateyears() { // get this year as a number var date = new date(); var year = date.getfullyear(); // make this year, and the 100 years before it available in the year <select> for(var i = 0; i <= 100; i++) { var option = document.createelement('option'); option.textcontent = year-i; yearselect.appendchild(option); } } function populatehours() { // populate the hours <select> with the 24 hours of the day for(var i = 0; i <= 23; i++) { var option = document.createelement('option'); option.textcontent = (i < 1...
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
ription alt alternate string to display when the image can't be shown formaction the url to which to submit the data formenctype the encoding method to use when submitting the form data formmethod the http method to use when submitting the form formnovalidate a boolean which, if present, indicates that the form shouldn't be validated before submission formtarget a string indicating a browsing context from where to load the results of submitting the form height the height, in css pixels, at which to draw the image src the url from which to load the image width the width, in css pixels, at which to draw the image alt the alt attribute provides an alternate string to use as the bu...
... formnovalidate a boolean attribute which, if present, specifies that the form should not be validated before submission to the server.
... examples a login form the following example shows the same button as before, but included in the context of a typical login form.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
permitted parents a media element—<audio> or <video>—and it must be placed before any flow content or <track> element.
... a <picture> element, and it must be placed before the <img> element.
...this information is used by the browser to determine, before laying the page out, which image defined in srcset to use.
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
required this attribute specifies that the user must fill in a value before submitting a form.
...roperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettextareachrome full support yesedge full support 12firefox full support yesnotes full support yesnotes notes before firefox 6, when a <textarea> was focused, the insertion point was placed at the end of the text by default.
... yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesnotes full support yesnotes notes before firefox 6, when a <textarea> was focused, the insertion point was placed at the end of the text by default.
Link types - HTML: Hypertext Markup Language
<link> <a>, <area>, <form> dns-prefetch hints to the browser that a resource is needed, allowing the browser to do a dns lookup and protocol handshaking before a user clicks the link.
... the shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore.
... (in firefox, before firefox 37, this worked only in links found in pages.
Using the application cache - HTML: Hypertext Markup Language
whitespace is allowed before and after the uri or iri on each line.
...since a cache manifest file may have been updated before a script attaches event listeners to test for updates, scripts should always test window.applicationcache.status.
...you must update the cache manifest file itself before the browser retrieves and uses the updated files.
Browser detection using the user agent - HTTP
considerations before using browser detection when considering using the user agent string to detect which browser is being used, your first step is to try to avoid it if possible.
...the agent might be an older version of chrome, from before support was added, or (because the feature was experimental at the time) it could be a later version of chrome that removed it.
...if there is a lot calculated by this layout function before it determines the new layout of the page, then consider debouncing the event listener such that it is not called as often.
HTTP caching - HTTP
WebHTTPCaching
cache-control: no-store cache but revalidate a cache will send the request to the origin server for validation before releasing a cached copy.
... cache-control: max-age=31536000 validation when using the "must-revalidate" directive, the cache must verify the status of the stale resources before using it and expired ones should not be used.
...before this expiration time, the resource is fresh; after the expiration time, the resource is stale.
Retry-After - HTTP
the retry-after response http header indicates how long the user agent should wait before making a follow-up request.
... when sent with a 429 (too many requests) response, this indicates how long to wait before making a new request.
... when sent with a redirect response, such as 301 (moved permanently), this indicates the minimum time that the user agent is asked to wait before issuing the redirected request.
HTTP Index - HTTP
WebHTTPIndex
176 retry-after http, reference, response, response header, header the retry-after response http header indicates how long the user agent should wait before making a follow-up request.
...such a request can be done before deciding to download a large resource to save bandwidth, for example.
...the new resource is effectively created before this response is sent back and the new resource is returned in the body of the message, its location being either the url of the request, or the content of the location header.
An overview of HTTP - HTTP
WebHTTPOverview
these can be transparent, forwarding on the requests they receive without altering them in any way, or non-transparent, in which case they will change the request in some way before passing it along to the server.
... before a client and server can exchange an http request/response pair, they must establish a tcp connection, a process which requires several round-trips.
... send an http message: http messages (before http/2) are human-readable.
Concurrency model and the event loop - JavaScript
"run-to-completion" each message is processed completely before any other message is processed.
... this offers some nice properties when reasoning about your program, including the fact that whenever a function runs, it cannot be pre-empted and will run entirely before any other code runs (and can modify data the function manipulates).
...in the example below, the message ''this is just a message'' will be written to the console before the message in the callback gets processed, because the delay is the minimum time required for the runtime to process the request (not a guaranteed time).
JavaScript modules - JavaScript
rcle from './modules/circle.js'; import * as triangle from './modules/triangle.js'; in each case, you can now access the module's imports underneath the specified object name, for example: let square1 = square.draw(mycanvas.ctx, 50, 50, 100, 'blue'); square.reportarea(square1.length, reportlist); square.reportperimeter(square1.length, reportlist); so you can now write the code just the same as before (as long as you include the object names where needed), and the imports are much neater.
... in this example we've only made changes to our index.html and main.js files — the module exports remain the same as before.
... we mentioned this before, but to reiterate: .js files need to be loaded with a mime-type of text/javascript (or another javascript-compatible mime-type, but text/javascript is recommended), otherwise you'll get a strict mime type checking error like "the server responded with a non-javascript mime type".
Array.prototype.sort() - JavaScript
for example, "banana" comes before "cherry".
... in a numeric sort, 9 comes before 80, but because numbers are converted to strings, "80" comes before "9" in the unicode order.
...thus the character formed by the surrogate pair \ud655\ude55 will be sorted before the character \uff3a.
JSON.parse() - JavaScript
an optional reviver function can be provided to perform a transformation on the resulting object before it is returned.
... reviver optional if a function, this prescribes how the value originally produced by parsing is transformed, before being returned.
... throw new syntaxerror("json.parse"); }; } examples using json.parse() json.parse('{}'); // {} json.parse('true'); // true json.parse('"foo"'); // "foo" json.parse('[1, 5, "false"]'); // [1, 5, "false"] json.parse('null'); // null using the reviver parameter if a reviver is specified, the value computed by parsing is transformed before being returned.
Map.prototype.forEach() - JavaScript
each value is visited once, except in the case when it was deleted and re-added before foreach has finished.
... callback is not invoked for values deleted before being visited.
... new values added before foreach has finished will be visited.
Set.prototype.forEach() - JavaScript
each value is visited once, except in the case when it was deleted and re-added before foreach() has finished.
... callback is not invoked for values deleted before being visited.
... new values added before foreach() has finished will be visited.
Lexical grammar - JavaScript
note also that no whitespace of any kind is permitted before the #!.
... although bom before hashbang comment will work in a browser it is not advised to use bom in a script with hasbang.
...a semicolon is inserted before, when a line terminator or "}" is encountered that is not allowed by the grammar.
Optional chaining (?.) - JavaScript
without optional chaining, looking up a deeply-nested subproperty requires validating the references in between, such as: let nestedprop = obj.first && obj.first.second; the value of obj.first is confirmed to be non-null (and non-undefined) before then accessing the value of obj.first.second.
... with the optional chaining operator (?.), however, you don't have to explicitly test and short-circuit based on the state of obj.first before trying to access obj.first.second: let nestedprop = obj.first?.second; by using the ?.
... operator instead of just ., javascript knows to implicitly check to be sure obj.first is not null or undefined before attempting to access obj.first.second.
for - JavaScript
syntax for ([initialization]; [condition]; [final-expression]) statement initialization an expression (including assignment expressions) or variable declaration evaluated once before the loop begins.
... condition an expression to be evaluated before each loop iteration.
...this occurs before the next evaluation of condition.
while - JavaScript
the condition is evaluated before executing the statement.
... syntax while (condition) statement condition an expression evaluated before each pass through the loop.
... note: use the break statement to stop a loop before condition evaluates to true.
Media container formats (file types) - Web media technologies
wave is good but uncompressed, so be aware of that before using it for large audio samples.
...be sure to consider the needs of your application and your organization before selecting a container format.
...you should carefully consider the options before making a final decision, especially if you have a lot of media that will need to be encoded.
CSS and JavaScript animation performance - Web Performance
the callback function of the method is called by the browser before the next repaint on each frame.
...this can occur because css transitions/animations are simply resampling element styles in the main ui thread before each repaint event happens, which is almost the same as resampling element styles via a requestanimationframe() callback, also triggered before the next repaint.
... enabling fps tools before going through the example, please enable fps tools first to see the current frame rate: in the url bar, enter about:config; click the i’ll be careful, i promise!
Progressive loading - Progressive web apps (PWAs)
first meaningful paint it's important to deliver something meaningful to the user as soon as possible — the longer they wait for the page to load, the bigger the chance they will leave before waiting for everything to finish.
... render-blocking resources bundling is a problem, because the browser has to load the html, css, and javascript before it can paint their rendered results onto the screen.
...it's not unusual to have megabytes of image data to download before announcing the site is ready, but this again creates a bad perception of performance.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
if you want to experiment first before pushing your code to production, you can always test on a localhost or setup github pages — both support https.
...if a resource is cached and available offline, return it first before trying to download it from the server.
...if the file is not in the cache, the app adds it there first before then serving it: self.addeventlistener('fetch', (e) => { e.respondwith( caches.match(e.request).then((r) => { console.log('[service worker] fetching resource: '+e.request.url); return r || fetch(e.request).then((response) => { return caches.open(cachename).then((cache) => { console.log('[service worker] caching new resource: '+e.request.url); ...
Media - Progressive web apps (PWAs)
you can control how the content of the document breaks across page boundaries, by using the page-break-before, page-break-after and page-break-inside properties.
... example this rule sets the page margins to one inch on all four sides: @page {margin: 1in;} this rule ensures that every h1 element starts on a new page: h1 {page-break-before: always;} more details for full details of css support for paged media, see paged media in the css specification.
...copy and paste the content from here: /*** print sample ***/ /* defaults for screen */ #print-head, #print-foot { display: none; } /* print only */ @media print { h1 { page-break-before: always; padding-top: 2em; } h1:first-child { page-break-before: avoid; counter-reset: page; } #print-head { display: block; position: fixed; top: 0pt; left:0pt; right: 0pt; font-size: 200%; text-align: center; } #print-foot { display: block; position: fixed; bottom: 0pt; right: 0pt; font-size: 200%; } #print-foot:after { content: counter(page); cou...
Tutorials
the aim here is to provide you with a toolkit for writing competent css and help you understand all the essential theory, before moving on to more specific disciplines like text styling and css layout.
... javascript tutorials introductory level javascript first steps in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript.
... client-side web apis when writing client-side javascript for websites or applications, you won't go very far before you start to use apis — interfaces for manipulating different aspects of the browser and operating system the site is running on, or even data from other websites or services.
Using custom elements - Web Components
first of all, we define our element's class, in the same manner as before: class expandinglist extends htmlulistelement { constructor() { // always call super first in constructor super(); // write element functionality in here ...
... next, we register the element using the define() method as before, except that this time it also includes an options object that details what element our custom element inherits from: customelements.define('expanding-list', expandinglist, { extends: "ul" }); using the built-in element in a web document also looks somewhat different: <ul is="expanding-list"> ...
...this will happen each time the node is moved, and may happen before the element's contents have been fully parsed.
Using templates and slots - Web Components
this was possible before, but it is made a lot easier by the html <template> element (which is well-supported in modern browsers).
...as before, this can be anything you like, for example: <my-paragraph> <span slot="my-text">let's have some different text!</span> </my-paragraph> or <my-paragraph> <ul slot="my-text"> <li>let's have some different text!</li> <li>in a list!</li> </ul> </my-paragraph> note: elements that can be inserted into slots are known as slotable; when an element has been inserted in a slot, it is s...
... for both <element-details> elements, an attributes heading gets automatically added from the shadow root before the position of the "attributes" named slot.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
the stylesheet has to be passed in as an xml document, which means that the .xsl file has to be loaded by the page before calling xsltprocessor.importstylesheet().
...the element must be defined before any other output document element inside the output document element for which it establishes attribute values.
...if one or more <xsl:sort> elements appear as the children of this element, sorting occurs before processing.
Content Scripts - Archive of obsolete content
if you do this, scripts specified using contentscriptfile are loaded before those specified using contentscript.
... the postmessage api before the port object was added, add-on code and content scripts communicated using a different api: the content script called self.postmessage() to send and self.on() to receive the add-on script called worker.postmessage() to send and worker.on()to receive the api is still available and documented, but there's no reason to use it instead of the port api described here.
tabs - Archive of obsolete content
content scripts specified by this option are loaded before those specified by the contentscript option.
...this is because when a new tab is opened, its activate event may be emitted before the content is loaded.
content/loader - Archive of obsolete content
content scripts specified by this property are loaded before those specified by the contentscript property.
...this may take one of the following values: "start": load content scripts immediately after the document 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.
content/worker - Archive of obsolete content
content scripts specified by this option are loaded before those specified by the contentscript option.
...a detach event is fired just before removal.
places/history - Archive of obsolete content
("sdk/places/history"); // simple query search( { url: "https://developers.mozilla.org/*" }, { sort: "visitcount" } ).on("end", function (results) { // results is an array of objects containing // data about visits to any site on developers.mozilla.org // ordered by visit count }); // complex query // the query objects are or'd together // let's say we want to retrieve all visits from before a week ago // with the query of 'ruby', but from last week onwards, we want // all results with 'javascript' in the url or title.
... // 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", function (results) { // results is an array of objects containing visit data, // sorted by visit date, with all entries from more than a week ago // that contain 'ruby', *in addition to* entries from this last week // that contain 'javascript' }); globals functions search(queries, options) queries can be performed on history entries by passing in one or more query options.
ui/sidebar - Archive of obsolete content
on the add-on side, you need to get a worker object for the sidebar before you can send or receive messages.
... this option was mandatory before firefox 28.
Using third-party modules (jpm) - Archive of obsolete content
before the jpm tool was available, there wasn't any package manager for these community-developed modules, so it wasn't obvious where to find community-developed modules, or how to install and update them.
...open "index.js" and replace it with this: var menuitems = require("menuitem"); var menuitem = menuitems.menuitem({ id: "clickme", menuid: "menu_toolspopup", label: "click me!", oncommand: function() { console.log("clicked"); }, insertbefore: "menu_pageinfo" }); now run the add-on: jpm run -b nightly you should see a new menu item in the tools menu labeled "click me!".
Examples and demos from articles - Archive of obsolete content
[article] image preview before upload [html] the filereader.prototype.readasdataurl() method is useful, for example, to get a preview of an image before uploading it.
... [article] note: the filereader() constructor was not supported by internet explorer for versions before 10.
Preferences - Archive of obsolete content
using prefhasuservalue() lets you check if the preference exists before attempting to read it.
... resources other documentation on preferences preferences api a brief guide to mozilla preferences — describes preferences system from user's/administrator's pov mozilla xpcom interfaces of the preferences system most used interfaces (these are frozen and will not change): nsiprefbranch and nsiprefservice nsiprefbranch2 interface (before gecko 1.8 it was called nsiprefbranchinternal) preferences system - an easy way to create a xul options window for your extension or application syncing preferences across clients using sync lxr pages for libpref, the source code module that implements the preferences system a javascript wrapper for preferences api adding preferences to an extension — a simple tutorial with a working ...
Rosetta - Archive of obsolete content
"); if (!odicts.hasownproperty(smimetype)) { alert("rosetta.translatescript() \u2013 unknown mime-type \"" + smimetype + "\": script ignored."); return; } var ocompiled = document.createelement("script"); oscript.parentnode.insertbefore(obaton, oscript); oscript.parentnode.removechild(oscript); for (var aattrs = oscript.attributes, nattr = 0; nattr < aattrs.length; nattr++) { ocompiled.setattribute(aattrs[nattr].name, aattrs[nattr].value); } ocompiled.type = "text\/ecmascript"; if (oxhr200) { ocompiled.src = "data:text\/javascript," + encodeuricomponent(odicts[smimetype](oxhr200.responsetext)); } ...
..."" : odicts[smimetype](oscript.text); obaton.parentnode.insertbefore(ocompiled, obaton); } function reqerror (oerror) { throw new urierror("the script " + oerror.target.src + " is not accessible."); } function reqsuccess () { createscript(this.refscript, this); } function getsource (oscript) { var oreq = new xmlhttprequest(); oreq.onload = reqsuccess; oreq.onerror = reqerror; oreq.refscript = oscript; oreq.open("get", oscript.src, true); oreq.send(null); } function parsescript (oscript) { if (oscript.hasattribute("type") && !rignoremimes.test(oscript.getattribute("type").tolowercase())) { oscript.hasattribute("src") ?
Delayed Execution - Archive of obsolete content
delete delay.timers[idx]; func(); }, timeout, ci.nsitimer.type_one_shot); // store a reference to the timer so that it's not reaped before it fires.
... let idx = delay.timers.push(timer) - 1; return idx; } delay.timers = []; function repeat(timeout, func) { let timer = new timer(function () { func(); }, timeout, ci.nsitimer.type_repeating_slack); // store a reference to the timer so that it's not reaped before it fires.
How to convert an overlay extension to restartless - Archive of obsolete content
it will probably be notably faster than whatever you were doing before.
...your property files and dtd files loaded from chrome:// uris should work just as before.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
if using an unencrypted, insecure connection, a man-in-the-middle attacker might replace the json with attack code before it arrives at the user.
... gbrowser.addtab = function() { // execute some action before the original function call.
Connecting to Remote Content - Archive of obsolete content
request.overridemimetype("text/xml"); // do this before sending the request!
... if you click on the "start tamper" button, for every request made you will get a popup dialog for tampering with it before it is sent.
Getting Started with Firefox Extensions - Archive of obsolete content
bootstrapped extensions are a step above traditional ones in complexity, so you should go through this tutorial before giving them a try.
...starting with firefox 43, extensions need to be signed by mozilla before they can be installed in firefox.
JavaScript Object Management - Archive of obsolete content
the load event is fired after the dom on the window has loaded completely, but before it's displayed to the user.
...the window has to finish loading before it can do any of these things.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
that approach meant that the content of every column would have to be loaded and calculated before it would be rendered in the browser window.
...despite some initial setbacks with those approaches due to our own unique scenarios, it wasn't long before i discovered a variation of one of their methods that worked for the wired news design.
Creating reusable content with CSS and XBL - Archive of obsolete content
you can use css to provide content for selected elements, but the content is limited to text and images, and its positioning is limited to before or after the selected element.
...it looks something like this, before and after you press the button: notes about this demonstration: the html document links the document stylesheet as usual, but it does not link any javascript code.
XML data - Archive of obsolete content
copy and paste the content from here, making sure that you scroll to get all of it: /*** xml demonstration ***/ planet:before { display: block; width: 8em; font-weight: bold; font-size: 200%; content: "oceans"; margin: -.75em 0px .25em -.25em; padding: .1em .25em; background-color: #cdf; } planet { display: block; margin: 2em 1em; border: 4px solid #cdf; padding: 0px 1em; background-color: white; } ocean { display: block; margin-bottom: 1em; } name { display: block; font-weight...
...: bold; font-size: 150%; } area { display: block; } area:before { content: "area: "; } area:after { content: " million km\b2"; } depth { display: block; } depth:before { content: "mean depth: "; } depth:after { content: " m"; } open the document in your browser: oceans arctic area: 13,000 million km² mean depth: 1,200 m atlantic area: 87,000 million km² mean depth: 3,900 m .
CSS3 - Archive of obsolete content
pseudo-elements are now characterized by two colons rather than one: :after becomes ::after, :before becomes ::before, :first-letter becomes ::first-letter, and :first-line becomes ::first-line.
... css multi-column layout module working draft adds support for easy multi-column layouts using the css columns, column-count, column-fill, column-gap, column-rule, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, break-after, break-before, and break-inside.
Notes on HTML Reflow - Archive of obsolete content
the xul box layout model, on the other hand, is constraint based , meaning that geometric preferences and constraints of neighboring elements are taken into consideration before the elements' final geometry can be computed.
...for example, a <div> with a constrained width (e.g., set via the css width property) would note this in the reflow state object before flowing its children.
Autodial for Windows NT - Archive of obsolete content
origin of the bug before the implementation of the autodial helper feature, mozilla would trigger the autodial feature on nt-based operating systems, but only if certain conditions are met.
...some users have had the autodial setting turned on, but mozilla never triggered them before.
Automated testing tips and tricks - Archive of obsolete content
o add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${profile_dir}/testprofile" next, start firefox to populate the new profile directory with the rest of the default settings firefox-bin -p testprofile -chrome chrome://tests/content/quit.xul<code> the above process may exit before the profile is completely created.
... in test scripts, <code>sleep 5 after the above command should ensure the profile is created before the next command in the test script is run how to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js how to execute test code with chrome privileges using a chrome doc - see sbtests.xul in http://people.mozilla.com/~davel/scripts/ for an example firefox-bin -p sbtestprofile -chrome chrome://sbtests/content/ above code calls the quit function in quit.js to exit after test is finished how to detect content onload event from chrome use the domcontentloaded event chromewindow.addeventlistener('domcontentloaded',callbackfunction,false); ...
Kill the XUL.mfl file for good - Archive of obsolete content
loading these files from the server, and storing them back slows down the network, thus it may actually be faster without than with xul.mfl occasionnally gets corrupted, needing a manual intervention to wipe it out, before mozilla again works correctly.
...but creating a subdirectory named xul.mfl in mozilla's profile directory seems to help (mozilla is not smart enough to remove the directory before creating the file, thus the presence of the directory effectively disables this (mis)feature).
Getting Started - Archive of obsolete content
install your new theme before you can see the changes you make to a seamonkey theme (since live edits are restrictively difficult to set up) you must first learn how to repackage the classic theme to make it installable.
...but this list includes everything that we changed, so just modify the blue text to point to match the name/version that you used in the sections before this.
Getting Started - Archive of obsolete content
creating the install script getting it ready for the installation before we can package everything up for installation, we need to remove all references to classic.
...but this list includes everything that we changed, so just modify the blue text to point to match the name/version that you used in the sections before this.
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
install your new theme before you can see the changes you make to a firefox theme (since live edits are restrictively difficult to set up) you must first learn how to repackage the classic theme to make it installable.
...but this list includes everything that we changed, so just modify the blue text to point to match the name/version that you used in the sections before this.
Creating regular expressions for a microsummary generator - Archive of obsolete content
the only difference is that the regular expression has backwards slashes before the periods and the question mark, since both of those characters have special meaning in regular expressions.
...as before, we should distinguish the components of the url which are unique to the item from those which are common to all auction item urls of this style.
Dehydra Function Reference - Archive of obsolete content
decl is a variable type input_end() called once at the end of the c++ source file before the compiler quits.
... msg is a string to output to customize the location info printed set this._loc before calling print() include(file [, namespace]) include a javascript file into a namespace.
Extension Frequently Asked Questions - Archive of obsolete content
before asking for help, be sure to set the debugging prefs and check the error console for related messages.
... also, don't forget to do at least a simple web search before asking.
Downloading Nightly or Trunk Builds - Archive of obsolete content
the three common cases are "trunk", meaning the most recent version of mozilla; "branch", meaning the version before trunk (though it can be any version before trunk); and "next", meaning a possible version in the future.
...anyone can be a tester, you don't need to get approval before you can start testing.
Repackaging Firefox - Archive of obsolete content
important legal considerations before you get started, it is very important to know and abide by the legal requirements for distributing firefox.
...please remember to obtain permission as described above before distributing your new firefox installer.
Clipboard Test - Archive of obsolete content
hod>.params>.param{display: block; margin-bottom:5px;} .method>.params>.param>.name{font-weight:bold; margin-right:.5em; min-width:80px; display:inline-block;} .method>.params>.param>.description{display:inline-block; width:300px; vertical-align:top;margin-right:30px} .method>.params>.param>.type{display:inline-block; width:100px; vertical-align:top;font-weight:bold;} .method>.params>.param>.type:before{content: "type "; color: #888; font-weight:normal;} .method>.params>.param>.default{display:inline-block; width:100px; vertical-align:top;font-weight:bold;} .method>.params>.param>.default:before{content: "default "; color: #888;font-weight:normal;} ]]></style> clipboard jetpack's clipboard support api provides a standardized way for features to access the clipboard.
...remember to import clipboard from the future before calling it.
jspage - Archive of obsolete content
ext":"textcontent"}; var b=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var k=["value","type","defaultvalue","accesskey","cellpadding","cellspacing","colspan","frameborder","maxlength","readonly","rowspan","tabindex","usemap"]; b=b.associate(b);hash.extend(e,b);hash.extend(e,k.associate(k.map(string.tolowercase)));var a={before:function(m,l){if(l.parentnode){l.parentnode.insertbefore(m,l); }},after:function(m,l){if(!l.parentnode){return;}var n=l.nextsibling;(n)?l.parentnode.insertbefore(m,n):l.parentnode.appendchild(m);},bottom:function(m,l){l.appendchild(m); },top:function(m,l){var n=l.firstchild;(n)?l.insertbefore(m,n):l.appendchild(m);}};a.inside=a.bottom;hash.each(a,function(l,m){m=m.capitalize();element.implement("...
...s;}if(!a){for(var b in c){this.cloneevents(d,b); }}else{if(c[a]){c[a].keys.each(function(e){this.addevent(a,e);},this);}}return this;}});element.nativeevents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,dommousescroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,domcontentloaded:1,readystatechange:1,error:1,abort:1,scroll:1}; (function(){var a=function(b){var c=b.relatedtarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="document"&&c!=this&&c.prefix!="xul"&&!this.haschild(c)); };element.events=new hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{...
Modularization techniques - Archive of obsolete content
a successful queryinterface() will call addref() on the requested interface before returning.
... out parameters functions that return a new interface should call addref() on that interface before returning it.
Space Manager High Level Design - Archive of obsolete content
if the blockreflowstate already had a space manager instance associated with it, it is stored off before being replaced, and the returned to the blockreflowstate instance after the new one has been destroyed.
...lls its propagatefloatdamage method the space manager is checked to see if there is any float damage if there is, then the block frame asks the space manager if the line in question intersects the float damage if the line does intersect a damage interval, then the line is marked dirty if the line does not intersect a damage interval, it may still be marked dirty if: it was impacted by floats before, but is not any longer it was not impacted by floats before, but is now it is impacted by floats and is a block problems / bugs found during documentation: bandrect and bandlist are public in nsspacemanager.h - should be private (compiles fine) nsspacemanager data members are declared protected, but there are no subclasses.
Actionscript Acceptance Tests - Archive of obsolete content
any avm arguments can be placed before the |multiabc| directive, or the line can start with the directive.
... the underscore is necessary otherwise the buildbot system will delete the .abc before starting up a testrun (not an issue when running locally, but makes it easy to differentiate between binary-only abc files and generated abcs.
Treehydra Manual - Archive of obsolete content
this is called just before gcc converts the c++-specific ast to the generic (language-independent) representation.
...by default, this is called just after gcc converts the ast to gimple, before any further lowering or optimization.
Anonymous Content - Archive of obsolete content
if the anonymous content is focusable, it can be tabbed into, but if the bound element is not focusable, the event will be stopped before it reaches the bound element.
...if the user then focuses the button inside the file upload control, the focus event generated for the button is stopped before it reaches the file control, since the file control is already focused.
Binding Attachment and Detachment - Archive of obsolete content
using a <destructor> block, a binding can perform any necessary cleanup before it is torn down.
... binding documents whenever a binding is attached to an element in another document, the binding document is only fetched if no binding from the binding document has been used before in the bound document.
Event Handlers - Archive of obsolete content
in both cases the javascript body is compiled just before execution; code that does not depend on the context of the event should be factored into normal javascript file.
...when a filter is imposed, additional conditions must be met before the event handler will fire.
initInstall - Archive of obsolete content
it is an error to call any other install methods before calling initinstall.
... after calling initinstall, your script must call performinstall or cancelinstall before it finishes.
collapse - Archive of obsolete content
before when the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
... both either the element immediately before the splitter, or the element immediately after the splitter can be collapsed, if the size of that element would fall below the minimum size due to the position of the splitter.
state - Archive of obsolete content
open the content either before or after the splitter, depending on the value of the collapsed attribute, is currently displayed.
... collapsed the content either before or after the splitter is collapsed and is not visible.
Building accessible custom components in XUL - Archive of obsolete content
<caption>it looks like a column header, but it's not</caption> so, before we do anything else, we need to tell assistive technologies that all of these unrelated elements are actually related.
...(we don't need any special code to track the focus change; we just need an onblur handler to accept the edited value before the focus changes.) first, the code to trigger edit mode: <code> const key_up = 38; const key_down = 40; const key_left = 37; const key_right = 39; const key_enter = 13; const key_escape = 27; function cell_keypress(e) { var current = e.target; switch (e.keycode) { case key_enter: if (current.tagname == 'label') { start_edit(current); } break; case key...
getPreviousItem - Archive of obsolete content
« xul reference home getpreviousitem( startitem, delta ) return type: element this method returns the item a given distance (delta) before the specified startitem, or null if no such item exists.
... this example will return the item five rows before someitem: getpreviousitem ( someitem, 5 ); ...
Namespaces - Archive of obsolete content
</html> there is a very subtle difference here than before.
... before i wrote xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" but here the :xul piece is omitted.
ContextMenus - Archive of obsolete content
as textboxes have a context menu built in, the event will fire before an attempt to open the context menu.
... hiding and showing menu items based on context when the context menu is opened, a popupshowing event will fire before the popup is displayed.
MenuItems - Archive of obsolete content
you do not need to update the checked attribute as the menuitem will update this automatically before the command event is fired.
... note that the checked state is updated before the command event fires, so if you use the menuitem's checked attribute within the command listener, it will already be in the new state.
MenuModification - Archive of obsolete content
in this case, 0 is supplied as the index, which means before the first item.
... indicies are counted starting at 0, so to insert an item before the fourth item pass 3 as the argument.
OpenClose - Archive of obsolete content
somepopup.openpopup(document.documentelement, "end_before", 0, 0, false, false); the second argument to openpopup is the anchor position, which specifies which side of the anchor the popup is positioned on.
... for instance, the value 'end_before' as used in the above example, indicates to place the left edge of the popup along the right edge of the the anchor element, aligned along the top edge of both.
RDF Modifications - Archive of obsolete content
any triples that don't exist in the new data but were there before are removed.
...there are still two more things to do before a result is accepted as a new match.
Custom toolbar button - Archive of obsolete content
be sure to add the extra code before the curly brace on the last line of the file.
...before and after the at-sign, it can only contain the characters a-z, a-z, 0-9, full stop, hyphen and underscore.
Toolbar customization events - Archive of obsolete content
beforecustomization this event is delivered when the user starts the toolbar customization process; for example, by right-clicking on a toolbar and choosing "customize".
...window.addeventlistener("beforecustomization", customizestart, false); window.addeventlistener("aftercustomization", customizeend, false); window.addeventlistener("customizationchange", customizechange, false); function customizestart(e) { let thetoolbox = e.target; /* now we know the user has started customizing */ } function customizeend(e) { let thetoolbox = e.target; /* the user has finished customizing */ } func...
Adding Style Sheets - Archive of obsolete content
in this file, we'll add the style declarations, as shown below: #find-text { min-width: 15em; } #progmeter { margin: 4px; } .springspace { width: 10px; } .titlespace { height: 10px; } notice how these styles are equivalent to the styles we had before.
...(the selector is the part before the curly brace in a style rule).
Box Objects - Archive of obsolete content
elements with a lower ordinal value are placed in the box before elements with a higher ordinal value.
... for example, if one element has an ordinal of 2, it would be placed before an element with ordinal 3 or higher but after one with ordinal 1.
Commands - Archive of obsolete content
for instance, there is also an insertcontrollerat method which inserts a controller into an element before other ones.
... var tboxcontroller = { supportscommand : function(cmd){ return (cmd == "cmd_paste"); }, iscommandenabled : function(cmd){ return false; }, docommand : function(cmd){ }, onevent : function(evt){ } }; document.getelementbyid("tbox").controllers.insertcontrollerat(0,tboxcontroller); in this example, we insert the controller at index 0, which means before any others.
Document Object Model - Archive of obsolete content
it is important to note, however, that the open() method returns before the window has fully loaded, so functions will not typically be available yet.
... the window object isn't defined by any dom specification, but in mozilla is sometimes considered part of dom level 0, a name used by some developers to refer to the dom-like functions before they were added to specifications.
Manifest Files - Archive of obsolete content
older applications if you are creating applications for older versions of mozilla software, that is, before firefox 1.5 or mozilla 1.8, the process is a bit more involved.
...exit mozilla before you do this.
Styling a Tree - Archive of obsolete content
dropbefore this property is set if the mouse pointer is hovering before the row currently being dragged over.
... getcellproperties: function(row,col){ if ((row %4) == 0){ return "makeitblue"; } } to support gecko versions before and after this change use.
Tree Box Objects - Archive of obsolete content
the name was changed to getpagelength() since it was confusing before since it doesn't return the number of pages, but the size of each page.
...these are indicated by the word 'out' before the argument.
Tree View Details - Archive of obsolete content
the getparentindex method is expected to return the parent row of a given row, that is, the row before it with a lower nesting value.
...for example, if the liquids row was opened, the corresponding array from childdata, which in this case contains only the single mercury child, will be inserted into the visibledata array after liquids but before gases.
Using Spacers - Archive of obsolete content
before we get into detail about boxes, we'll introduce another xul element that is useful for layout, the spacer.
...insert it just before the find button.
action - Archive of obsolete content
examples example needed attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , cl...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
arrowscrollbox - Archive of obsolete content
gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width clicktoscroll type: boolean clicktoscroll, if true, the arrows must be clicked to s...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
assign - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
bbox - Archive of obsolete content
ArchiveMozillaXULbbox
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
binding - Archive of obsolete content
properties object, predicate, subject examples fixme: (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties object type: string the object of the element.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related tbd ...
bindings - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width object type: string the object of the element.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related tbd ...
box - Archive of obsolete content
ArchiveMozillaXULbox
"/> <label value="two"/> </box> <box orient="horizontal"> <label value="three"/> <label value="four"/> </box> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements vbox, hbox ...
broadcaster - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
broadcasterset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
browser - Archive of obsolete content
warning: the type attribute must be set before the element is inserted into the document.
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata addprogresslistener( listener )...
column - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns, rows...
columns - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, column, rows,...
conditions - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
content - Archive of obsolete content
propiedades tag, uri ejemplos (no son necesarios) atributos inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width propiedades tag type: tag name this may be set to a tag name.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata relacionados tbd ...
deck - Archive of obsolete content
ArchiveMozillaXULdeck
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties selectedindex type: integer returns the index of the c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related stack ...
dropmarker - Archive of obsolete content
examples properties accessibletype attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
grid - Archive of obsolete content
ArchiveMozillaXULgrid
e"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements columns, column, ro...
grippy - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
groupbox - Archive of obsolete content
radiogroup> <radio label="black and white"/> <radio label="colour"/> </radiogroup> <checkbox label="enabled"/> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprov...
hbox - Archive of obsolete content
ArchiveMozillaXULhbox
example <!-- two button on the right --> <hbox> <spacer flex="1"/> <button label="connect"/> <button label="ping"/> </hbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements box, vbox ...
keyset - Archive of obsolete content
attributes disabled examples <keyset> <key id="sample-key" modifiers="shift" key="r"/> </keyset> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width disabled type: boolean indicates whether the element is disabled or not.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
listbox - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata additemtoselection( item ) return ty...
... a select event is sent before the items are deselected.
listcol - Archive of obsolete content
cell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, ...
listcols - Archive of obsolete content
cell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, ...
listhead - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, ...
listheader - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, ...
member - Archive of obsolete content
properties child, container examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties child type: ?
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
notificationbox - Archive of obsolete content
cation, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties currentnotification type: notification element the currently displayed ...
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata appendnotification( label , value , im...
observes - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
page - Archive of obsolete content
ArchiveMozillaXULpage
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
popupset - Archive of obsolete content
item label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <label value="right click for popup" context="clipmenu"/> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements popup, menupopup ...
preferences - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related preferences system documentat...
query - Archive of obsolete content
ArchiveMozillaXULquery
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
queryset - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
resizer - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
richlistbox - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata additemtoselection( item ) return t...
... a select event is sent before the items are deselected.
row - Archive of obsolete content
ArchiveMozillaXULrow
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns, colu...
rows - Archive of obsolete content
ArchiveMozillaXULrows
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns, colu...
script - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
scrollbox - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
scrollcorner - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
separator - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following classes may...
spacer - Archive of obsolete content
examples <box> <button label="left"/> <spacer flex="1"/> <button label="right"/> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements separator, splitter...
spinbuttons - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
stack - Archive of obsolete content
ArchiveMozillaXULstack
--> </hbox> </stack> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related deck ...
statusbar - Archive of obsolete content
left panel"/> <spacer flex="1"/> <progressmeter mode="determined" value="82"/> <statusbarpanel label="right panel"/> </statusbar> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements statusbarpanel ...
<statusbarpanel> - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following classes may...
...the image will appear before the label.
stringbundle - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties applocale obsolete since gecko 1.9.1 type: nsilocale ...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related xul property files ...
stringbundleset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
tabbrowser - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata addprogresslistener( listener ) ...
...if there were more tabs before, the additional ones are not removed.
tabpanel - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tabbox, tabs, tab, ...
tabpanels - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibil...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tabbox, tabs, tab, ...
template - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
textnode - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
titlebar - Archive of obsolete content
ndow> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width note: the allowevents attribute did not work for title bars prior to firefox 3.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
toolbargrippy - Archive of obsolete content
properties accessible examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibili...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbut...
toolbaritem - Archive of obsolete content
barbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbut...
toolbarpalette - Archive of obsolete content
label="&mylabel;" tooltiptext="&mytiptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbut...
toolbarseparator - Archive of obsolete content
toolbar> <toolbarbutton label="button 1"/> <toolbarseparator /> <toolbarbutton label="button 2"/> </toolbar> </toolbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, ...
toolbarset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , cla...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, ...
toolbarspacer - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbut...
toolbarspring - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, ...
toolbox - Archive of obsolete content
</toolbar> </toolbox> <textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="20"/> </window> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibil...
...node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata appendcustomtoolbar( name, currentset ...
tree - Archive of obsolete content
ArchiveMozillaXULtree
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata startediting( row, column ) return typ...
...this style must come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect.
treechildren - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata example <tree flex="1"> <treecols> ...
treecol - Archive of obsolete content
this style must come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect.
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following class may b...
treecols - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the ty...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tree, treecol, tree...
treerow - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tree, treecols, tre...
treeseparator - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tree, treecols, tre...
triple - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
vbox - Archive of obsolete content
ArchiveMozillaXULvbox
example <!-- two labels at bottom --> <vbox> <spacer flex="1"/> <label value="one"/> <label value="two"/> </vbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , c...
...aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements box, hbox ...
MacFAQ - Archive of obsolete content
note that in order to copy the framework while keeping the relative soft-links in the framework, do something like: % ( cd dist ; gnutar cf - xul.framework | ( cd /library/frameworks ; gnutar xf - )) installing your application your application must be installed as a xulrunner app before you can open it.
... taking advantage of the core code "openurl" from "nscommandlineservicemac.cpp", you'll see that it looks for "browser.chromeurl" before defaulting to navigator.xul, and this is called when an xulrunner app is already running, so: create a default preference of "browser.chromeurl" that points to your new "hiddenwindow" as such: "chrome://myxul/content/hiddenwindow.xul" next take the code below and drop it in, to create the hiddenwindow.xul (note: the debug function and nsicommandline try/catch can be removed, all you need is ...
Gecko Compatibility Handbook - Archive of obsolete content
these browsers were developed before the relevant w3c recommendations for html, css, and the dom existed.
...to be backwardly compatible you must have a space before the trailing />.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 30-october 06, 2006 announcements mac user needed scott macgregor announced that .mac support and a dynamically add isp account feature has been added to the thunderbird account manager, however, testing is required before release can be issued.
... 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-10-27 - Archive of obsolete content
cédric wanted to know if the release directory should be closed before a major release to avoid this kind of thing to happen.
... on the same day paul reed replied to cédric's posting by stating that they would like to close the directory before major releases but that unfortunately it wasn't that easy to do because the files must be readable, so mirrors can get the bits to serve them on the release day.
2006-11-03 - Archive of obsolete content
the aim of the group is to develop a new, higher standard for the validation which is done before certificate issuance, called extended validation.
...he would like to have some comments before november 19th, after which there will possibly be a vote.
NP_Port - Archive of obsolete content
save the current port settings before changing the port for drawing.
... set the desired port settings before drawing.
Building a Theme - Archive of obsolete content
your theme will not be active the first time you install, and you will need to click "enable" and restart before you can see your change.
...se the command-line zip tool: zip -r my_theme.xpi install.rdf chrome.manifest browser communicator global mozapps or, if you have 7-zip installed, you can use that for zipping it up: 7z a -tzip my_theme.xpi chrome chrome.manifest note: the command-line tool will update an existing zip file, not replace it - so if you have files you've deleted from your theme, be sure to remove the .xpi file before running the zip command again.
Browser Detection and Cross Browser Support - Archive of obsolete content
feature oriented object detection is the testing for the existence of specific objects before attempting to use them in a script.
...in our example, branch 2.2.0 was created before 2.12.36 however comparing these values as strings shows '2.2.0' > '2.12.36'.
CSS - Archive of obsolete content
ArchiveWebCSS
if the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated.-ms-hyphenate-limit-linesthe -ms-hyphenate-limit-lines css property is a microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word.-ms-hyphenate-limit-zonethe -ms-hyphenate-limit-zone css property is a microsoft extension specifying the width of the hyphenation zone...
...a slider control is one possible representation of <input type="range">.::-ms-ticks-beforethe ::-ms-ticks-before css pseudo-element is a microsoft extension that applies one or more styles to the tick marks that appear before the track of a slider control.
Processing XML with E4X - Archive of obsolete content
one must instead either calculate the variable with a javascript expression (e.g., bar={'a'+var1+var2}), define a new variable before the element literal which includes the full interpolation and then include that variable or retrieve the attribute after the literal to alter it (see below).
...these filter operations are specified using an expression contained in parentheses: var html = <html> <p id="p1">first paragraph</p> <p id="p2">second paragraph</p> </html>; alert(html.p.(@id == "p1")); // alerts "first paragraph" nodes matching the path before the expression (in this case the paragraph elements) are added to the scope chain before the expression is evaluated, as if they had been specified using the with statement.
Using XForms and PHP - Archive of obsolete content
?> but remember this (quote from php documentation): remember that header() must be called before any actual output is sent, either by normal html tags, blank lines in a file, or from php.
... it is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called.
Building up a basic demo with A-Frame - Game development
add the following html before the <a-cube> element: <a-sky color="#dddddd"></a-sky> at this point, if you save the code and refresh your browser you can already see the cube on the screen with our custom background: here's the code we have created so far: you can also check it out on github.
...add this just before the closing </a-scene> element: <a-camera position="0 1 4" cursor-visible="true" cursor-scale="2" cursor-color="#0095dd" cursor-opacity="0.5"> </a-camera> we've also defined a cursor for the given camera, using the cursor-* attributes (by default it is invisible.) — we've set its scale so it will more easily visible, its color, and some opacity so it won't completely covering the o...
Building up a basic demo with the PlayCanvas engine - Game development
before reading on, copy this code to a new text file and save it in your working directory as index.html.
...to make the cylinder have a color, let's say yellow, we need to create the material for it, as before.
Building up a basic demo with Three.js - Game development
before reading further, copy this code to a new text file, and save it in your working directory as index.html.
...add it right before the render() function: var t = 0; now let's increase the value by a given constant value, on each frame of the animation.
Desktop mouse and keyboard controls - Game development
phaser approach as i mentioned before you can write everything on your own, but you can also take the advantage of built-in functions in frameworks like phaser — these will make your life easier and development a lot faster.
...it can be done exactly the same as before — by capturing key codes and performing actions.
Unconventional controls - Game development
first, we add a <script> tag with the url pointing at this file, and add <div id="output"></div> just before the closing </body> tag for outputting diagnostic information.
...we next add these lines after all the event listeners for keyboard and mouse, but before the draw method: var todegrees = 1 / (math.pi / 180); var horizontaldegree = 0; var verticaldegree = 0; var degreethreshold = 30; var grabstrength = 0; right after that we use the leap's loop method to get the information held in the hand variable on every frame: leap.loop({ hand: function(hand) { horizontaldegree = math.round(hand.roll() * todegrees); verticaldegree = math.roun...
Efficient animation for web games - Game development
requestanimationframe causes the browser to redraw and call your function before that frame gets to the screen.
...we do this so that any setup or processes that happen between the start of the animation and the callback being processed do not affect the start of the animation, and so that all the animations we start before the frame is processed are synchronised.
Create the Canvas and draw on it - Game development
before we can start writing the game's functionality, we need to create a basic structure to render the game inside.
... the fillstyle property looks different than before.
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.
... save on drop menu or better with ctrl+s before testing in browsers.
Houdini - MDN Web Docs Glossary: Definitions of Web-related terms
while many of the features houdini enables can be created with javascript, interacting directly with the cssom before javascript is enabled provides for faster parse times.
... browsers create the cssom — including layout, paint, and composite processes — before applying any style updates found in scripts: layout, paint, and composite processes are repeated for updated javascript styles to be implemented.
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
page prediction is a browser feature or script which, when enabled, tells the browser to download resources the user is likely to visit before the user requests the content.
...for example, as the user types in the address bar, the browser might send the current text in the address bar to the search engine before the user submits the request.
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
the three message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as http browser requests.
... this handshake step happens after a dns lookup and before the tls handshake, when creating a secure connection.
HTML: A good basis for accessibility - Learn web development
any personal knowledge or extra description shouldn't be included here, as it is not useful for people who have not come across the image before.
...see test your skills: html accessibility to verify that you've retained this information before you move on.
HTML: A good basis for accessibility - Learn web development
any personal knowledge or extra description shouldn't be included here, as it is not useful for people who have not come across the image before.
...see test your skills: html accessibility to verify that you've retained this information before you move on.
Debugging CSS - Learn web development
you can try this out in devtools before adding it to your css file.
...you are much more likely to get help if you can show that you have done the work of reducing the problem and identifying exactly where it happens, before asking for help.
Images, media, and form elements - Learn web development
typically these do similar things to those described above, making sure that anything different across browsers is set to a consistent default before you do your own work on the css.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: images and form elements.
Styling tables - Learn web development
this causes the caption to be positioned on the bottom of the table, which along with the other declarations gives us this final look (see it live at punk-bands-complete.html): table styling quick tips before moving on, we thought we'd provide you with a quick list of the most useful points illustrated above: make your table markup as simple as possible, and keep things flexible, e.g.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: tables.
The box model - Learn web development
html { box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } note: an interesting bit of history — internet explorer used to default to the alternative box model, with no mechanism available to switch.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: the box model.
CSS values and units - Learn web development
we can't do this calculation beforehand because we don't know what 20% of the parent will be, so we use calc() to tell the browser to do it for us.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: values and units.
CSS building blocks - Learn web development
the aim here is to provide you with a toolkit for writing competent css and help you understand all the essential theory, before moving on to more specific disciplines like text styling and css layout.
... get started prerequisites before starting this module, you should have: basic familiarity with using computers, and using the web passively (i.e.
Floats - Learn web development
first, we'll start off with some simple html — add the following to your html body, removing anything that was inside there before: <h1>simple float example</h1> <div class="box">float</div> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: floats.
Positioning - Learn web development
this is fine — as we said before, static positioning is the default behavior!
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: positioning.
What is CSS? - Learn web development
as we have mentioned before, css is a language for specifying how documents are presented to users — how they are styled, laid out, etc.
... before the colon, we have the property, and after the colon, the value.
Styling lists - Learn web development
list-style-position: sets whether the bullets appear inside the list items, or outside them before the start of each item.
... bullet position the list-style-position property sets whether the bullets appear inside the list items, or outside them before the start of each item.
Web fonts - Learn web development
open up the stylesheet.css file and copy both the @font-face blocks contained inside into your web-font-start.css file — you need to put them at the very top, before any of your css, as the fonts need to be imported before you can use them on your site.
...put it above the existing <link> element, so that the font is imported before you try to use it in your css.
How do I start to design my website? - Learn web development
so when you get an idea and want to turn it into a website, there are a few questions you should answer before anything else: what exactly do i want to accomplish?
...therefore, before jumping into the technical side—for example, code and tools—you must first step back and decide in detail what you want to do.
How do I use GitHub Pages? - Learn web development
the other thing you need to do before moving on is to initialise your code directory as a git repository.
... further github knowledge if you want to make more changes to your test site and upload those to github, you simply need to make the change to your files just like you did before.
What is a URL? - Learn web development
the web server can use those parameters to do extra stuff before returning the resource.
... examples of absolute urls full url (the same as the one we used before) https://developer.mozilla.org/docs/learn implicit protocol //developer.mozilla.org/docs/learn in this case, the browser will call that url with the same protocol as the one used to load the document hosting that url.
What is a Domain Name? - Learn web development
the label located right before the tld is also called a secondary level domain (sld).
...each dns server that knows about a given domain stores the information for some time before it is automatically invalidated and then refreshed (the dns server queries an authoritative server and fetches the updated information from it).
The HTML5 input types - Learn web development
client-side validation as you can see above, email, along with other newer input types, provides built-in client-side error validation — performed by the browser before the data gets sent to the server.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: html5 controls.
HTML forms in legacy browsers - Learn web development
before using features that aren't fully supported in the browsers your targeting, you should feature detect: css feature detection before styling a replaced form control widget, you can check to see if the browser supports the features you plan on using using @supports: @supports (appearance: none) { input[type="search"] { appearance: none; /* restyle the search input */ } theappearance prop...
...the basic premise is to consider whether altering the default implemenation is worth the work before embarking on the challenge.
Other form controls - Learn web development
f values: <select id="groups" name="groups"> <optgroup label="fruits"> <option>banana</option> <option selected>cherry</option> <option>lemon</option> </optgroup> <optgroup label="vegetables"> <option>carrot</option> <option>eggplant</option> <option>potato</option> </optgroup> </select> on the <optgroup> element, the value of the label attribute is displayed before the values of the nested options.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: other controls.
Your first form - Learn web development
designing your form before starting to code, it's always better to step back and take the time to think about your form.
... before you go any further, make a local copy of our simple html template — you'll enter your form html into here.
Web forms — Working with user data - Learn web development
get started prerequisites before starting this module, you should at least work through our introduction to html.
...therefore, before you look at the other sections listed below we'd recommend that you go away and learn some css and javascript first.
HTML basics - Learn web development
the closing tag: this is the same as the opening tag, except that it includes a forward slash before the element name.
... images let's turn our attention to the <img> element again: <img src="images/firefox-icon.png" alt="my test image"> as we said before, it embeds an image into our page in the position it appears.
How the Web works - Learn web development
this theory is not essential to writing web code in the short term, but before long you'll really start to benefit from understanding what's happening in the background.
...when you type a web address in your browser, the browser looks at the dns to find the website's real address before it can retrieve the website.
JavaScript basics - Learn web development
in your index.html file, enter this code on a new line, just before the closing </body> tag: <script src="scripts/main.js"></script> this is doing the same job as the <link> element for css.
... in index.html, add the following line just before the <script> element: <button>change user</button> in main.js, place the following code at the bottom of the file, exactly as it is written.
Getting started with HTML - Learn web development
the closing tag: this is the same as the opening tag, except that it includes a forward slash before the element name.
...for proper nesting, we should close the strong element first, before closing the p.
Mozilla splash page - Learn web development
prerequisites: before attempting this assessment you should have already worked through the rest of the multimedia and embedding module.
...then save pattern.png in the same directory (right click on the image to get an option to save it.) access the different images in the originals directory and save them in the same way; you'll want to save them in a different directory for now, as you'll need to manipulate (some of) them using a graphics editor before they're ready to be used.
Structuring the web with HTML - Learn web development
get started prerequisites before starting this topic, you should have at least basic familiarity with using computers and using the web passively (i.e.
... it is recommended that you work through getting started with the web before attempting this topic, however, it isn't absolutely necessary; much of what is covered in the html basics article is also covered in our introduction to html module, albeit in a lot more detail.
Functions — reusable blocks of code - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: functions.
... these tests require skills that are covered in the next two articles, so you might want to read those first before trying it.
Function return values - Learn web development
so when you execute the following: ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); if the three random() calls returned the values 500, 200, and 35, respectively, the line would actually be run as if it were this: ctx.arc(500, 200, 35, 0, 2 * math.pi); the function calls on the line are run first, and their return values substituted for the function calls, before the line itself is then executed.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: functions.
Making decisions in your code — conditionals - Learn web development
break; case 'overcast': para.textcontent = 'it isn\'t raining, but the sky is grey and gloomy; it could turn any minute, so take a rain coat just in case.'; break; default: para.textcontent = ''; } } note: you can also find this example on github (see it running live on there also.) ternary operator there is one final bit of syntax we want to introduce you to before we get you to play with some examples.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: conditionals.
Fetching data from the server - Learn web development
these technologies allow web pages to directly handle making http requests for specific resources available on a server and formatting the resulting data as needed before it is displayed.
...add this next: request.responsetype = 'text'; fetching a resource from the network is an asynchronous operation, meaning that you have to wait for that operation to complete (e.g., the resource is returned from the network) before you can do anything with that response, otherwise, an error will be thrown.
Manipulating documents - Learn web development
it is useful to familiarize yourself with this terminology before working with the dom, as a number of the code terms you'll come across make use of them.
... going back to the current example, let's start by grabbing a reference to our <section> element — add the following code at the bottom of your existing script (do the same with the other lines too): const sect = document.queryselector('section'); now let's create a new paragraph using document.createelement() and give it some text content in the same way as before: const para = document.createelement('p'); para.textcontent = 'we hope you enjoyed the ride.'; you can now append the new paragraph at the end of the section using node.appendchild(): sect.appendchild(para); finally for this part, let's add a text node to the paragraph the link sits inside, to round off the sentence nicely.
Third-party APIs - Learn web development
note: the example has rudimentary form data validation — the search term field has to be filled in before the form can be submitted (achieved using the required attribute), and the date fields have pattern attributes specified, which means they won't submit unless their values consist of 8 numbers (pattern="[0-9]{8}").
... the second function works nearly exactly the same way in reverse, but we also have to take the extra step of checking that pagenumber is not already zero before decrementing it — if the fetch request runs with a minus page url parameter, it could cause errors.
A first splash into JavaScript - Learn web development
; } resetbutton.parentnode.removechild(resetbutton); guessfield.disabled = false; guesssubmit.disabled = false; guessfield.value = ''; guessfield.focus(); lastresult.style.backgroundcolor = 'white'; randomnumber = math.floor(math.random() * 100) + 1; } </script> </body> </html> have a go at playing it — familiarize yourself with the game before you move on.
... a small discussion on objects let's add one more final improvement before we get to this discussion.
Working with JSON - Learn web development
and when we want to send a javascript object across the network, we need to convert it to json (a string) before sending.
...you can find some further tests to verify that you've retained this information before you move on — see test your skills: json.
Object-oriented JavaScript for beginners - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: object-oriented javascript.
... note that this set of tests relies on some of the knowledge taught in the next two articles, so you might want to read them first before you try the tests.
Object building practice - Learn web development
in each case, we include the size of the ball in the calculation because the x/y coordinates are in the center of the ball, but we want the edge of the ball to bounce off the perimeter — we don't want the ball to go halfway off the screen before it starts to bounce back.
...this serves to cover up the previous frame's drawing before the next one is drawn.
Test your skills: JSON - Learn web development
you'll need to parse it into json before you can get any data out of it.
... the last mother cat name should have an "and" before it, and a full stop after it.
Multimedia: Images - Learn web development
rendering strategy as images are loaded asynchronously and continue to load after the first paint, if their dimensions aren't defined before load, they can cause reflows to the page content.
... for any background images, it's important you set a background-color value so any content overlaid is still readable before the image has downloaded.
Ember app structure and componentization - Learn web development
before we start adding any component code, let’s create the scaffolding for the other components.
... </button> </footer> finally, the contents of application.hbs should be updated so that they call the appropriate components, like so: <section class="todoapp"> <h1>todos</h1> <header /> <todolist /> <footer /> </section> with these changes made, run npm start in your terminal again, then head over to http://localhost:4200 to ensure that the todo app still looks as it did before the refactor.
Introduction to client-side frameworks - Learn web development
as we've alluded to before, the advantages of frameworks are achievable in vanilla javascript, but using a framework takes away all of the cognitive load of having to solve these problems yourself.
...before you decide to use a framework for a project, be sure you have time to learn enough of its features for it to be useful to you rather than it working against you, and be sure that your teammates are comfortable with it as well.
Getting started with Svelte - Learn web development
we encourage you to go through the svelte tutorial for a really quick introduction to the basic concepts, before returning to this tutorial series to learn how to build something slightly more in-depth.
...before we do that, however, let's recap some of the things we’ve learned.
Working with Svelte stores - Learn web development
update the <script> and markup sections of alert.svelte as follows: <script> import { alert } from '../stores.js' </script> {#if $alert} <div on:click={() => $alert = ''}> <p>{ $alert }</p> </div> {/if} check your app again and you'll see that this works just like before.
...we'll specify a prop with the milliseconds to wait before clearing the notification, and we'll define a timeout to remove the alert.
Vue conditional rendering: editing existing todos - Learn web development
ttom: 5px; } input { display: inline-block; margin-top: 0.4rem; width: 100%; min-height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } form { display: flex; flex-direction: row; flex-wrap: wrap; } form > * { flex: 0 0 100%; } </style> note: walk through the above code then read the below description to make sure you understand everything the component is doing before moving on.
... modifying our todoitem component before we can add todoitemeditform to our app, we need to make a few modifications to our todoitem component.
Creating our first Vue component - Learn web development
additionally, prop validation functions are invoked before the component instance is created, so they do not have access to the component state (or other props).
... your component’s template section should now look like this: <template> <div> <input type="checkbox" id="todo-item" checked="false" /> <label for="todo-item">{{label}}</label> </div> </template> go back to your browser and you'll see the todo item rendered as before, but without a label (oh no!).
Understanding client-side JavaScript frameworks - Learn web development
get started now, with "introduction to client-side frameworks" prerequisites you should really learn the basics of the core web languages first before attempting to move on to learning client-side frameworks — html, css, and especially javascript.
...before we can make it do things, we need to break it apart into manageable, descriptive components.
Strategies for carrying out testing - Learn web development
when you've got a new addition to your codebase that needs testing, before you start testing you should write out a list of testing requirements that need to pass to be accepted.
... user testing before we move on, we'll finish this article off by talking a bit about user testing — this can be a good option if you have a willing user group to test your new functionality on.
Package management basics - Learn web development
now try running the following in your terminal, making sure you are inside the parcel-experiment directory: npm run dev this should start parcel and serve up your index.html at the local development server, as we saw before: server running at http://localhost:1234 ✨ built in 5.48s.
... in addition, the npm (and yarn) commands are clever in that they will search for command line tools that are locally installed to the project before trying to find them through conventional methods (where your computer will normally store and allow software to be found).
Accessibility API cross-reference
indicates an element is being modified and that assistive technologies may want to wait until the modifications are complete before exposing them to the user.
... minimized n/a iconified iconified can be expressed with aria-expanded marqueed n/a n/a 3rd state in a tri-state checkbox mixed n/a n/a aria-checked=mixed n/a must do something with control before leaving it n/a modal modal aria-modal=true edit control that can take multiple lines n/a multi_line multi_line aria-multiline=true can select more than one of the children multiselectable multiselectable multi_selectable aria-multiselectable=true currently off-screen offscreengrouping...
Theme concepts
if you have a lightweight theme it will be converted to this new theme format automatically before lightweight themes are deprecated.
... return; } currenttheme = theme; browser.theme.update(themes[theme]); } learn more about dynamic themes and see an additional example in the following video: if you have not built a browser extension before, check out your first extension for a step-by-step guide.
What to do and what not to do in Bugzilla
before you have canconfirm, you can still do good triaging by leaving comments with useful information on the bug that will help to confirm it.
... before verifying fixed bugs, make sure that you can verify them on every hardware/os they were reported on.
Debugging JavaScript
(note that before firefox 28, this was labeled "browser debugger" and only the debugger was available, not the whole toolbox.) note that you must accept the incoming connection : (you may disable the pop-up above with the devtools.debugger.prompt-connection set to false in about:config.
...(note that before firefox 28, only the script debugger was available.) the use of these tools are the same as the built-in tools.
HTTP logging
launch the browser and get it into whatever state you need to be in just before your bug occurs.
... in that case you can set environment variables *before* you launch firefox.
Simple SeaMonkey build
mkdir /c/mozilla-src) and switch to it before building (cd /c/mozilla-src).
... to (possibly) fix this, cd to a dir without spaces before doing the "hg clone" command above.
Simple Sunbird build
c:\ ) before doing the following steps.
...then just re-run the "make -f client.mk" command above (you can do the addition before running make for the first time).
Simple Thunderbird build
add the following line to your mozconfig file: ac_add_options --enable-calendar to add that line you can do this in the source/ directory: echo 'ac_add_options --enable-calendar' >> mozconfig building before you start, make sure that the version you checked out is not busted.
... if on windows you get link errors like "lnk1102: out of memory" or "lnk1318: unexpected pdb error; ok (0)", try deleting the largest .pdb files before rushing out the door to buy more ram.
ESLint
meeting these rules before review will help reduce the amount of review time, and the revisions necessary to have a review granted.
...this lets you see errors in real time, and can help you fix issues before you compile or run tests, reducing the time to develop patches.
Gecko Logging
if (moz_log_test(slogger, loglevel::warning)) { int elapsed = time::nowms() - start; if (elapsed > 1000) { moz_log(slogger, loglevel::warning, ("loop took %dms!", elapsed)); } } if (i != 10) { moz_log(slogger, loglevel::error, ("i should be 10!")); } } enabling logging the log level for a module is controlled by setting an environment variable before launching the application.
... sync print each log synchronously, this is useful to check behavior in real time or get logs immediately before crash.
Obsolete Build Caveats and Tips
if you are using windows xp, you must have windows xp service pack 2 and .net framework 2.0 installed before installing the vista sdk.
... if you are building mozilla source code from before firefox 5, then you must first select the mozilla application that you want to build (see below), and you will probably also need to set at least some of the other basic configuration options (such as whether to build a debug build or not) to get the type of build that you need.
Limitations of chrome scripts
== "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var loadcontext = httpchannel.notificationcallbacks.getinterface(ci.nsiloadcontext); // topframeelement is the <browser> element var topframeelement = loadcontext.topframeelement; var browsermm = topframeelement.messagemanager; console.log("browsermm: " + browsermm); } } however, before firefox 38, this technique will not work if multiprocess firefox is disabled: specifically, topframeelement will be null.
... this means that if you need to write code that works before firefox 38 and on both multiprocess and non-multiprocess variants, you need to implement both paths: test whether topframeelement is null if it is, you're running in single-process firefox, and should use the old way if it isn't, you're running in multiprocess firefox and should use the new way from firefox 38 onwards, the topframeelement approach always works.
Embedding Tips
how do i watch/intercept a load before it happens?
...wait for persistence to complete before returning.
Geckoview-Junit Tests
before running tests, install the androidtest apk on your device; otherwise, 'mach geckoview-junit' will offer to install it.
...to disable a single test, edit the source code and insert junit's @ignore annotation before the existing @test annotation.
Hacking with Bonsai
there is a web page, which records if the tree is open or closed what the date stamp of the last known good tree is who is on the hook for the current tree before the tree is opened, the list of checkins that happened when the tree was closed is reviewed to insure that only build related checkins took place.
... before the tree is opened, there is a car pool lane where people who have been off on a branch and need a stable tip to merge in can pull the tip for their merge.
How to get a stacktrace with WinDbg
before debugging can start, several commands must be entered into the one-line input box at the bottom of the command window.
... .logopen /t c:\temp\firefox-debug.log .childdbg 1 .tlist sxn gp lm if you see firefox.exe listed in the output from .tlist more than once, then you are already running the application and need to close the running instance first before you start debugging, otherwise you won't get useful results.
How to implement a custom autocomplete search component
it has no specific logic (it just returns a dummy array of choices) it doesn't care about compatibility with older gecko versions first copy the following javascript code into a file named basic_autocomplete.js into the components directory (or whatever components folder is appropriate in your case): warning: the uuid used below in chrome.manifest and assigned to class_id must be changed before use.
...a bit more complex example compatible with old gecko versions first copy the following javascript code into a file named "simple_autocomplete.js" into the "components" directory (or whatever "components" folder is appropriate in your case) warning: the uuid used below in chrome.manifest and assigned to class_id must be changed before use.
How to Report a Hung Firefox
if firefox is truly hung, please note the approximate amount of time you waited before forcing a crash (below) in the bug report.
... if you suspect a hang (as opposed to slow performance), wait one minute on an idle system before getting the stack trace.
IPDL Best Practices
this document is intended to help correct these before the formal review process is initiated.
... is there any chance that an ipdl function could be called after the protocol itself has been destroyed, or before it has been created?
DownloadSummary
progresstotalbytes read only number indicates the total number of bytes to be transferred before completing all the downloads that are currently in progress.
...views on the summarized data can be registered before this object is bound to an actual list.
Following the Android Toasts Tutorial from a JNI Perspective
for example, navigating away from an email before you send it triggers a "draft saved" toast to let you know that you can continue editing later.
... let sig = { context: 'landroid/content/context;', charsequence; 'ljava/lang/charsequence;', int: 'i', toast: 'landroid/widget/toast;', void: 'v', }; get java environment before we go on to declare the other important features, we need to load our environment variable.
Promise
the resolving functions can be used at any time, before or after the executor has completed, to control the final state of the promise.
... note: calling this method with a pending promise as the avalue argument, and then calling it again with another value before the promise is fulfilled or rejected, will have no effect the second time, as the associated promise is already resolved to the pending promise.
PromiseWorker.jsm
if any of the arguments is a promise, it is resolved before posting the message.
... aclosure optional an object holding strong references to value that should not be garbage-collected before the reply has been received.
Using JavaScript code modules
for example: components.utils.import("resource://app/my_module.jsm"); alert(foo()); // displays "foo" alert(bar.size + 3); // displays "6" alert(dummy); // displays "dummy is not defined" because 'dummy' was not exported from the module note: when you're testing changes to a code module, be sure to change the application's build id (e.g., the version) before your next test run; otherwise, you may find yourself running the previous version of your module's code.
...] .createinstance(components.interfaces.nsilocalfile); aliasfile.initwithpath("/some/absolute/path"); var aliasuri = services.io.newfileuri(aliasfile); resprot.setsubstitution("myalias", aliasuri); // assuming the code modules are in the alias folder itself notes custom modules and xpcom components note that prior to gecko 2.0 javascript xpcom components are loaded before chrome registration.
source-editor.jsm
sourceeditor.events.context_menu "contextmenu" fired when the editor's context menu is invoked, but before it's opened.
...you must call this, and wait until your callback is called, before calling any other source editor methods.
Localization content best practices
the word version may have to go before or after flash and one or both may need to be inflected.
...this means that string changes are not allowed to land, and each case must be evaluated before landing.
Localizing extension descriptions
if a preference isn't set and there isn't a matching em:localized property for the current locale or en-us, then the properties specified directly on the install manifest are used as a last resort, as they were always used before gecko 1.9.
... localizing before gecko 1.9 before gecko 1.9, add-on developers must go through a special process to define localized add-on descriptions for add-ons targeting toolkit-based apps (such as firefox or thunderbird).
Localizing with Mercurial
configuring mercurial once you've installed mercurial, you'll need to configure it before you can use it successfully.
...here are the steps to send your l10n work using mercurial: since your l10n work takes place in your own local repository, you should ensure that there are no changes made to the remote repository before committing your work.
Initial setup
here we'll go over the accounts you need as well as the tools and their configurations you need to set up before contributing.
... new or existing before anything else, you need to know if you will be creating a new localization or joining an existing one.
Mozilla Quirks Mode Behavior
orphaned dd has generated content :before instead of margin (bug 5119).
... maybe (firefox 3) when computing the minimum intrinsic width of an inline flow directly in a table cell (no blocks in between), it is assumed that it is not possible to break before and after an image (when otherwise it would be).
Profiling with Xperf
just make sure you set the symbol paths before enabling "load symbols" and before opening a summary view.
... these refer to the time range that was selected for the summary graph; for example, something that's in the aofi category was allocated before the start of the selected time range, but the free event happened inside.
TimerFirings logging
the following two lines show the output before and after being post-processed by that script.
... it is sometimes useful to pre-process the output by stripping out certain parts of each line before doing this aggregation step, for example, by inserting one or more of the following commands into the command pipeline.
about:memory
if you do not wish to share this information, you can select the "anonymize" checkbox before clicking on "measure and save..." or "measure...".
...if you select the "verbose" checkbox before measuring, all trees will be shown fully expanded and no artificial nodes will be inserted.
Optimizing Applications For NSPR
at thread switch time, the stack of the current running thread is copied to other storage associated with that thread and the about-to-be-dispatched thread's stack data is copied back onto the windows stack just before the thread is given control.
...if the spawned thread establishes and exits before the parent thread is resumed, the parent will be left with an invalid pointer to the child.
Monitors
monitor type monitor functions with a mutex of type prlock, a single thread may enter the monitor only once before it exits, and the mutex can have multiple associated condition variables.
...when the calling thread resumes, it has the same entry count it had before the wait operation.
Named Shared Memory
pr_deletesharedmemory should be called before process termination.
...some platforms may mangle the name before creating the file and the shared memory.
PRLinger
pr_true means the option is on, and the value of linger will be used to determine how long pr_close waits before returning.
... linger time (in printervaltime units) to linger before closing if any data remain in the socket send buffer.
PR_CWait
timeout the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
...when the wait has finished, the thread regains control of the monitor's lock with the same entry count as before the wait began.
PR_TransmitFile
headers a pointer to the buffer holding the headers to be sent before sending data.
...if headers is non-null, pr_transmitfile sends the headers across the socket before sending the file.
PR_Wait
ticks the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
...when the wait is over, the thread regains control of the monitor's lock with the same entry count it had before the wait began.
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
the callback is told whether the cert passed, and then can do anything extra that it wants to do before making a final decision.
...before jss 3.2 you would use cryptomanager to obtain the cryptotoken you want to use, then call cryptotoken.getciphercontext() to get an encryption engine.
Using JSS
MozillaProjectsNSSJSSUsing JSS
setup your runtime environment you need to set some environment variables before building and running java applications with jss.
... initialize jss in your application before calling any jss methods, you must initialize jss by calling one of the cryptomanager.initialize methods.
NSS_3.12_release_notes.html
ences in pk11obj.c bug 353780: klocwork null ptr dereferences in pkcs11.c bug 353865: klocwork null ptr deref in softoken/pk11db.c bug 353888: klockwork ids for ssl3con.c bug 353895: klocwork null ptr derefs in pki/pkibase.c bug 353902: klocwork bugs in stanpcertdb.c bug 353903: klocwork oom crash in softoken/keydb.c bug 353908: klocwork oom crash in tdcache.c bug 353909: klocwork ptr dereference before null check in devutil.c bug 353912: misc klocwork bugs in lib/ckfw bug 354008: klocwork bugs in freebl bug 359331: modutil -changepw strict shutdown failure bug 373367: verify ocsp response signature in libpkix without decoding and reencoding bug 390542: libpkix fails to validate a chain that consists only of one self issued, trusted cert bug 390728: pkix_pl_ocsprequest_create throws an error if ...
...es -b time option when -p option is present bug 403563: implement the tls session ticket extension (ste) bug 400917: want exported function that outputs all host names for dns name matching bug 315643: test_buildchain_resourcelimits won't build bug 353745: klocwork null ptr dereference in pkcs12 decoder bug 338367: the gf2m_populate and gfp_populate should check the eccurve_map array index bounds before use bug 201139: ssltap should display plain text for null cipher suites bug 233806: support nist crl policy bug 279085: nss tools display public exponent as negative number bug 363480: ocspclnt needs option to take cert from specified file bug 265715: remove unused hsearch.c dbm code bug 337361: leaks in jar_parse_any (security/nss/lib/jar/jarver.c) bug 338453: leaks in security/nss/lib/jar/jarfi...
NSS 3.48 release notes
bug 1590001 - prevent negotiation of versions lower than 1.3 after helloretryrequest bug 1596450 - added a simplified and unified mac implementation for hmac and cmac behind pkcs#11 bug 1522203 - remove an old pentium pro performance workaround bug 1592557 - fix prng known-answer-test scripts bug 1586176 - encryptupdate should use maxout not block size (cve-2019-11745) bug 1593141 - add `notbefore` or similar "beginning-of-validity-period" parameter to mozilla::pkix::trustdomain::checkrevocation bug 1591363 - fix a pbkdf2 memory leak in nsc_generatekey if key length > max_key_len (256) bug 1592869 - use arm neon for ctr_xor bug 1566131 - ensure sha-1 fallback disabled in tls 1.2 bug 1577803 - mark pkcs#11 token as friendly if it implements ckp_public_certificates_token bug 1566126 - p...
...ower ghash vector acceleration bug 1589073 - use of new pr_assert_arg in certdb.c bug 1590495 - fix a crash in pk11_makecertfromhandle bug 1591742 - ensure des iv length is valid before usage from pkcs#11 bug 1588567 - enable mozilla::pkix gtests in nss ci bug 1591315 - update nsc_decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength ch...
NSS API Guidelines
be sure to increment the reference count, on the returned object, before unlocking.
... methods/functions design init, shutdown functions if a layer has some global initialization tasks, which need to be completed before the layer can be used, that layer should supply an initialization function of the form layer_init().
NSS Developer Tutorial
miscellaneous goto can be used, to simplify resource deallocation, before returning from a function.
... check with nss-dev@ before using a language feature not already used, if you are uncertain.
nss tech note1
it can only decode der .† it does not handle streaming input, and requires that all input be present before beginning to decode.
...for this reason, i will first describe all the common functionality of the two decoders, before outlining their differences.
NSS tools : certutil
creating new security databases certificates, keys, and security modules related to managing certificates are stored in three related databases: * cert8.db or cert9.db * key3.db or key4.db * secmod.db or pkcs11.txt these databases must be created before certificates or keys can be generated.
...however, certificates can also be revoked before they hit their expiration date.
NSS tools : modutil
usage and examples creating database files before any operations can be performed, there must be a set of security databases available.
...files destined for the temporary directory are guaranteed to be in place before any executable file is run; they are not deleted until all executable files have finished.
gtstd.html
before running the sample programs, it's important to understand the relationships between the ssl interface, the pkcs #11 interface, pkcs #11 modules, and the default netscape security databases.
... setting up the certificate and key databases before you can run the sample programs (server.c and client.c) that come with nss, you must set up certificate, key, and security module databases for both the client and the server and populate them with valid ca, client ssl, and server ssl certificates.
NSS Tools certutil
ed ca to issue client certs (implies c) c trusted ca to issue server certs(for ssl only) (implies c) u user cert w send warning creating a certificate request this example generates a binary certificate request file named e95c.req in the specified directory: certutil -r -s "cn=john smith, o=netscape, l=mountain view, st=california, c=us" -p "650-555-8888" -o mycert.req -d certdir before it creates the request file, the certificate database tool prompts you for a password: enter password or pin for "communicator certificate db": creating a certificate a valid certificate must be issued by a trusted ca.
...tificate in the database with this command: certutil -l -n jsmith@netscape.com -d certdir the certificate database tool displays output similar to the following: certificate: data: version: 3 (0x2) serial number: 0 (0x0) signature algorithm: pkcs #1 md5 with rsa encryption issuer: cn=john smith, o=netscape, l=mountain view, st=california, c=us validity: not before: thu mar 12 00:10:40 1998 not after: sat sep 12 00:10:40 1998 subject: cn=john smith, o=netscape, l=mountain view, st=california, c=us subject public key info: public key algorithm: pkcs #1 rsa encryption rsa public key: modulus: 00:da:53:23:58:00:91:6a:d1:a2:39:26:2f:06:3a: 38:eb:d4:c1:54:a3:62:00:b9:f0:7f:d6:00:76:aa: 18:da:6b:79:71:5b:d9:8a:82:...
certutil
creating new security databases certificates, keys, and security modules related to managing certificates are stored in three related databases: o cert8.db or cert9.db o key3.db or key4.db o secmod.db or pkcs11.txt these databases must be created before certificates or keys can be generated.
...however, certificates can also be revoked before they hit their expiration date.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
usage and examples creating database files before any operations can be performed, there must be a set of security databases available.
...files destined for the temporary directory are guaranteed to be in place before any executable file is run; they are not deleted until all executable files have finished.
Multithreading in Necko
for example, the http protocol handler has code that runs on the socket transport thread to kick off pending requests well before the main thread would get around to doing so.
...as with the socket transport thread, the nsistreamlistener passed to a file transport's asyncread method can operate partially on the file transport's thread before proxying data to the main thread.
Rhino overview
introduction most people who have used javascript before have done so by adding scripts to their html web pages.
... toboolean boolean(new boolean(false)) is false for all versions before 1.3.
Rhino scopes and contexts
before using rhino in a concurrent environment, it is important to understand the distinction between contexts and scopes.
... note that currently in order to use java classes (liveconnect) from a sealed shared scope you need to pre-load a number of objects needed for liveconnect into the scope before it gets sealed.
SpiderMonkey Build Documentation
before you begin, make sure you have the right build tools for your computer: linux, windows, mac, others.
...before you begin, make sure you have right build tools for your computer: linux, windows, mac, others.
Creating JavaScript tests
jstests automatically load js/src/tests/shell.js before they run, which creates a ton of functions.
... testing your test run your new test locally before checking it in (or posting it for review).
Future directions
practical coding bits experimental language features new language features (es6+) and apis often get added to spidermonkey while the spec is still being drafted, or before the feature has stabilized.
... disable the feature before the beta channel.
GCIntegration - SpiderMonkey Redirect 1
overview before digging too deep, here are some quick rules of thumb for how to write code that will work smoothly with the gc regardless of changes that happen in the future.
...before the pointer is modified (except initializing writes, which don't need a barrier), you should call incrementalreferencebarrier() or incrementalvaluebarrier(), passing it the value the pointer held before the write.
GC Rooting Guide
these do not need to be wrapped in any of rooting classes, but they should be immediately used to initialize a js::rooted<t> if there is any code that could gc before the end of the containing function; a raw pointer must never be stored on the stack during a gc.
... obj.set(foo()); } (note that the above should probably check the return value and propagate an error on null), or: jsobject* somefunction(jscontext* cx) { js::rooted<jsobject*> obj(cx, foo()); { // make a scope to force the destructor to run before obj is unwrapped.
Exact Stack Rooting
any single gcthing is likely to get passed through a fairly deep call-stack before getting used.
...this prevents an entire class of bugs where return values are not rooted properly before the next js-api call.
JIT Optimization Strategies
for objects constructed by constructor functions, this means that the property needs to be defined in the constructor, before any complex logic occurs within the constructor.
...for objects constructed by constructor functions, this means that the property needs to be defined in the constructor, before any complex logic occurs within the constructor.
JS::SetOutOfMemoryCallback
added in spidermonkey 38 description unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
... if the large-allocation-failure callback is called at all (not all allocation sites call the large-allocation-failure callback on failure), it is called before the out-of-memory callback; the out-of-memory callback is only called if the allocation still fails after the large-allocation-failure callback has returned.
JSAutoByteString
you should call this before calling encode* methods or initbytes method if a string is already owned, otherwise the string will never be freed.
...so ensure the string is returned by operator!() before using ptr() method.
JSNewEnumerateOp
before jsapi 37, jsnewenumerateop was the type of jsclass.enumerate.
...(spidermonkey, noting the jsclass_new_enumerate flag, will cast that function pointer back to type jsnewenumerateop before calling it.) the behavior depends on the value of enum_op: jsenumerate_init a new, opaque iterator state should be allocated and stored in *statep.
JS_AddFinalizeCallback
added in spidermonkey 38 name description jsfinalize_group_start called when preparing to sweep a group of compartments, before anything has been swept.
... the collector will not yield to the mutator before calling the callback with jsfinalize_group_end status.
JS_GetGCParameter
hreshold_factor_avoid_interrupt, jsgc_nursery_free_threshold_for_idle_collection, jsgc_pretenure_threshold, jsgc_pretenure_group_threshold, jsgc_nursery_free_threshold_for_idle_collection_percent, jsgc_min_nursery_bytes, jsgc_min_last_ditch_gc_period, } jsgcparamkey; value (c++/js shell) description jsgc_max_bytes / "maxbytes" maximum nominal heap before last ditch gc.
... jsgc_max_malloc_bytes / "maxmallocbytes" number of js_malloc bytes before last ditch gc.
JS_SetGCCallback
the jsgc_begin callback can occur very early when something triggers garbage collection—before the javascript engine has even determined whether gc should actually be done at the moment.
... in a js_threadsafe build, a jsgc_begin callback can happen on one thread before or while a jsgc_end callback for the previous gc cycle runs on another thread.
JS_THREADSAFE
for each thread that is in a request: almost any call into the jsapi may trigger garbage collection; but garbage collection does not happen at any other time (such as, for example, at the moment before the return value of js_newobject is assigned to a rooted variable).
...when one thread calls js_gc or otherwise finds that garbage collection is necessary, it must wait for all other threads that are in requests to pause before garbage collection can occur.
Thread Sanitizer
before using it, you must of course adjust the path name for llvm_root to match your setup.
...to use it, either make sure the llvm-symbolizer binary is in your path or set the environment variable tsan_options="external_symbolizer_path=/path/to/llvm-symbolizer" before running the process.
Web Replay
before taking the snapshot, all threads participating in the recording must enter an idle state, waiting on a thread-specific condition variable.
... once all thread are idle, the main thread computes the memory diff, reads the stacks from each thread and their register state (which each thread recorded by calling setjmp before idling).
Exploitable crashes
additionally, mozilla developers make heavy use of two tools in particular to find exploitable situations before they show up as exploitable crash reports.
...do this before making comments or taking actions that expose exploitability publicly.
Setting up an update server
if you want it to be the same before and after updating, this step is unnecessary and you can use the same build that you used to create the installation.
...remember to navigate to the correct directory before starting the server.
Places utilities for JavaScript
markpageastyped() by calling this before we visit a url, we will use transition_typed as the transition for the visit to that url (if we don't have a referrer).
... markpageastyped(string aurl) markpageasfollowedbookmark() by calling this before we visit a url, we will use transition_bookmark as the transition for the visit to that url (if we don't have a referrer).
The Publicity Stream API
getpublicitystream( onsuccess: <function>, { [ onerror: <function> ], [ for_apps: <list> ], [ since: <date> ], [ before: <date> ], [ count: <int> ]): provides a means for a web store to receive a list of the current user's socially relevant app activity by being called from an origin which hosts a web store.
... before the timestamp of the latest event you want returned.
Aggregating the In-Memory Datasource
technical details as before, have an nscomptr as your delegate, but this time around,don't derive from nsirdfdatasource.
...this); } else if (aiid.equals(nscomtypeinfo<nsirdfdatasource>::getiid())) { return minner->queryinterface(aiid, aresult); } else { *aresult = nsnull; return ns_nointerface; } ns_addref(ns_static_cast(nsisupports*, aresult)); return ns_ok; } the only other thing that you'll need to be aware of is that you'll need to queryinterface() from nsisupports to nsirdfdatasource before you can actually do anything useful with the datasource from within your object.
Building the WebLock UI
client code overview before we get started on the actual user interface, we should establish how the client code is to access the weblock component and use its interfaces to control the web locking of the browser.
...avigator/content/weblock.css" type="text/css"?> <overlay id="weblockoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://weblock/content/weblock.js"/> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="weblock-status" insertbefore="offline-status" oncommand="loadweblock();" status="none"/> </statusbar> </overlay> note that the root element for this file is not a <window/> but an <overlay/>.
Starting WebLock
for example, the user interface may bring up a dialog asking the user for a password before calling unlock.
... before, we created a class and registered it with the component manager.
Using XPCOM Utilities to Make Things Easier
however, a change in xpcom that occurred before mozilla 1.3 makes ns_init_isupports no longer necessary: mrefcnt's type has been changed from an integer to a class that provides its own auto-initialization.
... ns_release(value); // release our reference } a method returns an nsisupports interface pointer that has been reference counted before it is returned (assuming it wasn't nsnull).
NS_InitXPCOM2
some of the possible errors are documented below: ns_error_not_initialized indicates that static globals were not yet initialized, which may happen if this method is called before xpcom's static initialization code executes.
... remarks you must call ns_initxpcom2 (or ns_initxpcom3) before proceeding to use xpcom in a process.
NS_InitXPCOM3
some of the possible errors are documented below: ns_error_not_initialized indicates that static globals were not yet initialized, which may happen if this method is called before xpcom's static initialization code executes.
... remarks you must call ns_initxpcom3 (or ns_initxpcom2) before proceeding to use xpcom in a process.
imgIContainer
flag_sync_decode: forces synchronous/non-progressive decode of all available data before the call returns.
... kdontanimmode 1 klooponceanimmode 2 kdisposeclearall -1 "disposal" method indicates how the image should be handled before the subsequent image is displayed.
imgIDecoderObserver
if imgidecoder::flag_sync_decode is passed to a function that triggers a decode, all notifications that can be generated from the currently loaded data fire before the call returns.
... if flag_sync_decode is not passed, all, some, or none of the notifications may fire before the call returns.
imgIEncoder
delay=# -- default: "500" number of milliseconds to display the frame, before moving to the next frame.
... dispose=[none|background|previous] -- default: "none" what to do with the image's canvas before rendering the next frame.
imgIRequest
aobserver will be notified synchronously (before the clone call returns) with all the notifications that have already been dispatched for this image load.
...imgicontainer has a requestdecode method, but callers may want to request a decode before the container has necessarily been instantiated.
mozIStorageConnection
before closing the connection, you need to finalize all statements created for the connection.
...this is essentially an "undo," and returns the database to the state it was in before the transaction began.
nsIAuthPrompt2
the implementation should fill in this object with the information entered by the user before returning.
...the implementation should fill in this object with the information entered by the user before returning.
nsIAutoCompleteInput
minresultsforpopup unsigned long specifies a minimum number of search results that must be available before the autocomplete popup will open.
... timeout unsigned long the number of milliseconds after a keystroke before a search begins.
nsICacheEntryDescriptor
checked before we write to the cache entry, to prevent ever taking up space in the cache for an entry that we know up front is going to have to be evicted anyway.
...markvalid() this method means that a writer must validate this cache object before any readers are given a descriptor to the object.
nsICachingChannel
the value of this attribute should be set before opening the channel.
...this value is undefined before the channel fires its onstartrequest notification and after the channel fires its onstoprequest notification.
nsICompositionStringSynthesizer
i.e., you may not call this before dispatchevent().
...this must be called before every call of dispatchevent().
nsIConsoleService
note: console listeners expect you to log an empty string message before calling reset, so they too can clear their message buffers.
... (this also works before gecko 19.) unregisterlistener() deregisters a listener.
nsICryptoHash
" must be called before any other method on this interface is called.
..." must be called before any other method on this interface is called.
nsIDOMHTMLSourceElement
type domstring the type attribute gives the type of the media resource, to help the user agent determine if it can play this media resource before fetching it.
... media unimplemented domstring the media attribute gives the intended media type of the media resource, to help the user agent determine if this media resource is useful to the user before fetching it.
nsIDOMNode
inherits from: nsisupports last changed in gecko 0.9.6 method overview nsidomnode appendchild(in nsidomnode newchild) nsidomnode clonenode(in boolean deep); boolean hasattributes(); boolean haschildnodes(); nsidomnode insertbefore(in nsidomnode newchild, in nsidomnode refchild) boolean issupported(in domstring feature, in domstring version); void normalize(); nsidomnode removechild(in nsidomnode oldchild) nsidomnode replacechild(in nsidomnode newchild, in nsidomnode oldchild) attributes attribute type description attributes nsidomnamednodemap read only.
...return value insertbefore() nsidomnode insertbefore( in nsidomnode newchild, in nsidomnode refchild ); parameters newchild refchild return value issupported() boolean issupported( in domstring feature, in domstring version ); parameters feature version return value normalize() void normalize(); parameters none.
nsIDOMWindowUtils
aflushlayout if true, layout is flushed before hit testing begins.
... apreventdefault optional obsolete since gecko 15.0 if true, preventdefault() the event before dispatch.
nsIFileInputStream
it may be removed before the stream is closed if it is possible to delete it and still read from it.
...also, the file is not locked when init is called, so it might be deleted before we try to read from it.
nsILoginManagerPrompter
must be called before using other interfaces.
... note: because the caller does not know the username of the login to be changed, anewlogin.username and anewlogin.usernamefield will be set (using the user's selection) before modifylogin() is called.
nsIMsgWindow
if you are checking this flag, you need to clear it before you start your operation since there's no convenient place to clear it.
... clearmsghdr whether or not the existing message pane and header should be cleared before the html is displayed.
nsINavHistoryService
this can be and is called before the page is actually added to history, since the page isn't added until it actually starts loading.
... you don't have to worry about calling this, addpagetosession/adduri will always check before actually adding the page.
nsIPlacesImportExportService
"bookmarks-restore-begin" is fired just before the import is started.
..."bookmarks-restore-begin" is fired just before the import is started.
nsIResumableChannel
entityid information about the file, to match before obtaining the file.
...entityid information about the file, to match before obtaining the file.
nsIScriptableIO
block: when this mode is specified, reading from a transport such as a socket when no data is available will block until data is available before returning.
...the write position will be set to the end of the file before each write.
nsISound
init() not strictly necessary, but avoids a delay before the first sound.
...if you wish to use this method for playing sounds, you should check the platform before you call playsystemsound().
nsIStreamListener
note: your implementation of this method must read exactly acount bytes of data before returning.
...you must read all of these bytes before returning to the caller.
nsIThreadPool
idlethreadtimeout unsigned long get/set the amount of time in milliseconds that a thread must be idle before it becomes eligible to be destroyed.
... a listener will only receive notifications about threads created after the listener is set so it is recommended that the consumer set the listener before dispatching the first event.
nsITimer
note that the delay is approximate: the timer can be fired before the requested time has elapsed.
...this target must be set before calling any of the initialization methods.
nsIWebBrowserChrome3
1.0 66 introduced gecko 2.0 inherits from: nsiwebbrowserchrome2 last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); methods onbeforelinktraversal() determines the appropriate target for a link.
... astring onbeforelinktraversal( in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab ); parameters originaltarget the original link target.
nsIWindowMediator
note: before gecko 23.0, use nsidomwindowutils.getouterwindowwithid.
... this method may not work on linux or mac (bug 462222) nor on os2 (bug 370134) - please check those bugs before relying on it.
nsIWindowWatcher
make sure you understand the security implications of this before using this method!
...component code), you might want to use this interface for opening a new window: var ww = components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getservice(components.interfaces.nsiwindowwatcher); var win = ww.openwindow(null, "chrome://myextension/content/about.xul", "aboutmyextension", "chrome,centerscreen", null); note: versions of gecko before gecko 2.0 would ignore some of the chrome flags when opening a chrome window without an opener window, instead behaving as if the "all" flag was present.
nsIXULBrowserWindow
method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); void setjsdefaultstatus(in astring status); void setjsstatus(in astring status); void setoverlink(in astring link, in nsidomelement element); methods onbeforelinktraversal() called before traversing a link to determine the appropriate target into which to load the link.
...astring onbeforelinktraversal( in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab ); parameters originaltarget the specified target for the link.
Weak reference
if the referent object is destroyed before the weak reference, the pointer inside the weak reference is set to nsnull.
... } alternatives this technique is useful, but in situations where you need this, there are two alternatives which you may want to consider: you might hold an owning reference, but arrange to release it out-of-band; this must be before the destructor, which would otherwise never be called.
XPIDL
attributes named 'iid' and methods named 'getiid' are forbidden, although this is checked before binaryname conversion.
...finally, as an exception to everything already mentioned, for attribute getters and setters the jscontext *cx comes before any other arguments.
Thunderbird Binaries
please read the release notes before downloading.
...the trunk can be very unstable at times, so it's good to ask around before using trunk builds.
Zombie compartments
some zombie compartments stick around for a limited time before disappearing, others are immortal, and it's useful to know which is which.
...(please note that you may need to close the about:addons ui before changes are made).
Mozilla
firefox and thunderbird releases are both signed before shipping; this article describes the process.
...before you can even get your code committed into the source tree, you have to test it, and larger patches have to have automated tests.
Debugger.Frame - Firefox Developer Tools
similarly, walking the stack back to a previously accessed frame yields the same frame object as before.
...if it is a function, spidermonkey calls it just before this frame is popped, passing a completion value indicating how this frame’s execution completed, and providing this debugger.frame instance as the this value.
Taking screenshots - Firefox Developer Tools
taking screenshots with the web console if you need to specify a different device-pixel-ratio, set a delay before taking the screenshot, or specify your own file name, starting in firefox 62 you can use the :screenshot helper function in the web console.
... --delay number the number of seconds to delay before taking the screenshot; you can use an interger or floating point number.
Tips - Firefox Developer Tools
check "enable persistent logs" in the settings to keep logged messages from before even after navigation.
... check "enable persistent logs" in the settings to keep requests from before even after navigation.
Using the Beacon API - Web APIs
beacon requests are guaranteed to be initiated before the page unloads.
... the following example specifies a handler for the load and beforeunload events.
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
notice that we log response.bodyused to the console once before the response.blob() call and once after.
... this returns false before and true afterwards, as at that point the body has been read.
Applying styles and colors - Web APIs
for example: var img = new image(); img.src = 'someimage.png'; var ptrn = ctx.createpattern(img, 'repeat'); note: like with the drawimage() method, you must make sure the image you use is loaded before calling this method or the pattern may be drawn incorrectly.
...this is to make sure the image is loaded before it is assigned to the pattern.
Drawing shapes with canvas - Web APIs
the grid before we can start drawing, we need to talk about the canvas grid or coordinate space.
... before this method is executed, the moveto() method is automatically called with the parameters (x,y).
ChildNode.after() - Web APIs
WebAPIChildNodeafter
argitem : document.createtextnode(string(argitem))); }); this.parentnode.insertbefore(docfrag, this.nextsibling); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); another polyfill // from: https://github.com/fabiovergani/js-polyfill_element.prototype.after/blob/master/after.js (function(x){ var o=x.prototype,p='after'; if(!o[p]){ o[p]=function(){ var e, m=arguments, l=m.length, i=0, t=this, p=t.parentnode, n=node, s=stri...
...ng, d=document; if(p!==null){ while(i<l){ e=m[i]; if(e instanceof n){ t=t.nextsibling; if(t!==null){ p.insertbefore(e,t); }else{ p.appendchild(e); }; }else{ p.appendchild(d.createtextnode(s(e))); }; ++i; }; }; }; }; })(element); /* minified: (function(x){ var o=x.prototype; o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=this,p=t.parentnode,n=node,s=string,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextsibling )!==null)?p.insertbefore(e,t):p.appendchild(e)):p.appendchild(d.createtextnode(s(e)));++i;}}}); }(element)); */ specification specification status comment ...
ChildNode.replaceWith() - Web APIs
u can polyfill the replacewith() method in internet explorer 10+ and higher with the following code: function replacewithpolyfill() { 'use-strict'; // for safari, and ie > 10 var parent = this.parentnode, i = arguments.length, currentnode; if (!parent) return; if (!i) // if there are no arguments parent.removechild(this); while (i--) { // i-- decrements i and returns the value of i before the decrement currentnode = arguments[i]; if (typeof currentnode !== 'object'){ currentnode = this.ownerdocument.createtextnode(currentnode); } else if (currentnode.parentnode){ currentnode.parentnode.removechild(currentnode); } // the value of "i" below is after the decrement if (!i) // if currentnode is the first argument (currentnode === arguments[0]) ...
...parent.replacechild(currentnode, this); else // if currentnode isn't the first parent.insertbefore(currentnode, this.nextsibling); } } if (!element.prototype.replacewith) element.prototype.replacewith = replacewithpolyfill; if (!characterdata.prototype.replacewith) characterdata.prototype.replacewith = replacewithpolyfill; if (!documenttype.prototype.replacewith) documenttype.prototype.replacewith = replacewithpolyfill; specification specification status comment domthe definition of 'childnode.replacewith()' in that specification.
ChildNode - Web APIs
WebAPIChildNode
childnode.before() inserts a set of node or domstring objects in the children list of this childnode's parent, just before this childnode.
...added the remove(), before(), after() and replacewith() methods.
CustomEvent - Web APIs
setting its value to true before returning from an event handler prevents propagation of the event.
... event.explicitoriginaltarget read only the explicit original target of the event (mozilla-specific.) event.originaltarget read only the original target of the event, before any retargetings.
Document.createProcessingInstruction() - Web APIs
the new node usually will be inserted into an xml document in order to accomplish anything with it, such as with node.insertbefore.
... example var doc = new domparser().parsefromstring('<foo />', 'application/xml'); var pi = doc.createprocessinginstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'); doc.insertbefore(pi, doc.firstchild); console.log(new xmlserializer().serializetostring(doc)); // displays: <?xml-stylesheet href="mycss.css" type="text/css"?><foo/> specifications specification status comment domthe definition of 'createprocessinginstruction()' in that specification.
Document.importNode() - Web APIs
to include it, you need to call an insertion method such as appendchild() or insertbefore() with a node that is currently in the document tree.
... example const iframe = document.queryselector("iframe"); const oldnode = iframe.contentwindow.document.getelementbyid("mynode"); const newnode = document.importnode(oldnode, true); document.getelementbyid("container").appendchild(newnode); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
Element.classList - Web APIs
WebAPIElementclassList
nsole.log(div.classlist.contains("foo")); // add or remove multiple classes div.classlist.add("foo", "bar", "baz"); div.classlist.remove("foo", "bar", "baz"); // add or remove multiple classes using spread syntax const cls = ["foo", "bar"]; div.classlist.add(...cls); div.classlist.remove(...cls); // replace class "foo" with class "bar" div.classlist.replace("foo", "bar"); versions of firefox before 26 do not implement the use of several arguments in the add/remove/toggle methods.
...elements created by document.createelement before they are appended to a parent node) in ie6-7.
Element.scrollHeight - Web APIs
it can also include the height of pseudo-elements such as ::before or ::after.
..."thank you." : "please, scroll and read the following text."; } onload = function () { var otoberead = document.getelementbyid("rules"); checkreading.noticebox = document.createelement("span"); document.registration.accept.checked = false; checkreading.noticebox.id = "notice"; otoberead.parentnode.insertbefore(checkreading.noticebox, otoberead); otoberead.parentnode.insertbefore(document.createelement("br"), otoberead); otoberead.onscroll = checkreading; checkreading.call(otoberead); } specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollheight' in that specification.
Event.cancelable - Web APIs
WebAPIEventcancelable
event listeners that handle multiple kinds of events may want to check cancelable before invoking their preventdefault() methods.
...canceling the click, scroll, or beforeunload events would prevent the user from clicking on something, scrolling the page, or navigating away from the page, respectively.
EventTarget.dispatchEvent() - Web APIs
the dispatchevent() method throws unspecified_event_type_err if the event's type was not specified by initializing the event before the method was called, or if the event's type is null or an empty string.
...all applicable event handlers will execute and return before the code continues on after the call to dispatchevent().
Using Fetch - Web APIs
the copy must be made before the body is read, and reading the body in the copy will also mark it as read in the original request.
...for example: const myresponse = response.error(); try { myresponse.headers.set('origin', 'http://mybank.com'); } catch (e) { console.log('cannot pretend to be a bank!'); } a good use case for headers is checking whether the content type is correct before you process it further.
Using files from web applications - Web APIs
example: showing thumbnails of user-selected images let's say you're developing the next great photo-sharing website and want to use html to display thumbnail previews of images before the user actually uploads them.
... before actually transferring the data, several preparatory steps are taken: the xmlhttprequest's upload progress listener is set to update the throbber with new percentage information so that as the upload progresses the throbber will be updated based on the latest information.
Force Touch events - Web APIs
events webkitmouseforcewillbegin this event is fired before the mousedown event.
...this event first fires after the mousedown event and stops firing before the mouseup event.
Fullscreen API - Web APIs
no support 9 — 65notes alternate name notes before firefox 44, firefox incorrectly allowed elements inside a <frame> or <object> element to request, and to be granted, fullscreen.
... no support 9 — 65notes alternate name notes before firefox 44, firefox incorrectly allowed elements inside a <frame> or an <object> to request, and to be granted, fullscreen.
GlobalEventHandlers.ontransitioncancel - Web APIs
the transition is stopped before it has run to completion, e.g.
... also note the log that appears in the javascript console when you click the box, or move the cursor away before the transition has run to completion.
HTMLAnchorElement - Web APIs
htmlhyperlinkelementutils.password is a usvstring containing the password specified before the domain name.
... htmlhyperlinkelementutils.username is a usvstring containing the username specified before the domain name.
HTMLAreaElement - Web APIs
htmlhyperlinkelementutils.password is a usvstring containing the password specified before the domain name.
... htmlhyperlinkelementutils.username is a usvstring containing the username specified before the domain name.
HTMLElement: transitioncancel event - Web APIs
in this example, to cancel the transition, stop hovering over the transitioning box before the transition ends.
...() { message.textcontent = 'transitionstart fired'; }); el.addeventlistener('transitioncancel', function() { message.textcontent = 'transitioncancel fired'; }); el.addeventlistener('transitionend', function() { message.textcontent = 'transitionend fired'; }); the transitioncancel event is fired if the transition is cancelled in either direction after the transitionrun event occurs and before the transitionend is fired.
HTMLElement: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
...in this example, to cancel the transition, stop hovering over the transitioning box before the transition ends.
HTMLElement: transitionrun event - Web APIs
before any transition-delay has begun.
... the transitionrun will occur even if the transition is canceled before the delay expires.
HTMLFrameSetElement - Web APIs
windoweventhandlers.onbeforeprint is an eventhandler representing the code to be called when the beforeprint event is raised.
... windoweventhandlers.onbeforeunload is an eventhandler representing the code to be called when the beforeunload event is raised.
HTMLHyperlinkElementUtils - Web APIs
htmlhyperlinkelementutils.username this is a usvstring containing the username specified before the domain name.
... htmlhyperlinkelementutils.password this is a usvstring containing the password specified before the domain name.
HTMLImageElement.loading - Web APIs
for instance, if the user is scrolling through the document, a value of lazy will cause the image to only be loaded shortly before it will appear in the window's visual viewport.
...when images are loaded eagerly (which is the default), every image in the document must be fetched before the load event can fire.
HTMLScriptElement - Web APIs
examples dynamically importing scripts let's create a function that imports new scripts within a document creating a <script> node immediately before the <script> that hosts the following code (through document.currentscript).
... function loaderror(oerror) { throw new urierror("the script " + oerror.target.src + " didn't load correctly."); } function prefixscript(url, onloadfunction) { var newscript = document.createelement("script"); newscript.onerror = loaderror; if (onloadfunction) { newscript.onload = onloadfunction; } document.currentscript.parentnode.insertbefore(newscript, document.currentscript); newscript.src = url; } this next function, instead of prepending the new scripts immediately before the document.currentscript element, appends them as children of the <head> tag.
History.state - Web APIs
WebAPIHistorystate
examples the code below logs the value of history.state before using the pushstate() method to push a value to the history.
... // should be null because we haven't modified the history stack yet console.log(`history.state before pushstate: ${history.state}`); // now push something on the stack history.pushstate({name: 'example'}, "pushstate example", 'page3.html'); // now state has a value.
IDBKeyRange.upperBound() - Web APIs
here we declare keyrangevalue = idbkeyrange.upperbound("f"); — a range that includes the value "f" and everything before it.
... if we used idbkeyrange.upperbound("f", true);, then the range excludes "f"; and instead only includes the values before it.
Checking when a deadline is due - Web APIs
as we saw before, the javascript date object creates month values as a number between 0 and 11.
...we want all the values to match before we show the user some kind of notification to tell them their deadline is up.
IntersectionObserver.rootMargin - Web APIs
each side of the rectangle represented by rootmargin is added to the corresponding side in the root element's bounding box before the intersection test is performed.
...these offsets are added to the corresponding values in the root's bounding box before the intersection between the resulting rectangle and the target element's bounds.
KeyboardEvent.code - Web APIs
olid black; } javascript window.addeventlistener("keydown", function(event) { let str = "keyboardevent: key='" + event.key + "' | code='" + event.code + "'"; let el = document.createelement("span"); el.innerhtml = str + "<br/>"; document.getelementbyid("output").appendchild(el); }, true); try it out to ensure that keystrokes go to the sample, click in the output box below before pressing keys.
...rowleft": // handle "turn left" angle -= turnrate; break; case "keyd": case "arrowright": // handle "turn right" angle += turnrate; break; } refresh(); // consume the event so it doesn't get handled twice event.preventdefault(); }, true); try it out to ensure that keystrokes go to the sample code, click inside the black game play field below before pressing keys.
KeyboardEvent - Web APIs
keyboardevent.iscomposing read only returns a boolean that is true if the event is fired between after compositionstart and before compositionend.
... auto-repeat handling prior to gecko 5.0 before gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2), keyboard handling was less consistent across platforms.
LargestContentfulPaint - Web APIs
the largestcontentfulpaint interface of the largest contentful paint api provides details about the largest image or text paint before user input on a web page.
... this example also demonstrates how to include buffered entries (those that ocurred before observer() was called), which is done by setting the buffered option to true.
MediaStream Image Capture API - Web APIs
const track = mediastream.getvideotracks()[0]; at this point, you might want to configure the device capabilities before capturing an image.
... you can do this by calling applyconstraints() on the track object before doing anything else.
Recording a media element - Web APIs
we always record no more than the specified number of milliseconds of media, although if the media stops before that time is reached, mediarecorder automatically stops recording as well.
...as mentioned before, startrecording() returns a promise whose resolution handler is called (receiving as input an array of blob objects containing the chunks of recorded media data) once recording has completed.
Using the MediaStream Recording API - Web APIs
keeping the interface constrained to the viewport, regardless of device height, with calc() the calc() function is one of those useful little utility features that's cropped up in css that doesn't look like much initially, but soon starts to make you think "wow, why didn't we have this before?
... audio: true }) // success callback .then(function(stream) { }) // error callback .catch(function(err) { console.log('the following getusermedia error occured: ' + err); } ); } else { console.log('getusermedia not supported on your browser!'); } the whole thing is wrapped in a test that checks whether getusermedia is supported before running anything else.
MediaStream Recording API - Web APIs
the media needs to be reassembled before playback.
... examining potential input sources if your goal is to record camera and/or microphone input, you may wish to examine the available input devices before beginning the process of constructing the mediarecorder.
Transcoding assets for Media Source Extensions - Web APIs
when working with media source extensions, it is likely that you need to condition your assets before you can stream them.
... get these installed successfully before moving to the next step.
MutationRecord - Web APIs
for attributes, it is the value of the changed attribute before the change.
... for characterdata, it is the data of the changed node before the change.
Web-based protocol handlers - Web APIs
firefox will, by default, prompt the user before handing off the action.
... example <!doctype html public "-//w3c//dtd html 4.01//en"> <html lang="en"> <head> <title>web protocol handler sample - test</title> </head> <body> <p>hey have you seen <a href="web+burger:cheeseburger">this</a> before?</p> </body> </html> handling the next phase is handling the action.
Node.appendChild() - Web APIs
WebAPINodeappendChild
if the given child is a reference to an existing node in the document, appendchild() moves it from its current position to the new position (there is no requirement to remove the node from its parent node before appending it to some other node).
...the node.clonenode() method can be used to make a copy of the node before appending it under the new parent.
Node - Web APIs
WebAPINode
node.insertbefore() inserts a node before the reference node as a child of a specified parent node.
... obsolete the methods insertbefore(), replacechild(), removechild(), and appendchild() returns one more kind of error (not_supported_err) if called on a document.
NodeIterator - Web APIs
nodeiterator.pointerbeforereferencenode read only returns a boolean flag that indicates whether the nodeiterator is anchored before, the flag being true, or after, the flag being false, the anchor node.
... living standard added the referencenode and pointerbeforereferencenode properties.
Using the Notifications API - Web APIs
requesting permission before an app can send a notification, the user must grant the application the right to do so.
... note: before version 37, chrome doesn't let you call notification.requestpermission() in the load event handler (see issue 274284).
PerformanceNavigationTiming.domComplete - Web APIs
the domcomplete read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to complete.
... syntax perfentry.domcomplete; return value a timestamp representing a time value equal to the time immediately before the user agent sets the current document readiness of the current document to complete.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
the domcontentloadedeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
... syntax perfentry.domcontentloadedeventstart; return value a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
PerformanceNavigationTiming.domInteractive - Web APIs
the dominteractive read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
... syntax perfentry.dominteractive; return value a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
PerformanceNavigationTiming.loadEventStart - Web APIs
the loadeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the load event of the current document is fired.
... syntax perfentry.loadeventstart; return value a timestamp representing a time value equal to the time immediately before the load event of the current document is fired.
PerformanceNavigationTiming.unloadEventStart - Web APIs
the unloadeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.
... syntax perfentry.unloadeventstart; return value a timestamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.
PerformanceResourceTiming.connectStart - Web APIs
the connectstart read-only property returns the timestamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
... syntax resource.connectstart; return value a domhighrestimestamp immediately before the browser starts to establish the connection to the server to retrieve the resource.
PerformanceResourceTiming.domainLookupStart - Web APIs
the domainlookupstart read-only property returns the timestamp immediately before the browser starts the domain name lookup for the resource.
... syntax resource.domainlookupstart; return value a domhighrestimestamp immediately before the browser starts the domain name lookup for the resource.
PerformanceResourceTiming.requestStart - Web APIs
the requeststart read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
... syntax resource.requeststart; return value a domhighrestimestamp representing the time immediately before the browser starts requesting the resource from the server example in the following example, the value of the *start and *end properties of all "resource" type events are logged.
PerformanceResourceTiming.responseEnd - Web APIs
the responseend read-only property returns a timestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
... syntax resource.responseend; return value a domhighrestimestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
PerformanceResourceTiming.secureConnectionStart - Web APIs
the secureconnectionstart read-only property returns a timestamp immediately before the browser starts the handshake process to secure the current connection.
... syntax resource.secureconnectionstart; return value if the resource is fetched over a secure connection, a domhighrestimestamp immediately before the browser starts the handshake process to secure the current connection.
PerformanceTiming - Web APIs
this moment is before the check to any application cache.
... performancetiming.domcontentloadedeventstart read only right before the parser sent the domcontentloaded event, that is right after all the scripts that need to be executed right after parsing have been executed.
PublicKeyCredentialRequestOptions.extensions - Web APIs
this text is displayed on a prompt of the authenticator before verifying the user or testing their presence.
...this is used to display an image or some non-textual content on the authenticator before verifying the user or testing their presence.
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.
... syntax var tries = adatachannel.maxretransmits; value the maximum number of times the browser will try to retransmit a message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called.
Range() - Web APIs
WebAPIRangeRange
syntax range = new range() example in this example we create a new range with the range() constructor, and set its beginning and end positions using the range.setstartbefore() and range.setendafter() methods.
... html <p>first paragraph.</p> <p>second paragraph.</p> <p>third paragraph.</p> <p>fourth paragraph.</p> javascript const paragraphs = document.queryselectorall('p'); // create new range const range = new range(); // start range at second paragraph range.setstartbefore(paragraphs[1]); // end range at third paragraph range.setendafter(paragraphs[2]); // get window selection const selection = window.getselection(); // add range to window selection selection.addrange(range); result specification specification status comment domthe definition of 'range.range()' in that specification.
Range.compareNode() - Web APIs
WebAPIRangecompareNode
the possible values are: node_before (0) node starts before the range node_after (1) node ends after the range node_before_and_after (2) node starts before and ends after the range node_inside (3) node starts after and ends before the range, i.e.
... the following function can be used as replacement: function rangecomparenode(range, node) { var noderange = node.ownerdocument.createrange(); try { noderange.selectnode(node); } catch (e) { noderange.selectnodecontents(node); } var nodeisbefore = range.compareboundarypoints(range.start_to_start, noderange) == 1; var nodeisafter = range.compareboundarypoints(range.end_to_end, noderange) == -1; if (nodeisbefore && !nodeisafter) return 0; if (!nodeisbefore && nodeisafter) return 1; if (nodeisbefore && nodeisafter) return 2; return 3; } syntax returnvalue = range.comparenode( referencenode ); parameters refer...
SVGAnimatedString - Web APIs
you need to create svg attribute before doing anything else, everything should be declared inside this.
...the base value of the given attribute before applying any animations.
Selection - Web APIs
WebAPISelection
the anchor can be placed before the focus or vice-versa, depending on the direction you made your selection.
... the above behavior applies to selections made using the following methods: selection.collapse() selection.collapsetostart() selection.collapsetoend() selection.extend() selection.selectallchildren() selection.addrange() selection.setbaseandextent() and when the range is modified using the following methods: range.setstart() range.setend() range.setstartbefore() range.setstartafter() range.setendbefore() range.setendafter() range.collapse() range.selectnode() range.selectnodecontents() glossary other key terms used in this section.
Selection API - Web APIs
yessamsung internet android full support yescontainsnode experimentalchrome full support yesedge full support 12firefox full support 4notes full support 4notes notes before firefox 35, the method didn't throw if node was null.ie no support noopera full support yessafari full support yeswebview android full support yeschrome android full support ...
...yesfirefox android full support 4notes full support 4notes notes before firefox 35, the method didn't throw if node was null.opera android full support yessafari ios full support yessamsung internet android full support yesdeletefromdocument experimentalchrome full support yesedge full support 12firefox full support 55ie ?
ServiceWorkerContainer.startMessages() - Web APIs
this can be used to react to sent messages earlier, even before that page's content has finished loading.
...it's possible to start dispatching these messages earlier by calling serviceworkercontainer.startmessages(), for example if you've invoked a message handler using eventtarget.addeventlistener() before the page has finished loading, but want to start processing the messages right away.
SpeechSynthesisErrorEvent.error - Web APIs
possible codes are: canceled a speechsynthesis.cancel method call caused the speechsynthesisutterance to be removed from the queue before it had begun being spoken.
... interrupted a speechsynthesis.cancel method call caused the speechsynthesisutterance to be interrupted after it had begun being spoken and before it completed.
StereoPannerNode.StereoPannerNode() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstereopannernode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari no support nowebview android ...
... full support 55notes full support 55notes notes before chrome 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios no support nosamsung internet android full support 6.0notes full support 6.0notes notes before samsung interne...
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.
... "persistent" the user agent will retain the data as long as possible, clearing all "best-effort" boxes before considering clearing a box marked "persistent".
Using readable streams - Web APIs
cancels, // so we should stop generating strings clearinterval(interval); } }); in the readstream() function itself, we lock a reader to the stream using readablestream.getreader(), then follow the same kind of pattern we saw earlier — reading each chunk with read(), checking whether done is true and then ending the process if so, and reading the next chunk and processing it if not, before running the read() method again.
...as we said before, any previously enqueued chunks will still be read, but no more can be enqueued because it is closed.
Using writable streams - Web APIs
ed = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
... the difference is that when close is called, any previously enqueued chunks are written and finished with before the stream is closed.
SyncManager.register() - Web APIs
maxdelay: the maximum delay in milliseconds before the next sync event (or the first sync event if it is periodic).
... mindelay: the minimum delay in milliseconds before the next sync event (or the first sync event if it is periodic).
Text.splitText() - Web APIs
WebAPITextsplitText
syntax newnode = textnode.splittext(offset) parameters offset the index immediately before which to break the text node.
... javascript const p = document.queryselector('p'); // get contents of <p> as a text node const foobar = p.firstchild; // split 'foobar' into two text nodes, 'foo' and 'bar', // and save 'bar' as a const const bar = foobar.splittext(3); // create a <u> element containing ' new content ' const u = document.createelement('u'); u.appendchild(document.createtextnode(' new content ')); // add <u> before 'bar' p.insertbefore(u, bar); // the result is: <p>foo<u> new content </u>bar</p> result specifications specification status comment domthe definition of 'text.splittext' in that specification.
TreeWalker - Web APIs
if no such node exists, or if it is before that the root node defined at the object construction, returns null and the current node is not changed.
...if no such node exists, or if it is before that the root node defined at the object construction, returns null and the current node is not changed.
URL - Web APIs
WebAPIURL
password a usvstring containing the password specified before the domain name.
... username a usvstring containing the username specified before the domain name.
URLUtilsReadOnly.hash - Web APIs
dfirefox for androidopera for androidsafari on iossamsung internethash experimentalchrome no support noedge no support nofirefox full support 38 full support 38 no support 3.5 — 38notes notes before firefox 38, firefox returned the hash percent encoded.
... no support nowebview android no support nochrome android no support nofirefox android full support 38 full support 38 no support 4 — 38notes notes before firefox 38, firefox returned the hash percent encoded.
URLUtilsReadOnly - Web APIs
android no support nohash experimentalchrome no support noedge no support nofirefox full support 38 full support 38 no support 3.5 — 38notes notes before firefox 38, firefox returned the hash percent encoded.
... no support nowebview android no support nochrome android no support nofirefox android full support 38 full support 38 no support 4 — 38notes notes before firefox 38, firefox returned the hash percent encoded.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
a device must be opened before it can be controlled by a web page.
...it shows how to test that a device is open before calling usbdevice.controltransferout to set a specified led color.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
compressed image formats must be enabled by webgl extensions before using these methods.
...compressed image formats must be enabled by webgl extensions before using this method.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
compressed image formats must be enabled by webgl extensions before using this method or a webgl2renderingcontext must be used.
...compressed image formats must be enabled by webgl extensions before using this method.
WebGLRenderingContext.disable() - Web APIs
gl.dither deactivates dithering of color components before they get written to the color buffer.
... when using a webgl 2 context, the following values are available additionally: constant description gl.rasterizer_discard deactivates that primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage.
WebGLRenderingContext.enable() - Web APIs
gl.dither activates dithering of color components before they get written to the color buffer.
... when using a webgl 2 context, the following values are available additionally: constant description gl.rasterizer_discard primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage.
WebGLRenderingContext.isContextLost() - Web APIs
the webglrenderingcontext.iscontextlost() method returns a boolean indicating whether or not the webgl context has been lost and must be re-established before rendering can resume.
... usage notes there are several reasons why a webgl context may be lost, making it necessary to re-establish the context before resuming rendering.
WebGLRenderingContext.isEnabled() - Web APIs
gl.dither dithering of color components before they get written to the color buffer.
... when using a webgl 2 context, the following values are available additionally: constant description gl.rasterizer_discard primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage.
Animating textures in WebGL - Web APIs
tetexture() function looks like; this is where the real work is done: function updatetexture(gl, texture, video) { const level = 0; const internalformat = gl.rgba; const srcformat = gl.rgba; const srctype = gl.unsigned_byte; gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, level, internalformat, srcformat, srctype, video); } you've seen this code before.
... in the definition of render() if copyvideo is true, then we call updatetexture() each time just before we call the drawscene() function.
Using textures in WebGL - Web APIs
but before we can use it, we need to establish the mapping of the texture coordinates to the vertices of the faces of our cube.
...ne 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, num, type, normalize, stride, offset); gl.enablevertexattribarray(programinfo.attriblocations.texturecoord); } then add code to specify the texture to map onto the faces, just before draw: // tell webgl we want to affect texture unit 0 gl.activetexture(gl.texture0); // bind the texture to texture unit 0 gl.bindtexture(gl.texture_2d, texture); // tell the shader we bound the texture to texture unit 0 gl.uniform1i(programinfo.uniformlocations.usampler, 0); webgl provides a minimum of 8 texture units; the first of these is gl.texture0.
Using WebGL extensions - Web APIs
canonical extension names, vendor prefixes and preferences extensions may be supported by browser vendors before being officially ratified (but only when they are in draft stage).
...t ovr_multiview2 webgl_color_buffer_float webgl_compressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context enabling an extension before an extension can be used it has to be enabled using webglrenderingcontext.getextension().
WebGL best practices - Web APIs
flush when expecting results (like queries or rendering frame completion) flush tells the implementation to push all pending commands out for execution, flushing them out of the queue, instead of waiting for more commands to enqueue before sending for execution.
... prefer doing uploads before starting drawing, or at least between pipelines: in webgl: ...
WebGL model view projection - Web APIs
this matrix is sent directly to the shader, having been multiplied in javascript beforehand.
...rather than modifying the vertex directly, it gets multiplied by an additional projection matrix, which (as the name suggests) projects 3d points onto a 2d drawing surface: // make sure to read the transformations in reverse order gl_position = projection * model * vec4(position, 1.0); the results view on jsfiddle the viewing frustum before we move on to covering how to compute a perspective projection matrix, we need to introduce the concept of the viewing frustum (also known as the view frustum).
WebRTC connectivity - Web APIs
it’s any sort of channel of communication to exchange information before setting up a connection, whether by email, post card or a carrier pigeon...
... prflx a peer reflexive candidate is one whose ip address comes from a symmetric nat between the two peers, usually as an additional candidate during trickle ice (that is, additional candidate exchanges that occur after primary signaling but before the connection verification phase is finished).
Signaling and video calling - Web APIs
media received before the ice negotiation is completed may be used to help ice decide upon the best connectivity approach to take, thus aiding in the negotiation process.
... in addition, if something happens to cause a change in the streaming scenario, negotiation will begin again, with the negotiationneeded event being sent to the rtcpeerconnection, and the entire process starts again as described before.
WebRTC API - Web APIs
interoperability because implementations of webrtc are still evolving, and because each browser has different levels of support for codecs and webrtc features, you should strongly consider making use of the adapter.js library provided by google before you begin to write your code.
...you can be notified before closing completes by watching for the closing event instead.
Writing WebSocket client applications - Web APIs
closing the connection when you've finished using the websocket connection, call the websocket method close(): examplesocket.close(); it may be helpful to examine the socket's bufferedamount attribute before attempting to close the connection to determine if any data has yet to be transmitted on the network.
... if this value isn't 0, there's pending data still, so you may wish to wait before closing the connection.
Using bounded reference spaces - Web APIs
<<<--- example --->>> creating a bounded reference space before creating a project that relies on bounded reference spaces, it's important to keep in mind that not all xr devices are capable of creating them.
... safely creating a bounded-preferred space before actually attempting to create a bounded reference space, you need to create a session that supports them.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
there are a few articles about the fundamental math, geometry, and other concepts behind webgl and webxr which may be useful to read before or while reading this one, including: explaining basic 3d theory matrix math for the web webgl model view projection geometry and reference spaces in webxr ed.
...before we can do so, and before we can then simulate the movement of the camera, let's actually take a look at the virtual camera and how it can move, at the most fundamental level.
Geometry and reference spaces in WebXR - Web APIs
units before discussing the details of the geometry of the 3d space used by webxr, it's first useful to understand the units of measure that are applied to the 3d world.
...using these, you can ensure before your code even runs that you have access to a webxr session that can support the reference space type you require or prefer.
Lighting a WebXR setting - Web APIs
performing the shading for each of these light source types is more computationally demanding than the one before it; so ambient light is the least expensive to apply, followed by directional light sources, point lights, and finally spotlights.
...it is at this time that the scene's lighting is considered and applied as appropriate to the pixel before the pixel is stored into the framebuffer.
Using the Web Animations API - Web APIs
writing css animations with the web animations api one of the more familiar ways to approach learning the web animations api is to start with something most web developers have played with before: css animations.
...to prevent the cake from eating itself up before the user has had the chance to click on it, we call animation.pause() on it immediately after it is defined, like so: nommingcake.pause(); we can now use the animation.play() method to run it whenever we’re ready: nommingcake.play(); specifically, we want to link it to alice’s animation, so she gets bigger as the cupcake gets eaten.
Background audio processing using AudioWorklet - Web APIs
high level overview before we start looking at the use of audioworklet on a step-by-step basis, let's start with a brief high-level overview of what's involved.
...the example creates an oscillator node and adds white noise to it using an audioworkletnode before playing the resulting sound out.
Using the Web Speech API - Web APIs
we also set a few other properties of the recognition instance before we move on: speechrecognition.continuous: controls whether continuous results are captured (true), or just a single result each time recognition is started (false).
...with chrome however, you have to wait for the event to fire before populating the list, hence the if statement seen below.
window.requestIdleCallback() - Web APIs
functions are generally called in first-in-first-out order; however, callbacks which have a timeout specified may be called out-of-order if necessary in order to run them before the timeout elapses.
... a timeout option is strongly recommended for required work, as otherwise it's possible multiple seconds will elapse before the callback is fired.
Window: unload event - Web APIs
bubbles no cancelable no interface event event handler property onunload it is fired after: beforeunload (cancelable event) pagehide the document is in the following state: all the resources still exist (img, iframe etc.) nothing is visible anymore to the end user ui interactions are ineffective (window.open, alert, confirm, etc.) an error won't stop the unloading workflow please note that the unload event also follows the document tree: parent frame unload will happen before child frame unload (see example below).
... examples <!doctype html> <html> <head> <title>parent frame</title> <script> window.addeventlistener('beforeunload', function(event) { console.log('i am the 1st one.'); }); window.addeventlistener('unload', function(event) { console.log('i am the 3rd one.'); }); </script> </head> <body> <iframe src="child-frame.html"></iframe> </body> </html> below, the content of child-frame.html: <!doctype html> <html> <head> <title>child frame</title> <script> window.addeventlistener('beforeunload', function(event) { console.log('i am the 2nd one.'); }); window.addeventlistener('unload', function(event) { console.log('i am the 4th and last one…'); }); </script> </head> <body> �...
WindowOrWorkerGlobalScope - Web APIs
windoworworkerglobalscope.queuemicrotask() enqueues a microtask—a short function to be executed after execution of the javascript code completes and control isn't being returned to a javascript caller, but before handling callbacks and other tasks.
... this lets your code run without interfering with other, possibly higher priority, code, but before the browser runtime regains control, potentially depending upon the work you need to complete.
WritableStream.WritableStream() - Web APIs
this takes two parameters: highwatermark a non-negative integer — this defines the total number of chunks that can be contained in the internal queue before backpressure is applied.
...ed = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
WritableStreamDefaultWriter.write() - Web APIs
return value a promise, which fulfills with the undefined upon a successful write, or rejects if the write fails or stream becomes errored before the writing process is initiated.
...ed = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
XMLHttpRequest.timeout - Web APIs
the xmlhttprequest.timeout property is an unsigned long representing the number of milliseconds a request can take before automatically being terminated.
... using a timeout with an asynchronous request in internet explorer, the timeout property may be set only after calling the open() method and before calling the send() method.
XMLHttpRequest.withCredentials - Web APIs
xmlhttprequest from a different domain cannot set cookie values for their own domain unless withcredentials is set to true before making the request.
... note: xmlhttprequest responses from a different domain cannot set cookie values for their own domain unless withcredentials is set to true before making the request, regardless of access-control- header values.
XMLHttpRequestEventTarget.onprogress - Web APIs
the xmlhttprequesteventtarget.onprogress is the function called periodically with information when an xmlhttprequest before success completely.
... syntax xmlhttprequest.onprogress = callback; values callback is the function to be called periodically before the request is completed.
XRReferenceSpace: reset event - Web APIs
in either case, the event is sent before any webxr animation frames which make use of the new origin are executed.
...the event is sent before any animation frame callbacks are executed to render the pending frame, to ensure that those callbacks have the updated coordinate system available.
XRReferenceSpaceEventInit - Web APIs
transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system.
... usage notes all of this dictionary's properties must have valid values set on them before calling the xrreferencespaceevent() constructor.
XRSession.requestAnimationFrame() - Web APIs
the specified callback is executed once before the next repaint; if you wish for it to be executed for the following repaint, you must call requestanimationframe() again.
... syntax requestid = xrsession.requestanimationframe(animationframecallback); parameters animationframecallback a function which is called before the next repaint in order to allow you to update and render the xr scene based on elapsed time, animation, user input changes, and so forth.
ARIA Test Cases - Accessibility
the word "button" is also spoken before or after the accessible name.
... (al) if two or more changes occur before the screen reader gets a chance to read the region, the screen reader should still only read the entire region once.
ARIA: Comment role - Accessibility
<p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> to associate the comment with the text being commented, we need to wrap the commented text with an element containing the aria-details a...
... multiple comments since aria-details can now accept multiple ids, we can associate multiple comments with the same annotation, like so: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1 thread-2">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> <div role="comment" id="thread-2" data-author="chris"> <h3>marcus said</h3> <p class="comment-text">the guitar solo could do with a touch more chorus, and a slightly lower volume.</p>...
ARIA: textbox role - Accessibility
aria-required attribute indicates that a value must be provided for the field before it is submitted.
...before using this technique, ensure that the browsers you need to target currently support it.
Keyboard-navigable JavaScript widgets - Accessibility
elements with a positive tabindex are put before the default interactive elements on the page, which means page authors will have to set (and maintain) tabindex values for all focusable elements on the page whenever they use one or more positive values for tabindex.
...tabindex="33") yes tabindex value determines where this element is positioned in the tab order: smaller values will position elements earlier in the tab order than larger values (for example, tabindex="7" will be positioned before tabindex="11").
Web Accessibility: Understanding Colors and Luminance - Accessibility
luminance must be established before the contrast may be.
... as mentioned before, any calculation of contrast must include luminance in the calculation.
-moz-user-focus - CSS: Cascading Style Sheets
select-before ?
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax ignore | normal | select-after | select-before | select-menu | select-same | select-all | none examples html <input class="ignored" value="the user cannot focus on this element."> css .ignored { -moz-user-focus: ignore; } specifications not part of any standard.
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
/* add an arrow after links */ a::after { content: "→"; } note: the pseudo-elements generated by ::before and ::after are contained by the element's formatting box, and thus don't apply to replaced elements such as <img>, or to <br> elements.
...this shows how flexible ::before and ::after can be, though for the most accessible experience a semantic disclosure widget created in some other way (such as with details and summary elements) is likely to be more appropriate.
:link - CSS: Cascading Style Sheets
WebCSS:link
to style links appropriately, put the :link rule before all other link-related rules, as defined by the lvha-order: :link — :visited — :hover — :active.
...thus, the links in this example will probably have special font colors only before you visit them.
:not() - CSS: Cascading Style Sheets
WebCSS:not
/* selects any element that is not a paragraph */ :not(p) { color: blue; } the :not() pseudo-class has a number of quirks, tricks, and unexpected results that you should be aware of before using it.
... since pseudo-elements are not simple selectors, they are not valid arguments to :not(); thus, selectors like :not(p::before) will not work.
:target - CSS: Cascading Style Sheets
WebCSS:target
isn't that delightful?</p> css p:target { background-color: gold; } /* add a pseudo-element inside the target element */ p:target::before { font: 70% sans-serif; content: "►"; color: limegreen; margin-right: .25em; } /* style italic elements within the target element */ p:target i { color: red; } result pure-css lightbox you can use the :target pseudo-class to create a lightbox without using any javascript.
...*/ .lightbox .close { position: relative; display: block; } .lightbox .close::after { right: -1rem; top: -1rem; width: 2rem; height: 2rem; position: absolute; display: flex; z-index: 1; align-items: center; justify-content: center; background-color: black; border-radius: 50%; color: white; content: "×"; cursor: pointer; } /* lightbox overlay */ .lightbox .close::before { left: 0; top: 0; width: 100%; height: 100%; position: fixed; background-color: rgba(0,0,0,.7); content: ""; cursor: default; } result specifications specification status comment html living standardthe definition of ':target' in that specification.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
in this example, we use structures like this, which include extra <span>s to generate content on; we'll use these to provide indicators of valid/invalid data: <div> <label for="fname">first name *: </label> <input id="fname" name="fname" type="text" required> <span></span> </div> to provide these indicators, we use the following css: input + span { position: relative; } input + span::before { position: absolute; right: -20px; top: 5px; } input:invalid { border: 2px solid red; } input:invalid + span::before { content: '✖'; color: red; } input:valid + span::before { content: '✓'; color: green; } we set the <span>s to position: relative so that we can position the generated content relative to them.
... note: we've used ::before to add these labels, as we were already using ::after for the "required" labels.
Attribute selectors - CSS: Cascading Style Sheets
[attr operator value i] adding an i (or i) before the closing bracket causes the value to be compared case-insensitively (for characters within the ascii range).
... [attr operator value s] adding an s (or s) before the closing bracket causes the value to be compared case-sensitively (for characters within the ascii range).
Using CSS animations - CSS: Cascading Style Sheets
animation-fill-mode configures what values are applied by the animation before and after it is executing.
...because the animationstart event fires as soon as the animation starts, and in our case, that happens before our code runs.
Border-radius generator - CSS: Cascading Style Sheets
span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grouping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all browsers except ie6 and lower */ ...
...padding: 0; border-radius: 3px; position: absolute; overflow: hidden; } #unit-selection select { width: 50px; height: 20px; marign: 0; padding: 0 0 0 10px; background: #555; border: 1px solid #555; border: none; color: #fff; float: left; } #unit-selection select option { background: #fff; color: #333; } #unit-selection select:hover { cursor: pointer; } #unit-selection .dropdown:before { content: ""; width: 18px; height: 20px; display: block; background-color: #555; background-image: url("https://mdn.mozillademos.org/files/5675/dropdown.png"); background-position: center center; background-repeat: no-repeat; top: 0px; right: 0px; position: absolute; z-index: 1; pointer-events: none; } #unit-selection .unit-top-left { top: 0; left: 0; display: none; } #unit-sel...
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
the auto-placed items will place themselves before the placed items in dom order, they don’t start after the position of a placed item that comes before them.
... having done this, grid will now backfill the gaps, as it moves through the grid it leaves gaps as before, but then if it finds an item that will fit in a previous gap it will pick it up and take it out of dom order to place it in the gap.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
in a web browser, you won’t see any difference to how these items are displayed before turning them into a grid, as grid has created a single column grid for the items.
... <div>four</div> <div>five</div> </div> * {box-sizing: border-box;} .wrapper { 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.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
in the flexbox example, the items are larger than the 200 pixel basis before wrapping.
...in the below example we have our grid as before but this time i have nested an item inside .box3 of the grid.
Using CSS counters - CSS: Cascading Style Sheets
*/ } h3::before { counter-increment: section; /* increment the value of section counter by 1 */ content: "section " counter(section) ": "; /* display the word 'section ', the value of section counter, and a colon before the content of each h3 */ } html <h3>introduction</h3> <h3>body</...
... example of a nested counter css ol { counter-reset: section; /* creates a new instance of the section counter with each ol element */ list-style-type: none; } li::before { counter-increment: section; /* increments only this instance of the section counter */ content: counters(section, ".") " "; /* combines the values of all instances of the section counter, separated by a period */ } html <ol> <li>item</li> ...
Basic Shapes - CSS: Cascading Style Sheets
before looking at the shapes, it is worth understanding two pieces of information that go together to make these shapes possible: the <basic-shape> type the reference box the <basic-shape> type the <basic-shape> type is used as the value for all of our basic shapes.
...in the example below change the reference box from margin-box to border-box, padding-box or content-box to see how the reference box used as the starting point before offsets are calculated changes.
Breadcrumb Navigation - CSS: Cascading Style Sheets
recipe download this example note: the example above uses two selectors to insert content before every li except the first one.
... this could also be achieved using one selector only: .breadcrumb li:not(:first-child)::before { content: "→"; } this solution uses a more complex selector, but requires less rules.
Visual formatting model - CSS: Cascading Style Sheets
the part of the string before the paragraph element is wrapped in an anonymous box, then we have the <p>, which generates a box, and then another anonymous box.
...this splits the sentence into three inline boxes — an anonymous inline box before the emphasized section, the section wrapped in the <em> element, then a final anonymous inline box.
animation-fill-mode - CSS: Cascading Style Sheets
the animation-fill-mode css property sets how a css animation applies styles to its target before and after its execution.
... formal definition initial valuenoneapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-fill-mode>#where <single-animation-fill-mode> = none | forwards | backwards | both examples you can see the effect of animation-fill-mode in the following example.
animation-iteration-count - CSS: Cascading Style Sheets
the animation-iteration-count css property sets the number of times an animation sequence should be played before stopping.
... formal definition initial value1applies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-iteration-count>#where <single-animation-iteration-count> = infinite | <number> examples see css animations for examples.
animation - CSS: Cascading Style Sheets
WebCSSanimation
<single-animation-fill-mode> determines how styles should be applied to the animation's target before and after its execution.
... guideline 2.2 explanations understanding success criterion 2.2.2 | w3c understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:animation-name: noneanimation-duration: 0sanimation-timing-function: easeanimation-delay: 0sanimation-iteration-count: 1animation-direction: normalanimation-fill-mode: noneanimation-play-state: runningapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:animation-name: as specifiedanimation-duration: as specifiedanimation-timing-function: as specifiedanimation-delay: as specifiedanimation-direction: as specifiedanimation-iteration-count: as specifiedanimation-fill-mode: as specifiedanimation-play-state: as specifiedanimation typediscrete formal syntax...
break-after - CSS: Cascading Style Sheets
verso; /* column break values */ break-after: avoid-column; break-after: column; /* region break values */ break-after: avoid-region; break-after: region; /* global values */ break-after: inherit; break-after: initial; break-after: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...if more than one of them are such a break, the one of the element that appears the latest in the flow is taken (i.e., the break-before value has precedence over the break-after value, which itself has precedence over the break-inside value).
break-inside - CSS: Cascading Style Sheets
/* keyword values */ break-inside: auto; break-inside: avoid; break-inside: avoid-page; break-inside: avoid-column; break-inside: avoid-region; /* global values */ break-inside: inherit; break-inside: initial; break-inside: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...thus, the break-before value has precedence over the break-after value, which in turn has precedence over the break-inside value.
<display-outside> - CSS: Cascading Style Sheets
syntax valid <display-outside> values: block the element generates a block element box, generating line breaks both before and after the element when in the normal flow.
... inline the element generates one or more inline element boxes that do not generate line breaks before or after themselves.
display - CSS: Cascading Style Sheets
WebCSSdisplay
valid <display-outside> values: block the element generates a block element box, generating line breaks both before and after the element when in the normal flow.
... inline the element generates one or more inline element boxes that do not generate line breaks before or after themselves.
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
the cross-start is either equivalent to start or before depending on the flex-direction value.
...the cross-start is either equivalent to start or before depending flex-direction value and the cross-end is the opposite of the specified cross-start.
font-size-adjust - CSS: Cascading Style Sheets
79disabled full support 79disabled disabled from version 79: this feature is behind the enable experimental web platform features preference.firefox full support 40 full support 40 full support 3notes notes before firefox 40, font-size-adjust: 0 was incorrectly interpreted as font-size-adjust: none (bug 1144885).
... full support 1notes notes before firefox 3, font-size-adjust was supported on windows only.ie no support noopera full support 30disabled full support 30disabled disabled from version 30: this feature is behind the enable experimental web platform features preference.safari no support nowebview android no support nochrome android full support 43disabled full support 43disabled disabled from version 43: this feature is behind the enable expe...
grid-column - CSS: Cascading Style Sheets
the grid-column-start longhand is set to the value before the slash, and the grid-column-end longhand is set to the value after the slash.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-column: foo; will choose the start/end edge of that named grid area (unless another line named foo-start/foo-end was explicitly specified before it).
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
if two <grid-line> values are specified, the grid-row-start longhand is set to the value before the slash, and the grid-row-end longhand is set to the value after the slash.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-row: foo; will choose the start/end edge of that named grid area (unless another line named foo-start/foo-end was explicitly specified before it).
<image> - CSS: Cascading Style Sheets
WebCSSimage
if supported, the browser-defined size matching the usual cursor size on the client's system content for a pseudo-element (::after/::before) a 300px × 150px rectangle the concrete object size is calculated using the following algorithm: if the specified size defines both the width and the height, these values are used as the concrete object size.
...before this, there was no explicitly defined <image> data type.
list-style-type - CSS: Cascading Style Sheets
to address this, add a zero-width space as pseudo content before each list item to ensure the list is announced properly.
... ul { list-style: none; } ul li::before { content: "\200b"; } voiceover and list-style-type: none – unfettered thoughts mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valuediscapplies tolist itemsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <counter-style> | <string> | nonewhere <counter-style> = <counter-style-name> | symbols()where <counter-style-name> = <custom-ident> examples setting list item markers html list 1 <ol class="normal"> <li>hello</li> <li>world</li> <li>what's up?</li> </ol> list 2 <ol class="shortcut"> <li>looks</li> ...
list-style - CSS: Cascading Style Sheets
to address this, add a zero-width space as pseudo-content before each list item to ensure the list is recognized properly.
... ul { list-style: none; } ul li::before { content: "\200b"; } voiceover and list-style-type: none – unfettered thoughts mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:list-style-type: disclist-style-position: outsidelist-style-image: noneapplies tolist itemsinheritedyescomputed valueas each of the properties of the shorthand:list-style-image: none or the image with its uri made absolutelist-style-position: as specifiedlist-style-type: as specifiedanimation typediscrete formal syntax <'list-style-type'> | <'list-style-position'> | <'l...
ruby-position - CSS: Cascading Style Sheets
f having display: inline on the ruby), and above (synonym of the modern over).opera no support nosafari no support nonotes no support nonotes notes safari implements a non-standard, prefixed, version of ruby-position, -webkit-ruby-position: it has two properties: before and after (both equivalent, for ltr and rtl scripts to the standard over value used with ruby-align: start).webview android no support nochrome android no support nofirefox android full support 38opera android no support ...
... nosafari ios no support nonotes no support nonotes notes safari implements a non-standard, prefixed, version of ruby-position, -webkit-ruby-position: it has two properties: before and after (both equivalent, for ltr and rtl scripts to the standard over value used with ruby-align: start).samsung internet android no support nointer-character experimentalchrome no support noedge no support nofirefox no support noie no support noopera no support ...
transition-delay - CSS: Cascading Style Sheets
the transition-delay css property specifies the duration to wait before starting a property's transition effect when its value changes.
... formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples transition-delay: 0.5s <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; ...
Adding captions and subtitles to HTML5 video - Developer guides
html5 and video captions before diving into how to add captions to the video player, there are a number of things that we will first mention, which you should be aware of before we start.
... we have added the button, but before we make it do anything, we need to build the menu that goes with it.
Audio and Video Delivery - Developer guides
if the <video> element also has <source> element descendants, those should also be removed before calling load().
....2"'> </source> <source id="3gp_src" src="video.3gp" type='video/3gpp; codecs="mp4v.20.8, samr"'> </source> <source id="ogg_src" src="video.ogv" type='video/ogv; codecs="theora, vorbis"'> </source> </video> since firefox doesn't support mp4 and 3gp on some platforms due to their patent-encumbered nature, the <source> elements with the ids "mp4_src" and "3gp_src" will receive error events before the ogg resource is loaded.
Constraint validation - Developer guides
limiting the size of a file before its upload another common constraint is to limit the size of a file to be uploaded.
... checking this on the client side before the file is transmitted to the server requires combining the constraint validation api, and especially the field.setcustomvalidity() method, with another javascript api, here the file api.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
if you omit quotes on the last attribute value, you must have a space before the closing slash.
...a balanced sub-tree is html code in which any elements that are opened are also closed, so that after the script, the elements left open are the same ones that were open before the script.
Date and time formats used in HTML - HTML: Hypertext Markup Language
for <input>, the values of type that return a value which contains a string representing a date and/or time are: date datetime datetime-local month time week examples before getting into the intricacies of how date and time strings are written and parsed in html, here are some examples that should give you a good idea what the more commonly-used date and time string formats look like.
...8:45 am and 25 seconds [details] 0033-08-04t03:40 3:40 am on august 4, 33 [details] 1977-04-01t14:00:30 30 seconds after 2:00 pm on april 1, 1977 [details] 1901-01-01t00:00z midnight utc on january 1, 1901 [details] 1901-01-01t00:00:01-04:00 1 second past midnight eastern standard time (est) on january 1, 1901 [details] basics before looking at the various formats of date and time related strings used by html elements, it is helpful to understand a few fundamental facts about the way they're defined.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
other audio may have a media timeline that doesn't start at 0 seconds, so setting currenttime to a time before that would fail.
... for example, if the audio's media timeline starts at 12 hours, setting currenttime to 3600 would be an attempt to set the current playback position well before the beginning of the media, and would fail.
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
onbeforeprint function to call when the user requests printing of the document.
... onbeforeunload function to call when the document is about to be unloaded.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements.
... del::before, del::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } del::before { content: " [deletion start] "; } del::after { content: " [deletion end] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
if the value entered into the element occurs beforehand, the element fails constraint validation.
...f(dayselect.value === "") { dayselect.value = previousday - 1; } if(dayselect.value === "") { dayselect.value = previousday - 2; } if(dayselect.value === "") { dayselect.value = previousday - 3; } } } function populateyears() { // get this year as a number var date = new date(); var year = date.getfullyear(); // make this year, and the 100 years before it available in the year <select> for(var i = 0; i <= 100; i++) { var option = document.createelement('option'); option.textcontent = year-i; yearselect.appendchild(option); } } // when the month or year <select> values are changed, rerun populatedays() // in case the change affected the number of available days yearselect.onchange = function() { populatedays(monthselect.value)...
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
specifics of how the entry process works may vary from browser to browser; mobile devices, for example, often display the typed character for a moment before obscuring it, to allow the user to be sure they pressed the key they meant to press; this is helpful given the small size of keys and the ease with which the wrong one can be pressed, especially on virtual keyboards.
... <label for="userpassword">password:</label> <input id="userpassword" type="password" autocomplete="current-password"> making the password mandatory to tell the user's browser that the password field must have a valid value before the form can be submitted, simply specify the boolean required attribute.
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
formnovalidate a boolean which, if present, means the form's fields will not be subjected to constraint validation before submitting the data to the server formtarget the browsing context into which to load the response returned by the server after submitting the form formaction a string indicating the url to which to submit the data.
... formnovalidate a boolean attribute which, if present, specifies that the form should not be validated before submission to the server.
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
basic example <form> <div> <label for="uname">choose a username: </label> <input type="text" id="uname" name="name"> </div> <div> <button>submit</button> </div> </form> this renders like so: when submitted, the data name/value pair sent to the server will be uname=chris (if "chris" was entered as the input value before submission).
... making input required you can use the required attribute as an easy way of making entering a value required before form submission is allowed: <form> <div> <label for="uname">choose a username: </label> <input type="text" id="uname" name="name" required> <span class="validity"></span> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; position: relative; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖';...
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
this is simple enough, with the label and input as we've seen before, but with the addition of a <p> element with a <span> to display the value of the time input: <form> <label for="starttime">start time: </label> <input type="time" id="starttime"> <p> value of the <code>time</code> input: <code> "<span id="value">n/a</span>"</code>.
... var starttime = document.getelementbyid("starttime"); var valuespan = document.getelementbyid("value"); starttime.addeventlistener("input", function() { valuespan.innertext = starttime.value; }, false); when a form including a time input is submitted, the value is encoded before being included in the form's data.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
the input value is automatically validated to ensure that it's either empty or a properly-formatted url before the form can be submitted.
... making a url required as mentioned earlier, to make a url entry required before the form can be submitted (you can't leave the field blank), you just need to include the required attribute on the input.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements.
... ins::before, ins::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } ins::before { content: " [insertion start] "; } ins::after { content: " [insertion end] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<listing> - HTML: Hypertext Markup Language
WebHTMLElementlisting
eroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlisting deprecatedchrome no support noedge no support nofirefox no support nonotes no support nonotes notes before firefox 4, this element implemented the htmlspanelement interface instead of the standard htmlelement interface.ie no support noopera no support nosafari no support nowebview android no support nochrome android ...
... no support nofirefox android no support nonotes no support nonotes notes before firefox 4, this element implemented the htmlspanelement interface instead of the standard htmlelement interface.opera android no support nosafari ios no support nosamsung internet android no support nolegend no support no supportdeprecated.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements.
... mark::before, mark::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } mark::before { content: " [highlight start] "; } mark::after { content: " [highlight end] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
paragraphs are block-level elements, and notably will automatically close if another block-level element is parsed before the closing </p> tag.
...switch back!">use pilcrow for paragraphs</button> </p> css p { margin: 0; text-indent: 3ch; } p.pilcrow { text-indent: 0; display: inline; } p.pilcrow + p.pilcrow::before { content: " ¶ "; } javascript document.queryselector('button').addeventlistener('click', function (event) { document.queryselectorall('p').foreach(function (paragraph) { paragraph.classlist.toggle('pilcrow'); }); var newbuttontext = event.target.dataset.toggletext; var oldtext = event.target.innertext; event.target.innertext = newbuttontext; event.target.dataset.toggletext =...
<s> - HTML: Hypertext Markup Language
WebHTMLElements
it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements.
... s::before, s::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } s::before { content: " [start of stricken text] "; } s::after { content: " [end of stricken text] "; } some people who use screen readers deliberately disable announcing content that creates extra verbosity.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
the css is unchanged from before.
... table { border: 1px solid black; } th, td { border: 1px solid black; } explicitly specifying table content groups before really getting into styling this table, let's take a moment to add row and column groups to help make our css easier.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
other media may have a media timeline that doesn't start at 0 seconds, so setting currenttime to a time before that would fail.
... preload this enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience with regards to what content is loaded before the video is played.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
unlike <input type="email"> and <input type="url"> , the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world.
... 235 preloading content with rel="preload" guide, html, javascript, link, media, performance, web performance, as, preload, rel the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in.
Inline elements - HTML: Hypertext Markup Language
<div>the following paragraph is a <p class="highlight">block-level element;</p> its background has been colored to display both the beginning and end of the block-level element's influence.</div> the css (not displayed in standard reading mode) is also used: body { margin: 0; padding: 4px; border: 1px solid #333; } .highlight { background-color:#ee3; } rendered using the same css as before, we get: see the difference?
... the <p> element totally changes the layout of the text, splitting it into three segments: the text before the <p>, then the <p>'s text, and finally the text following the <p>.
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
this is essential in order to support websites that were built before the widespread adoption of web standards.
...anything before the doctype, like a comment or an xml declaration will trigger quirks mode in internet explorer 9 and older.
Evolution of HTTP - HTTP
http/1.1 – the standardized protocol in parallel to the somewhat chaotic use of the diverse implementations of http/1.0, and since 1995, well before the publication of http/1.0 document the next year, proper standardization was in progress.
... pipelining has been added, allowing to send a second request before the answer for the first one is fully transmitted, lowering the latency of the communication.
Connection management in HTTP/1.x - HTTP
each http request is completed on its own connection; this means a tcp handshake happens before each http request, and these are serialized.
...as they are affected by network latencies and bandwidth limitations, this can result in significant delay before the next request is seen by the server.
List of default Accept values - HTTP
user agent value comment firefox text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since firefox 66) text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in firefox 65) text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before) in firefox 65 and earlier, this value can be modified using the network.http.accept.default parameter.
... user agent value comment firefox image/webp,*/* (since firefox 65) */* (since firefox 47) image/png,image/*;q=0.8,*/*;q=0.5 (before) this value can be modified using the image.http.accept parameter.
Cache-Control - HTTP
however, the stored response must always go through validation with the origin server first before using it, therefore, you cannot use no-cache in-conjunction with immutable.
... cache-control: public, max-age=604800, immutable requiring revalidation specifying no-cache or max-age=0 indicates that clients can cache a resource and must revalidate each time before using it.
CSP: upgrade-insecure-requests - HTTP
the upgrade-insecure-requests directive is evaluated before block-all-mixed-content and if it is set, the latter is effectively a no-op.
... <img src="http://example.com/image.png"> <img src="http://not-example.com/image.png"> these urls will be rewritten before the request is made, meaning that no insecure requests will hit the network.
If-None-Match - HTTP
for other methods, and in particular for put, if-none-match used with the * value can be used to save a file not known to exist, guaranteeing that another upload didn't happen before, losing the data of the previous put; this problem is a variation of the lost update problem.
...they are only useful when uploading a resource, usually with put, to check if another resource with the identity has already been uploaded before.
Index - HTTP
WebHTTPHeadersIndex
leading white space before the value is ignored.
... 96 retry-after http, reference, response, response header, header the retry-after response http header indicates how long the user agent should wait before making a follow-up request.
HTTP headers - HTTP
WebHTTPHeaders
whitespace before the value is ignored.
... retry-after indicates how long the user agent should wait before making a follow-up request.
CSS Houdini
browsers parse the cssom — including layout, paint, and composite processes — before applying any style updates found in scripts.
...as you extend css with houdini, make sure to keep these considerations in mind, and start small before moving on to more ambitious projects.
Equality comparisons and sameness - JavaScript
neither value is implicitly converted to some other value before being compared.
... === b tonumber(a) === tonumber(b) a == toprimitive(b) boolean false false tonumber(a) === b tonumber(a) === tonumber(b) a === b tonumber(a) == toprimitive(b) object false false toprimitive(a) == b toprimitive(a) == b toprimitive(a) == tonumber(b) a === b in the above table, tonumber(a) attempts to convert its argument to a number before comparison.
Grammar and types - JavaScript
javascript before ecmascript 2015 does not have block statement scope.
...referencing the variable in the block before the variable declaration results in a referenceerror, because the variable is in a "temporal dead zone" from the start of the block until the declaration is processed.
Indexed collections - JavaScript
alternatively, create an empty array first before adding the single element to it.
... let a = ['a', 'b', 'c', 'd', 'a', 'b'] console.log(a.lastindexof('b')) // logs 5 // now try again, starting from before the last match console.log(a.lastindexof('b', 4)) // logs 1 console.log(a.lastindexof('z')) // logs -1 foreach(callback[, thisobject]) executes callback on every array item and returns undefined.
Loops and iteration - JavaScript
a do...while statement looks as follows: do statement while (condition); statement is always executed once before the condition is checked.
... the condition test occurs before statement in the loop is executed.
Inheritance and the prototype chain - JavaScript
for example, when you do var a1 = new a(), javascript (after creating the object in memory and before running function a() with this defined to it) sets a1.[[prototype]] = a.prototype.
... in conclusion it is essential to understand the prototypal inheritance model before writing complex code that makes use of it.
constructor - JavaScript
} description a constructor enables you to provide any custom initialization that must be done before any other methods can be called on an instantiated object.
... class square extends polygon { constructor(length) { // here, it calls the parent class' constructor with lengths // provided for the polygon's width and height super(length, length); // note: in derived classes, `super()` must be called before you // can use `this`.
ReferenceError: "x" is not defined - JavaScript
note: when loading a library (such as jquery), make sure it is loaded before you access library variables, such as "$".
... put the <script> tag that loads the library before your code that uses it.
JavaScript error reference - JavaScript
argument is not a valid code pointrangeerror: invalid array lengthrangeerror: invalid daterangeerror: precision is out of rangerangeerror: radix must be an integerrangeerror: repeat count must be less than infinityrangeerror: repeat count must be non-negativereferenceerror: "x" is not definedreferenceerror: assignment to undeclared variable "x"referenceerror: can't access lexical declaration "x" before initializationreferenceerror: deprecated caller or arguments usagereferenceerror: invalid assignment left-hand sidereferenceerror: reference to undefined property "x"syntaxerror: "0"-prefixed octal literals and octal escape seq.
...syntaxerror: for-in loop head declarations may not have initializerssyntaxerror: function statement requires a namesyntaxerror: identifier starts immediately after numeric literalsyntaxerror: illegal charactersyntaxerror: invalid regular expression flag "x"syntaxerror: missing ) after argument listsyntaxerror: missing ) after conditionsyntaxerror: missing : after property idsyntaxerror: missing ; before statementsyntaxerror: missing = in const declarationsyntaxerror: missing ] after element listsyntaxerror: missing formal parametersyntaxerror: missing name after .
Functions - JavaScript
function expressions are not hoisted onto the beginning of the scope, therefore they cannot be used before they appear in the code.
...for example, the following would result in an error: var foo = new function("alert(anonymous);"); foo(); unlike functions defined by function expressions or by the function constructor, a function defined by a function declaration can be used before the function declaration itself.
Array.prototype.filter() - JavaScript
the range of elements processed by filter() is set before the first invocation of callback.
...gh the `words` itself now has a lot more words with character length less than 6 // ["spray" ,"limit" ,"elite"] // deleting words words = ['spray', 'limit', 'exuberant', 'destruction', 'elite', 'present'] const deletewords = words.filter( (word, index, arr) => { arr.pop() return word.length < 6 }) console.log(deletewords) // notice 'elite' is not even obtained as its been popped off `words` before filter can even get there // ["spray" ,"limit"] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.filter' in that specification.
Array.prototype.map() - JavaScript
the range of elements processed by map is set before the first invocation of callback.
...elements that are deleted after the call to map begins and before being visited are not visited.
Array.prototype.shift() - JavaScript
examples removing an element from an array the following code displays the myfish array before and after removing its first element.
... it also displays the removed element: var myfish = ['angel', 'clown', 'mandarin', 'surgeon']; console.log('myfish before:', json.stringify(myfish)); // myfish before: ['angel', 'clown', 'mandarin', 'surgeon'] var shifted = myfish.shift(); console.log('myfish after:', myfish); // myfish after: ['clown', 'mandarin', 'surgeon'] console.log('removed this element:', shifted); // removed this element: angel using shift() method in while loop the shift() method is often used in condition inside while loop.
Function.length - JavaScript
this number excludes the rest parameter and only includes parameters before the first one with a default value.
...*/ console.log((function(...args) {}).length); // 0, rest parameter is not counted console.log((function(a, b = 1, c) {}).length); // 1, only parameters before the first one with // a default value is counted specifications specification ecmascript (ecma-262)the definition of 'function.length' in that specification.
Intl.Collator() constructor - JavaScript
examples using collator the following example demonstrates the different potential results for a string occurring before, after, or at the same level as another: console.log(new intl.collator().compare('a', 'c')); // → a negative value console.log(new intl.collator().compare('c', 'a')); // → a positive value console.log(new intl.collator().compare('a', 'a')); // → 0 note that the results shown in the code above can vary between browsers and browser versions.
...that is, the specification requires only that the before and after values are negative and positive.
Intl.Collator - JavaScript
examples using collator the following example demonstrates the different potential results for a string occurring before, after, or at the same level as another: console.log(new intl.collator().compare('a', 'c')); // → a negative value console.log(new intl.collator().compare('c', 'a')); // → a positive value console.log(new intl.collator().compare('a', 'a')); // → 0 note that the results shown in the code above can vary between browsers and browser versions.
...that is, the specification requires only that the before and after values are negative and positive.
Intl.Locale.prototype.caseFirst - JavaScript
casefirst values value description upper upper case to be sorted before lower case.
... lower lower case to be sorted before upper case.
Number.prototype.toExponential() - JavaScript
return value a string representing the given number object in exponential notation with one digit before the decimal point, rounded to fractiondigits digits after the decimal point.
... if you use the toexponential() method for a numeric literal and the numeric literal has no exponent and no decimal point, leave whitespace(s) before the dot that precedes the method call to prevent the dot from being interpreted as a decimal point.
Object.freeze() - JavaScript
examples freezing objects var obj = { prop: function() {}, foo: 'bar' }; // before freezing: new properties may be added, // and existing properties may be changed or removed obj.foo = 'baz'; obj.lumpy = 'woof'; delete obj.prop; // freeze.
... function deepfreeze(object) { // retrieve the property names defined on object var propnames = object.getownpropertynames(object); // freeze properties before freezing self for (let name of propnames) { let value = object[name]; if(value && typeof value === "object") { deepfreeze(value); } } return object.freeze(object); } var obj2 = { internal: { a: null } }; deepfreeze(obj2); obj2.internal.a = 'anothervalue'; // fails silently in non-strict mode obj2.internal.a; // null specifications specification ...
Object - JavaScript
ined) let o = new object(null) using object to create boolean objects the following examples store boolean objects in o: // equivalent to o = new boolean(true) let o = new object(true) // equivalent to o = new boolean(false) let o = new object(boolean()) object prototypes when altering the behavior of existing object.prototype methods, consider injecting code by wrapping your extension before or after the existing logic.
... for example, this (untested) code will pre-conditionally execute custom logic before the built-in logic or someone else's extension is executed.
Promise.prototype.then() - JavaScript
receive "foobar", register a callback function to work on that string // and print it to the console, but not before returning the unworked on // string to the next then .then(function(string) { settimeout(function() { string += 'baz'; console.log(string); // foobarbaz }, 1) return string; }) // 3.
... print helpful messages about how the code in this section will be run // before the string is actually processed by the mocked asynchronous code in the // previous then block.
Promise - JavaScript
"use strict"; var promisecount = 0; function testpromise() { let thispromisecount = ++promisecount; let log = document.getelementbyid('log'); // begin log.insertadjacenthtml('beforeend', thispromisecount + ') started (sync code started)'); // we make a new promise: we promise a numeric count of this promise, starting from 1 (after waiting 3s) let p1 = new promise((resolve, reject) => { // the executor function is called with the ability to resolve or reject the promise log.insertadjacenthtml('beforeend', thispromisecount + ') promise started (async code started)'...
... resolve(thispromisecount); }, math.random() * 2000 + 1000); }); // we define what to do when the promise is resolved with the then() call, // and what to do when the promise is rejected with the catch() call p1.then(function(val) { // log the fulfillment value log.insertadjacenthtml('beforeend', val + ') promise fulfilled (async code terminated)'); }).catch((reason) => { // log the rejection reason console.log(`handle rejected promise (${reason}) here.`); }); // end log.insertadjacenthtml('beforeend', thispromisecount + ') promise made (sync code terminated)'); } if ("promise" in window) { let btn = document.getelementbyid("btn"); btn.addeventlistener("click"...
String.prototype.split() - JavaScript
the array may contain fewer entries than limit if the end of the string is reached before the limit is reached.
...after splitting the string, the function logs messages indicating the original string (before the split), the separator used, the number of elements in the array, and the individual array elements.
TypedArray.prototype.forEach() - JavaScript
the range of elements processed by foreach() is set before the first invocation of callback.
...if the values of existing elements of the typed array are changed, the value passed to callback will be the value at the time foreach() visits them; elements that are deleted before being visited are not visited.
undefined - JavaScript
// x has not been declared before if (typeof x === 'undefined') { // evaluates to true without errors // these statements execute } if (x === undefined) { // throws a referenceerror } however, there is another alternative.
... var x; if (x === void 0) { // these statements execute } // y has not been declared before if (y === void 0) { // throws uncaught referenceerror: y is not defined } specifications specification ecmascript (ecma-262)the definition of 'undefined' in that specification.
Decrement (--) - JavaScript
syntax operator: x-- or --x description if used postfix, with operator after operand (for example, x--), the decrement operator decrements and returns the value before decrementing.
... if used prefix, with operator before operand (for example, --x), the decrement operator decrements and returns the value after decrementing.
Grouping operator ( ) - JavaScript
syntax ( ) description the grouping operator consists of a pair of parentheses around an expression or sub-expression to override the normal operator precedence so that expressions with lower precedence can be evaluated before an expression with higher priority.
... var a = 1; var b = 2; var c = 3; // default precedence a + b * c // 7 // evaluated by default like this a + (b * c) // 7 // now overriding precedence // addition before multiplication (a + b) * c // 9 // which is equivalent to a * c + b * c // 9 specifications specification ecmascript (ecma-262)the definition of 'the grouping operator' in that specification.
Increment (++) - JavaScript
syntax operator: x++ or ++x description if used postfix, with operator after operand (for example, x++), the increment operator increments and returns the value before incrementing.
... if used prefix, with operator before operand (for example, ++x), the increment operator increments and returns the value after incrementing.
Operator precedence - JavaScript
remember that precedence comes before associativity.
... so, mixing division and exponentiation, the exponentiation comes before the division.
Property accessors - JavaScript
document.createelement('pre') if you use a method for a numeric literal, and the numeric literal has no exponent and no decimal point, you should leave white-space(s) before the dot preceding the method call, so that the dot is not interpreted as a decimal point.
... document['createelement']('pre') a space before bracket notation is allowed.
super - JavaScript
super.functiononparent([arguments]); description when used in a constructor, the super keyword appears alone and must be used before the this keyword is used.
... // here, it calls the parent class's constructor with lengths // provided for the rectangle's width and height super(length, length); // note: in derived classes, super() must be called before you // can use 'this'.
this - JavaScript
calling super() creates a this binding within the constructor and essentially has the effect of evaluating the following line of code, where base is the inherited class: this = new base(); warning: referring to this before calling super() will throw an error.
... derived classes must not return before calling super(), unless they return an object or have no constructor at all.
typeof - JavaScript
typeof /s/ === 'function'; // chrome 1-12 non-conform to ecmascript 5.1 typeof /s/ === 'object'; // firefox 5+ conform to ecmascript 5.1 errors before ecmascript 2015, typeof was always guaranteed to return a string for any operand it was supplied with.
... but with the addition of block-scoped let and statements/const using typeof on let and const variables (or using typeof on a class) in a block before they are declared will throw a referenceerror.
async function - JavaScript
in concurrentstart, if promise fast rejects before promise slow is fulfilled, then an unhandled promise rejection error will be raised, regardless of whether the caller has configured a catch clause.
...return await foo will wait for foo to resolve or reject if it's a promise, and throws before returning if it rejects.
class - JavaScript
note that super(), used in the constructor, can only be used in constructors, and must be called before the this keyword can be used.
... class foo {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has already been declared the same error is thrown when a class has been defined before using the class expression.
for...in - JavaScript
a property that is deleted before it has been visited will not be visited later.
...there is no guarantee whether an added property will be visited, whether a modified property (other than the current one) will be visited before or after it is modified, or whether a deleted property will be visited before it is deleted.
Transitioning to strict mode - JavaScript
differences from non-strict to strict syntax errors when adding 'use strict';, the following cases will throw a syntaxerror before the script is executing: octal syntax var n = 023; with statement using delete on a variable name delete myvariable; using eval or arguments as variable or function argument name using one of the newly reserved keywords (in prevision for ecmascript 2015): implements, interface, let, package, private, protected, public, static, and yield declaring function in blocks if (a < b) { function f...
...they occur before the code is running.
Template literals (Template strings) - JavaScript
in that case, the tag expression (usually a function) gets called with the template literal, which you can then manipulate before outputting.
... to escape a backtick in a template literal, put a backslash (\) before the backtick.
JavaScript
this module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones.
... strict mode strict mode defines that you can not use any variable before initializing it.
background_color - Web app manifests
type string mandatory no the background_color member defines a placeholder background color for the application page to display before its stylesheet is loaded.
... this value is used by the user agent to draw the background color of a shortcut when the manifest is available before the stylesheet has loaded.
Authoring MathML - MathML
it's recommended to convert your content mathml markup into presentation mathml before publishing it, for example with the help of the ctop.xsl stylesheet.
... command-line programs an alternative way is to parse the simple syntax before publishing your web pages.
Optimizing startup performance - Web Performance
this allows html parsers to continue processing the document, instead of having to wait until the scripts have been downloaded and executed before continuing.
... emscripten provides an api to help with this refactoring; for example, you can use emscripten_push_main_loop_blocker() to establish a function to be executed before the main thread is allowed to continue.
Using dns-prefetch - Web Performance
dns-prefetch is an attempt to resolve domain names before resources get requested.
... when a browser requests a resource from a (third party) server, that cross-origin’s domain name must be resolved to an ip address before the browser can issue the request.
Web Performance
this article explains what latency is, how it impacts performance, how to measure latency, and how to reduce it.using dns-prefetchdns-prefetch is an attempt to resolve domain names before resources get requested.
...native browser features enable us to hint to the browser when it should connect to another server, or preload a resource before the browser knows it ever needs it.
Privacy, permissions, and information security
security and privacy defined before we go into any depth about the various security and privacy features available to users on the web, let's define some important terms.
...these start at the web server, include the very communication layer used over the network, and then extend through the web browser's security offerings before reaching your web app code and the efforts it takes to secure itself and the data the user entrusts to it.
Progressive web app structure - Progressive web apps (PWAs)
app shell the app shell concept is concerned with loading a minimal user interface as soon as possible and then caching it so it is available offline for subsequent visits before then loading all the contents of the app.
... the app shell model requires all the resources to be available before the website can start rendering.
Structural overview of progressive web apps - Progressive web apps (PWAs)
the app shell concept the app shell concept is concerned with loading a minimal user interface and content as soon as possible, caching it so it's available offline for subsequent visits before then loading the remainder of the app's contents.
... the app shell model requires all the resources to be available before the website can start rendering.
Content type - SVG: Scalable Vector Graphics
unless explicitly described differently, lists within svg's xml attributes can be either comma-separated (with optional white space before or after the comma), or white space-separated.
... before svg 2, the more limited iri content type was used instead, because the url specification was not standardized before.
Namespaces crash course - SVG: Scalable Vector Graphics
this is done by putting the namespace prefix and a colon before the parameter name as shown on the <script> element in the example above.
... the dom level 1 recommendation was created before the original namespaces in xml recommendation was released; therefore, dom1 isn't namespace aware.
Getting started - SVG: Scalable Vector Graphics
(firefox users: click here) the rendering process involves the following: we start with the <svg> root element: a doctype declaration as known from (x)html should be left off because dtd based svg validation leads to more problems than it solves before svg 2, to identify the version of the svg for other types of validation the version and baseprofile attributes should always be used instead.
...however, this technique doesn't work in firefox before 4.0.
Introduction - SVG: Scalable Vector Graphics
before you start there are a number of drawing applications available such as inkscape which are free and use svg as their native file format.
... before starting you should have a basic understanding of xml or another markup language such as html.
Patterns - SVG: Scalable Vector Graphics
WebSVGTutorialPatterns
ight="50" fill="skyblue"/> <rect x="0" y="0" width="25" height="25" fill="url(#gradient2)"/> <circle cx="25" cy="25" r="20" fill="url(#gradient1)" fill-opacity="0.5"/> </pattern> </defs> <rect fill="url(#pattern)" stroke="black" width="200" height="200"/> </svg> screenshotlive sample inside the <pattern> element, you can include any of the other basic shapes you've included before, and each of them can be styled using any of the styles you've learned before, including gradients and opacity.
...in the example above, we've defined a width and height attribute on the pattern element to describe how far the pattern should go before it begins repeating itself again.
Certificate Transparency - Web security
browser requirements google chrome requires ct log inclusion for all certificates issues with a notbefore date of after 30 april 2018.
...in chrome, even if the certificate was issued with a notbefore date prior to april).
Subresource Integrity - Web security
subresource integrity with the <script> element you can use the following <script> element to tell a browser that before executing the https://example.com/example-framework.js script, the browser must first compare the script to the expected hash, and verify that there's a match.
... how browsers handle subresource integrity browsers handle sri by doing the following: when a browser encounters a <script> or <link> element with an integrity attribute, before executing the script or before applying any stylesheet specified by the <link> element, the browser must first compare the script or stylesheet to the expected hash given in the integrity value.
Transport Layer Security - Web security
the configuration file may need some adjustments to include custom settings, so be sure to review the generated configuration before using it; installing the configuration file without ensuring any references to domain names and the like are correct will result in a server that just doesn't work.
...though the performance gains from 0-rtt can be significant, they come with some risk of replay attack, so some care is needed before enabling this feature.
Index - XPath
WebXPathIndex
14 preceding-sibling axe, xpath the preceding-sibling axis indicates all the nodes that have the same parent as the context node and appear before the context node in the source document.
... 49 substring-before xslt, xslt_reference the substring-before function returns a string that is the part of a given string before a given substring.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
before the first element tag.
... all pis in the prolog must be honored, both ones occurring before and onces occurring after any xml-stylesheet pis.
Compiling a New C/C++ Module to WebAssembly - WebAssembly
putting emscripten_keepalive before a function name stops this from happening.
...in() exits the runtime would be shut down — necessary for proper c emulation, e.g., atexits are called — and it wouldn't be valid to call compiled code.) emcc -o hello3.html hello3.c -o3 -s wasm=1 --shell-file html_template/shell_minimal.html -s no_exit_runtime=1 -s "extra_exported_runtime_methods=['ccall']" if you load the example in your browser again, you'll see the same thing as before!
Loading Content Scripts - Archive of obsolete content
contentscriptfile: [data.url("jquery-1.4.2.min.js"), data.url("my-content-script.js")] scripts specified using contentscriptfile are loaded before those specified using contentscript.
Classes and Inheritance - Archive of obsolete content
constructors before the ecmascript 6 standard, a javascript class was defined by creating a constructor function for that class.
Private Properties - Archive of obsolete content
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.
clipboard - Archive of obsolete content
var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("image") != -1) require("sdk/tabs").open(clipboard.get()); as noted before, data type can be easily omitted for images.
request - Archive of obsolete content
var request = require("sdk/request").request; var latesttweetrequest = request({ url: "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=mozhacks&count=1", oncomplete: function (response) { var tweet = response.json[0]; console.log("user: " + tweet.user.screen_name); console.log("tweet: " + tweet.text); } }); // be a good consumer and check for rate limiting before doing more.
windows - Archive of obsolete content
in particular, if the user quits the browser then it's possible that your add-on will be unloaded before all windows are closed.
console/plain-text - Archive of obsolete content
parameters print : function an optional function to process the arguments passed in before printing to stdout.
core/heritage - Archive of obsolete content
as mentioned before you could pass constructors that were not created using class function as long as they have proper prototype setup.
dev/panel - Archive of obsolete content
js var content = document.getelementbyid("content"); window.addeventlistener("message", function(event) { var debuggee = event.ports[0]; console.log(debuggee); debuggee.onmessage = function(event) { content.textcontent = json.stringify(event.data); } debuggee.postmessage({ "to":"root", "type":"listtabs" }); }); if you do this, don't forget to call start() on the port before passing it over to the panel document.
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
in this case, // `mygroup` has to be saved before `mybookmark`, since // `mybookmark` is a child of `mygroup`.
ui/button/action - Archive of obsolete content
after that, the property will inherit its value from the less-specific state as before: var { actionbutton } = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = actionbutton({ id: "my-button", label: "default label", icon: "./firefox-16.png" }); tabs.open({ url: "https://mozilla.org/", onopen: onnewtab }); function onnewtab(tab) { // modify the label only for the new tab button.state(tab, { "label" : "tab-specific label" }); //...
ui/button/toggle - Archive of obsolete content
after that, the property will inherit its value from the less-specific state as before: var { togglebutton } = require('sdk/ui/button/toggle'); var tabs = require("sdk/tabs"); var button = togglebutton({ id: "my-button", label: "default label", icon: "./firefox-16.png" }); tabs.open({ url: "https://mozilla.org/", onopen: onnewtab }); function onnewtab(tab) { // modify the label only for the new tab button.state(tab, { "label" : "tab-specific label" }); //...
util/collection - Archive of obsolete content
would print this to the console: 1 2 3 iteration proceeds over a copy of the collection made before iteration begins, so it is safe to mutate the collection during iteration; doing so does not affect the results of the iteration.
cfx to jpm - Archive of obsolete content
activation you need to call cfx activate before you can use cfx, and this only works in the current command shell: if you open a new shell you have to call activate again.
jpm - Archive of obsolete content
listed add-ons will require a manual review before they can be signed.
Bookmarks - Archive of obsolete content
initiating the bookmarks service as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder() method.
Downloading Files - Archive of obsolete content
curtotalprogress, amaxtotalprogress) { var percentcomplete = math.round((acurtotalprogress / amaxtotalprogress) * 100); progresselement.textcontent = percentcomplete +"%"; }, onstatechange: function(awebprogress, arequest, astateflags, astatus) { // do something } } persist.saveuri(obj_uri, null, null, null, "", targetfile, privacy); downloading files that require credentials before calling nsiwebbrowserpersist.saveuri(), you need to set the progresslistener property of the nsiwebbrowserpersist instance to an object that implements nsiauthprompt.
File I/O - Archive of obsolete content
there might be races between different processes and/or threads, e.g., a file could be immediately created or deleted after you check the existence but before you can perform any other actions such as opening the file for reading or writing.
HTML in XUL for rich tooltips - Archive of obsolete content
the tooltiphtml attribute is an html string which is set sometime beforehand for each element.
Post data to window - Archive of obsolete content
most of the time, post data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before passing the data to one of the methods.
JavaScript timers - Archive of obsolete content
the method takes as an argument a callback to be invoked before the repaint.
Toolbar - Archive of obsolete content
@optional */ function installbutton(toolbarid, id, afterid) { if (!document.getelementbyid(id)) { var toolbar = document.getelementbyid(toolbarid); // if no afterid is given, then append the item to the toolbar var before = null; if (afterid) { let elem = document.getelementbyid(afterid); if (elem && elem.parentnode == toolbar) before = elem.nextelementsibling; } toolbar.insertitem(id, before); toolbar.setattribute("currentset", toolbar.currentset); document.persist(toolbar.id, "currentset"); if (toolbarid == "addon-bar") ...
URI parsing - Archive of obsolete content
getservice(components.interfaces.nsieffectivetldservice); var suffix = etldservice.getpublicsuffix(auri); var basedomain = etldservice.getbasedomain(auri); // this includes the tld basedomain = basedomain.substr(0, (basedomain.length - suffix.length - 1)); // - 1 to remove the period before the tld ...
xml:base support in old browsers - Archive of obsolete content
before using this code, check if your browser has native support for node.baseuri.
Common Pitfalls - Archive of obsolete content
how to do security checks for uri loads before loading a uri, one of two security checks needs to be performed: if the uri is a string that will be loaded via passing the string to nsiwebnavigation::loaduri, the one must call checkloaduristrwithprincipal and pass the principal that the uri originates from as the first argument and the uri string as the second argument.
Communication between HTML and your extension - Archive of obsolete content
as a last ditch effort i tried setting a timeout using settimeout when i got the event in the extension to wait a few milliseconds before looking for the desired element.
Install Manifests - Archive of obsolete content
in versions before gecko 2.0 all extensions were unpacked, in gecko 2.0 and later the default is to not unpack.
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.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
note: #include nsisupportsarray.h before nsmsgutils.h convenience methods that work using either api.
Chapter 1: Introduction to Extensions - Archive of obsolete content
emura-san is a co-author of firefox 3 hacks (o'reilly japan, 2008.) introduction if you're reading this guide, you’ve probably used firefox before.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
before we dive into a thorough explanation, we'll quickly introduce the technologies used to develop firefox extensions.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
permit by dialog try adding the contents of listing 2 to test.xul, before the line var ioservice = …, and re-open it in firefox.
Adding Events and Commands - Archive of obsolete content
you can capture and cancel events during any of these phases, provided that they aren't canceled before they reach the point where you intended to capture them.
Adding menus and submenus - Archive of obsolete content
if filling your menu takes a noticeable amount of time, you should not make firefox (and your users) wait for it to fill up before displaying anything.
Adding sidebars - Archive of obsolete content
it is meant to be very versatile and malleable, but it can require a good amount of work before it fits your specific needs.
Adding windows and dialogs - Archive of obsolete content
it's also a useful accessibility feature, because screen readers will read the caption right before reading any text in its contents.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
you should also change the preference value before you run any other first run code.
Custom XUL Elements with XBL - Archive of obsolete content
the oncommand attribute of the button has some code you've probably never seen before: document.getbindingparent(this).
Local Storage - Archive of obsolete content
as mentioned before, it revolves around rdf, so you may need to take some time to understand how rdf works.
Mozilla Documentation Roadmap - Archive of obsolete content
be sure to look at the license the extension's code is released with before thinking about copying large sections of it.
Observer Notifications - Archive of obsolete content
this is because the first parameter of the observe method is typed as nsisupports (the generic interface, as seen before), therefore its properties and methods cannot be accessed unless the correct interface is set to it.
Setting Up a Development Environment - Archive of obsolete content
it allows you to cancel them and even replace payload data before it is sent.
The Box Model - Archive of obsolete content
if you're not familiar with css, you should read this css getting started guide and other online resources before continuing with this tutorial.
XPCOM Objects - Archive of obsolete content
creating your own components javascript xpcom components as we've said before, we recommend using jsm whenever you can.
Extensions support in SeaMonkey 2 - Archive of obsolete content
for example, if you overlay some chrome before the status bar, like this: <vbox id="browser-bottombox"> <something insertbefore="status-bar" /> </vbox> use the following technique to make your overlay work on both seamonkey 2 and firefox 3: <window id="main-window"> <vbox id="browser-bottombox" insertbefore="status-bar"> <something insertbefore="status-bar" /> </vbox> </window> thunderbird 3 gfolderdisplay api seamonkey 2.0 ...
Signing an XPI - Archive of obsolete content
if the browser is currently running, you should exit the browser before continuing this operation.
Supporting search suggestions in search plugins - Archive of obsolete content
if the request for the suggest url does not return data before 500ms have elapsed, no search suggestions will be shown.
Tabbed browser - Archive of obsolete content
if your code does not have access to the main window because it is run in a sidebar or dialog, you first need to get access to the browser window you need before you can use gbrowser.
Adding preferences to an extension - Archive of obsolete content
as before, concepts covered in the previous articles in this series won't be rehashed here, so if you haven't already seen them: creating a status bar extension creating a dynamic status bar extension also, for reference, you may want to take a look at preferences system and the preferences api.
Creating a status bar extension - Archive of obsolete content
before firefox 1.5, this was a guid.
Events - Archive of obsolete content
archived event pages domsubtreemodifiedmozaudioavailablemozbeforeresizemozorientationcachedchargingchangechargingtimechangecheckingdischargingtimechangedownloadingerrorlevelchangenoupdateobsoleteprogressupdateready ...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
the mechanism can be as simple as copying new content to the current document, or as complex as performing dynamic transformations on the data source before applying the changes into the current document.
JXON - Archive of obsolete content
before implementing it in a working environment, please read the note about the const statement compatibility.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
and there you have it-- spaces opening up where none have ever been seen before.
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
none of the registry keys mentioned here are written by browsers before the mozilla 0.9.1 timeframe.
Source Navigator - Archive of obsolete content
this triggers a splash screen, followed by a "source-navigator projects" dialog as the following: i've already created a new project bin.proj before documenting this.
Visualizing an audio spectrum - Archive of obsolete content
s there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } fft.forward(signal); // clear the canvas before drawing spectrum ctx.clearrect(0,0, canvas.width, canvas.height); for (var i = 0; i < fft.spectrum.length; i++ ) { // multiply spectrum by a zoom value magnitude = fft.spectrum[i] * 4000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } } var audio = document.getelement...
Other Mozilla customization pages - Archive of obsolete content
other mozilla customization pages mcd, mission control desktop aka autoconfig pre-configuring mozilla mozexec, a mozilla launcher that writes a registry.bat before launching mozilla (contributed by petr kristan) mozptch: the main difference of the mozptch approach is, not to patch the registry.dat, but to create a new one with mozillas comandline option -createprofile.
Protecting Mozilla's registry.dat file - Archive of obsolete content
moreover, it's advisable to "protect" the mozilla registry using attrib +r +s in case the logon script is finished before ie's "personnalized settings" have completed their dirty deed...
Bookmark Keywords - Archive of obsolete content
these searches can be as complex as google will tolerate, since the entered data will be converted to url-encoded text before it's sent to the google servers.
Enabling the behavior - updating the status bar panel - Archive of obsolete content
because our conditional looks for worse states (bustage, test failures) first, it will display those states before displaying the success state.
Making a Mozilla installation modifiable - Archive of obsolete content
although mozilla stores the ui files in jar archives, it can also access them in their original, unarchived form, which is useful for the extensions developer because it makes it unnecessary to extract the files from the archive before changing the code and then re-add them to the archive afterwards.
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
nderstatus/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://tinderstatus/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> we also need to change the urls in the copy of tinderstatus.css: statusbarpanel#tinderbox-status { list-style-image: url("chrome://tinderstatus/content/tb-nostatus.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("chrome://tinderstatus/content/tb-success.png"); } statusbarpanel#tinderbox...
Tinderbox - Archive of obsolete content
mozilla engineers regularly check tinderbox before changing the code because changes are prohibited while the codebase is broken.
Installing Dehydra - Archive of obsolete content
building gcc 4.5 for treehydra's process_tree_decl to work, when compiling with g++, you must use a patched gcc 4.5 before building dehydra.
Download Manager preferences - Archive of obsolete content
browser.download.manager.resumeonwakedelay an integer value indicating the number of milliseconds to wait after the system wakes up from sleep before resuming downloads.
Error Console - Archive of obsolete content
before gecko 1.8.1 (firefox 2), it was called javascript console (see bug 265871).
Documentation for BiDi Mozilla - Archive of obsolete content
text in visual mode must also be reversed before display on a bidi platform.
Layout FAQ - Archive of obsolete content
block(body)(1)@035ff490 {120,120,8820,600} [state=00000010] sc=035ff264(i=2,b=0)< line 035ffc18: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:linebr[0x5100] {0,0,330,300} < inline(span)(0)@035ffa04 next=035ffc48 next-continuation=035ffc48 {0,7,330,285} [content=0359ed50] [sc=035ff990]< text(0)@035ffa8c[0,4,t] next=035ffb1c {0,0,330,285} [state=41600020] sc=035ffa3c pst=:-moz-non-element< "\nabc" > frame(br)(1)@035ffb1c {330,225,0,0} [state=00000020] [content=035aebf0] > > the linebox is...
Layout System Overview - Archive of obsolete content
this is a major benefit for large documents because the user does not have to wait for the 200th page of text to be read in before the first page can be displayed - they can start reading something right away.
GRE - Archive of obsolete content
dependent libraries and environment variables the xulrunner gre is designed so that the embedder does not need to set any environment variables such as path or ld_library_path before calling xpcomgluestartup(), because it dynamically loads the correct dependent libraries.
JavaScript crypto - Archive of obsolete content
this function will issue a user prompt to confirm the operation before the add or delete actually occurs.
Java in Firefox Extensions - Archive of obsolete content
the following approach is taken from the extension xquseme (note you must use the latest version, currently still in the sandbox, as prior versions only worked with liveconnect before java 6 update 11) which borrows some of the code of the java firefox extension in order to grant full privileges to java within a firefox extension, but it is easier to understand and doesn't require creation of a xpcom component.
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("me"); methods onfirstrun(funcfunction)jetpack.me.onfirstrun() allows jetpacks to be notified after they are successfully installed.
Settings - Archive of obsolete content
because it is still under development, the api currently lives in the future and must be imported before it is used: specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api.
Settings - Archive of obsolete content
because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("storage.settings"); specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api.
Clipboard - Archive of obsolete content
remember to import clipboard from the future before calling it.
Clipboard - Archive of obsolete content
remember to import clipboard from the future before calling it.
Clipboard - Archive of obsolete content
remember to import clipboard from the future before calling it.
Litmus tests - Archive of obsolete content
these were developed before litmus, but then pulled in.
Monitoring downloads - Archive of obsolete content
note that the start time is being divided by 1000 before we create a javascript date object from it.
Mozilla Application Framework in Detail - Archive of obsolete content
innovative gecko technologies it supports make the development of browsers, applications and devices faster and easier than ever before.
Mozilla Crypto FAQ - Archive of obsolete content
on september 6, 2000, rsa security released the rsa patent into the public domain, two weeks before the patent was scheduled to expire (on september 20, 2000).
LIR - Archive of obsolete content
the back-ends cannot generate code for it.it's used in tracemonkey briefly but is always demoted to a lir_modl or converted to a function call before nanojit has to do anything serious with it.
Bundles - Archive of obsolete content
when prism is launched with a "-webapp [bundle]" command line, the bundle must first be unpacked before the web application is launched.
New Skin Notes - Archive of obsolete content
--dria the menu column seems larger than before in the current test theme, so as to cause some reference pages to look ugly when browser set in 800x* resolution, using the default firefox 1.0.6 fonts settings on xfree86.
Static Analysis for Windows Code under Linux - Archive of obsolete content
we highly recommend you to read the cross compiling manual and the dehydra build manual before you start the following reading.
Table Cellmap - Archive of obsolete content
insertrowsbefore firstrow=0 ***start table dump*** mcolwidths= row(0)=02763344 cell(0)=02763528 cell(0)=0276381c row(0)=02763940 cell(0)=02763990 cell(0)=02763ab4 ***** start table cell map dump ***** 023566b0 cols array orig/span-> 023566b0 ***** start group cell map dump ***** 023565b0 maprowcount=0 tablerowcount=0 ***** end group cell map dump ***** ***** end table cell map dump ***** ***end table dump*...
Table Layout Regression Tests - Archive of obsolete content
it is good style to check for these unwanted regressions and fixing them before checkin rather than causing bugzilla avalanches.
Tamarin Acceptance Testing - Archive of obsolete content
in order to ensure that changes to the tamarin code base are high quality before submitting, all developers are required to complete the following steps.
Tamarin build documentation - Archive of obsolete content
note that, whereas before when you selected the aggregate target you got a 'shell' 32-bit executable and a 'shell64' 64-bit executable in the same folder, now because of the fix to bug 478714 you will get an 'avm' executable in two separate folders, /debug and /debug64 respectively.
Tamarin Build System Documentation - Archive of obsolete content
checkins (hg push) to http://hg.mozilla.org/tamarin-redux and sandbox requests will trigger a buildbot build when all build slaves are idle the next build begins before the build begins buildbot waits for 2 minutes of no checkin activity the build system prioritizes tamarin-redux checkins over sandbox builds when several tamarin-redux checkins occur the newest change is built including all checkins since the last build each sandbox build occurs in the order they were submitted, the submitter may cancel a build.
The life of an HTML HTTP request - Archive of obsolete content
after every parsed block it passes the parsed data as nsiparsernodes to the contentsink unless the parser has been temporarily blocked, in wich case it waits until it gets unblocked before parsing the cached data it has receieved while being blocked.
Tuning Pageload - Archive of obsolete content
during this delay, the page that's coming in is not painted, unless it ends up fully loaded before the delay expires.
URIs and URLs - Archive of obsolete content
likewise, a uri must be separated into its components before the escaped characters within those components can be safely decoded.
Using gdb on wimpy computers - Archive of obsolete content
however, you need to make sure that the base libraries like libc and pthreads are loaded before you tell gdb to stop loading shared libraries.
Venkman Internals - Archive of obsolete content
sourcecontext is the 5 lines of source text before the last instance of the word "function" on the line where this function starts.
Venkman Introduction - Archive of obsolete content
start venkman note: at one point, the debugger needed to be started before the scripts it was going to debug.
Using Breakpoints in Venkman - Archive of obsolete content
venkman will stop before the line executes.
Writing textual data - Archive of obsolete content
versions before gecko 1.8 firefox 1.0.x, mozilla 1.7.x and older versions do not support nsiconverteroutputstream.
Binding Implementations - Archive of obsolete content
property initialization always takes place after content generation but before the firing of a binding attachment event, since the bindingattached handler needs to be able to assume that all properties will be accessible on the binding.
Example Sticky Notes - Archive of obsolete content
*/ // your code goes here ]]></constructor> <destructor><![cdata[ /** * the code below will be called one time only before * binding is unbound.
Using XPInstall to Install Plugins - Archive of obsolete content
the first install problem the first install problem refers to the conditions arising when a plugin arrives on a user's machine before a browser arrives.
addFile - Archive of obsolete content
some file transfer programs will convert apple binaries to this format on transfer if you transfer them from a macintosh to a unix/windows machine before zipping up those files on that target system.
createKey - Archive of obsolete content
you must add a key to the registry before you can add a value for that key.
Learn XPI Installer Scripting by Example - Archive of obsolete content
in the browser.xpi installation, this function appears at line 20: var err = initinstall("netscape seamonkey", "browser", "6.0.0.2000110807"); if you call a method on the install object before initinstall(), you will get an error.
norestorefocus - Archive of obsolete content
« xul reference home norestorefocus type: boolean if false, the default value, then when the panel is hidden, the keyboard focus will be restored to whatever had the focus before the panel was opened.
accesskey - Archive of obsolete content
however, if the last character of the label is an ellipsis or a colon, the accesskey text is inserted before them.
browser.type - Archive of obsolete content
warning: the type attribute must be set before the element is inserted into the document.
insertafter - Archive of obsolete content
this attribute overrides the insertbefore attribute.
onpopupshowing - Archive of obsolete content
« xul reference home onpopupshowing type: script code this event is sent to a popup just before it is opened.
persist - Archive of obsolete content
persistence will not remember the absence of an attribute, so for boolean attributes like checked where absence means false, you will need to explicitly set the attribute to false before the window closes (bug 15232).
popup.position - Archive of obsolete content
valid single-word values are after_start, after_end, before_start, before_end, end_after, end_before, start_after, start_before, overlap, at_pointer or after_pointer.
position - Archive of obsolete content
this attribute is ignored if either an insertbefore or insertafter attribute matches an element.
rel - Archive of obsolete content
ArchiveMozillaXULAttributerel
less the numeric value of the subject must be less than the value greater the numeric value of the subject must be greater than the value before the string value of subject must come before value alphabetically after the string value of subject must come after value alphabetically startswith the value of subject must start with the value endswith the value of subject must end with the value contains the value of subject must contain the value as a substring ...
resizeafter - Archive of obsolete content
see also resizebefore ...
substate - Archive of obsolete content
before the element immediately before the splitter is collapsed.
treecol.type - Archive of obsolete content
this style must come before treechildren::-moz-tree-checkbox(checked) otherwise it won't take effect.
Deprecated and defunct markup - Archive of obsolete content
tabbox and tabpanel) <text> (like <label> or <description> but does not wrap; like <label crop="end">; had been used in menus/toolbars) <textfield> (like <textbox>) <thumb> (<button> with deprecated <gripper>; implements sliding box in center of scrolbar) <title> (to add a caption on a <titledbox> <titledbox> (box with a frame) <titledbutton> (attempt to combine text and images before <button>) <toolbarpaletteitem> required to embed non-buttons in customisable toolbars --neil 03 march 2011 <treebody> (old/experimental and unsupported xul tags) lives on as the internal name for the ancestor <treechildren> element --neil 03 march 2011 <treecaption> (old/experimental and unsupported xul tags) <treecolgroup> (former name for <treecols> <treecolpicker> (internal use ...
Reading from Files - Archive of obsolete content
you may wish to use nsifile.exists() to check if the file exists before opening it.
Writing to Files - Archive of obsolete content
if this flag is not used, the file is truncated before being written to.
Moving, Copying and Deleting Files - Archive of obsolete content
for this reason, you may wish to check if the file exists using nsifile.exists() before moving the file.
open - Archive of obsolete content
ArchiveMozillaXULMethodOpen
if the findbar hasn't been used before, find_normal is the default.
startFind - Archive of obsolete content
if the findbar hasn't been used before, find_normal is the default.
advance - Archive of obsolete content
ArchiveMozillaXULMethodadvance
the code in the onwizardnext attribute is called before the page is changed.
cancel - Archive of obsolete content
ArchiveMozillaXULMethodcancel
the code in the onwizardcancel attribute is called before the wizard is cancelled.
clearSelection - Archive of obsolete content
a select event is sent before the items are deselected.
openPopup - Archive of obsolete content
position possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer.
replaceGroup - Archive of obsolete content
if there were more tabs before, the additional ones are not removed.
rewind - Archive of obsolete content
ArchiveMozillaXULMethodrewind
the code in the onwizardback attribute is called before the page is changed.
Methods - Archive of obsolete content
hevent dom:element.getattribute dom:element.getattributenode dom:element.getattributenodens dom:element.getattributens dom:element.getelementsbytagname dom:element.getelementsbytagnamens dom:element.getfeature fixme: brokenlink dom:element.getuserdata dom:element.hasattribute dom:element.hasattributens dom:element.hasattributes dom:element.haschildnodes dom:element.insertbefore dom:element.isequalnode dom:element.issamenode dom:element.issupported dom:element.lookupnamespaceuri dom:element.lookupprefix dom:element.normalize dom:element.removeattribute dom:element.removeattributenode dom:element.removeattributens dom:element.removechild dom:element.removeeventlistener dom:element.replacechild dom:element.setattribute dom:element.setattributeno...
Node - Archive of obsolete content
ArchiveMozillaXULNode
3 short cdata_section_node 4 short entity_reference_node 5 short entity_node 6 short processing_instruction_node 7 short comment_node 8 short document_node 9 short document_type_node 10 short document_fragment_node 11 short notation_node 12 methods node appendchild ( node newchild ) node clonenode ( boolean deep ) boolean hasattributes ( ) boolean haschildnodes ( ) node insertbefore ( node newchild , node refchild ) boolean issupported ( string feature , string version ) void normalize ( ) node removechild ( node oldchild ) node replacechild ( node newchild , node oldchild ) ...
Panels - Archive of obsolete content
when a panel is closed, the focus is removed from the element within the panel which has the focus event, if any, and whatever element was focused before the panel was opened is refocused.
PopupKeys - Archive of obsolete content
while a menu is open, the focus remains where it was before the menu was open.
Tooltips - Archive of obsolete content
the popupshowing event will be fired on the tooltip element just before the tooltip appears.
dateLeadingZero - Archive of obsolete content
« xul reference dateleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the date when it is less than 10.
hourLeadingZero - Archive of obsolete content
« xul reference hourleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the hour when it is less than 10.
minuteLeadingZero - Archive of obsolete content
« xul reference minuteleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the minute when it is less than 10.
monthLeadingZero - Archive of obsolete content
« xul reference monthleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the month when it is less than 10.
secondLeadingZero - Archive of obsolete content
« xul reference secondleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the second when it is less than 10.
yearLeadingZero - Archive of obsolete content
« xul reference yearleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the year when it is less than 1000.
statusbarpanel-iconic-text - Archive of obsolete content
the image will appear before the label.
Actions - Archive of obsolete content
the toolbar is created just before the content for the first result is generated.
Building Menus With Templates - Archive of obsolete content
if you press this button before opening the menu, there will be one child (the template itself).
Multiple Rules - Archive of obsolete content
operatordescriptionexample equalsmatch if a value equals anothermatch a specific value lessmatch if a number is less than anothermatch only negative values with one rule, positive values with another greatermatch if a number is greater than anotherdisplay values greater than 1000 differently beforematch if a value comes before another alphabetically aftermatch if a value comes after another alphabetically startswithmatch if a value starts with a specific string endswithmatch if a value ends with a specific string containsmatch if a value contains a substringto highlight results that contain a search term here is an example using the 'contains' operator: <vbox datasources="people.xml" ref=...
Sorting Results - Archive of obsolete content
for example, the date 'may 15' would appear after 'august 24' when sorted purely alphabetically but before it when sorted chronologically.
Special Condition Tests - Archive of obsolete content
remember, the more specific rules should go before less specific rules.
Template Builder Interface - Archive of obsolete content
some static content before the <template> element displays a <h1> header.
Template Logging - Archive of obsolete content
expected <content> to be first for an rdf template, when using the full query syntax, the <content> element must always appear before any other elements.
Using Multiple Queries to Generate More Results - Archive of obsolete content
the first query will match the streets as before, but the second query will generate a result for each person.
The Joy of XUL - Archive of obsolete content
before the web became the standard for delivering applications to users across disparate desktops, this problem was solved with cross-platform client-server tools.
Complete - Archive of obsolete content
check extensions for compatibility before installing them.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
be sure to add the extra code before the curly brace on the last line of the file.
Adding Event Handlers - Archive of obsolete content
add the line below just after the opening window tag and before any elements.
Adding Methods to XBL-defined Elements - Archive of obsolete content
then, the 'showtitle' method is called, which functions as it did before.
Additional Install Features - Archive of obsolete content
you can use these to move, copy or delete files before or after the files are installed.
Advanced Rules - Archive of obsolete content
the following conditions might be used: <conditions> <content uri="?list"/> <member container="?list" child="?city"/> <triple subject="?city" predicate="http://www.xulplanet.com/rdf/weather#prediction" object="?pred"/> </conditions> the template builder will iterate over each city as before.
Box Model Details - Archive of obsolete content
however, the problem with this is that you need to know how big the element will be beforehand.
Creating a Skin - Archive of obsolete content
you may wish to make a copy of the files used by the find files dialog before editing.
Creating a Wizard - Archive of obsolete content
this allows you to validate the input entered on each page before the user continues.
Cross Package Overlays - Archive of obsolete content
the code below should be added into contents.rdf just before the closing rdf tag.
Custom Tree Views - Archive of obsolete content
in the older versions of mozilla (before firefox 1.5 or mozilla 1.8), the columns are supplied as the values of the id attribute on the columns.
Input Controls - Archive of obsolete content
<label value="search for:" control="find-text"/> <textbox id="find-text"/> <button id="find-button" label="find"/> add these lines before the buttons we created in the last section.
Install Scripts - Archive of obsolete content
that means that you can call the methods of the window object with the qualifier before it, which means that window.open() can simply be written open().
Manipulating Lists - Archive of obsolete content
in other cases, you may wish to check to ensure that selecteditem is not null before continuing.
More Tree Features - Archive of obsolete content
this causes a small triangle or plus sign to appear before the cells in that column to indicate the cells that can be expanded.
Open and Save Dialogs - Archive of obsolete content
default directory and filters there are two features you can set of the dialog before it is displayed.
RDF Datasources - Archive of obsolete content
we don't want every file in the filesystem to be determined before the data is displayed.
Skinning XUL Files by Hand - Archive of obsolete content
reading the global skin it's very important to familiarize yourself with the basic style definitions in the global skin before you set out creating your own stylesheet.
Tabboxes - Archive of obsolete content
the first tab looks pretty much like it did before, apart from the tabs along the top.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
<treecol id="name" label="filename" flex="1"/> <treecol id="location" label="location" flex="2"/> <treecol id="size" label="size" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="mozilla"/> <treecell label="/usr/local"/> <treecell label="2520 bytes"/> </treerow> </treeitem> </treechildren> </tree> <splitter collapse="before" resizeafter="grow"/> we've added a tree with three columns for the filename, the location and the file size.
XBL Example - Archive of obsolete content
if (newidx<0) return 0; if the new index is before the first page, don't change the page and return 0.
XPCOM Examples - Archive of obsolete content
since an enumerator just returns a generic object, we need to queryinterface() it to an nsicookie before we can use it.
Using Remote XUL - Archive of obsolete content
in case you're wondering, the reason the buttons and menu items had style before we added the stylesheet reference is that some xul elements are defined in mozilla using another xml-based language called xbl which provides building blocks for creating ui widgets.
Using Visual Studio as your XUL IDE - Archive of obsolete content
compared to a simple text-editor, visual studio gives you some special features when writing xul: intellisense / autocompletion for elements and attributes validation syntax coloring (okay, more sophisticated editors like notepad++ provide this as well) before you can use all of this, you have to adjust visual studio a little.
Writing Skinnable XUL and CSS - Archive of obsolete content
style="..." is prohibited in xul files without approval any usages of inline style are extremely dangerous, since they are overriding the included skin, and must be approved before their usage will be allowed.
XUL Accesskey FAQ and Policies - Archive of obsolete content
if methods like confirm(), confirmex() or prompt() are being used to create a dialog, use an & before the button or checkbox text to make the next character an accesskey.
XUL FAQ - Archive of obsolete content
are there any elements inside the <prefwindow>, before the <prefpane>s?
The Implementation of the Application Object Model - Archive of obsolete content
if the xul stream came from a local file, then rdf can either locally annotate the graph (just as before), or it can serialize the xul and write over the original file (thus allowing local changes to a local file to be reflected right in the xul).
XUL controls - Archive of obsolete content
<splitter collapse="before"> <grippy/> </splitter> splitter reference related elements: grippy <tab> description goes here.
button - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprov...
caption - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements groupbox,...
checkbox - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprov...
colorpicker - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsidomxulcontrole...
command - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related xul:list of commands ...
commandset - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
description - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes header a class used fo...
dialog - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata acceptdialog() return type: no ...
dialogheader - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements dialog, window ...
editor - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprov...
image - Archive of obsolete content
ArchiveMozillaXULimage
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes alert-icon ...
key - Archive of obsolete content
ArchiveMozillaXULkey
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata details on key, keycode, and modifiers a...
label - Archive of obsolete content
ArchiveMozillaXULlabel
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following classes may b...
listcell - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes listcell-iconic use th...
listitem - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following classes may...
menu - Archive of obsolete content
ArchiveMozillaXULmenu
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata appenditem( label, value ) ...
menubar - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements menu, menuitem, men...
menuitem - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes menuitem-iconic use th...
menulist - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata appenditem( label, value, description )...
menuseparator - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements menu, menubar, menu...
notification - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata close() return type: no return value ...
param - Archive of obsolete content
ArchiveMozillaXULparam
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
preference - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata events change when a preference valu...
prefpane - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata events paneload this event...
radio - Archive of obsolete content
ArchiveMozillaXULradio
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements radiogroup, checkbo...
radiogroup - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata appenditem( label, value ) ...
richlistitem - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprov...
rule - Archive of obsolete content
ArchiveMozillaXULrule
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
scale - Archive of obsolete content
ArchiveMozillaXULscale
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata decrease() return type: no...
scrollbar - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
tabbox - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tabs, tab, tabpanel...
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata advanceselectedtab( dir, wrap ) retur...
toolbarbutton - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolba...
treecell - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tree, treecols, tre...
treeitem - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tree, treecols, tre...
window - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata see also: dom window object methods no...
wizard - Archive of obsolete content
node(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata « xul reference home advance( ...
wizardpage - Archive of obsolete content
aredocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related wizard ...
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
system requirements before installing, make sure your computer meets the system requirements.
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
system requirements before installing, make sure your computer meets the system requirements.
XULRunner 1.9.1 Release Notes - Archive of obsolete content
system requirements before installing, make sure your computer meets the system requirements.
XULRunner 1.9.2 Release Notes - Archive of obsolete content
system requirements before installing, make sure your computer meets the system requirements.
XULRunner 1.9 Release Notes - Archive of obsolete content
system requirements before installing, make sure your computer meets the system requirements.
XULRunner 2.0 Release Notes - Archive of obsolete content
system requirements before installing, make sure your computer meets the system requirements (nb: that page will change for firefox 4 shipping).
Application Update - Archive of obsolete content
//pref("app.update.url.override", ""); // interval: time between checks for a new version (in seconds) // default=1 day pref("app.update.interval", 86400); // interval: time before prompting the user to download a new version that // is available (in seconds) default=1 day pref("app.update.nagtimer.download", 86400); // interval: time before prompting the user to restart to install the latest // download (in seconds) default=30 minutes pref("app.update.nagtimer.restart", 1800); // interval: when all registered timers should be checked (in milliseconds)...
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
if you've never done this before, you should consult creating xpcom components or another xpcom reference.
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
myapp/ application.ini chrome/ default/ myapp.exe (copy xulrunner-stub.exe and rename) xulrunner/ please test your application before deploying it.
Dialogs in XULRunner - Archive of obsolete content
the xul filepickers are xpcom components and must be instantiated before using, like this: function dofileopen() { /* see: http://developer.mozilla.org/en/docs/xul_tutorial:open_and_save_dialogs */ var nsifilepicker = components.interfaces.nsifilepicker; var fp = components.classes["@mozilla.org/filepicker;1"].createinstance(nsifilepicker); fp.init(window, "open file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filtertext | nsifilepicker.filt...
Make your xulrunner app match the system locale - Archive of obsolete content
the first step is to get the code we're about to write to run before any of the locale specific resources are loaded.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
2c42 < var jsout = $.xmltojson(xdata.responsexml); --- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < beforesend: function(req) { < req.setrequestheader("method", "post"); < req.setrequestheader("content-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclie...
application/http-index-format specification - Archive of obsolete content
note that a 201 line encountered before a 200 line should be ignored.
calICalendarView - Archive of obsolete content
implementations should therefore be wary to check whether a controller has been assigned to the view, before calling any of the methods it implements.note that in most cases, this attribute will be set by the consumers of calicalendarview very early in an application/extension's loading process.
2006-10-13 - Archive of obsolete content
(user feels print belongs on the context menu along with back, reload, etc.) questions about programming for firefox a student questions how to create an extension that changes fonts, and how to capture website content before it is displayed.
2006-11-10 - Archive of obsolete content
event in firefox similar to ondownloadcomplete event in ie an inquiry about how to change the font of a web page before it is displayed using an extenstion.
2006-10-13 - Archive of obsolete content
some testing and validation has been done, but they would like other people to look at the installations and complete the setup before they switch over.
Extentsions FAQ - Archive of obsolete content
how can i backup some of the files before upgrade an extension and put them back afterward?
2006-10-20 - Archive of obsolete content
there are a few concerns with the software updates, and a decision is required on this before a "go" for rc3 release can be given.
2006-12-01 - Archive of obsolete content
http://www.juicescript.org/ discussions deleting objects in spidermonkey a user asks if there's a method of manually deleting an object in spidermonkey before garbage collector deletes it.
2006-12-24 - Archive of obsolete content
but in firefox the document is reset (shifted both horizontally and vertically) to its 0,0 position before being centered horizontally.
2006-12- 02 - Archive of obsolete content
but in firefox the document is reset (shifted both horizontally and vertically) to its 0,0 position before being centered horizontally.
2006-12-01 - Archive of obsolete content
discussions nsicontentpolicy and user interaction the proper way to get user confirmation before trying to load certain file types.
Monitoring plugins - Archive of obsolete content
if you are new to the mozilla observer service, you may want to familiarize yourself with it before proceeding further.
NPFullPrint - Archive of obsolete content
if you want the plug-in to take complete control of the printing process, it should print the full page and set the field pluginprinted to true before returning.
NPN_CreateObject - Archive of obsolete content
the newly created npobject's reference count is initialized to 1 before it is returned.
NPN_InvalidateRect - Archive of obsolete content
description before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either npn_invalidaterect() or npn_invalidateregion().
NPN_InvalidateRegion - Archive of obsolete content
description before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either npn_invalidaterect() or npn_invalidateregion().
NPN_MemFlush - Archive of obsolete content
on the mac, you can use this method to free memory before calling memory-intensive system calls.
NPN_Status - Archive of obsolete content
your message is always displayed, but you have no control over how long it stays in the status line before another message replaces it.
NPP_SetWindow - Archive of obsolete content
before setting the window parameter to point to a new window, it is a good idea to compare the information about the new window to the previous window (if one existed) to account for any changes.
NPP_WriteReady - Archive of obsolete content
description the browser calls npp_writeready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive.
NPStream - Archive of obsolete content
the plug-in should copy this data before making use of it.
NP_Initialize - Archive of obsolete content
description the browser calls this function only once: when a plug-in is loaded, before the first instance is created.
NP_Shutdown - Archive of obsolete content
syntax #include <npapi.h> void np_shutdown(void); windows #include <npapi.h> void winapi np_shutdown(void); description the browser calls this function once after the last instance of your plug-in is destroyed, before unloading the plug-in library itself.
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
you should aim to use a domain-name that you own and then your own unique short-name for the plugin before the @.
The First Install Problem - Archive of obsolete content
problem definition the first install problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other gecko-based browser.
Writing a plugin for Mac OS X - Archive of obsolete content
before you go on reading this article, you may wish to grab the sample code located here, as it will be referenced during this tutorial.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
however, before you do so you should make sure that the browser also supports xembed when the plugin is first initialized.
Plugins - Archive of obsolete content
plugins: the first install problem the first install problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other gecko-based browser.
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
before the word blog was coined there was slashdot.
Getting Started - Archive of obsolete content
what do you need before you start?
.htaccess ( hypertext access ) - Archive of obsolete content
it's a fast and efficient way of redirecting traffic, because the redirect happens before the pages are served.
Vulnerabilities - Archive of obsolete content
an example is the number of consecutive failed authentication attempts to permit before locking out a user account.
Table Reflow Internals - Archive of obsolete content
the reflower positions reflowee (if it can) before actually reflowing in case views are involved (e.g.
The Basics of Web Services - Archive of obsolete content
examples of web services in action as said before, rss and atom feeds are a simple example of how a web service works, most commonly, xml-rpc or soap are also used to communicate between a server and a client.
Common Firefox theme issues and solutions - Archive of obsolete content
this guide will help you thoroughly test your theme to find and fix issues before you push updates to amo.
Theme changes in Firefox 2 - Archive of obsolete content
browser.css the following styles that were used in firefox 1.5 are no longer used in firefox 2 and have been removed: tab:focus tab[beforeselected="true"] > .tab-image-right tab[selected="true"] > .tab-image-left tab[selected="true"] > .tab-image-middle tab[selected="true"] > .tab-image-right the following styles are new in firefox 2: .alltabs-item > .menu-iconic-left > .menu-iconic-icon .alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon .alltabs-item[selected="true"] .tab-close-button .tab-close-button > .toolb...
Theme changes in Firefox 3.5 - Archive of obsolete content
before that change, opaque windows always had a shadow and transparent windows never had a shadow.
Using SSH to connect to CVS - Archive of obsolete content
this will bring up a graphic box just after login, and before the desktop loads, asking for your passphrase.
Using the W3C DOM - Archive of obsolete content
w3c dom standards are well supported by modern browsers, however the standards are moving target so support for newer features should be tested before use.
-ms-wrap-flow - Archive of obsolete content
end inline flow content can wrap after the end edge of the exclusion area but must leave empty the area before the start edge of the exclusion area.
::-ms-browse - Archive of obsolete content
browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-check - Archive of obsolete content
browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-fill-lower - Archive of obsolete content
browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-fill-upper - Archive of obsolete content
browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-ticks-after - Archive of obsolete content
it is possible to use the ::-ms-ticks-after, ::-ms-ticks-before, and ::-ms-track pseudo-elements together.
::-ms-track - Archive of obsolete content
it is possible to use the ::-ms-ticks-after, ::-ms-ticks-before, and ::-ms-track pseudo-elements together.
Displaying notifications (deprecated) - Archive of obsolete content
this lets you configure the event listeners before the notification is shown, if you need to be notified when the notification is dismissed.
Array.observe() - Archive of obsolete content
the value before the change.
VBArray - Archive of obsolete content
the safearray argument must have obtained a vbarray value before being passed to the vbarray constructor.
@if - Archive of obsolete content
however, all @elif clauses must come before an @elseclause.
@set - Archive of obsolete content
~ * / % + - << >> >>> < <= > >= == != === !== & ^ | && | | if a variable is used before it has been defined, its value is nan.
Object.observe() - Archive of obsolete content
the value before the change.
JavaClass - Archive of obsolete content
backward compatibility javascript 1.3 and earlier you must create a wrapper around an instance of java.lang.class before you pass it as a parameter to a java method -- javaclass objects are not automatically converted to instances of java.lang.class.
Sharp variables in JavaScript - Archive of obsolete content
make sure you don't put in any spaces before the equal sign though.
XForms Custom Controls - Archive of obsolete content
if you would like to do this kind of heroic work then please contact the mozilla xforms developers before you start.
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
now we need to start teaching xforms to web newcomers before they are brainwashed into believing that the only way to build cool web apps is to do dom surgery with javascript!
Displaying a graphic with audio samples - Archive of obsolete content
event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0, canvas.width, canvas.height); ctx.fillstyle = "rgb(255,255,255)"; for (var i = 0; i < signal.length; i++ ) { // multiply spectrum by a zoom value magnitude = signal[i] * 1000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, ...
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
shortly before mozilla 0.9.4 was finished, a bug was introduced that affects the sizing of list item markers (such as the numbers in an ordered list).
RDF in Mozilla FAQ - Archive of obsolete content
the only caveat is that you must call rebuild() before the changes you've made will take effect (just as you must if you add a datasource to the xul template).
Windows Media in Netscape - Archive of obsolete content
d="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height="200" width="200"> <param name="uimode" value="full" /> <param name="autostart" value="true" /> <param name="url" value="preludesteel.wma" /> your browser does not support the activex windows media player </object> the classid attribute references the clsid of windows media player 7 and above -- windows media player versions before 7 used a different clsid.
XUL Parser in Python - Archive of obsolete content
how the script works as i said before, there isn't too much to explain in this script, particularly if you have used python's xmllib parser before.
Archive of obsolete content
in general, it may be best to discuss it in the mdn web docs room on matrix before moving content here.
GLSL Shaders - Game development
before reading on, copy this code to a new text file and save it in your working directory as index.html.
Desktop gamepad controls - Game development
the same goes for when the game is paused: the start button unpauses the game and the back button goes back, just like before.
Collision detection - Game development
update the following part of the code as indicated by the highlighted line: var bricks = []; for(var c=0; c<brickcolumncount; c++) { bricks[c] = []; for(var r=0; r<brickrowcount; r++) { bricks[c][r] = { x: 0, y: 0, status: 1 }; } } next we'll check the value of each brick's status property in the drawbricks() function before drawing it — if status is 1, then draw it, but if it's 0, then it was hit by the ball and we don't want it on the screen anymore.
Finishing up - Game development
replace the following line: var interval = setinterval(draw, 10); with simply: draw(); and remove each instance of: clearinterval(interval); // needed for chrome to end game then, at the very bottom of the draw() function (just before the closing curly brace), add in the following line, which causes the draw() function to call itself over and over again: requestanimationframe(draw); the draw() function is now getting executed again and again within a requestanimationframe() loop, but instead of the fixed 10 milliseconds frame rate, we are giving control of the framerate back to the browser.
Game over - Game development
if yes, then it bounces off just like you'd expect; if not then the game is over as before.
Move the ball - Game development
this works ok, although it appears that the ball is leaving a trail behind it: clearing the canvas before each frame the ball is leaving a trail because we're painting a new circle on every frame without removing the previous one.
Animations and tweens - Game development
add the following function just before your closing </script> tag: function ballhitpaddle(ball, paddle) { ball.animations.play('wobble'); } the animation is played every time the ball hits the paddle.
Build the brick field - Game development
add the initbricks() function at the end of our games code, just before the closing </script> tag, as shown below.
Collision detection - Game development
create this new function as the bottom of your code, just before the closing </script> tag, as follows: function ballhitbrick(ball, brick) { brick.kill(); } and that's it!
Extra lives - Game development
to make it easier for us to maintain in the future we can create a separate variable that will hold our styling, let's call it textstyle and place it before the text definitions: textstyle = { font: '18px arial', fill: '#0095dd' }; we can now use this variable when stlying our text labels — update your code so that the multiple instances of the text styling are replaced with the variable: scoretext = game.add.text(5, 5, 'points: 0', textstyle); livestext = game.add.text(game.world.width-5, 5, 'lives: '+lives, textstyle); livestext.anchor.set(1,...
Game over - Game development
to make the game more interesting we can introduce the ability to lose — if you don't hit the ball before it reaches the bottom edge of the screen it will be game over.
Initialize the framework - Game development
before we can start writing the game's functionality, we need to create a basic structure to render the game inside.
Move the ball - Game development
in any case, before we do all that we will first introduce phaser's physics engines, and do some setup work.
2D maze game with device orientation - Game development
howto.js ball.howto = function(game) { }; ball.howto.prototype = { create: function() { this.buttoncontinue = this.add.button(0, 0, 'screen-howtoplay', this.startgame, this); }, startgame: function() { this.game.state.start('game'); } }; the howto state shows the gameplay instructions on the screen before starting the game.
Boot2Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
(firefox os was also often called boot2gecko before the project had an official name.) ...
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
they can also help a user get back to where they were before and can reduce the number of clicks needed to get to a higher-level page.
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
ciphers were common long before the information age (e.g., substitution ciphers, transposition ciphers, and permutation ciphers), but none of them were cryptographically secure except for the one-time pad.
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
in a cryptosystem like tls, the client and server must agree on a cipher suite before they can begin communicating securely.
Gzip compression - MDN Web Docs Glossary: Definitions of Web-related terms
gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before sending them, and browsers can uncompress files upon receiving them.
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
color: #d9480f; } <div class="wrapper"> <div class="item">item</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 100px 100px; } .item { grid-column-start: 1; grid-column-end: 3; grid-row-start: 1; grid-row-end: 3; } naming lines the lines created in the explicit grid can be named, by adding the name in square brackets before or after the track sizing information.
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
(date objects by default serialize to a string containing the date in iso format, so the information isn't completely lost.) if you need json to represent additional data types, transform values as they are serialized or before they are deserialized.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
mvc on the web as a web developer, this pattern will probably be quite familiar even if you've never consciously used it before.
MitM - MDN Web Docs Glossary: Definitions of Web-related terms
check for https in your address bar and ensure encryption is in-place before logging in.
Opera Browser - MDN Web Docs Glossary: Definitions of Web-related terms
opera uses blink as its layout engine since 2013 (before that, presto).
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
forward error correction is when the receiver uses the error-correcting code which automatically corrects the errors at the transmitter, the calculation is performed before the packet is sent.
Preflight request - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a client might be asking a server if it would allow a delete request, before sending a delete request, by using a preflight request: options /resource/foo access-control-request-method: delete access-control-request-headers: origin, x-requested-with origin: https://foo.bar.org if the server allows it, then it will respond to the preflight request with an access-control-allow-methods response header, which lists delete: http/1.1 204 no content connection: keep-alive acc...
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
it correctly finds our variable instantiated with our first statement after finding it, the expression is evaluated, foo is replaced by 5 and the javascript engine passes that value to the functions as an argument before executing the statements inside the functions' bodies, javascript takes a copy of the originally passed argument (which is a primitive) and creates a local copy.
SLD - MDN Web Docs Glossary: Definitions of Web-related terms
an sld (second level domain) is the domain name that is located right before a tld.
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
how to prevent before executing the queries for the user credentials, make some changes like the following: $id = $_get['id'] (1) $id = stripslashes($id) (2) $id = mysql_real_escape_string($id) so due to (1) each single quote (') in the input string is replaced with double quotes ("), and due to (2) before every (') it adds (/).
Second-level Domain - MDN Web Docs Glossary: Definitions of Web-related terms
an sld (second level domain) is the domain name that is located right before a tld.
Smoke Test - MDN Web Docs Glossary: Definitions of Web-related terms
smoke testing comes before further, in-depth testing.
Specification - MDN Web Docs Glossary: Definitions of Web-related terms
a specification is a document that lays out in detail what functionality or attributes a product must include before delivery.
TCP slow start - MDN Web Docs Glossary: Definitions of Web-related terms
to implement tcp slow start, the congestion window (cwnd) sets an upper limit on the amount of data a source can transmit over the network before receiving an acknowledgment (ack).
TTL - MDN Web Docs Glossary: Definitions of Web-related terms
ttl can refer either to : the lifetime of a packet in a network can do before being released the expiry time of cached data networking in networking, the ttl, embedded in the packet, is a usually defined as a number of hops or as an expiration timestamp after which the packet is dropped.
Transmission Control Protocol (TCP) - MDN Web Docs Glossary: Definitions of Web-related terms
the three message mechanism is designed for the two computers that want to pass information back and forth and can negotiate the parameters of the connection before transmitting data such as http browser requests.
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
before unicode, it was difficult and error-prone to mix languages in the same data.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
examples for loop syntax: for (statement 1; statement 2; statement 3){ execute code block } statement 1 is executed once before the code block is run.
Strict mode - MDN Web Docs Glossary: Definitions of Web-related terms
strict mode for an entire script is invoked by including the statement "use strict"; before any other statements.
CSS and JavaScript accessibility best practices - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: css and javascript accessibility.
Accessible multimedia - Learn web development
before moving onto creating our button functionality, let's remove the native controls so they don't get in the way of our custom controls.
Test your skills: WAI-ARIA - Learn web development
as before, we have a simple app that presents a list of animal names.
A cool-looking box - Learn web development
prerequisites: before attempting this assessment, you should have already worked through all the articles in this module.
Advanced styling effects - Learn web development
note: there is another item that can be set in the box-shadow value — another length value can be optionally set just before the color value, which is a spread radius.
Backgrounds and borders - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: backgrounds and borders.
Creating fancy letterheaded paper - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
Handling different text directions - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: writing modes.
Attribute selectors - Learn web development
case-sensitivity if you want to match attribute values case-insensitively you can use the value i before the closing bracket.
Combinators - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: selectors.
CSS selectors - Learn web development
h1, .special { color: blue; } white space is valid before or after the comma.
Beginner's guide to media queries - Learn web development
you can find a test to verify that you've retained this information before you move on — see test your skills: responsive web design.
Multiple-column layout - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: multiple-column layout.
Practical positioning examples - Learn web development
add the following <section> just below your opening <body> tag, just before the existing section: <section class="fake-content"> <h1>fake content</h1> <p>this is fake content.
Responsive design - Learn web development
flexible layout before responsive design a number of approaches were developed to try to solve the downsides of the liquid or fixed-width methods of building websites.
Supporting older browsers - Learn web development
before deciding on the approach to take, find out the number of visitors coming to your site using older browsers.
Using your new knowledge - Learn web development
prerequisites: before attempting this assessment you should have worked through the rest of the css basics module, and also have an understanding of html basics (study introduction to html).
CSS first steps - Learn web development
get started prerequisites before starting this module, you should have: basic familiarity with using computers, and using the web passively (i.e.
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
documents with an incomplete, incorrect, or missing doctype declaration or a known doctype declaration in common use before 2001 will be rendered in quirks mode.
Typesetting a community school homepage - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
Styling text - Learn web development
get started prerequisites before starting this module, you should already have basic familiarity with html, as discussed in the introduction to html module, and be comfortable with css fundamentals, as discussed in introduction to css.
What text editors are available? - Learn web development
editors vary widely in flexibility, so check beforehand.
How do you host your website on Google App Engine? - Learn web development
if you've not created a project before, you'll need to select whether you want to receive email updates or not, agree to the terms of service, and then you should be able to continue.
How much does it cost to do something on the Web? - Learn web development
most of the images on the internet are copyrighted, so it is better to check the license of the file before you use it.
What are browser developer tools? - Learn web development
note: before you run through the examples below, open the beginner's example site that we built during the getting started with the web article series.
What are hyperlinks? - Learn web development
before the web, it was quite hard to access documents and move from one to another.
What is a web server? - Learn web development
we call it "dynamic" because the application server updates the hosted files before sending content to your browser via the http server.
Sending form data - Learn web development
you can see this in action in our example php-example.html file — which contains the same example form as we saw before, with a method of post and an action of php-example.php.
Test your skills: Form validation - Learn web development
form validation 1 in this task, we are providing you with a simple support query form, and we want you to add some validation features to it: make all of the input fields mandatory to complete before the form can be submitted.
Dealing with files - Learn web development
when you're building a website, you need to assemble these files into a sensible structure on your local computer, make sure they can talk to one another, and get all your content looking right before you eventually upload them to a server.
Installing basic software - Learn web development
before going on, you should install at least two of these browsers and have them ready for testing.
What will your website look like? - Learn web development
discusses the planning and design work you have to do for your website before writing code, including "what information does my website offer?", "what fonts and colors do i want?", and "what does my site do?" first things first: planning before doing anything, you need some ideas.
Getting started with the Web - Learn web development
before you start writing the code for your website, you should plan it first.
Using data attributes - Learn web development
for example to show the parent data on the article you can use generated content in css with the attr() function: article::before { content: attr(data-parent); } you can also use the attribute selectors in css to change styles according to the data: article[data-columns='3'] { width: 400px; } article[data-columns='4'] { width: 600px; } you can see all this working together in this jsbin example.
Advanced text formatting - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: advanced html text.
Debugging HTML - Learn web development
html is not compiled into a different form before the browser parses it and shows the result (it is interpreted, not compiled).
Document and website structure - Learn web development
with the right css, you could use pretty much any elements to wrap around the different sections and get it looking how you wanted, but as discussed before, we need to respect semantics and use the right element for the right job.
Marking up a letter - Learn web development
prerequisites: before attempting this assessment you should have already worked through getting started with html, what's in the head?
Structuring a page of content - Learn web development
prerequisites: before attempting this assessment you should have already worked through the rest of the course, with a particular emphasis on document and website structure.
What’s in the head? Metadata in HTML - Learn web development
this is useful as it makes sure that the html is all loaded before the javascript runs, so that you don't get errors resulting from javascript trying to access an html element that doesn't exist on the page yet.
Introduction to HTML - Learn web development
get started prerequisites before starting this module, you don't need any previous html knowledge, but you should have at least basic familiarity with using computers and using the web passively (i.e., just looking at it and consuming content).
From object to iframe — other embedding technologies - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: multimedia and embedding.
Multimedia and Embedding - Learn web development
get started prerequisites before starting this module, you should have a reasonable understanding of the basics of html, as previously covered in introduction to html.
HTML table basics - Learn web development
LearnHTMLTablesBasics
providing common styling to columns there is one last feature we'll tell you about in this article before we move on.
Assessment: Structuring planet data - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
HTML Tables - Learn web development
LearnHTMLTables
get started prerequisites before starting this module, you should already have covered the basics of html — see introduction to html.
Introduction to events - Learn web development
to verify you've retained this information before you move on — see test your skills: events.
Image gallery - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
Test your skills: Functions - Learn web development
you'll want to clear the canvas before drawing, so that when the code is updated in the case of the live version, you don't get lots of rectangles drawn on top of one another.
Test your skills: Loops - Learn web development
loops 2 in this next task, we want you to write a simple program that, given a name, searches an array of objects containing names and phone numbers (phonebook) and, if it finds the name, outputs the name and phone number into the paragraph (para) and then exits the loop before it has run its course.
JavaScript building blocks - Learn web development
get started prerequisites before starting this module, you should have some familiarity with the basics of html and css, and you should have also worked through our previous module, javascript first steps.
Storing the information you need — Variables - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: variables.
Solve common problems in your JavaScript code - Learn web development
how do you exit a loop before the end if a certain condition is met?
JavaScript object basics - Learn web development
you can find some further tests to verify that you've retained this information before you move on — see test your skills: object basics.
Test your skills: Object-oriented JavaScript - Learn web development
test that it works by creating the square and triangle object instances as before (using new shape() for both), and then calling their calcperimeter() methods.
CSS performance optimization - Learn web development
will-change property the css will-change property tells browsers which properties of an element are expected to change enabling browsers to set up optimizations before the element is actually changed, improving performance by doing potentially expensive work before it is required.
Measuring performance - Learn web development
at the time of writing, mdn's performance report summary looks similar to the following: a performance report contains information about things like how long a user has to wait before anything is displayed on the page, how many bytes need to be downloaded to display a page, and much more.
Web performance resources - Learn web development
<link rel="stylesheet" href="/path/to/my.css" media="print" onload="this.media='all'"> <noscript><link rel="stylesheet" href="/path/to/my.css"></noscript> the downside with this approach is the flash of unstyled text (fout.) the simplist way to address this is by inlining css that is required for any content that is rendered above the fold, or what you see in the browser viewport before scrolling.
The "why" of web performance - Learn web development
you might give up before it finishes loading.
Web performance - Learn web development
we do however recommend that before you work through this module, you at least get a basic idea of web development by working through our getting started with the web module.
Server-side website programming first steps - Learn web development
prerequisites before starting this module, you don't need to have any knowledge of server-side website programming, or indeed any other type of programming.
Ember interactivity: Events, classes and state - Learn web development
and just like before, the add() function that will be called from the template gets annotated with the @action decorator to bind it to the class instance.
Ember resources and troubleshooting - Learn web development
a route only has 3 lifecycle hooks, all of which are optional: beforemodel — gate access to the route.
Routing in Ember - Learn web development
there is a lot more to be implemented before what we've covered here has parity with the original todomvc app, such as editing, deleting, and persisting todos across page reloads.
Componentizing our Svelte app - Learn web development
go back to this file and update your <todo> component call like so: <todo {todo} on:remove={e => removetodo(e.detail)} /> our handler receives the e parameter (the event object), which as described before holds the todo being deleted in the detail property.
Deployment and next steps - Learn web development
before you start to upload content to your git repository, it is a good practice to add a .gitignore file to tell git which files to exclude from source control.
Getting started with Vue - Learn web development
if you've never run the vue cli before, you'll get one more question — you'll be asked to choose a package manager.
Rendering a list of Vue components - Learn web development
key attribute before we do that, there's one other piece of syntax to know about that is used with v-for, the key attribute.
Cross browser testing - Learn web development
get started prerequisites you should really learn the basics of the core html, css, and javascript languages first before attempting to use the tools detailed here.
Understanding client-side web development tools - Learn web development
get started now, with our "client-side tooling overview" prerequisites you should really learn the basics of the core html, css, and javascript languages first before attempting to use the tools detailed here.
Chrome Worker Modules
however, if you have cyclic requirements, some of the modules involved in the cyclic requirements may become visible by the other modules before they are fully evaluated.
Mozilla accessibility architecture
events: we must ensure that the accessible for an event is not released before the accessible client has a chance to review its data.
Accessibility information for UI designers and developers
or provide an opportunity to review the input before submitting it.
Embedding API for Accessibility
this is a ui issue we'll need to settle before we know where to go with the embedding accessibility interface.
Mozilla’s UAAG evaluation report
css: text-indent: yes css: text-align: yes css: word-spacing: yes css: letter-spacing: yes css: font-stretch: ni css: margin: yes css: float: yes css: position: yes css: !important: yes css: system fonts: yes css: system colors: yes css: list types: yes css: outline: no css: :before, :after, content: p(oor) 8.2 conform to specifications.
ZoomText
you may wish to read through the current issues on this page before reporting bugs.
Index
676 index add-ons, glossary, guide, index found 689 pages: 677 signing and distributing your add-on add-ons, extensions, webextensions, distribution, publication, reviews, signing add-ons need to be signed before they can be installed into release and beta versions of firefox.
Android-specific test suites
to disable a single test, edit the source code and insert junit's @ignore annotation before the existing @test annotation.
Benchmarking
the poisoning can be disabled by setting the environment variable jsgc_disable_poisoning=1 before starting the browser.
A bird's-eye view of the Mozilla framework
xpcom object model before getting into the details of the ui example, it's helpful to have a basic understanding of the xpcom object model.
Browser chrome tests
notice that any function call in head.js main scope will run before the main test() method.
Cookies Preferences in Mozilla
network.cookie.prefsmigrated default value: false migration pref for users with older profiles (before mozilla 1.7).
Creating a Language Pack
before gecko 59 you had to set the preference general.useragent.locale to your language code.
Debugging OpenGL
with this enabled, messages are printed before and after every opengl call.
Articles for new developers
also, before you go any further, we'd like to welcome you to the mozilla community of developers!
Makefile - variables
extra_components nsdefaultclh.manifest, javascript xpcomm files extra_dso_libs extra_dso_ldopts extra_js_modules extra_pp_components xpcomm files to pre-process before installation.
How Mozilla's build system works
the existence of a config.status file may be familiar to those who have worked with autoconf before.
Updating NSPR or NSS in mozilla-central
(because some developers might not be aware that nspr/nss are separately maintained and released, the mozilla hg server rejects accidental changes/forking, if the required keywords are missing in the commit comment.) if nspr or nss must be upgraded to a new static tag, follow this procedure: before starting, make sure your local repository is updated to mozilla-central tip and that there are no local changes: $ hg status -mard pull the new sources $ python client.py update_nspr nspr_tag_name or $ python client.py update_nss nss_tag_name if you update a branch older than mozilla 17 (without the change from bug 782784), you must manually add a dummy change (add or remove a bla...
Commenting IDL for better documentation
everything in the doxygen comment before a method, attribute, constant, or whatnot will be used as part of its description when the automatic documentation generator tool scans your idl, so if you don't want it in the docs, you probably shouldn't put it there.
Contributing to the Mozilla code base
we know even before you start contributing that getting set up to work on firefox and finding a bug that's a good fit for your skills can be a challenge.
Listening to events on all tabs
amillis the delay (in milliseconds) before refresh.
SVG Guidelines
if saved as a raster image then the work to rasterize the gradients and filters takes place on the authors computer before the result is stored in the raster file.
mach
for zsh, you can call the built-in bashcompinit function before sourcing: autoload bashcompinit bashcompinit source /path/to/mozilla-central/python/mach/bash-completion.sh frequently asked questions why should i not use mach?
Developer guide
check this before checking in and out, to be sure you're working with a working tree.
Cross Process Object Wrappers
it’s possible that the request for the documenturi property will be processed before the "changedocumenturi" message, in which case uri will have its previous value.
Frame script environment
another use is to interact with the content very early in the page load process, long before domcontentloaded event is fired.
Frame script environment
another use is to interact with the content very early in the page load process, long before domcontentloaded event is fired.
Frame script loading and lifetime
in fact, the message manager guarantees that loadframescript and broadcastasyncmessage are guaranteed to affect frame scripts in the order that they are called, so in this case "disable" will be received and consumed before the new frame scripts are loaded.
Security best practices for Firefox front-end engineers
the last flag ensures that developers will identify and avoid the problems early on in the development cycle and before shipping the code.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
it was originally used in firefox os to implement browser applications before that project was cancelled; since firefox 47 it is available to desktop chrome code and used in places like the firefox devtools.
HTMLIFrameElement.getScreenshot()
note: getscreenshot() waits for the event loop to go idle before it takes the screenshot.
Chrome-only Events reference
mozbeforepaintgecko 2.0 adds a new method for performing javascript controlled animations that synchronize not only with one another, but also with css transitions and smil animations being performed within the same window.mozscrolledareachangedthe mozscrolledareachanged event is fired when the document view has been scrolled or resized.
Overview of Mozilla embedding APIs
// save webbrowser before it goes out of scope :-) web navigation the nsiwebnavigation interface is used to load uris into the webbrowser and provide access to session history capabilities - such as back and forward.
Gecko SDK
downloading for gecko versions before 2.0, you should choose the gecko sdk version for the earliest version of mozilla you wish to target.
IPDL Tutorial
because protocol messages are represented as c++ methods, it's easy to forget that they are in fact asynchronous messages: by default the c++ method will return immediately, before the message has been delivered.
Implementing Download Resuming
you may want to use nsisimplestreamlistener to simplify this task; to get progress notifications, you can implement nsiprogresseventsink and set an interface requester as the notificationcallbacks of the channel that gives out such an event sink (this needs to be done before calling asyncopen).
Infallible memory allocation
when using these, you must check to ensure the resulting value isn't null before attempting to use the returned memory.
Addon
api consumers should take care to verify the existence of these methods or properties before relying on them.
AddonManager
the callbacks will be called just once but that may be before or after the method returns.
Code Samples
ddon.com", function(addon) { addon.uninstall(); }); disable an add-on components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid("youraddon@youraddon.com", function(addon) { if (addon.isactive) addon.userdisabled = addon.isactive; }); listening for add-on uninstall this example sets a variable beinguninstalled that you can check when you get a profile-before-change message to do cleanup for your add-on on uninstall.
Add-on Manager
for example: components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getalladdons(function(aaddons) { // here aaddons is an array of addon objects }); // this code will execute before the code inside the callback notifications about changes to installed add-ons are dispatched to any registered addonlisteners.
API-provided widgets
onbeforecreated(adoc) attached to all non-custom widgets; a function that will be invoked before the widget gets a dom node constructed, passing the document in which that will happen.
Dict.jsm
note: you can actually specify non-strings as keys; these are converted to strings before being used, so they're documented here as if they were a string parameter.
Downloads.jsm
when you catch an exception during a download, you can use this to verify if ex instanceof downloads.error, before reading the exception properties with the error details.
Interfacing with the Add-on Repository
importing the repository code module before you can use the add-on repository api, you need to import the code module: components.utils.import("resource://gre/modules/addonrepository.jsm"); having done this, you can then access the api through the resulting addonrepository object.
JNI.jsm
if you would like to support versions before that, you can copy and paste the contents of the jsm file int jni stands for java native interface; this library allows calling java code running in java virtual machines (jvms), etc.
JavaScript OS.Constants
before using a constant, you should check that it is defined.
OS.File.Info
before deprecation, this used to be the date at which the file was created on windows and mac os x, as a javascript date object.
PerfMeasurement.jsm
before you can use this module, you need to import it into your scope: components.utils.import("resource://gre/modules/perfmeasurement.jsm") see measuring performance using the perfmeasurement.jsm code module for details on how to use this api.
Deferred
note: calling this method with a pending promise as the avalue argument, and then calling it again with another value before the promise is resolved or rejected, will have no effect the second time, as the associated promise is already resolved to the pending promise value as its resolution.
Examples
var myvariscommented = 'hi'; alert(myvariscommented); throw new error('i feel like rejecting this promise'); return promise.resolve('yay success'); // this makes the success function trigger with asuccessreason being 'yay success' but because i commented out the var 2 lines above, it will error out on the throw and never get to this success line becuase i throw an error on the line before this } catch(ex) { return promise.reject(ex); } } in this example even though the variable is defined, the proimse is rejected because i threw an error.
Promise.jsm
this module was used before dom promises were made globally available in gecko 29.
Deferred
note: calling this method with a pending promise as the avalue argument, and then calling it again with another value before the promise is resolved or rejected, will have no effect the second time, as the associated promise is already resolved to the pending promise value as its resolution.
SourceMap.jsm
this is useful as the final intermediate representation a compiler might use before outputting the generated js and source map.
Application Translation with Mercurial
you installed scrapbook earlier, now open it in firefox either by calling it from the firefox menu bar (press the alt key to show it if necessary) using "view" > "sidebar" > "scrapbook" or by clicking its toolbar button which you likely have to add by toolbar customization if you didn't do this before.
Index
here we'll go over the accounts you need as well as the tools and their configurations you need to set up before contributing.
Localization and Plurals
just put the following line somewhere that will be evaluated before you want to use pluralform.
Localizing with Mozilla Translator
mt could be changed for a mt product to have a list of ''root'' directories instead of just one, and maybe someday it will do, but it will probably won't happen before seamonkey 1.1.x dies (and seamonkey 2.0 finally conquers the web, if i may add).
Translation phase
if you are creating your own localization, there are a number of mozilla websites that need to be localized before your efforts become an officially released localization.
Localization quick start guide
initial setup tech prep work before localizing.
Uplifting a localization from Central to Aurora
you don't want to push this to aurora before there's been the notification that the status of aurora has been lifted up to beta.
Localization formats
as every new web-dev project takes shape, a project manager should ask themselves these questions and have the answers ready before starting the web l10n process.
What every Mozilla translator should know
search plugins, protocol handlers, rss/live bookmarks), you will need to upload a patch with the suggested changes to bugzilla and get approval before pushing those changes to your hg repository.
MathML In Action
or what about those things that were working before and are not working anymore (a.k.a.
Mozilla Style System Documentation
this is useful for the pseudo-elements defined in the css specification (:before, :after, :first-line, :first-letter), but few of mozilla's custom pseudo-elements, many of which are hacks for further formatting objects that we create.
Are We Slim Yet
to this end we request that memory reporting be integrated into any new process before it is enabled on nightly.
BloatView
this happens when something that didn't leak before is now leaking.
Investigating leaks using DMD heap scan mode
if you have a patch that introduces a leak, you are probably better off auditing all of the strong references that your patch creates before trying this.
Leak-hunting strategies and tips
start finding and fixing leaks by running part of the task under nstracerefcnt logging, gradually building up from as little as possible to the complete task, and fixing most of the leaks in the first steps before adding additional steps.
Leak Gauge
you must exit the browser before post-processing the log file or the results will be unreliable.
Measuring performance using the PerfMeasurement.jsm code module
since we enable monitoring immediately before calling code_to_be_benchmarked(), and disable it as soon as it returns, the code in set_up_some_state() and clean_up_afterward() is not measured.
Memory reporting
tl;dr: you should read this document before writing a memory reporter.
Refcount tracing and balancing
dosomethingwithfooandreturnittoo() is a method that munges the foo before returning it to main(), the main program.
Scroll-linked effects
in the asynchronous scrolling model, the visual scroll position is updated in the compositor thread and is visible to the user before the scroll event is updated in the dom and fired on the main thread.
TraceMalloc
<script type="text/javascript"> var filename = window.prompt("filename to log: "); if (filename) tracemallocdumpallocations(filename); </script> one can then use the script tools/trace-malloc/diffbloatdump.pl to compare trace-malloc dumps before and after doing an action that might leak.
ui.textSelectBackground
type:string with rgb hex value as color code default value:#ef0fff (blue) [1] exists by default: no application support: before gecko 1.7 status: active; last updated 2015-09-21 introduction: pushed to trunk on 2000-04-13 bugs: bug 34704 [1]: nsxplookandfeel.cpp, line 628, retrieved 2015-09-21 ...
ui.textSelectForeground
type:string with rgb hex value as color code default value:#ffffff (white) [1] exists by default: no application support: before gecko 1.7 status: active; last updated 2015-09-21 introduction: pushed to trunk on 2000-04-13 bugs: bug 34704 [1]: nsxplookandfeel.cpp, line 635, retrieved 2015-09-21 ...
Patches and pushes
if the r+ is "with nits" (i.e., that's short for nit-picky requests), fix those before committing.
A guide to searching crash reports
please read the documentation about individual crash reports before reading this page.
L20n Javascript API
ctx.localize(['hello', 'new'], function(l10n) { var node = document.queryselector('[data-l10n-id=hello]'); node.textcontent = l10n.entities.hello.value; node.classlist.remove('hidden'); }); ctx.registerlocales(defaultlocale: string?, availablelocales: array<string>?) register the default locale of the context instance, as well as all other locales available to the context instance before the language negotiation.
AsyncTestUtils extended framework
ews/resources/loghelper.js"); load("../../mailnews/resources/asynctestutils.js"); load("../../mailnews/resources/messagegenerator.js"); load("../../mailnews/resources/messagemodifier.js"); load("../../mailnews/resources/messageinjection.js"); if the directory where you are adding the tests does not have a head_*.js file that has the two following lines, add them at the top of your test file (before the lines shown above): load("../../mailnews/resources/maildirservice.js"); load("../../mailnews/resources/mailtestutils.js"); at the bottom of the test file, add the following: var tests =[ // list your tests here ]; function run_test() { configure_message_injection({mode: "local"}); async_run_tests(tests); } asynchronous testing basics why do we need it?
McCoy
https://fireclipse.svn.sourceforge.net/svnroot/fireclipse/trunk/fireclipseextensions/chromebug/mccoy/signontheline/ bug 396525 - patch to mccoy https://bugzilla.mozilla.org/show_bug.cgi?id=396525 signing update manifests before you release your add-on in order to verify the update manifests applications need to already have information from you for how to verify it.
About NSPR
negative times extend to times before 1970, and positive numbers forward.
NSPR Contributor Guide
before you begin what may be a substantial effort in making a candidate feature for nspr, talk to us.
NSPR release procedure
before you run repackage.sh, you need to have built the binary distributions using the "gmake release" makefile target.
Process Forking in NSPR
no nspr functions should be called in the child process before the exec call is made.
I/O Functions
nspr converts the slashes in a pathname to the directory separator of the native os--for example, backslash (\) on windows and colon (:) on mac os--before passing it to the native system calls.
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.
Linked Lists
linked list macros macros that create and operate on linked lists are: pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_remove_link pr_remove_and_init_link pr_insert_before pr_insert_after pr_clist_is_empty pr_list_head pr_list_tail ...
Logging
before running the compiled program, set the environment variable nspr_log_modules to userstuff:5 static void userlogstuff( void ) { prlogmoduleinfo *mylm; printn i; pr_static_assert(5 > 4); /* nspr 4.6.6 or newer */ mylm = pr_newlogmodule( "userstuff" ); pr_assert( mylm ); pr_log( mylm, pr_log_notice, ("log a notice %d\n", 999 )); for (i = 0; i < 10 ; i++ ) { ...
NSPR LOG MODULES
set nspr_log_modules=timestamp,mozstorage:5 set nspr_log_file=/tmp/foo.log logging with try server for mochitest, edit variable nspr_log_modules in testing/mochitest/runtests.py before pushing to try.
PRCallOnceType
this initialization must be accomplished before any threading issues exist.
PRFileMap
before actually mapping a file to memory, you must create a memory-mapped file object by calling pr_createfilemap, which returns a pointer to prfilemap.
PRNetAddr
pr_inaddr_any and pr_inaddr_loopback are special ipv4 addresses in host byte order, so they must be converted to network byte order before being assigned to the inet.ip field.
PRThreadState
this results in some ambiguity after the thread's root function has returned and before the thread has finished terminating itself.
PRTime
a time after the epoch has a positive value, and a time before the epoch has a negative value.
PR_Accept
if the timeout parameter is not pr_interval_no_timeout and no pending connection can be accepted before the time limit, pr_accept returns null with the error code pr_io_timeout_error.
PR_AtomicSet
the returned value is the value that was readbefore memory was updated.
PR_AttachThread
in nspr release 19980529b and earlier, it is necessary for a native thread not created by nspr to call pr_attachthread before it calls any nspr functions, and call pr_detachthread when it is done calling nspr functions.
PR_CEnterMonitor
in the latter case, the calling thread is likely to find the monitor locked by another thread and waits for that thread to exit before continuing.
PR_CallOnce
initially (before any threading issues exist), the object must be initialized to all zeros.
PR_CreateIOLayerStub
the caller should override appropriate contents of the file descriptor returned before pushing it onto the protocol stack.
PR_CreateThread
description if you want the thread to start up waiting for the creator to do something, enter a lock before creating the thread and then have the thread's root function enter and exit the same lock.
PR_DestroyCondVar
description before calling pr_destroycondvar, the caller is responsible for ensuring that the condition variable is no longer in use.
PR_DestroyMonitor
description the caller is responsible for guaranteeing that the monitor is no longer in use before calling pr_destroymonitor.
PR_DetachThread
in nspr release 19980529b and earlier, it is necessary for a native thread not created by nspr to call pr_attachthread before it calls any nspr functions, and call pr_detachthread when it is done calling nspr functions.
PR ImportTCPSocket
the caller must not do anything to the native file descriptor before the pr_importtcpsocket call that will prevent the native file descriptor from working in non-blocking mode.
PR_PushIOLayer
if the containers are allocated by some method other than pr_createiolayerstub, it may be required that the stack have the layers popped off (in reverse order that they were pushed) before calling pr_close.
PR_QueueJob_Timer
timeout a value, expressed as a printervaltime, to wait before queuing the job.
PR_SetThreadPrivate
description if the thread already has non-null private data associated with it, and if the destructor function for the index is known (not null), nspr calls the destructor function associated with the index before setting the new data value.
PR_WaitForPollableEvent
blocks the calling thread until the pollable event is set, and then atomically unsetting the event before returning.
PR_Write
note that if pr_write returns -1, some data (less than amount bytes) may have been written before an error occurred.
PR_Writev
note that if pr_writev returns -1, part of the data may have been written before an error occurred.
NSPR API Reference
strdup pl_strfree floating point number to string conversion pr_strtod pr_dtoa pr_cnvtf long long (64-bit) integers bitmaps formatted printing linked lists linked list types prclist linked list macros pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_remove_link pr_remove_and_init_link pr_insert_before pr_insert_after dynamic library linking library linking types prlibrary prstaticlinktable library linking functions pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program platform notes ...
Building NSS
please read these instructions carefully before attempting to build.
NSS Certificate Download Specification
following the data should be the following line: -----end certificate----- in a text format download, nss ignores any text before the first begin certificate line, and ignores any text after the first end certificate line.
Encrypt Decrypt MAC Keys As Session Objects
* encrypts the input file and appends mac before storing in intermediate * header file.
Encrypt and decrypt MAC using token
* encrypts the input file and appends mac before storing in intermediate * header file.
FIPS Mode - an explanation
in fips mode, every user must have a good strong "master password", and must enter it each time he starts or restarts firefox before he can visit any web sites that use cryptography (https).
HTTP delegation
make sure you have completed the nss initialization before you attempt to register the callbacks.
HTTP delegation
make sure you have completed the nss initialization before you attempt to register the callbacks.
Introduction to Network Security Services
what you should already know before using nss, you should be familiar with the following topics: concepts and techniques of public-key cryptography the secure sockets layer (ssl) protocol the pkcs #11 standard for cryptographic token interfaces cross-platform development issues and techniques where to find more information for information about pki and ssl that you should understand before using nss, see the following: ...
4.3.1 Release Notes
some tokens require that a key be marked for an operation before the key can be used to perform that operation; other tokens don't care.
Build instructions for JSS 4.3.x
build instructions for jss 4.3.x newsgroup: mozilla.dev.tech.crypto before building jss, you need to set up your system as follows: build nspr/nss by following the nspr/nss build instructions, to check that nss built correctly, run all.sh (in mozilla/security/nss/tests) and examine the results (in mozilla/test_results/security/computername.#/results.html.
JSS
MozillaProjectsNSSJSS
documentation before you use jss, you should have a good understanding of the crypto technologies it uses.
NSS 3.14.2 release notes
if so, nss uses the optimized code path, reducing the cpu cycles per byte to 1/20 of what was required before the patch (https://bugzilla.mozilla.org/show_bug.cgi?id=805604 and https://crypto.stanford.edu/realworldcrypto/slides/gueron.pdf).
NSS 3.15.2 release notes
bug 884178 - add pk11_cipherfinal macro bugs fixed in nss 3.15.2 bug 734007 - sizeof() used incorrectly bug 900971 - nssutil_readsecmoddb() leaks memory bug 681839 - allow ssl_handshakenegotiatedextension to be called before the handshake is finished.
NSS 3.16.2.3 release notes
previously nss would only validate the peer's public key before performing ecdh key agreement.
NSS 3.17.2 release notes
previously nss would only validate the peer's public key before performing ecdh key agreement.
NSS 3.28.1 release notes
bugs fixed in nss 3.28.1 bug 1296697 - december 2016 batch of root ca changes bug 1322496 - internal error assert when the other side closes connection before reading eoed compatibility nss 3.28.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.44 release notes
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 1537927 - ipsec usage is too restrictive for existing deployments 1549608 - signature fails with dbm disabled 1549848 - allow building nss for ios using gyp 1549...
NSS 3.47 release notes
t set bug 1583068 - nss 3.47 should pick up fix from bug 1575821 (nspr 4.23) bug 1152625 - support aes hw acceleration on armv8 bug 1549225 - disable dsa signature schemes for tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk11load and stanpcertdb bug 1576307 - check mechanism param and param length before casting to mechanism-specific structs bug 1577953 - support longer (up to rfc maximum) hkdf outputs bug 1508776 - remove refcounting from sftk_freesession (cve-2019-11756) bug 1494063 - support tls exporter in tstclnt and selfserv bug 1581024 - heap overflow in nss utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle invald tag sizes for ckm_aes...
NSS 3.52 release notes
bug 1629661 - mpconfig calls in ssl initialize policy before nss is initialized.
NSS 3.53 release notes
(bug 1618404, bug 1621159) if a builtin certificate has a cka_nss_server_distrust_after timestamp before the sct or notbefore date of a certificate that builtin issued, then clients can elect not to trust it.
Encrypt Decrypt_MAC_Using Token
* encrypts the input file and appends mac before storing in intermediate * header file.
NSS Sample Code Sample_3_Basic Encryption and MACing
* encrypts the input file and appends mac before storing in intermediate * header file.
NSS Sample Code Utilities_1
name = pk11_gettokenname(slot); if (tokenname) { tokenlen = port_strlen(tokenname); } } i = 0; do { int startphrase = i; int phraselen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++; /* terminate passphrase */ phrases[i++] = '\0'; /* clean up any eol before the start of the next passphrase */ while ( (i<nb) analyze="" char="" current="" getmodulepassword="" if="" int="" now="" passphrase="" phrase="&amp;phrases[startphrase];" phraselen="" pk11slotinfo="" pwdata="=" pwdata-="" retry="" return="" secupwdata="" the="" void="" while="">source != pw_none) { pr_fprintf(pr_stderr, "incorrect password/pin entered.\n"); return null; ...
NSS Sample Code sample2
if (secparam == null) { fprintf(stderr, "failure to set up pkcs11 param (err %d)\n", pr_geterror()); goto out; } /* sample data we'll encrypt and decrypt */ strcpy(data, "encrypt me!"); fprintf(stderr, "clear data: %s\n", data); /* ========================= start section ============================= */ /* if using the the same key and iv over and over, stuff before this */ /* section and after this section needs to be done only once */ /* encrypt data into buf1.
NSS Sample Code sample6
* to decrypt, you need the ciphertext and the id of the key that was used * to encrypt * * before running this example, create the nss database * certutil -n -d .
EncDecMAC using token object - sample 3
* encrypts the input file and appends mac before storing in intermediate * header file.
Utilities for nss samples
name = pk11_gettokenname(slot); if (tokenname) { tokenlen = port_strlen(tokenname); } } i = 0; do { int startphrase = i; int phraselen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++; /* terminate passphrase */ phrases[i++] = '\0'; /* clean up any eol before the start of the next passphrase */ while ( (i<nb) && (phrases[i] == '\r' || phrases[i] == '\n')) { phrases[i++] = '\0'; } /* now analyze the current passphrase */ phrase = &phrases[startphrase]; if (!tokenname) break; if (port_strncmp(phrase, tokenname, tokenlen)) continue; phraselen = port_strlen(phrase); if...
NSS sources building testing
after the build on your computer has succeeded, before you can run the tests on your computer, it might be necessary to set additional environment variables.
nss tech note8
as originally designed, before calling the cache function, the caller was responsible to fill in the session creation time (which might not be the same as the time of insertion into the cache) and the session expiration time, among other things.
NSS Tools sslstrength
the enabled ciphersuites will always be printed out before the connection is made.
Notes on TLS - SSL 3.0 Intolerant Servers
(note: you will be asked to provide your email address before you can file a bug at bugzilla.) original document information author : katsuhiko momoi last updated date: january 27th, 2003 copyright © 2001-2003 netscape.
PKCS #11 Module Specs
timeout - time in minutes before the current authentication should be rechecked.
PKCS11 Implement
if your token requires authentication before executing these functions, your token cannot provide the default implementation for them.
Build instructions
build instructions for older versions (cvs) set the environment variable cvsroot to :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot cvs login (if you haven't before).
FC_CopyObject
a user must log into the token (to assume the nss user role) before copying a secret or private key object.
FC_CreateObject
a user must log into the token (to assume the nss user role) before calling fc_createobject.
FC_Decrypt
a user must log into the token (to assume the nss user role) before calling fc_decrypt.
FC_DecryptDigestUpdate
a user must log into the token (to assume the nss user role) before calling fc_decryptdigestupdate.
FC_DecryptFinal
a user must log into the token (to assume the nss user role) before calling fc_decryptfinal.
FC_DecryptInit
a user must log into the token (to assume the nss user role) before calling fc_decryptinit.
FC_DecryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_decryptupdate.
FC_DecryptVerifyUpdate
a user must log into the token (to assume the nss user role) before calling fc_decryptverifyupdate.
FC_DeriveKey
a user must log into the token (to assume the nss user role) before calling fc_derivekey.
FC_DestroyObject
a user must log into the token (to assume the nss user role) before destroying a secret or private key object.
FC_DigestEncryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_digestencryptupdate.
FC_DigestKey
a user must log into the token (to assume the nss user role) before calling fc_digestkey.
FC_Encrypt
a user must log into the token (to assume the nss user role) before calling fc_encrypt.
FC_EncryptFinal
a user must log into the token (to assume the nss user role) before calling fc_encryptfinal.
FC_EncryptInit
a user must log into the token (to assume the nss user role) before calling fc_encryptinit.
FC_EncryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_encryptupdate.
FC_FindObjectsInit
a user must log into the token (to assume the nss user role) before searching for secret or private key objects.
FC_GenerateKey
a user must log into the token (to assume the nss user role) before calling fc_generatekey.
FC_GenerateKeyPair
a user must log into the token (to assume the nss user role) before calling fc_generatekeypair.
FC_GetAttributeValue
a user must log into the token (to assume the nss user role) before getting the attribute values of a secret or private key object.
FC_GetObjectSize
a user must log into the token (to assume the nss user role) before getting the size of a secret or private key object.
FC_InitToken
ers fc_inittoken() has the following parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description fc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
FC_SetAttributeValue
a user must log into the token before setting the attribute values of a secret or private key object.
FC_SetPIN
the user must log into the token (to assume the nss user role) before calling fc_setpin.
FC_Sign
a user must log into the token (to assume the nss user role) before calling fc_sign.
FC_SignEncryptUpdate
a user must log into the token (to assume the nss user role) before calling fc_signencryptupdate.
FC_SignFinal
a user must log into the token (to assume the nss user role) before calling fc_signfinal.
FC_SignInit
a user must log into the token (to assume the nss user role) before calling fc_signinit.
FC_SignRecover
a user must log into the token (to assume the nss user role) before calling fc_signrecover.
FC_SignRecoverInit
a user must log into the token (to assume the nss user role) before calling fc_signrecoverinit.
FC_SignUpdate
a user must log into the token (to assume the nss user role) before calling fc_signupdate.
FC_UnwrapKey
a user must log into the token (to assume the nss user role) before calling fc_unwrapkey.
FC_Verify
a user must log into the token (to assume the nss user role) before calling fc_verify.
FC_VerifyFinal
a user must log into the token (to assume the nss user role) before calling fc_verifyfinal.
FC_VerifyInit
a user must log into the token (to assume the nss user role) before calling fc_verifyinit.
FC_VerifyRecover
a user must log into the token (to assume the nss user role) before calling fc_verifyrecover.
FC_VerifyRecoverInit
a user must log into the token (to assume the nss user role) before calling fc_verifyrecoverinit.
FC_VerifyUpdate
a user must log into the token (to assume the nss user role) before calling fc_verifyupdate.
FC_WrapKey
a user must log into the token (to assume the nss user role) before calling fc_wrapkey.
NSC_InitToken
s nsc_inittoken() has the following parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description nsc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
troubleshoot.html
building nss having /usr/ucb/bin in the path before /usr/ccs/bin breaks the build on 64-bit solaris.
sslerr.html
sec_error_ocsp_unauthorized_request -8068 "the ocsp server has refused this request as unauthorized." sec_error_ocsp_unknown_response_status -8067 "the ocsp server returned an unrecognizable status." sec_error_ocsp_unknown_cert -8066 "the ocsp server has no status for the certificate." sec_error_ocsp_not_enabled -8065 "you must enable ocsp before performing this operation." sec_error_ocsp_no_default_responder -8064 "you must set the ocsp default responder before performing this operation." sec_error_ocsp_malformed_response -8063 "the response from the ocsp server was corrupted or improperly formed." sec_error_ocsp_unauthorized_response -8062 "the signer of the ocsp response is not authorized to...
ssltyp.html
description this function is similar to secitem_freeitem, except that it overwrites the structures to be freed with zeroes before it frees them.
NSS Tools sslstrength
the enabled ciphersuites will always be printed out before the connection is made.
NSS Tools ssltap
you use the tool to look at the plain text and binary data that are part of the handshake procedure, before the secure connection is established.
Tutorial: Embedding Rhino
initializing standard objects the code scriptable scope = cx.initstandardobjects(); initializes the standard objects (object, function, etc.) this must be done before scripts can be executed.
Rhino serialization
if you are using rhino serialization in an environment where you always define, say, a constructor foo, you should add the following code before calling writeobject: out.addexcludedname("foo"); out.addexcludedname("foo.prototype"); this code will prevent foo and foo.prototype from being serialized and will cause references to foo or foo.prototype to be resolved to the objects in the new scope upon deserialization.
Shumway
you may wish to do this before opening your swf file.
Creating JavaScript jstest reftests
before using test262, spidermonkey had a fair number of internal tests of conformance to ecmascript, and many of those tests remain in the js/src/non262 directory as regressions.
64-bit Compatibility
if you use these bits to squirrel away a payload, they must be adjusted before attempting to dereference the pointer.
Functions
this is fast if the global either doesn't exist before the script runs (the script creates it) or it's a non-configurable data property (which amounts to the same thing).
SpiderMonkey Internals
(otherwise, spidermonkey converts primitive values to objects before invoking their methods, per ecma 262-3 §11.2.1.) error handling spidermonkey has two interdependent error-handling systems: javascript exceptions (which are not implemented with, or even compatible with, any kind of native c/c++ exception handling) and error reporting.
INT_TO_JSVAL
before spidermonkey 1.8.5, not all integers can be stored in a jsval; use int_fits_in_jsval to test.
JS::CallArgs
if (args.length() == 0 || !args[0].isnumber()) { args.rval().setint32(0); return true; } // access to the callee must occur before accessing/setting // the return value.
JS::DeflateStringToUTF8Buffer
this can be less than the length of the string, if the buffer is exhausted before the string is fully encoded.
JS::PersistentRooted
before spidermonkey 38, persistentrooted<t> itself cannot be a global variable, but from spidermonkey38, it can be declared as a global variable, and initialized later with init() method (bug 1107639).
JSDeletePropertyOp
an attempt to delete such a property fails early, returning false, before the delproperty hook is reached.
JSEnumerateOp
description jsenumerateop is called just before an object is enumerated (via a for...in statement, an array comprehension, or a call to js_enumerate).
JSErrorReport
set linebuf to point at the buffer before your application executes a script.
JSObjectOps.lookupProperty
note: a successful return with non-null *propp means the implementation may have locked *objp and added a reference count associated with *propp, so callers should not risk deadlock by nesting or interleaving other lookups or any obj-bearing ops before dropping *propp.
JSPRINCIPALS_HOLD
application code that stores a pointer to a jsprincipals object must call jsprincipals_hold(cx, principals) before storing it and jsprincipals_drop(cx, principals) when done with it.
JS_CStringsAreUTF8
there are two ways to enable this: at compile time, by building spidermonkey with js_c_strings_are_utf8 defined; or at run time, by calling js_setcstringsareutf8 before the first call to js_newruntime.
JS_ClearNewbornRoots
these newborn roots help native code protect newly-created gc-things from gc invocations activated before those things can be rooted using local or global roots.
JS_DefineProperties
js_defineproperties creates one property for each element in the array before the element with a null name field.
JS_DefineProperty
(exception: if attrs contains the jsprop_readonly flag, the setter will never be called, as property assignment will fail before it gets that far.
JS_DeleteElement
for javascript 1.2 and earlier, if failure occurs because you attempt to delete a permanent or read-only element, js_deleteelement reports the error before returning false.
JS_EncodeCharacters
on failure, *dstlenp receives the number of bytes written to dst before the error occurred.
JS_ExecuteScript
if the script is cross-compartment, it is cloned into the current compartment before executing.
JS_GetInstancePrivate
if you pass a non-null argument vector, argv, to js_getinstanceprivate, and obj is not an instance of clasp, this function reports a class mismatch error before returning null.
JS_Init
this method must be called before any other jsapi method is used on any thread.
JS_LeaveCompartment
leave a the compartment, returning to the compartment active before the corresponding js_entercompartment.
JS_LeaveCrossCompartmentCall
leave a the compartment, returning to the compartment active before the corresponding js_entercrosscompartmentcall.
JS_MakeStringImmutable
applications must call js_makestringimmutable before sharing a jsstring among threads by storing it in a c/c++ variable, field, or array element that another thread can read.
JS_NewContext
before a jsruntime may be destroyed, all the jscontexts associated with it must be destroyed.
JS_NewExternalString
the array must be populated with the desired character data before js_newexternalstring is called, and the array must remain in memory, with its contents unchanged, for as long as the javascript engine needs to hold on to it.
JS_NewRuntime
call js_newruntime before making any other api calls except js_init.
JS_PreventExtensions
before then, js_preventextensions did not accept a succeeded argument; in those cases where *succeeded would be set to false, js_preventextensions would throw a typeerror and return false.
JS_RemoveExternalStringFinalizer
you must ensure that all strings with finalizer's type have been collected before calling this function.
JS_SaveFrameChain
before calling js_restoreframechain, cx's call stack must be balanced and all nested calls to js_saveframechain must have had matching js_restoreframechain calls.
JS_SetDestroyCompartmentCallback
description js_setdestroycompartmentcallback sets callback function which will be called when sweeping each compartment of the runtime, before deleting the compartment.
JS_SetICUMemoryFunctions
it must be called before js_init.
JS_SetInterruptCallback
the embedding must ensure that the callback is disconnected before attempting such re-entry.
JS_SetNativeStackQuota
this function may only be called immediately after the runtime is initialized and before any code is executed and/or interrupts requested.
JS_SetOperationCallback
the embedding must ensure that the callback is disconnected before attempting such re-entry.
JS_SetScriptStackQuota
the function must be called before any script compilation or execution api calls, i.e.
JS_SetVersion
js_setversion returns the js version in effect for the context before you changed it.
JS_ShutDown
calling this method before all other resources have been destroyed has undefined behavior.
JS_SuspendRequest
description in js_threadsafe builds, when a multi-threaded application is in a request but needs to block or perform lengthy computation that can race safely with the garbage collector, it should call js_suspendrequest before the time-consuming operation and js_resumerequest after.
JSAPI reference
spidermonkey 17 js_dumpheap added in spidermonkey 1.8 js_setgccallbackrt obsolete since jsapi 13 js_setfinalizecallback added in spidermonkey 17 obsolete since jsapi 32 js_markgcthing obsolete since jsapi 5 js_isabouttobefinalized obsolete since jsapi 35 js_clearnewbornroots obsolete since jsapi 5 the rest of these apis help protect objects from being destroyed by the garbage collector before the application is done using them.
SpiderMonkey 1.8
this makes gc-related problems easier to reproduce, reveals gc problems that you may not have noticed before, and causes gc-safety bugs to surface much closer to their cause.
Using RAII classes in Mozilla
in the common case, using these macros involves these three additions to a class: class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(jscontext *cx moz_guard_object_notifier_param) { // note: no ',' before macro moz_guard_object_notifier_init; nscontentutils::addscriptblocker(cx); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_decl_use_guard_object_notifier }; moz_guard_object_notifier_param is added to the end of the constructor's parameter list.
A Web PKI x509 certificate primer
if you wish to do this, you should read the relevant part of the mozilla ca faq before doing so.
Signing Mozilla apps for Mac OS X
firefox and thunderbird releases are both signed before shipping; this article describes the process.
Gecko states
t_state_supports_autocompletion for editable areas that have any kind of autocompletion ext_state_defunct object no longer exists ext_state_selectable_text for text which is selectable, object must implement nsiaccessibletext ext_state_editable implements nsiaccessibleeditabletext ext_state_active this window is currently the active window ext_state_modal must do something with control before leaving it ext_state_multi_line edit control that can take multiple lines ext_state_horizontal uses horizontal layout ext_state_opaque indicates this object paints every pixel within its rectangular region ext_state_single_line this text object can only contain 1 line of text ext_state_transient ext_state_vertical especially used for sliders and scrollbars ext_state_stale object n...
History Service Design
these statements can be reused avoiding the overhead due to createstatement calls, before closing the connection these statements need to be finalized though, since not doing that would cause leaking.
Manipulating bookmarks using Places
initiating the bookmarks service as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder() method.
Querying Places
if you close a container and re-open it before any history or bookmark change notifications come, the results will generally still be there and this operation will be fast.
Retrieving part of the bookmarks tree
before accessing the children of any result container, you must first open it, and then you can iterate the children.
Using the Places history service
this can be and is calledbefore the page is actually added to history, since the page isn't added until it actually starts loading.
Using the Places livemark service
initiating the livemark service before using the livemark service, you need to obtain an instance: var livemarkservice = components.classes["@mozilla.org/browser/livemark-service;2"] .getservice(components.interfaces.nsilivemarkservice); creating a new livemark the nsilivemarkservice.createlivemark() method creates a new livemark.
Using the Places tagging service
initiating the tagging service before using the tagging service, you need to obtain a reference to an instance of it: var taggingsvc = components.classes["@mozilla.org/browser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice); tagging a uri the nsitaggingservice.taguri() method tags a url with the given set of tags.
places.sqlite Database Troubleshooting
before you proceed, make a backup of the firefox profile folder, in any case.
Component Internals
rather, the shutdown event gives the component or embedding application a last chance to clean up any leftovers before they are released.
Setting up the Gecko SDK
note that mozilla-config.h may be need to be included before other includes in your component's source code.
Detailed XPCOM hashtable guide
before using nsthashtable, see if nsbasehashtable and relatives will work for you.
Receiving startup notifications
final-ui-startup sent just before the first application window is displayed.
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
the stream listener must read exactly count bytes before exiting.
Components.classes
you should use the in operator to test for the element before trying to access it: if (!("@some/bogus/class;1" in components.classes)) // do something...
Components.utils.forceGC
another instance where it can be useful to force garbage collection is before cleaning out dead reference from a hash of weak javascript references.
HOWTO
however, when you start your script, it exits immediately, before the network request returns.
Profiling XPCShell
using an earlier build will cause the profiler to hang the more adventurous can use the nsixpctoolsprofiler.idl interface directly, but be aware that you must start the profiler before loading the files you want to profile (creating an instance of a component loads the file!) ...
XPCShell Reference
if that file is found, it is executed before any other js files specified.
IAccessibleEditableText
the substrings used with this interface are specified as follows: if startoffset is less than endoffset, the substring starts with the character at startoffset and ends with the character just before endoffset.
imgICache
findentryproperties() find properties used to get properties such as 'type' and 'content-disposition' 'type' is a nsisupportscstring containing the images' mime type such as 'image/png' 'content-disposition' will be a nsisupportscstring containing the header if you call this before any data has been loaded from a uri, it will succeed, but come back empty.
inIDOMUtils
apseudo optional a pseudo element, such as before.
mozIColorAnalyzer
if imageuri points to an image that has more than 128^2 pixels, this method will fail for performance reasons before analyzing it.
mozISpellCheckingEngine
if the dictionary was set to "no dictionary" (that is, by specifying an empty string), the observer may select another dictionary before returning.
mozIStorageStatementParams
enumeration of properties you can also enumerate all the properties on this object with a for..in enumeration: // valuestobind is an object that contains key-value pairs // to bind to the statement before executing it.
mozITXTToHTMLConv
you must set this value to zero before calling this method.
nsIAbCard
astring generatephoneticname(in boolean alastnamefirst) parameters alastnamefirst set to true to put the last name before the first.
nsIAccessibleStates
ext_state_modal 0x00000020 must do something with control before leaving it.
nsIAppShell
it is the amount of time in milliseconds to wait before the pr_false actually takes effect.
nsIAuthPromptCallback
they must not call any method on this interface before nsiauthprompt2.asyncpromptauth() returns.
nsIBlocklistPrompt
xpcom/system/nsiblocklistservice.idlscriptable this interface is used, if available, by the default implementation of nsiblocklistservice to display a confirmation user interface to the user before blocking extensions or plugins.
nsIBrowserHistory
this can be and is called before the page is actually added to history, since the page isn't added until it actually starts loading.
nsIChannelEventSink
these methods are called before onstartrequest.
nsIContentPrefCallback2
this may be called multiple times before handlecompletion is called.
nsIContentPrefService2
when a set() or remove method is called, observers are notified after the set() or removal completes but before method's callback is called.
nsIContentViewer
pagehide() void pagehide( in boolean isunload ); parameters isunload missing description exceptions thrown missing exception missing description permitunload() determins whether or not the document wants to prevent unloading by firing beforeunload on the document, and if it does, prompts the user.
nsIConverterOutputStream
must be called before any other method on this interface, or you will crash.
nsICryptoHMAC
note: this method must be called before any other method on this interface is called.
nsIDBChangeListener
aprechange true on first call before change, false on second call after change.
nsIDOMGeoPositionOptions
timeout unsigned long maximum time in milliseconds before giving up on an attempt to retrieve location information.
nsIDebug
this allows the debugger to be attached before the software break.
nsIDialogParamBlock
use before setting any string (if you want to change it from the default).
nsIDirectoryService
this method must be called before an nsidirectoryservice instance can be used.
nsIDynamicContainer
it is called before the container is deleted, so that the service can still reference it.
nsIEditorDocShell
void makeeditable( in boolean inwaitforuriload ); parameters inwaitforuriload true to wait for a uri before creating the editor.
nsIEditorSpellCheck
call this before calling initspellchecker(); calling it after initialization will have no effect.
nsIEffectiveTLDService
you should strip leading periods off host names before passing them to this method.
nsIExternalHelperAppService
ydecodingforextension(in autf8string aextension, in acstring aencodingtype); nsistreamlistener docontent(in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave); methods applydecodingforextension() determines whether or not data whose filename has the specified extension should be decoded from the specified encoding type before being saved or delivered to helper applications.
nsIFaviconDataCallback
it's up to the caller to check adatalen > 0 before using any data-related information like mime-type or data itself.
nsIFeedProgressListener
void handlefeedatfirstentry( in nsifeedresult result ); parameters result an nsifeedresult describing the feed at the point at which the first entry is found, but before processing it.
nsIFeedResult
there may still be feed metadata and entries that were parsed before the error occurred.
nsIFeedResultListener
even if an error occurred during processing, there may be valid data available for feed-level data or entries processed before the error occurred.
nsIFile
for specific handling before gecko 9 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6), please see bug 682571.
nsIFileStreams
it may be removed before the stream is closed if it is possible to delete it and still read from it.
nsIFileURL
callers must clone before attempting to modify the returned nsifile object.
nsIFrameMessageManager
set to oo if you want to receive messages during the short period after a frame has been removed from the dom and before its frame script has finished unloading.
nsIGeolocationProvider
this is called before any other method and may be called multiple times.
nsIHTMLEditor
adeleteselection delete the selection before inserting if adeleteselection is pr_false, then the element is inserted after the end of the selection for all element except named anchors, which insert before the selection.
nsIINIParserWriter
the sections are built in memory before the text of the ini file is generated, so you can add properties to the file in any order, regardless of section.
nsIIdleService
time the amount of time in seconds the user should be idle before the observer should be notified.
nsIInputStream
that enables the caller to know the condition of the stream before attempting to read from it.
nsILocalFileMac
note: if the path of the cfurl is /a/b/c, at least a/b must exist beforehand.
nsILoginInfo
a blank value indicates the login was stored before bug 360493 was fixed.
nsILoginManagerStorage
this does not decrypt logins before returning the array.
nsIMessageListenerManager
listenwhenclosed specify true to receive messages during the short period after a frame has been removed from the dom and before its frame script has finished unloading; this is false by default.
nsIMicrosummary
if you want know when a microsummary finishes updating, add an observer before calling this method.
nsIMicrosummaryService
otherwise, it'll asynchronously download the necessary information (the generator and/or page) before refreshing the microsummary.
nsIModule
it is very important to ensure that no outstanding references to the module's code/data exist before returning true.
nsIMsgAccountManagerExtension
methods showpanel() before displaying a panel in the account manager this method is triggered.
nsINavBookmarksService
this method exists because complex delete->undo operations rely on recreated folders to have the same id they had before they were deleted, so that any other items deleted in different transactions can be re-inserted correctly.
nsINavHistoryResult
sortingannotation autf8string the annotation to use in sort_by_annotation_* sorting modes; you must set this value before setting the sortingmode attribute.
nsINavHistoryResultObserver
this method is called after the item has been removed from the parent, but before any other action is taken (including zeroing out the item's parent reference).
nsINavHistoryResultViewer
remarks this method is called after the item has been removed from the parent, but before any other action is taken (including zeroing out the item's parent reference).
Component; nsIPrefBranch
it is not safe to change observers during this callback in releases before gecko 1.9.
nsIPrefBranch2
it is not safe to change observers during this callback in releases before gecko 1.9.
nsIPrintingPrompt
you can then fly you own dialog and then properly fill in the printsettings object before calling nsiwebbrowserprint's print method.
nsIProfile
however, it hasn't been used in firefox since before firefox 1.0.
nsIPromptService
a delay can be useful not only to give the user more time to think before acting, but also as a countermeasure against malicious web sites that intentionally create a race condition whereby the user intends to click or type a key responding, for example, to the web site's prompt but the security dialog pops up unexpectedly and its button is unintentionally activated.
nsIProtocolHandler
the caller may provide the charset from which the uri string originated, so that the uri string can be translated back to that charset (if necessary) before communicating with, for example, the origin server of the uri string.
nsIProtocolProxyService
this value may be used to tune the delay before this proxy is used again.
nsISelection2
aissynchronous when true, scrolls the selection into view before returning.
nsISelectionController
selection_on 2 selection_disabled 3 selection_attention 4 scroll constants constant value description scroll_synchronous 1<<1 if set scrolls the selection into view before returning.
nsISelectionPrivate
aissynchronous when true, scrolls the selection into view before returning.
nsISocketTransport
tus_waiting_for 0x804b000a status_receiving_from 0x804b0006 connection flags values for the connectionflags attribute constant value description bypass_cache 0 when making a new connection bypass_cache will force the necko dns cache entry to be refreshed with a new call to nspr if it is set before opening the new stream.
nsIStandardURL
protocol handlers can set this flag before handing out an url to ensure that it is not inadvertently modified.
nsIStyleSheetService
a user sheet loaded via this api will come before usercontent.css and userchrome.css in the cascade (so the rules in it will have lower precedence than rules in those sheets).
nsIThread
this causes events to stop being dispatched to the thread, and causes any pending events to run to completion before the thread joins with the current thread (see pr_jointhread() for details).
nsIThreadObserver
onprocessnextevent() called by the nsithread method nsithread.processnextevent() before an event is processed.
nsITraceableChannel
see modify url before loading page in firefox for an overview of how to modify a request before it is made.
nsITransaction
undotransaction() restores the state to what it was before the transaction was executed.
nsITreeColumns
restorenaturalorder() restore the original order of the columns before the user moved them.
nsIURI
about:blank) prepath autf8string the prepath returns the string before the path (such as "scheme://user:password@host:port").
nsIUTF8ConverterService
make sure that all characters outside us-ascii in your input spec are url-escaped if your spec is not in utf-8 (before url-escaping) because the presence of non-ascii characters is blindly regarded as an indication that your input spec is in unescaped utf-8 and it will be returned without further processing.
nsIUpdate
if this is specified, the user is shown the license file after they choose to install the update, and they must agree to it before the download begins.
nsIWebNavigation
load_flags_stop_content 2048 if this flag is set, stop() will be called before the load starts and will stop both content and network activity (the default is to only stop network activity).
nsIWebProgressListener2
amillis the delay (in milliseconds) before refresh.
nsIWindowsShellService
restorefilesettings() obsolete since gecko 1.9 (firefox 3) restores system settings to what they were before firefox modified them.
nsIXMLHttpRequestEventTarget
onprogress nsidomeventlistener a javascript function object that gets invoked zero or more times, after the loadstart event, but before any abort, error, or load events occur.
nsIXPCScriptable
for example, callers must guarantee that they set the *_retval of the various methods that return a boolean to pr_true before making the call.
nsIXULBuilderListener
willrebuild() called before a template builder rebuilds its content.
nsIXULTemplateBuilder
the default conditions specified inside the <rule> tag are applied before the rule filter is applied, meaning that the filter may be used to further filter out results but not reaccept results that have already been rejected.
nsIXmlRpcClient
call this before using this object void getdata ( in string serverurl ) ; parameters serverurl url of server side object on which methods should be called setauthentication() set authentication info if needed.
nsIZipReader
if aentryname is an external file which has meta-information stored in the jar, verifyexternalfile (not yet implemented) must be called before getprincipal.
nsIZipReaderCache
void init( in unsigned long cachesize ); parameters cachesize the number of released entries to maintain before beginning to throw some out.
nsMsgSearchOp
id(9160b196-6fcb-4eba-aaaf-6c806c4ee420)] interface nsmsgsearchop { const nsmsgsearchopvalue contains = 0; /* for text attributes */ const nsmsgsearchopvalue doesntcontain = 1; const nsmsgsearchopvalue is = 2; /* is and isn't also apply to some non-text attrs */ const nsmsgsearchopvalue isnt = 3; const nsmsgsearchopvalue isempty = 4; const nsmsgsearchopvalue isbefore = 5; /* for date attributes */ const nsmsgsearchopvalue isafter = 6; const nsmsgsearchopvalue ishigherthan = 7; /* for priority.
nsIAbCard/Thunderbird3
astring generatephoneticname(in boolean alastnamefirst) parameters alastnamefirst set to true to put the last name before the first.
nsMsgSearchOpValue
af-6c806c4ee420)] 149 interface nsmsgsearchop { 150 const nsmsgsearchopvalue contains = 0; /* for text attributes */ 151 const nsmsgsearchopvalue doesntcontain = 1; 152 const nsmsgsearchopvalue is = 2; /* is and isn't also apply to some non-text attrs */ 153 const nsmsgsearchopvalue isnt = 3; 154 const nsmsgsearchopvalue isempty = 4; 155 156 const nsmsgsearchopvalue isbefore = 5; /* for date attributes */ 157 const nsmsgsearchopvalue isafter = 6; 158 159 const nsmsgsearchopvalue ishigherthan = 7; /* for priority.
Performance
the page size can be set using the page_size pragma before any operations have been done on the file.
Troubleshooting XPCOM components registration
note: you should delete compreg.dat from your profile before doing this.
Using IndexedDB in chrome
n the sandbox constructor: var options = { "wantglobalproperties": ["indexeddb"] } var principal = cc["@mozilla.org/systemprincipal;1"].createinstance(ci.nsiprincipal); var sandbox = components.utils.sandbox(principal, options); // the sandbox will have access to indexeddb var sandboxscript = 'var req = indexeddb.open("my-database");'; components.utils.evalinsandbox(sandboxscript, sandbox); before firefox 33, you would access indexeddb from chrome code using the initwindowless method of the nsiindexeddatabasemanager service.
Frequently Asked Questions
release an nscomptr before it goes out of scope?
Using nsCOMPtr
if you've never used nscomptr before, you're starting in the right place.
Using nsIDirectoryService
there are things in the startup process that need these locations at a very early point - even before registering components.
XPCOM ownership guidelines
special code must be provided and called to break the cycle before the participants can be individually released.
Xptcall Porting Guide
i ended up with larger stubs than i would have preferred rather than battle the compiler over what would happen to the stack before my asm code began running.
XPCOM
if the referent object is destroyed before the weak reference, the pointer inside the weak reference is set to nsnull.working with multiple versions of interfacesin this short note we illustrate how one can update an xpcom module in order for it to work in both firefox 2 and firefox 3, even if the interfaces have changed in the interim.working with out parameterswrappedjsobjectwrappedjsobject is a property sometimes available on xpconnect...
XPIDL Syntax
MozillaTechXPIDLSyntax
some productions can only occur at the beginning of lines; to simplify the grammar, i will not mention them in the grammar, especially since they are handled as a preprocessing step before the idl source code is actually parsed.
XUL Overlays
MozillaTechXULOverlays
inserting the following processing instruction before the doctype declaration in a base file tells the layout engine to load the named overlay file: <?xul-overlay href="chrome://component/content/componentoverlay.xul"?> where component is the name of the package being overlayed (e.g., chrome://navigator/content/navigatoroverlay.xul).
Testing Mozilla code
before you can even get your code committed into the source tree, you have to test it, and larger patches have to have automated tests.
Index
spam detection happens after filters are run white listing happens after filters, but before spam detection the purge code is implemented as a search of the "junk" folder, looking for "old" message that have the proper junk status.
Mail and RDF
you should learn about rdf before reading this document or you will be hopelessly confused.
Spam filtering
white listing happens after filters, but before spam detection.
The libmime module
class initialization function the mimedefclass macro expects us to define a function which will finish up any initialization of the class object that needs to happen before the first time it is instantiated.
Adding items to the Folder Pane
unfortunately, this rebuild will occur before an extension's "load" event fires.
Creating a Custom Column
don't forget to add in a splitter before the column to ensure that the user can easily resize and drag our column around.
Theme Packaging
you must have a top-level chrome.manifest file which registers the chrome for the theme (as before) and also an install.rdf manifest that specifies metadata that is displayed in the appearance section of the add-ons manager.
Using the Multiple Accounts API
preference: mail.server.server.max_cached_connections - integer, max number of connections left open to the server preference: mail.server.server.empty_trash_threshhold integer, (should not be imap-specific) max k of wasted diskspace before we purge a folder preference: mail.server.server.delete_model - integer, delete model (move to trash, imap delete, purge immediately, not sure of values) preference: mail.server.server.timeout - integer, number of minutes a connection is idle before we drop it preference: mail.server.server.capability - list of capabilities of this server preference: mail.server.server.namesp...
Using the Mozilla symbol server
you will need to source this script before loading symbols (the part where it spends a few seconds loading each .so when you attach gdb).
Working with windows in chrome code
note however, that the open() call returns before the window is fully loaded, so some calls, like win.document.getelementbyid() will fail.
Declaring and Using Callbacks
before the javascript callback function is invoked, js-ctypes converts the arguments passed by the caller to javascript values.
Memory Management
be sure to hold an explicit reference so that the referent object doesn't get into garbage collection, before you're done using it.
Standard OS Libraries
there is a star/asterik ("*") before "bsd" because this means the bsd family such as freebsd, openbsd (who by the way made ssh), netbsd, etc.
ctypes.open
this must be called before any work can commence.
Using js-ctypes
before you can use js-ctypes, you need to import the ctypes.jsm code module.
Plug-in Basics - Plugins
plug-ins and helper applications before plug-ins, there were helper applications.
URLs - Plugins
wysiwyg placed before another url; displays a page that javascript has updated using document.write.
Version, UI, and Status Information - Plugins
for this reason, your message is always displayed, but you have no control over how long it stays in the status line before another message replaces it.
Plugin Roadmap for Firefox - Plugins
2019 in september 2019, firefox 69 will remove the "always activate" flash option so we always ask for user permission before activating flash on a website.
Debugging service workers - Firefox Developer Tools
getting your service worker to register before you can look at your service worker in action in the applications panel, you need to successfully register it.
Browser Console - Firefox Developer Tools
note: you can restart the browser with the command ctrl + alt + r (windows, linux) or cmd + alt + r (mac) this command restarts the browser with the same tabs open as before the restart.
Examine, modify, and watch variables - Firefox Developer Tools
to see the docs for the old debugger, please visit debugger (before firefox 52).
Debugger keyboard shortcuts - Firefox Developer Tools
note: before firefox 66, the combination ctrl + shift + s on windows and linux or cmd + opt + s on macos would open/close the debugger.
Using the Debugger map scopes feature - Firefox Developer Tools
when you click the increment button on the page and hit the breakpoint, an additional section is added to the right-hand panel below the call stack to display variables mapped from the original scope, like this: as useful as this is, it would be even nicer if you could view the original code (before it was packages into the "bundle.js" file.
Debugger - Firefox Developer Tools
code gathering objects by class name may need to examine them further before trying to use them.
Debugger-API - Firefox Developer Tools
all these types follow some general conventions, which you should look through before drilling down into any particular type’s specification.
DevTools API - Firefox Developer Tools
this event is emitted before the corresponding {toolid}-selected event.
JSON viewer - Firefox Developer Tools
before firefox 53, the json viewer is enabled by default only in firefox developer edition and firefox nightly.
Dominators view - Firefox Developer Tools
to enable this, you must check the box labeled "record call stacks" before you run the code that allocates the objects.
Network request list - Firefox Developer Tools
you can filter by plain text (in which case the text is used to find partial matches; entering "for" will match any message that contains the word "for") or—as of firefox 75—using regular expressions (by writing the regexp bracketed within slashes; "/.+corp.*/" will look for any occurrence of "corp" which has at least one character before it and may or may not have any characters after it, for example).
Page inspector 3-pane mode - Firefox Developer Tools
note: the 3-pane inspector is already enabled in nightly/developer edition before firefox 62.
Examine and edit CSS - Firefox Developer Tools
displaying pseudo-elements the rule view displays the following pseudo-elements, if they are applied to the selected element: ::after ::backdrop ::before ::first-letter ::first-line ::selection :-moz-color-swatch :-moz-number-spin-box :-moz-number-spin-down :-moz-number-spin-up :-moz-number-text :-moz-number-wrapper :-moz-placeholder :-moz-progress-bar :-moz-range-progress :-moz-range-thumb :-moz-range-track :-moz-selection if the selected element has pseudo-elements applied to it, they are displayed before the selected element but...
Work with animations - Firefox Developer Tools
starting in firefox 48, it will show animations applied to the ::before and ::after pseudo-elements.
UI Tour - Firefox Developer Tools
note that before firefox 50, the box model view did not appear in the "computed view" tab, but had its own tab.
Allocations - Firefox Developer Tools
to enable the allocations view, you must check "record allocations" in the performance tool settings, before recording a profile.
Intensive JavaScript - Firefox Developer Tools
requestanimationframe() tells the browser to run the given function in each frame, just before it performs a repaint.
UI Tour - Firefox Developer Tools
the allocations view only appears if you checked "record allocations" in the performance tool settings, before recording a profile: to learn much more about the allocations view, see the separate allocations page.
Web Console Helpers - Firefox Developer Tools
--delay number the number of seconds to delay before taking the screenshot.
The JavaScript input interpreter - Firefox Developer Tools
--delay number the number of seconds to delay before taking the screenshot.
Web Console UI Tour - Firefox Developer Tools
instant evaluation: when enabled, the interpreter displays the evaluated results of an expression, when possible, before you press enter to submit it.
Web Console remoting - Firefox Developer Tools
"title": newtitle, "nativeconsoleapi": true|false } getcachedmessages(types, onresponse) the webconsoleclient.getcachedmessages(types, onresponse) method sends the following packet to the server: { "to": "conn0.console9", "type": "getcachedmessages", "messagetypes": [ "pageerror", "consoleapi" ] } the getcachedmessages packet allows one to retrieve the cached messages from before the web console was open.
Firefox Developer Tools
(note: this feature is not turned on by default and must be enabled in settings before the icon will appear.) toggles responsive design mode.
AbortController.abort() - Web APIs
a fetch request) before it has completed.
AbortController - Web APIs
methods abortcontroller.abort() aborts a dom request before it has completed.
Animation.oncancel - Web APIs
the cancel event can be triggered manually with animation.cancel() when the animation enters the "idle" play state from another state, such as when the animation is removed from an element before it finishes playing creating a new animation that is initially idle does not trigger a cancel event on the new animation.
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
before dom4 this api was defined within the node interface.
Attr.prefix - Web APIs
WebAPIAttrprefix
before dom4 this api was defined within the node interface.
Attr - Web APIs
WebAPIAttr
insertbefore() modify the value of attr.value instead.
AudioBufferSourceNode.playbackRate - Web APIs
when set to another value, the audiobuffersourcenode resamples the audio before sending it to the output.
AudioContext.createMediaElementSource() - Web APIs
example this simple example creates a source from an <audio> element using createmediaelementsource(), then passes the audio through a gainnode before feeding it into the audiodestinationnode for playback.
AudioContext - Web APIs
you need to create an audiocontext before you do anything else, as everything happens inside a context.
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
for example, you might send the audio from a mediaelementaudiosourcenode—that is, the audio from an html5 media element such as <audio>—through a band pass filter implemented using a biquadfilternode to reduce noise before then sending the audio along to the speakers.
AudioProcessingEvent - Web APIs
for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
AudioScheduledSourceNode.stop() - Web APIs
note: if a scheduled stop time occurs before the node's scheduled start time, the node never starts to play.
AudioScheduledSourceNode - Web APIs
unless stated otherwise, nodes based upon audioscheduledsourcenode output silence when not playing (that is, before start() is called and after stop() is called).
BaseAudioContext.createScriptProcessor() - Web APIs
for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
Battery Status API - Web APIs
this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss.
BiquadFilterNode.getFrequencyResponse() - Web APIs
the two output arrays, magresponseoutput and phaseresponseoutput, must be created before calling this method; they must be the same size as the array of input frequency values (frequencyarray).
BlobBuilder - Web APIs
if the value you specify isn't a blob, arraybuffer, or string, the value is coerced to a string before being appended to the blob.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
note that before playing full audio file will be downloaded.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied.
CSSPseudoElement.type - Web APIs
syntax var typeofpseudoelement = csspseudoelement.type; value a cssomstring containing one of the following values: "::before" "::after" "::marker" examples the example below demonstrates the relationship between csspseudoelement.type and element.pseudo(): const myelement = document.queryselector('q'); const myselector = '::after'; const csspseudoelement = myelement.pseudo(myselector); const typeofpseudoelement = csspseudoelement.type; console.log(myselector === typeofpseudoelement); // outputs true specifications specification status comment css pseudo-elements level 4the definition of 'type' in ...
CSSPseudoElement - Web APIs
const element = document.queryselector('q'); const csspseudoelement = element.pseudo('::before'); console.log(csspseudoelement.element); // outputs [object htmlquoteelement] console.log(csspseudoelement.type); // outputs '::before' specifications specification status comment css pseudo-elements level 4the definition of 'csspseudoelement' in that specification.
CSSStyleDeclaration.removeProperty() - Web APIs
return value oldvalue is a domstring equal to the value of the css property before it was removed.
CSSStyleRule.style - Web APIs
syntax styleobj = cssrule.style example function stilo() { alert(document.stylesheets[0].cssrules[0].style.csstext); } // displays "background-color: gray;" notes the declaration block is that part of the style rule that appears within the braces and that actually provides the style definitions (for the selector, the part that comes before the braces).
CSSStyleSheet.insertRule() - Web APIs
it supplements insertrule() with a function that separates the selector from the rules before sending the arguments to the default native insertrule().
Using the CSS Painting API - Web APIs
by positioning some decorative generated content with ::before, or including background: linear-gradient(yellow, yellow) 0 15px / 200px 20px no-repeat; what makes the css painting api so interesting and powerful is that you can create complex images, passing variables, that automatically resize.
Using the CSS Typed Object Model - Web APIs
note the space before the 1.2rem.
Cache - Web APIs
WebAPICache
console.error(' error in fetch handler:', error); throw error; }); }) ); }); storing cookies in caches the fetch api requires set-cookie headers to be stripped before returning a response object from fetch().
CacheStorage.delete() - Web APIs
examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated.
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
examples in this code snippet we wait for an activate event, and then run a waituntil() block that clears up any old, unused caches before a new service worker is activated.
CanvasRenderingContext2D.beginPath() - Web APIs
html <canvas id="canvas"></canvas> javascript the beginpath() method is called before beginning each line, so that they may be drawn with different colors.
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
the starting point is the latest point in the current path, which can be changed using moveto() before creating the bézier curve.
CanvasRenderingContext2D.clearRect() - Web APIs
make sure to call beginpath() before starting to draw new items after calling clearrect().
CanvasRenderingContext2D.clip() - Web APIs
instead, you'd have to use rect() to add a rectangular shape to the path before calling clip().
CanvasRenderingContext2D.drawWindow() - Web APIs
bgcolor a domstring that specifies the color the canvas is filled with before the window is rendered into it.
CanvasRenderingContext2D.font - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = 'bold 48px serif'; ctx.stroketext('hello world', 50, 100); result loading fonts with the css font loading api with the help of the fontface api, you can explicitly load fonts before using them in a canvas.
CanvasRenderingContext2D.globalAlpha - Web APIs
the canvasrenderingcontext2d.globalalpha property of the canvas 2d api specifies the alpha (transparency) value that is applied to shapes and images before they are drawn onto the canvas.
CanvasRenderingContext2D.putImageData() - Web APIs
javascript const canvas = document.createelement("canvas"); canvas.width = 1; canvas.height = 1; const context = canvas.getcontext("2d"); const imgdata = context.getimagedata(0, 0, canvas.width, canvas.height); const pixels = imgdata.data; pixels[0 + 0] = 1; pixels[0 + 1] = 127; pixels[0 + 2] = 255; pixels[0 + 3] = 1; console.log("before:", pixels); context.putimagedata(imgdata, 0, 0); const imgdata2 = context.getimagedata(0, 0, canvas.width, canvas.height); const pixels2 = imgdata2.data; console.log("after:", pixels2); the output might look like: before: uint8clampedarray(4) [ 1, 127, 255, 1 ] after: uint8clampedarray(4) [ 255, 255, 255, 1 ] specifications specification status comment html living stan...
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
the starting point is the latest point in the current path, which can be changed using moveto() before creating the quadratic bézier curve.
CanvasRenderingContext2D.resetTransform() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // draw a rotated rectangle ctx.rotate(45 * math.pi / 180); ctx.fillrect(60, 0, 100, 30); // reset transformation matrix to the identity matrix ctx.resettransform(); result continuing with a regular matrix whenever you're done drawing transformed shapes, you should call resettransform() before rendering anything else.
CanvasRenderingContext2D - Web APIs
compositing canvasrenderingcontext2d.globalalpha alpha value that is applied to shapes and images before they are composited onto the canvas.
Compositing and clipping - Web APIs
if we wanted to keep the original clipping path we could have saved the canvas state before creating the new one.
Drawing text - Web APIs
these properties might be familiar to you, if you have worked with css before.
Canvas tutorial - Web APIs
before you start using the <canvas> element is not very difficult, but you do need a basic understanding of html and javascript.
Clients.claim() - Web APIs
WebAPIClientsclaim
example the following example uses claim() inside service worker's "activate" event listener so that clients loaded in the same scope do not need to be reloaded before their fetches will go through this service worker.
Clipboard.read() - Web APIs
WebAPIClipboardread
be sure to review the compatibility table before using these methods.
Clipboard.readText() - Web APIs
the "clipboard-read" permission of the permissions api must be granted before you can read data from the clipboard.
Clipboard - Web APIs
WebAPIClipboard
check the compatibility tables for each method before using it.
ClipboardItem.types - Web APIs
then checking the types property for available types before utilizing the clipboarditem.gettype() method to return the blob object.
CloseEvent.initCloseEvent() - Web APIs
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
console - Web APIs
WebAPIConsole
styling console output you can use the %c directive to apply a css style to console output: console.log("this is %cmy stylish message", "color: yellow; font-style: italic; background-color: blue;padding: 2px"); the text before the directive will not be affected, but the text after the directive will be styled using the css declarations in the parameter.
Constraint validation API - Web APIs
the constraint validation api enables checking values that users have entered into form controls, before submitting the values to the server.
ConvolverNode.normalize - Web APIs
convolver.normalize = false; // must be set before the buffer, to take effect convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'normalize' in that specification.
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied.
CustomElementRegistry.upgrade() - Web APIs
the upgrade() method of the customelementregistry interface upgrades all shadow-containing custom elements in a node subtree, even before they are connected to the main document.
CustomElementRegistry - Web APIs
customelementregistry.upgrade() upgrades a custom element directly, even before it is connected to its shadow root.
CustomEvent.initCustomEvent() - Web APIs
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
DOMImplementation.createDocumentType() - Web APIs
the domimplementation.createdocumenttype() method returns a documenttype object which can either be used with domimplementation.createdocument upon document creation or can be put into the document via methods like node.insertbefore() or node.replacechild().
DirectoryReaderSync - Web APIs
basic concepts before you call the only method in this interface, readentries(), create the directoryentrysync object.
Document: DOMContentLoaded event - Web APIs
</script> checking whether loading is already complete domcontentloaded may fire before your script has a chance to run, so it is wise to check before adding a listener.
Document.adoptNode() - Web APIs
example const iframe = document.queryselector('iframe'); const iframeimages = iframe.contentdocument.queryselectorall('img'); const newparent = document.getelementbyid('images'); iframeimages.foreach(function(imgel) { newparent.appendchild(document.adoptnode(imgel)); }); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
Document: animationend event - Web APIs
if the animation aborts before reaching completion, such as if the element is removed from the dom or the animation is removed from the element, the animationend event is not fired.
Document.caretRangeFromPoint() - Web APIs
offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty); textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode && textnode.nodetype == 3) { let replacement = textnode.splittext(offset); let br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); } } let paragraphs = document.getelementsbytagname("p"); for (let i = 0; i < paragraphs.length; i++) { paragraphs[i].addeventlistener('click', insertbreakatpoint, false); } result ...
Document.cookie - Web APIs
WebAPIDocumentcookie
before chrome 52, this flag could appear with cookies from http domains.
Document.createRange() - Web APIs
example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); notes once a range is created, you need to set its boundary points before you can make use of most of its methods.
Document.createTouch() - Web APIs
note: before gecko 25.0, this method was defined on the documenttouch mixin.
Document.createTouchList() - Web APIs
note: before gecko 25.0, this method was defined on the documenttouch mixin.
Document.execCommand() - Web APIs
don't try using the return value to verify browser support before calling a command.
Document.fullscreenEnabled - Web APIs
example in this example, before attempting to request full-screen mode for a <video> element, the value of fullscreenenabled is checked, in order to avoid making the attempt when not available.
Document.getElementById() - Web APIs
when creating an element and assigning it an id, you have to insert the element into the document tree with node.insertbefore() or a similar method before you can access it with getelementbyid(): var element = document.createelement('div'); element.id = 'testqq'; var el = document.getelementbyid('testqq'); // el will be null!
Document.getElementsByTagName() - Web APIs
ome outer text</p> <button onclick="getallparaelems();"> show all p elements in document</button><br /> <button onclick="div1paraelems();"> show all p elements in div1 element</button><br /> <button onclick="div2paraelems();"> show all p elements in div2 element</button> </body> </html> notes when called on an html document, getelementsbytagname() lower-cases its argument before proceeding.
Document.getElementsByTagNameNS() - Web APIs
note: currently parameters in this method are case-sensitive, but they were case-insensitive in firefox 3.5 and before.
Document: keypress event - Web APIs
since this event has been deprecated, you should look to use beforeinput or keydown instead.
Document.onfullscreenchange - Web APIs
the document interface's onfullscreenchange property is an event handler for the fullscreenchange event that is fired immediately before a document transitions into or out of full-screen mode.
Document.open() - Web APIs
WebAPIDocumentopen
examples the following simple code opens the document and replaces its content with a number of different html fragments, before closing it again.
Document.popupNode - Web APIs
in these other cases, for example when calling the popup's showpopup method, you may wish to set the popupnode property directly beforehand.
Document.readyState - Web APIs
ntentloaded event document.onreadystatechange = function () { if (document.readystate === 'interactive') { initapplication(); } } readystatechange as an alternative to load event // alternative to load event document.onreadystatechange = function () { if (document.readystate === 'complete') { initapplication(); } } readystatechange as event listener to insert or modify the dom before domcontentloaded document.addeventlistener('readystatechange', event => { if (event.target.readystate === 'interactive') { initloader(); } else if (event.target.readystate === 'complete') { initapp(); } }); specifications specification status comment html living standardthe definition of 'document readiness' in that specification.
Document.title - Web APIs
WebAPIDocumenttitle
in xul, accessing document.title before the document is fully loaded has undefined behavior: document.title may return an empty string and setting document.title may have no effect.
Document: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
Document: transitionrun event - Web APIs
before any transition-delay has begun.
Document - Web APIs
WebAPIDocument
document.onbeforescriptexecute represents the event handling code for the beforescriptexecute event.
DocumentFragment - Web APIs
usage notes a common use for documentfragment is to create one, assemble a dom subtree within it, then append or insert the fragment into the dom using node interface methods such as appendchild() or insertbefore().
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
etnode; offset = range.offset; } else if (document.caretrangefrompoint) { range = document.caretrangefrompoint(e.clientx, e.clienty); textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode.nodetype == 3) { var replacement = textnode.splittext(offset); var br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); } } window.onload = function (){ var paragraphs = document.getelementsbytagname("p"); for (i=0 ; i < paragraphs.length; i++) { paragraphs[i].addeventlistener("click", insertbreakatpoint, false); } }; specifications specification status comment css object model (cssom) view modulethe definition of 'caretpositionfrompoint()' in that specifica...
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
so if you want to append a text node between hello and world, you will need to use insertbefore instead of appendchild.
EXT_float_blend - Web APIs
this ensures that content written before ext_float_blend was exposed by webgl will function as expected.
Element: click event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onclick if the button is pressed on one element and the pointer is moved outside the element before the button is released, the event is fired on the most specific ancestor element that contained both elements.
Element.getAnimations() - Web APIs
examples the following code snippet will wait for all animations on elem and its descendants to finish before removing the element from the document.
Element.getAttribute() - Web APIs
examples const div1 = document.getelementbyid('div1'); const align = div1.getattribute('align'); alert(align); // shows the value of align for the element with id="div1" description lower casing when called on an html element in a dom flagged as an html document, getattribute() lower-cases its argument before proceeding.
Element.getAttributeNode() - Web APIs
example // html: <div id="top" /> let t = document.getelementbyid("top"); let idattr = t.getattributenode("id"); alert(idattr.value == "top") notes when called on an html element in a dom flagged as an html document, getattributenode lower-cases its argument before proceeding.
Element.getElementsByTagName() - Web APIs
when called on an html element in an html document, getelementsbytagname lower-cases the argument before searching for it.
Element.hasAttributeNS() - Web APIs
example // check that the attribute exists before you set a value var d = document.getelementbyid("div1"); if (d.hasattributens( "http://www.mozilla.org/ns/specialspace/", "special-align")) { d.setattribute("align", "center"); } notes dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 names...
Element: keypress event - Web APIs
since this event has been deprecated, you should look to use beforeinput or keydown instead.
Element.namespaceURI - Web APIs
before dom4 this api was defined within the node interface.
Element.prefix - Web APIs
WebAPIElementprefix
before dom4 this api was defined within the node interface.
Element.scrollWidth - Web APIs
it can also include the width of pseudo-elements such as ::before or ::after.
Element: webkitmouseforcechanged event - Web APIs
this event first fires after the mousedown event and stops firing before the mouseup event.
Element: webkitmouseforcewillbegin event - Web APIs
safari for macos fires the non-standard webkitmouseforcewillbegin event at an element before firing the initial mousedown event.
Element - Web APIs
WebAPIElement
webkitmouseforcewillbegin fired before the mousedown event.
Event.cancelBubble - Web APIs
setting its value to true before returning from an event handler prevents propagation of the event.
Event.explicitOriginalTarget - Web APIs
(mozilla-specific) if the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs.
Event.originalTarget - Web APIs
the original target of the event before any retargetings.
Event.preventDefault() - Web APIs
egant function but does the job for the purposes of this example: var warningtimeout; var warningbox = document.createelement("div"); warningbox.classname = "warning"; function displaywarning(msg) { warningbox.innerhtml = msg; if (document.body.contains(warningbox)) { window.cleartimeout(warningtimeout); } else { // insert warningbox after mytextbox mytextbox.parentnode.insertbefore(warningbox, mytextbox.nextsibling); } warningtimeout = window.settimeout(function() { warningbox.parentnode.removechild(warningbox); warningtimeout = -1; }, 2000); } result notes calling preventdefault() during any stage of event flow cancels the event, meaning that any default action normally taken by the implementation as a result of the event will not occur.
EventTarget.removeEventListener() - Web APIs
the available options are: capture: a boolean which indicates that events of this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree.
FetchEvent.replacesClientId - Web APIs
this could be used to access/communicate with a client that will imminently be replaced, right before a navigation.
FileReader.readAsDataURL() - Web APIs
, function () { var image = new image(); image.height = 100; image.title = file.name; image.src = this.result; preview.appendchild( image ); }, false); reader.readasdataurl(file); } } if (files) { [].foreach.call(files, readandpreview); } } note: the filereader() constructor was not supported by internet explorer for versions before 10.
FileSystemEntry.remove() - Web APIs
directories must be empty before they can be removed.
FileSystemEntry.toURL() - Web APIs
code that makes use of this might look like this: let img = document.createelement("img"); img.src = imagefileentry.tourl(); document.body.appendchild(img); assuming the scenario mentioned before the code, the result would be html that looks like this being appended to the end of the document: <img src="filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg"> browser compatibility the compatibility table on this page is generated from structured data.
FileHandle API - Web APIs
if for some reason a problem occurs before that, you can lose the results of some operations.
File and Directory Entries API support in Firefox - Web APIs
over time, a number of popular sites and web applications came to use it, often without providing any means of falling back to standard apis or even checking to be sure the api is available before using it.
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...
Using FormData Objects - Web APIs
ou can also append additional data to the formdata object between retrieving it from a form and sending it, like this: var formelement = document.queryselector("form"); var formdata = new formdata(formelement); var request = new xmlhttprequest(); request.open("post", "submitform.php"); formdata.append("serialnumber", serialnumber++); request.send(formdata); this lets you augment the form's data before sending it along, to include additional information that's not necessarily user-editable.
FormData.has() - Web APIs
WebAPIFormDatahas
example the following line creates an empty formdata object: var formdata = new formdata(); the following snippet shows the results of testing for the existence of username in the formdata object, before and after appending a username value to it with formdata.append: formdata.has('username'); // returns false formdata.append('username', 'chris'); formdata.has('username'); // returns true specifications specification status comment xmlhttprequestthe definition of 'has()' in that specification.
Guide to the Fullscreen API - Web APIs
let's consider this <video> element: <video controls id="myvideo"> <source src="somevideo.webm"></source> <source src="somevideo.mp4"></source> </video> we can put that video into full-screen mode as follows: var elem = document.getelementbyid("myvideo"); if (elem.requestfullscreen) { elem.requestfullscreen(); } this code checks for the existence of the requestfullscreen() method before calling it.
GainNode - Web APIs
WebAPIGainNode
it is an audionode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output.
Geolocation.getCurrentPosition() - Web APIs
timeout: integer (milliseconds) - amount of time before the error callback is invoked, if 0 it will never invoke.
GeolocationPositionError.code - Web APIs
3 timeout the time allowed to acquire the geolocation, defined by positionoptions.timeout information that was reached before the information was obtained.
GeolocationPositionError - Web APIs
3 timeout the time allowed to acquire the geolocation, defined by positionoptions.timeout information was reached before the information was obtained.
Using the Geolocation API - Web APIs
this object allows you to specify whether to enable high accuracy, a maximum age for the returned position value (up until this age it will be cached and reused if the same position is requested again; after this the browser will request fresh position data), and a timeout value that dictates how long the browser should attempt to get the position data for, before it times out.
GlobalEventHandlers.onanimationcancel - Web APIs
javascript before we get to the animation code, we define a function which logs information to a box on the user's screen.
GlobalEventHandlers.onanimationend - Web APIs
javascript content before we get to the animation code, we define a function which logs information to a box on the user's screen.
GlobalEventHandlers.onanimationstart - Web APIs
javascript content before we get to the animation code, we define a function which logs information to a box on the user's screen.
GlobalEventHandlers.onclose - Web APIs
note: to handle the closing of a window, use onbeforeunload or onunload.
GlobalEventHandlers.oninvalid - Web APIs
the validity of submittable elements is checked before submitting their owner form, or after the checkvalidity() method of the element or its owner form is called.
GlobalEventHandlers.ontransitionend - Web APIs
if the transition is removed from its target node before the transition completes execution, the transitionend event won't be generated.
GlobalEventHandlers - Web APIs
creation of globaleventhandlers (properties where on the target before it).
Audio() - Web APIs
if a url is specified, the browser begins to asynchronously load the media resource before returning the new object.
msAudioCategory - Web APIs
note that you must set the msaudiocategory before setting the src property in code.
HTMLCanvasElement.toDataURL() - Web APIs
= apix[npixel + 1] = apix[npixel] = (apix[npixel] + apix[npixel + 1] + apix[npixel + 2]) / 3; } octx.putimagedata(oimgdata, 0, 0); ograyimg = new image(); ograyimg.src = ocanvas.todataurl(); ograyimg.onmouseover = showcolorimg; ocolorimg.onmouseout = showgrayimg; octx.clearrect(0, 0, nwidth, nheight); ocolorimg.style.display = "none"; ocolorimg.parentnode.insertbefore(ograyimg, ocolorimg); } } specifications specification status comment html living standardthe definition of 'htmlcanvaselement.todataurl' in that specification.
HTMLCanvasElement: webglcontextrestored event - Web APIs
once the context is restored, webgl resources such as textures and buffers that were created before the context was lost are no longer valid.
HTMLCollection - Web APIs
note: this interface is called htmlcollection for historical reasons (before the modern dom, collections implementing this interface could only have html elements as their items).
HTMLElement: animationend event - Web APIs
if the animation aborts before reaching completion, such as if the element is removed from the dom or the animation is removed from the element, the animationend event is not fired.
HTMLElement.offsetHeight - Web APIs
it does not include the height of pseudo-elements such as ::before or ::after.
HTMLElement.offsetWidth - Web APIs
it does not include the width of pseudo-elements such as ::before or ::after.
HTMLElement - Web APIs
input events beforeinput fired when the value of an <input>, <select>, or <textarea> element is about to be modified.
HTMLHyperlinkElementUtils.password - Web APIs
the htmlhyperlinkelementutils.password property is a usvstring containing the password specified before the domain name.
HTMLHyperlinkElementUtils.username - Web APIs
the htmlhyperlinkelementutils.username property is a usvstring containing the username specified before the domain name.
HTMLImageElement.alt - Web APIs
view the css editors: if you change the css below, please be sure to close the details box using the toggle at the top of the css view before saving.
HTMLImageElement.complete - Web APIs
so the fixredeyecommand() function, which is called by the button that triggers red-eye removal, checks the value of the lightbox image's complete property before attempting to do its work.
HTMLImageElement.naturalHeight - Web APIs
this is done in response to the window's load event handler, in order to ensure that the image is available before attempting to examine its width and height.
HTMLImageElement.naturalWidth - Web APIs
this is done in response to the window's load event handler, in order to ensure that the image is available before attempting to examine its width and height.
HTMLImageElement.srcset - Web APIs
space characters, other than the whitespace separating the url and the corresponding condition descriptor, are ignored; this includes both leading and trailing space, as well as space before or after each comma.
HTMLInputElement: invalid event - Web APIs
the validity of submittable elements is checked before submitting their owner <form>, or after the checkvalidity() method of the element or its owner <form> is called.
HTMLInputElement.setRangeText() - Web APIs
"start"moves the selection to just before the inserted text.
HTMLInputElement.stepDown() - Web APIs
if the value before invoking the stepdown() method is invalid, for example, if it doesn't match the constraints set by the step attribute, invoking the stepdown() method will return a value that does match the form controls constraints.
HTMLInputElement.stepUp() - Web APIs
if the value before invoking the stepup() method is invalid—for example, if it doesn't match the constraints set by the step attribute—invoking the stepup() method will return a value that does match the form controls constraints.
HTMLInputElement - Web APIs
required boolean: returns / sets the element's required attribute, indicating that the user must fill in a value before submitting a form.
HTMLMediaElement.currentTime - Web APIs
also, media whose timeline doesn't begin at 0 seconds cannot be seeked to a time before its timeline's earliest time.
HTMLMediaElement.load() - Web APIs
the process of aborting any ongoing activities will cause any outstanding promises returned by play() being resolved or rejected as appropriate based on their status before the loading of new media can begin.
HTMLMediaElement.play() - Web APIs
note: the play() method may cause the user to be asked to grant permission to play the media, resulting in a possible delay before the returned promise is resolved.
HTMLMediaElement - Web APIs
the best time to set a new length is after the loadedmetadata event fires, when the audio info is known, but before the audio has started or mozaudioavailable events have begun firing.
HTMLOrForeignElement.dataset - Web APIs
camelcase to dash-style conversion the opposite transformation, which maps a key to an attribute name, uses the following rules: restriction: before the transformation, a dash must not be immediately followed by an ascii lowercase letter a to z; the prefix data- is added; any ascii uppercase letter a to z is transformed into a dash, followed by its lowercase counterpart; other characters are left unchanged.
HTMLSelectElement - Web APIs
htmlselectelement.required a boolean reflecting the required html attribute, which indicates whether the user is required to select a value before submitting the form.
HTMLSpanElement - Web APIs
recommendation initial definition, as <span> was associated with an htmlelement before that.
HTMLTableRowElement - Web APIs
htmltablerowelement.insertcell() inserts a new cell just before the given position in the row.
HTMLTableSectionElement - Web APIs
htmltablesectionelement.insertrow() inserts a new row just before the given position in the section.
HTMLTextAreaElement - Web APIs
required boolean: returns / sets the element's required attribute, indicating that the user must specify a value before submitting the form.
The HTML DOM API - Web APIs
beforeunloadevent hashchangeevent history location pagetransitionevent popstateevent web components interfaces these interfaces are used by the web components api to create and manage the available custom elements.
Recommended Drag Types - Web APIs
if it appears, it should appear before the text/uri-list type.
IDBCursor.continuePrimaryKey() - Web APIs
calling this method more than once before new cursor data has been loaded - for example, calling continueprimarykey() twice from the same onsuccess handler - results in an invalidstateerror being thrown on the second call because the cursor’s got value flag has been unset.
IDBDatabase.createObjectStore() - Web APIs
example // let us open our database var request = window.indexeddb.open("todolist", 4); // this handler is called when a new version of the database // is created, either when one has not been created before // or when a new version number is submitted by calling // window.indexeddb.open().
IDBDatabase - Web APIs
this is used a lot later on db = dbopenrequest.result; // run the displaydata() function to populate the task // list with all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version number has been // submitted via the window.indexeddb.open line above dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database using // idbdatabase.createobjectstore var objectstore = db.createobjectstore("t...
IDBObjectStore.createIndex() - Web APIs
db = request.result; // run the displaydata() function to populate the task list with // all the to-do list data already in the idb displaydata(); }; // this handler fires when a new database is created and indicates // either that one has not been created before, or a new version // was submitted with window.indexeddb.open().
IDBObjectStore.deleteIndex() - Web APIs
this is used a lot below db = this.result; // run the displaydata() function to populate the task list with all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of the database needs to be created // either one has not been created before, or a new version number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist...
IDBObjectStore - Web APIs
db = dbopenrequest.result; }; // this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version number has been // submitted via the window.indexeddb.open line above dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); //...
IDBOpenDBRequest.onblocked - Web APIs
either one has not been created // before, or a new version number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent browsers request.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todoli...
IDBOpenDBRequest.onupgradeneeded - Web APIs
either one has not been created // before, or a new version number has been submitted via the // window.indexeddb.open line above.
IDBOpenDBRequest - Web APIs
this is used a lot below db = dbopenrequest.result; // run the displaydata() function to populate the task // listwith all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version number has been // submitted via the window.indexeddb.open line above // it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolis...
IDBVersionChangeRequest.setVersion() - Web APIs
for older webkit browsers, call this method before creating or deleting an object store.
IIRFilterNode.getFrequencyResponse() - Web APIs
the two output arrays, magresponseoutput and phaseresponseoutput, must be created before calling this method; they must be the same size as the array of input frequency values (frequencyarray).
IdleDeadline.timeRemaining() - Web APIs
the callback can call this method at any time to determine how much time it can continue to work before it must return.
IdleDeadline - Web APIs
your callback can call this repeatedly to see if there's enough time left to do more work before returning.
InputEvent() - Web APIs
iscomposing: (optional) a boolean indicating that the event is part of a composition session, meaning it is after a compositionstart event but before a compositionend event.
InputEvent.isComposing - Web APIs
the inputevent.iscomposing read-only property returns a boolean value indicating if the event is fired after compositionstart and before compositionend.
InputEvent - Web APIs
inputevent.iscomposingread only returns a boolean value indicating if the event is fired after compositionstart and before compositionend.
Timing element visibility with the Intersection Observer API - Web APIs
then it calculates the number of minutes and seconds elapsed before setting the timer's innertext to a string representing that time in the form m:ss.
KeyboardEvent.initKeyEvent() - Web APIs
initkeyevent() must be called to set the event before it is dispatched.
KeyboardEvent.isComposing - Web APIs
after compositionstart and before compositionend.
Key Values - Web APIs
keycode_tv_timer_programming (258) [1] firefox added proper support for the "tv" key in firefox 37; before that, this key generated the key code "live".
LayoutShiftAttribution - Web APIs
layoutshiftattribution.previousrect returns a domrect representing the position of the element before the shift.
Location: password - Web APIs
WebAPILocationpassword
the password property of the location interface is a usvstring containing the password specified before the domain name.
Location: username - Web APIs
WebAPILocationusername
the username property of the location interface is a usvstring containing the username specified before the domain name.
Location - Web APIs
WebAPILocation
id="hash" title="hash">#bang</span></span> css html, body {height:100%;} html {display:table; width:100%;} body {display:table-cell; text-align:center; vertical-align:middle; font-family:georgia; font-size:230%; line-height:1em; white-space:nowrap;} [title] {position:relative; display:inline-block; box-sizing:border-box; /*border-bottom:.5em solid;*/ line-height:2em; cursor:pointer;} [title]:before {content:attr(title); font-family:monospace; position:absolute; top:100%; width:100%; left:50%; margin-left:-50%; font-size:40%; line-height:1.5; background:black;} [title]:hover:before, :target:before {background:black; color:yellow;} [title] [title]:before {margin-top:1.5em;} [title] [title] [title]:before {margin-top:3em;} [title]:hover, :target {position:relative; z-index:1; outline:50em so...
LockManager.request() - Web APIs
}); } catch (ex) { if (ex.name === 'aborterror') { // the request aborted before it could be granted.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
however, if something goes wrong before that, some operations can be lost.
MSCandidateWindowShow - Web APIs
mscandidatewindowshow fires immediately after the input method editor (ime) candidate window is set to appear, but before it renders.
MSCandidateWindowUpdate - Web APIs
mscandidatewindowupdate fires after the input method editor (ime) candidate window has been identified as needing to change size, but before any visual updates have rendered.
MediaDevices.getUserMedia() - Web APIs
first, getusermedia() must always get user permission before opening any media gathering input such as a webcam or microphone.
MediaElementAudioSourceNode - Web APIs
example this simple example creates a source from an <audio> element using createmediaelementsource(), then passes the audio through a gainnode before feeding it into the audiodestinationnode for playback.
MediaTrackSettings.noiseSuppression - Web APIs
noise suppression automatically filters the audio to remove background noise, hum caused by equipment, and the like from the sound before delivering it to your code.
MediaTrackSupportedConstraints - Web APIs
instead, the specified constraints will be applied, with any unrecognized constraints stripped from the request.that can lead to confusing and hard to debug errors, so be sure to use getsupportedconstraints() to retrieve this information before attempting to establish constraints if you need to know the difference between silently ignoring a constraint and a constraint being accepted.
Using the Media Capabilities API - Web APIs
they will be a useful feature of the api once available, but there is a high probability of the display capabilities functionality changing a great deal before browser implementations arrive.
MessagePort: message event - Web APIs
init', targetorigin, [channel.port2]); the target can receive the port and start listening for messages on it using code like this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.start(); }); note that the listener must call messageport.start() before any messages will be delivered to this port.
MessagePort: messageerror event - Web APIs
ors on it using code like this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.addeventlistener('messageerror', (event) => { console.error(event.data); }); myport.start(); }); note that the listener must call messageport.start() before any messages will be delivered to this port.
MouseEvent.initMouseEvent() - Web APIs
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
msFirstPaint - Web APIs
example the following example shows how to calculate the time that is required to request the document before the document begins to display for the user.
msRealTime - Web APIs
you must set the msrealtime before setting the src property in code.
MutationObserver.takeRecords() - Web APIs
example in this example, we demonstrate how to handle any undelivered mutationrecords by calling takerecords() just before disconnecting the observer.
Navigator.credentials - Web APIs
}); } else { //handle sign-in the way you did before.
Navigator.mediaSession - Web APIs
note that the code begins by ensuring that the navigator.mediasession property is available before attempting to use it.
Online and offline events - Web APIs
"online" : "offline"; status.classname = condition; status.innerhtml = condition.touppercase(); log.insertadjacenthtml("beforeend", "event: " + event.type + "; status: " + condition); } window.addeventlistener('online', updateonlinestatus); window.addeventlistener('offline', updateonlinestatus); }); a touch of css #status { position: fixed; width: 100%; font: bold 1em sans-serif; color: #fff; padding: 0.5em; } #log { padding: 2.5em 0.5em 0.5em; font: 1em sans-serif; } .online { background: gre...
Node.compareDocumentPosition() - Web APIs
example const head = document.head; const body = document.body; if (head.comparedocumentposition(body) & node.document_position_following) { console.log('well-formed document'); } else { console.error('<head> is not before <body>'); } note: because the result returned by comparedocumentposition() is a bitmask, the bitwise and operator must be used for meaningful results.
Node.nextSibling - Web APIs
WebAPINodenextSibling
after the closing tag of an element and before the opening tag of the next).
Node.replaceChild() - Web APIs
WebAPINodereplaceChild
note the idiosyncratic argument order (new before old).
NonDocumentTypeChildNode.nextElementSibling - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnextelementsiblingchrome full support 4edge full support 12notes full support 12notes notes before edge 79, this property was only implemented for element, not for characterdata.firefox full support 3.5ie partial support 9notes partial support 9notes notes only implemented for element, not for characterdata.
Notification.permission - Web APIs
examples the following snippet could be used if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.
Notification.requestPermission() - Web APIs
examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.
Notification - Web APIs
examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.
OscillatorNode.stop() - Web APIs
if the time is equal to or before the current audio context time, the oscillator will stop playing immediately.
ParentNode - Web APIs
parentnode.prepend() inserts a set of node objects or domstring objects before the first child of the parentnode.
PasswordCredential.additionalData - Web APIs
it then stores the form object in the additionaldata parameter, before sending it to server in a call to fetch.
Path2D - Web APIs
WebAPIPath2D
the starting point is the last point in the current path, which can be changed using moveto() before creating the bézier curve.
PaymentCurrencyAmount.value - Web APIs
you need to convert the value to this format before submitting the payment.
PaymentDetailsUpdate - Web APIs
this can be done either by calling the paymentrequestupdateevent.updatewith() method or by using the paymentrequest.show() method's detailspromise parameter to provide a promise that returns a paymentdetailsupdate that updates the payment information before the user interface is even enabled for the first time.
PaymentRequest.canMakePayment() - Web APIs
you can call this before calling show() to provide a streamlined user experience when the user's browser can't handle any of the payment methods you accept.
PaymentRequest.onpaymentmethodchange - Web APIs
to make sure you receive the event, you should add event listeners to paymentrequest object after instantiation, but before you call show().
PaymentRequest.onshippingaddresschange - Web APIs
to make sure an updated address is included when sending payment information to the server, you should add event listeners for a paymentrequest object after instantiation, but before the call to show().
PaymentRequest.onshippingoptionchange - Web APIs
to make sure an updated option is included when sending payment information to the server, you should add event listeners for a paymentrequest object after instantiation, but before the call to show().
PaymentRequest: paymentmethodchange event - Web APIs
before the event handler returns, it calls the event's paymentmethodchangeevent.updatewith.updatewith() method to integrate the changes into the request.
PaymentRequest.show() - Web APIs
examples in the following example, a paymentrequest object is instantiated before the show() method is called.
PaymentRequest - Web APIs
methods paymentrequest.canmakepayment() secure context indicates whether the paymentrequest object can make a payment before calling show().
Payment processing concepts - Web APIs
terminology before getting into the details of how the api operates, there are tems you'll need to know.
Payment Request API - Web APIs
paymentdetailsupdate an object describing changes that need to be made to the payment details in the event that the server needs to update information following the instantiation of the payment interface but before the user begins to interact with it.
PerformanceEntry.entryType - Web APIs
function run_performanceentry() { // check for feature support before continuing if (performance.mark === undefined) { console.log("performance.mark not supported"); return; } // create a performance entry named "begin" via the mark() method performance.mark("begin"); // check the entrytype of all the "begin" entries var entriesnamedbegin = performance.getentriesbyname("begin"); for (var i=0; i < entriesnamedbegin.length; i++) { var typ...
PerformanceEntry.startTime - Web APIs
"resource" - returns the timestamp immediately before the browser starts fetching the resource.
PerformanceNavigation.redirectCount - Web APIs
the legacy performancenavigation.redirectcount read-only property returns an unsigned short representing the number of redirects done before reaching the page.
PerformanceNavigation - Web APIs
performancenavigation.redirectcount read only an unsigned short representing the number of redirects done before reaching the page.
PerformanceResourceTiming.workerStart - Web APIs
the workerstart read-only property of the performanceresourcetiming interface returns a domhighrestimestamp immediately before dispatching the fetchevent if a service worker thread is already running, or immediately before starting the service worker thread if it is not already running.
PerformanceTiming.domContentLoadedEventStart - Web APIs
the legacy performancetiming.domcontentloadedeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, right before the parser sent the domcontentloaded event, that is right after all the scripts that need to be executed right after parsing has been executed.
PerformanceTiming.domInteractive - Web APIs
check if you are in one of these cases before using this property as a proxy for the user experience of a web site's speed of loading.
PerformanceTiming.fetchStart - Web APIs
this moment is before the check to any application cache.
Using the Performance API - Web APIs
by calling this method before and after a task, the time it takes to do the task can be measured.
Pointer Lock API - Web APIs
ter lock on a canvas element: canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpointerlock; canvas.requestpointerlock() if a user has exited pointer lock via the default unlock gesture, or pointer lock has not previously been entered for this document, an event generated as a result of an engagement gesture must be received by the document before requestpointerlock will succeed.
Multi-touch interaction - Web APIs
it may be called multiple times (for example, if the user moves the pointer) before a different event type is fired.
PublicKeyCredentialCreationOptions.timeout - Web APIs
examples var publickey = { timeout: 6000, // accepting to wait for a minute before giving up.
PublicKeyCredentialCreationOptions - Web APIs
] } }; // create the new credential with the options above navigator.credentials.create(createcredentialoptions) .then(function (newcredentialinfo) { var attestationresponse = newcredentialinfo.response; var clientextensionsoutputs = newcredentialinfo.getclientextensionsresults(); // send the response to the relying party server // it will verify the content and integrity before // creating a new credential }).catch(function (err) { // deal with any error properly console.error(err); });; specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredentialcreationoptions dictionary' in that specification.
PushEvent.PushEvent() - Web APIs
full support 17firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support nochrome android full support ...
PushEvent.data - Web APIs
WebAPIPushEventdata
full support 17firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 44safari no support nowebview android no support nochrome android full support ...
PushManager.hasPermission() - Web APIs
full support 17firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 29safari no support nowebview android no support nochrome android full support ...
PushManager.supportedContentEncodings - Web APIs
full support 17firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 47safari no support nowebview android no support nochrome android full support ...
PushMessageData.arrayBuffer() - Web APIs
efox for androidopera for androidsafari on iossamsung internetarraybuffer experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support nochrome android full support ...
PushMessageData.blob() - Web APIs
roidfirefox for androidopera for androidsafari on iossamsung internetblob experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support nochrome android full support ...
PushMessageData.json() - Web APIs
roidfirefox for androidopera for androidsafari on iossamsung internetjson experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support nochrome android full support ...
PushMessageData.text() - Web APIs
roidfirefox for androidopera for androidsafari on iossamsung internettext experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support nochrome android full support ...
PushMessageData - Web APIs
messages received through the push api are sent encrypted by push services and then automatically decrypted by browsers before they are made accessible through the methods of the pushmessagedata interface.
PushSubscription.getKey() - Web APIs
rome for androidfirefox for androidopera for androidsafari on iossamsung internetgetkey()chrome full support 42edge full support 16firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 29safari no support nowebview android no support nochrome android full support ...
PushSubscription.options - Web APIs
hrome for androidfirefox for androidopera for androidsafari on iossamsung internetoptionschrome full support 42edge full support 16firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 29safari no support nowebview android no support nochrome android full support ...
RTCConfiguration.iceServers - Web APIs
while it can be useful to provide a second server as a fallback in case the first is offline, listing too many servers can delay the user's connection being established, depending on the network's performance and how many servers get used for negotiation before a connection is established.
RTCConfiguration - Web APIs
you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
RTCDTMFSender.toneBuffer - Web APIs
the comma (",") this character instructs the dialing process to pause for two seconds before sending the next character in the buffer.
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
the comma (",") this character instructs the dialing process to pause for two seconds before sending the next character in the buffer.
RTCDataChannel: close event - Web APIs
before any further data can be transferred using rtcdatachannel, a new data channel instance must be created.
RTCDataChannel.maxPacketLifeTime - Web APIs
this limits how long the browser can continue to attempt to transmit and retransmit the message before giving up.
RTCDataChannel.readyState - Web APIs
it is no longer possible to queue new messages to be sent, but previously queued messages may still be send or received before entering the "closed" state.
RTCDataChannel.send() - Web APIs
data sent before connecting is buffered if possible (or an error occurs if it's not possible), and is also buffered if sent while the connection is closing or closed.
RTCDataChannel - Web APIs
lifetime read only the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.maxretransmits read only the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.negotiated read only the read-only rtcdatachannel property negotiated indicates whether the rtcdatachannel's connection was negotiated by the web app (true) or by the webrtc layer (false).ordered read only the read-only rtcdatachannel property ordered indicates whether or not the data channel ...
RTCIceCandidate.usernameFragment - Web APIs
to do so, you can compare the value of usernamefragment to the current usernamefragment being used for the connection after receiving the candidate from the signaling server and before caling addicecandidate() to add it to the set of possible candidates.
RTCIceServer - Web APIs
every server in the list will be contacted and tried out before one is selected to be used for negotiation.
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
since this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
since this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
RTCPeerConnection() - Web APIs
you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
if trickling isn't supported, or you aren't able to tell, you can check for a falsy value for this property and then wait until the value of icegatheringstate changes to "completed" before creating and sending the initial offer.
RTCPeerConnection.close() - Web APIs
make sure that you delete all references to the previous rtcpeerconnection before attempting to create a new one that connects to the same remote peer, as not doing so might result in some errors depending on the browser.
RTCPeerConnection.getStreamById() - Web APIs
example var stream = pc.getstreambyid(mytrackid); if (stream) { console.log("found stream: " + stream.id); } polyfill running the following code before any other code will create rtcpeerconnection.prototype.getstreambyid() if it's not natively available.
RTCPeerConnection: iceconnectionstatechange event - Web APIs
this can happen when only the last checked candidate is successful, and the gathering and end-of-candidates signals both occur before the successful negotiation is completed.
RTCPeerConnection.ondatachannel - Web APIs
be sure to wait for the "open" event to be fired on the new rtcdatachannel before using it.
RTCPeerConnection.peerIdentity - Web APIs
if there's no target peer identity, setremotedescription() doesn't need to wait for validation to occur before it resolves.
RTCPeerConnection.setConfiguration() - Web APIs
if, for example, the rtcpeerconnection() constructor was called with no parameters, you would have to then call setconfiguration() to add ice servers before ice negotiation could begin.
RTCPeerConnection.setRemoteDescription() - Web APIs
when our promise fulfillment handler is called, indicating that this has been done, we create a stream, add it to the connection, then create an sdp answer and call setlocaldescription() to set that as the configuration at our end of the call before forwarding that answer to the caller.
RTCPeerConnection.signalingState - Web APIs
for example, if you receive an answer while the signalingstate isn't "have-local-offer", you know that something is wrong, since you should only receive answers after creating an offer but before an answer has been received and passed into rtcpeerconnection.setlocaldescription().
RTCRtpCodecParameters - Web APIs
in addition to being the type of the rtcrtpparameters.codecs property, it's used when calling rtcrtptransceiver.setcodecpreferences() to configure a transceiver's codecs before beginning the offer/answer process to establish a webrtc peer connection.
RTCRtpReceiver.getCapabilities() static function - Web APIs
it's simply a means of determining what might be usable before starting to try to access media.
RTCRtpSender.getCapabilities() static function - Web APIs
it's simply a means of determining what might be usable before starting to try to access media.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
when preparing to open an rtcpeerconnection, you can change the codec parameters from the user agent's default configuration by calling setcodecparameters() before calling either rtcpeerconnection.createoffer() or createanswer().
Range.compareBoundaryPoints() - Web APIs
syntax compare = range.compareboundarypoints(how, sourcerange); return value compare a number, -1, 0, or 1, indicating whether the corresponding boundary-point of the range is respectively before, equal to, or after the corresponding boundary-point of sourcerange.
Range.comparePoint() - Web APIs
the range.comparepoint() method returns -1, 0, or 1 depending on whether the referencenode is before, the same as, or after the range.
Range.getBoundingClientRect() - Web APIs
the bounding client rectangle contains everything selected in the range.</p> css #highlight { background: yellow; position: absolute; z-index: -1; } p { width: 200px; } javascript const range = document.createrange(); range.setstartbefore(document.getelementsbytagname('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); const clientrect = range.getboundingclientrect(); const highlight = document.getelementbyid('highlight'); highlight.style.left = `${clientrect.x}px`; highlight.style.top = `${clientrect.y}px`; highlight.style.width = `${clientrect.width}px`; highlight.style.height = `${clientrect.hei...
Range.toString() - Web APIs
WebAPIRangetoString
look at the output below.</p> <p id="log"></p> javascript const range = document.createrange(); range.setstartbefore(document.getelementsbytagname('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); document.getelementbyid('log').textcontent = range.tostring(); result specifications specification status comment domthe definition of 'range.tostring()' in that specification.
ReadableStream.ReadableStream() - Web APIs
this takes two parameters: highwatermark a non-negative integer — this defines the total number of chunks that can be contained in the internal queue before backpressure is applied.
ReportingObserver() - Web APIs
buffered: a boolean that defines whether the reports that were generated before the observer was able to be created should be observable (true) or not (false).
ReportingObserverOptions - Web APIs
buffered a boolean that defines whether the reports that were generated before the observer was able to be created should be observable (true) or not (false).
Reporting API - Web APIs
the callback runs when observation starts an options dictionary that allows you to specify the type of reports to collect, and whether the reports that were generated before the observer was able to be created should be observable (buffered: true).
ResizeObserver - Web APIs
implementations should, if they follow the specification, invoke resize events before paint and after layout.
Using the Resource Timing API - Web APIs
the encodedbodysize property returns the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
SVGAnimatedAngle - Web APIs
interface overview also implement none methods none properties readonly svgangle baseval readonly svgangle animval normative document svg 1.1 (2nd edition) properties name type description baseval svgangle the base value of the given attribute before applying any animations.
SVGAnimatedBoolean - Web APIs
interface overview also implement none methods none properties readonly boolean baseval readonly boolean animval normative document svg 1.1 (2nd edition) properties name type description baseval boolean the base value of the given attribute before applying any animations.
SVGAnimatedEnumeration - Web APIs
interface overview also implement none methods none properties unsigned short baseval readonly unsigned short animval normative document svg 1.1 (2nd edition) properties name type description baseval unsigned short the base value of the given attribute before applying any animations.
SVGAnimatedInteger - Web APIs
interface overview also implement none methods none properties readonly long baseval readonly long animval normative document svg 1.1 (2nd edition) properties name type description baseval long the base value of the given attribute before applying any animations.
SVGAnimatedLength - Web APIs
interface overview also implement none methods none properties readonly svglength baseval readonly svglength animval normative document svg 1.1 (2nd edition) properties name type description baseval svglength the base value of the given attribute before applying any animations.
SVGAnimatedLengthList - Web APIs
interface overview also implement none methods none properties readonly svglengthlist baseval readonly svglengthlist animval normative document svg 1.1 (2nd edition) properties name type description baseval svglengthlist the base value of the given attribute before applying any animations.
SVGAnimatedNumber - Web APIs
interface overview also implement none methods none properties float baseval readonly float animval normative document svg 1.1 (2nd edition) properties name type description baseval float the base value of the given attribute before applying any animations.
SVGAnimatedNumberList - Web APIs
interface overview also implement none methods none properties readonly svgnumberlist baseval readonly svgnumberlist animval normative document svg 1.1 (2nd edition) properties svganimatednumberlist.baseval read only is a svgnumberlist that represents the base value of the given attribute before applying any animations.
SVGAnimatedPreserveAspectRatio - Web APIs
interface overview also implement none methods none properties readonly float baseval readonly float animval normative document svg 1.1 (2nd edition) properties svganimatedpreserveaspectratio.baseval read only is a svgpreserveaspectratio that represents the base value of the given attribute before applying any animations.
SVGAnimatedRect - Web APIs
interface overview also implement none methods none properties readonly svgrect baseval readonly svgrect animval normative document svg 1.1 (2nd edition) properties name type description baseval svgrect the base value of the given attribute before applying any animations.
SVGAnimatedString.baseVal - Web APIs
baseval gets or sets the base value of the given attribute before any animations are applied.the base value of the given attribute before applying any animations.
SVGAnimatedTransformList - Web APIs
interface overview also implement none methods none properties readonly svgtransformlist baseval readonly svgtransformlist animval normative document svg 1.1 (2nd edition) properties name type description baseval svgtransformlist the base value of the given attribute before applying any animations.
SVGElement: abort event - Web APIs
the abort event is fired when page loading is stopped before an svg element has been allowed to load completely.
SVGElement - Web APIs
abort fired when page loading is stopped before an svg element has been allowed to load completely.
Screen.mozBrightness - Web APIs
the value's precision might be reduced before storing it.
ScriptProcessorNode.bufferSize - Web APIs
for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
ScriptProcessorNode.onaudioprocess - Web APIs
for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
ScriptProcessorNode - Web APIs
for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
Selection.rangeCount - Web APIs
before the user has clicked a freshly loaded page, the rangecount is 0.
Selection.setBaseAndExtent() - Web APIs
note: if the focus position appears before the anchor position in the document, the direction of the selection is reversed — the caret is placed at the beginning of the text rather the end, which matters for any keyboard command that might follow.
Sensor APIs - Web APIs
a brief example, shown below, requests permission before attempting to use the sensor.
ServiceWorkerContainer - Web APIs
this can be used to react to sent messages earlier, even before that page's content has finished loading.
ServiceWorkerGlobalScope.oninstall - Web APIs
this happens before activation.
ServiceWorkerRegistration.navigationPreload - Web APIs
17 full support 17 full support 16disabled disabled from version 16: this feature is behind the enable service workers preference.firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 46safari full support 11.1webview android full support 59chrome android full support ...
ServiceWorkerRegistration.unregister() - Web APIs
the promise will resolve to false if no registration was found, otherwise it resolves to true irrespective of whether unregistration happened or not (it may not unregister if someone else just called serviceworkercontainer.register() with the same scope.) the service worker will finish any ongoing operations before it is unregistered.
ServiceWorkerRegistration - Web APIs
the service worker will finish any ongoing operations before it is unregistered.
SourceBuffer.abort() - Web APIs
}); sourcebuffer.appendbuffer(buf); let's say that after the call to appendbuffer but before the updateend event fires (i.e.
SourceBuffer - Web APIs
this event is fired before onupdateend.
SpeechSynthesis.onvoiceschanged - Web APIs
with chrome however, you have to wait for the event to fire before populating the list, hence the bottom if statement seen below.
SpeechSynthesis.speak() - Web APIs
the speak() method of the speechsynthesis interface adds an utterance to the utterance queue; it will be spoken when any other utterances queued before it have been spoken.
SpeechSynthesis - Web APIs
speechsynthesis.speak() adds an utterance to the utterance queue; it will be spoken when any other utterances queued before it have been spoken.
Using the Storage Access API - Web APIs
since embedded content won’t know which storage policy is in use by the user, it’s best to always check whether the embedded frame has storage access before attempting to read or write from storage.
Streams API - Web APIs
but this has never been available to javascript before.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
these systems all use a digest algorithm to hash the message to a short fixed size before signing.
SubtleCrypto.wrapKey() - Web APIs
syntax const result = crypto.subtle.wrapkey( format, key, wrappingkey, wrapalgo ); parameters format is a string describing the data format in which the key will be exported before it is encrypted.
TimeEvent - Web APIs
WebAPITimeEvent
this method may only be called before the timeevent has been dispatched via the dispatchevent method, though it may be called multiple times during that phase if necessary.
Supporting both TouchEvent and MouseEvent - Web APIs
if the browser fires both touch and mouse events because of a single user input, the browser must fire a touchstart before any mouse events.
TreeWalker.previousNode() - Web APIs
if no such node exists,or if it is before that the root node defined at the object construction, returns null and the current node is not changed.
UIEvent.initUIEvent() - Web APIs
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
URL.password - Web APIs
WebAPIURLpassword
the password property of the url interface is a usvstring containing the password specified before the domain name.
URL.username - Web APIs
WebAPIURLusername
the username property of the url interface is a usvstring containing the username specified before the domain name.
URL API - Web APIs
WebAPIURL API
note the call to urlsearchparams.sort() to sort the parameter list before generating the table.
USBDevice.configuration - Web APIs
example the following example uses this property to test for the existence of a usbconfiguration property to select a configuration before claiming an interface.
USBInTransferResult - Web APIs
a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferin() can be called again.
USBOutTransferResult - Web APIs
a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferout() can be called again.
Vibration API - Web APIs
for example: window.navigator.vibrate([200, 100, 200]); this vibrates the device for 200 ms, then pauses for 100 ms before vibrating the device again for another 200 ms.
VideoPlaybackQuality.droppedVideoFrames - Web APIs
frames are typically dropped either before or after decoding them, when it's determined that it will not be possible to draw them to the screen at the correct time.
Visual Viewport API - Web APIs
using requestanimationframe() ensures that the transform ocurrs before the next render.
WaveShaperNode - Web APIs
oversampling is a technique for creating more samples (up-sampling) before applying the distortion effect to the audio signal.
WebGL2RenderingContext.clientWaitSync() - Web APIs
gl.condition_satisfied: indicates that the sync object was signaled before the timeout expired.
WebGL2RenderingContext.waitSync() - Web APIs
timeout a glint64 specifying a timeout the server should wait before continuing.
WebGLRenderingContext.polygonOffset() - Web APIs
the offset is added before the depth test is performed and before the value is written into the depth buffer.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
this must be done before calling gl.linkprogram().
A basic 2D WebGL animation example - Web APIs
each of those objects includes, as mentioned before, the id of the <script> element the shader code is found in and the type of shader it is.
Clearing with colors - Web APIs
--> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } // run everything inside window load event handler, to make sure // dom is fully loaded and styled before trying to manipulate it, // and to not mess up the global scope.
Detect WebGL - Web APIs
<p>[ here would go the result of webgl feature detection ]</p> <button>press here to detect webglrenderingcontext</button> body { text-align : center; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } // run everything inside window load event handler, to make sure // dom is fully loaded and styled before trying to manipulate it.
Hello GLSL - Web APIs
but remember to read through the explanations and code on this page, before moving on to the next.
Hello vertex attributes - Web APIs
xinwebglcoords]), gl.static_draw); gl.drawarrays(gl.points, 0, 1); }, false); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0]), gl.static_draw); gl.vertexattribpointer(0, 1, gl.float, false, 0, 0); } window.addeventlistener("beforeunload", cleanup, true); function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program) gl.deleteprogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-we...
Matrix math for the web - Web APIs
the focus in the glmatrix library is to have target arrays that are allocated before the update loop.
Lighting in WebGL - Web APIs
e vertex shader: const fssource = ` varying highp vec2 vtexturecoord; varying highp vec3 vlighting; uniform sampler2d usampler; void main(void) { highp vec4 texelcolor = texture2d(usampler, vtexturecoord); gl_fragcolor = vec4(texelcolor.rgb * vlighting, texelcolor.a); } `; here we fetch the color of the texel, just like we did in the previous example, but before setting the color of the fragment, we multiply the texel's color by the lighting value to adjust the texel's color to take into account the effect of our light sources.
WebGL tutorial - Web APIs
before you start using the <canvas> element is not very difficult, but you do need a basic understanding of html and javascript.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
key features of rtp before examining rtp's use in webrtc contexts, it's useful to have a general idea of what rtp does and does not offer.
Taking still photos with WebRTC - Web APIs
listen for the video to start playing after calling htmlmediaelement.play() on the <video>, there's a (hopefully brief) period of time that elapses before the stream of video begins to flow.
Inputs and input sources - Web APIs
because we are managing the avatar's position as defined by the keyboard and mouse in addition to anything the xr hardware might be doing, we need to maintain that information separately and apply it as a transform before rendering the avatar (or the world from the avatar's point of view).
WebXR permissions and security - Web APIs
the webxr device api has several areas of security to contend with, from establishing feature-policy to ensuring the user intends to use the mixed reality presentation before activating it.
Basic concepts behind Web Audio API - Web APIs
secondly, signals must be low-pass filtered before sampling, otherwise aliasing occurs.
Web Audio API best practices - Web APIs
the audio will start playing when the browser determines it can load the rest of the file before playing finishes.
Migrating from webkitAudioContext - Web APIs
the web audio api went through many iterations before reaching its current state.
Web audio spatialization basics - Web APIs
we rolled our own in this article to give you an idea of how it works, but you'll save a lot of time by taking advantage of work others have done before you.
Web Authentication API - Web APIs
authenticator creates new key pair and attestation - before doing anything, the authenticator will typically ask for some form of user verification.
Using the Web Storage API - Web APIs
as you can see above, the event object associated with this event has a number of properties containing useful information — the key of the data that changed, the old value before the change, the new value after that change, the url of the document that changed the storage, and the storage object itself (which we've stringified so you can see its content).
Window: animationend event - Web APIs
if the animation aborts before reaching completion, such as if the element is removed from the dom or the animation is removed from the element, the animationend event is not fired.
Window.captureEvents() - Web APIs
click); window.onclick = page_click; } function page_click() { alert('page click event detected!'); } </script> </head> <body onload="reg();"> <p>click anywhere on this page.</p> </body> </html> notes events raised in the dom by user activity (such as clicking buttons or shifting focus away from the current document) generally pass through the high-level window and document objects first before arriving at the object that initiated the event.
Window.closed - Web APIs
WebAPIWindowclosed
before attempting to change the url, it checks that the current window has an opener using the window.opener property and that the opener isn't closed: // check that an opener exists and is not closed if (window.opener && !window.opener.closed) { window.opener.location.href = 'http://www.mozilla.org'; } note that popups can only access the window that opened them.
Window.convertPointFromNodeToPage() - Web APIs
please review the browser compatibility section before using this method, as it's not widely supported (nor is the point object it uses).
Window.convertPointFromPageToNode - Web APIs
please review the browser compatibility section before using this method, as it's not widely supported (nor is the point object it uses).
Window.focus() - Web APIs
WebAPIWindowfocus
it may fail due to user settings and the window isn't guaranteed to be frontmost before this method returns.
Window.getComputedStyle() - Web APIs
use with pseudo-elements getcomputedstyle can pull style info from pseudo-elements (such as ::after, ::before, ::marker, ::line-marker — see the pseudo-element spec).
Window.getDefaultComputedStyle() - Web APIs
div id="elem-container">dummy</div> <div id="output"></div> <script> var elem = document.getelementbyid("elem-container"); var thecssprop = window.getdefaultcomputedstyle(elem).position; document.getelementbyid("output").innerhtml = thecssprop; // will output "static" </script> use with pseudo-elements the getdefaultcomputedstyle() method can pull style info from pseudo-elements (e.g., ::before or ::after).
Window.history - Web APIs
WebAPIWindowhistory
in particular, that article explains security features of the pushstate() and replacestate() methods that you should be aware of before using them.
Window: pagehide event - Web APIs
for example, when the user clicks the browser's back button, the current page receives a pagehide event before the previous page is shown.
window.postMessage() - Web APIs
for example, if postmessage() is invoked in an event handler, that event handler will run to completion, as will any remaining handlers for that same event, before the messageevent is dispatched.
Window: resize event - Web APIs
bear in mind that since the example is running in an <iframe>, you'll need to actually get the <iframe> to resize before you see an effect.
Window: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
Window: transitionrun event - Web APIs
before any transition-delay has begun.
WindowEventHandlers.onafterprint - Web APIs
the beforeprint and afterprint events allow pages to change their content before printing starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed.
WindowEventHandlers.onhashchange - Web APIs
polyfill for event.newurl and event.oldurl // let this snippet run before your hashchange event binding code if (!window.hashchangeevent)(function(){ var lasturl = document.url; window.addeventlistener("hashchange", function(event){ object.defineproperty(event, "oldurl", {enumerable:true,configurable:true,value:lasturl}); object.defineproperty(event, "newurl", {enumerable:true,configurable:true,value:document.url}); lasturl = document.url; }); }()); ...
WindowOrWorkerGlobalScope.atob() - Web APIs
creation of windowbase64 (properties where on the target before it).
WindowOrWorkerGlobalScope.btoa() - Web APIs
creation of windowbase64 (properties where on the target before it).
WindowOrWorkerGlobalScope.fetch() - Web APIs
in chrome the default is follow (before chrome 47 it defaulted to manual).
WindowOrWorkerGlobalScope.setInterval() - Web APIs
while this pattern does not guarantee execution on a fixed interval, it does guarantee that the previous interval has completed before recursing.
WritableStream.getWriter() - Web APIs
ed = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
WritableStream - Web APIs
ed = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
ed = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
WritableStreamDefaultWriter - Web APIs
ncode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
HTML in XMLHttpRequest - Web APIs
usage retrieving an html resource as a dom using xmlhttprequest works just like retrieving an xml resource as a dom using xmlhttprequest, except you can't use the synchronous mode and you have to explicitly request a document by assigning the string "document" to the responsetype property of the xmlhttprequest object after calling open() but before calling send().
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
servercert; dump("\tcommon name (cn) = " + cert.commonname + "\n"); dump("\tissuer = " + cert.issuerorganization + "\n"); dump("\torganisation = " + cert.organization + "\n"); dump("\tsha1 fingerprint = " + cert.sha1fingerprint + "\n"); var validity = cert.validity.queryinterface(ci.nsix509certvalidity); dump("\tvalid from " + validity.notbeforegmt + "\n"); dump("\tvalid until " + validity.notaftergmt + "\n"); } } catch(err) { alert(err); } } function test(url) { var req = cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(); req.open('get', url, true); req.addeventlistener("error", function(e) { var error = createtcperrorfromfailedxhr(req); dumpsecurityinfo(req, error); }, false...
Synchronous and asynchronous requests - Web APIs
adapting sync xhr use cases to the beacon api there are some cases in which the synchronous usage of xmlhttprequest is not replaceable, like during the unload, beforeunload, and pagehide events.
XMLHttpRequest() - Web APIs
the object must be prepared by at least calling open() to initialize it before calling send() to send the request to the server.
XMLHttpRequest.mozBackgroundRequest - Web APIs
note: this property must be set before calling open().
XMLHttpRequest.overrideMimeType() - Web APIs
this method must be called before calling send().
XMLHttpRequest.response - Web APIs
you may attempt to request the data be provided in a specific format by setting the value of responsetype after calling open() to initialize the request but before calling send() to send the request to the server.
XMLHttpRequest.send() - Web APIs
this can be: a document, in which case it is serialized before being sent.
XMLHttpRequest.setRequestHeader() - Web APIs
when using setrequestheader(), you must call it after calling open(), but before calling send().
XMLHttpRequest.status - Web APIs
before the request completes, the value of status is 0.
XRInputSource - Web APIs
an action may be aborted either by the user in some device-specific fashion or if the input device is disconnected before the action is completed.
XRInputSourceArray.length - Web APIs
examples in this example, a game that requires at least one input source uses length to check this before proceeding to allow the user to play the game.
XRPermissionDescriptor - Web APIs
if permission is conditional based on prompting, we call a function promptandsetupxr() that would handle asking for permission before enabling and starting up the environment.
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.
XRReferenceSpaceEvent() - Web APIs
transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system.
XRReferenceSpaceEvent - Web APIs
transform read only an xrrigidtransform object indicating the position and orientation of the specified referencespace's native origin after the event, defined relative to the coordinate system before the event.
XRRenderState - Web APIs
when you apply changes using the xrsession method updaterenderstate(), the specified changes take effect after the current animation frame has completed, but before the next one begins.
XRRigidTransform() - Web APIs
examples in this example, the beginning of the animation of a scene is shown, starting with a request for a reference space of a given type, then shifting the coordinate system based on a transform before requesting the first animation frame.
XRRigidTransform.matrix - Web APIs
the values are stored into the array in column-major order; that is, each column is written into the array top-down before moving to the right one column and writing the next column into the array.
XRRigidTransform - Web APIs
usage notes when an xrrigidtransform is interpreted, the orientation is always applied to the affected object before the position is applied.
XRSession.onselect - Web APIs
the select event is sent after tracking of the primary action begins, as announced by the selectstart event, and immediately before the tracking of the primary action ends, which is announced by the selectend event.
XRSession.updateRenderState() - Web APIs
syntax xrsession.updaterenderstate(newstate) parameters newstate an object conforming to the xrrenderstateinit dictionary specifying the properties of the session's renderstate to update before rendering the next frame.
XRSystem: requestSession() - Web APIs
next, it calls issessionsupported(), passing it the desired session option before enabling controls for entering xr.
XRSystem - Web APIs
WebAPIXRSystem
to determine this, we call issessionsupported(), passing it the desired session option before enabling the button, immersivebutton, which the user can then use to switch to immersive mode only if immersive vr mode is available.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
now the width and height of the frame buffer are 50% what they were before, resulting in a total frame buffer size of 1280 by 720 pixels, with each eye's half of the buffer being 640x720 pixels.
XRWebGLLayerInit.antialias - Web APIs
example in this example, before creating a new xrwebgllayer to use for rendering, the value of a user preference from a configuration interface is obtained using a function called getpreferencevalue() to determine whether the user has enabled or disabled anti-aliasing support; this is passed into the constructor.
Web APIs
WebAPI
udionodeoptions audioparam audioparamdescriptor audioparammap audioprocessingevent audioscheduledsourcenode audiotrack audiotracklist audioworklet audioworkletglobalscope audioworkletnode audioworkletnodeoptions audioworkletprocessor authenticatorassertionresponse authenticatorattestationresponse authenticatorresponse b baseaudiocontext basiccardrequest basiccardresponse batterymanager beforeinstallpromptevent beforeunloadevent biquadfilternode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy by...
ARIA Screen Reader Implementors Guide - Accessibility
it is probably desirable to have at least a tiny timeout before presenting atomic region changes, in order to avoid presenting the region twice for two changes that occur quickly one after the other.
Using the alertdialog role - Accessibility
when the alert dialog is correctly labeled and focus is moved to a control inside the dialog, screen readers should announce the dialog's accessible role, name and optionally description before announcing the focused element.
Using the aria-invalid attribute - Accessibility
var content = document.createtextnode(msg); newalert.appendchild(content); document.body.appendchild(newalert); } } note that the alert has the aria role attribute set to "alert." working examples: alert role example (uses the aria-invalid attribute) notes when aria-invalid is used in conjunction with the aria-required attribute, aria-invalid should not be set to true before the form is submitted - only in response to validation.
Using the aria-required attribute - Accessibility
description the aria-required attribute is used to indicate that user input is required on an element before a form can be submitted.
Using the link role - Accessibility
you should however note that there are still problems with this approach: it is very difficult to detect whether the target of the fake link has been visited before, and therefore use :visited styles (e.g.
ARIA: Mark role - Accessibility
<p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> the related comment is marked up using an html structure wrapped with a <div> containing role="comment".
ARIA: checkbox role - Accessibility
html <span role="checkbox" id="chkpref" aria-checked="false" onclick="changecheckbox()" onkeypress="changecheckbox()" tabindex="0" aria-labelledby="chk1-label"></span> <label id="chk1-label" onclick="changecheckbox()" onkeypress="changecheckbox()">remember my preferences</label> css [role="checkbox"] { padding:5px; } [aria-checked="true"]::before { content: "[x]"; } [aria-checked="false"]::before { content: "[ ]"; } javascript function changecheckbox(event) { let item = document.getelementbyid('chkpref'); switch(item.getattribute('aria-checked')) { case "true": item.setattribute('aria-checked', "false"); break; case "false": item.setattribute('aria-checked', "true"); ...
ARIA: dialog role - Accessibility
after the dialog is dismissed, keyboard focus should be moved back to where it was before it moved into the dialog.
ARIA - Accessibility
videos of screen readers using aria see both real and simplified examples from around the web, including "before" and "after" aria videos.
An overview of accessible web applications and widgets - Accessibility
on fairly dense pages, a keyboard-only user often has to press the tab key dozens of times before accessing the needed section.
Accessibility documentation index - Accessibility
25 using the aria-required attribute aria, accessibility, needscontent the aria-required attribute is used to indicate that user input is required on an element before a form can be submitted.
Mobile accessibility checklist - Accessibility
for touch events, at least one of the following must be true (wcag 2.1: pointer cancellation): the down-event should not be used to trigger any action the action is triggered on the up event and an option to abort the action before its completion is available or an option to undo the action after its completion the up-event will undo any action that was triggered on a down event it is essential to trigger the action on the down event.
-moz-image-rect - CSS: Cascading Style Sheets
notice that before it begins doing so it saves a copy of the last box's style since it will be overwritten by the third element's style.
:-moz-first-node - CSS: Cascading Style Sheets
it differs from :first-child because it does not match a first-child element with (non-whitespace) text before it.
::backdrop - CSS: Cascading Style Sheets
/* backdrop is only displayed when dialog is opened with dialog.showmodal() */ dialog::backdrop { background: rgba(255,0,0,.25); } all full-screen elements are placed in a last-in/first out (lifo) stack in the top layer, which is a special layer in the viewport which is always rendered last (and therefore on top) before drawing the viewport's contents to the screen.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
(this is poorly supported by browsers; see the browser compatibility table below.) a combination of the ::before pseudo-element and the content property may inject some text at the beginning of the element.
::part() - CSS: Cascading Style Sheets
WebCSS::part
custom-element::part(foo) { /* styles to apply to the `foo` part */ } syntax ::part( <ident>+ ) examples html <template id="tabbed-custom-element"> <style type="text/css"> *, ::before, ::after { box-sizing: border-box; padding: 1rem; } :host { display: flex; } </style> <div part="tab active">tab 1</div> <div part="tab">tab 2</div> <div part="tab">tab 3</div> </template> <tabbed-custom-element></tabbed-custom-element> css tabbed-custom-element::part(tab) { color: #0c0c0dcc; border-bottom: transparent solid 2px; } tabbed-custom-element::part(tab):hover { background-color: #0c0c0d19; border-color: #0c0c0d33; } tabbed-custom-element::part(tab):hover:active { ba...
:hover - CSS: Cascading Style Sheets
WebCSS:hover
to style links appropriately, put the :hover rule after the :link and :visited rules but before the :active one, as defined by the lvha-order: :link — :visited — :hover — :active.
:required - CSS: Cascading Style Sheets
WebCSS:required
/* selects any required <input> */ input:required { border: 1px dashed red; } this pseudo-class is useful for highlighting fields that must have valid data before a form can be submitted.
:visited - CSS: Cascading Style Sheets
WebCSS:visited
to style links appropriately, put the :visited rule after the :link rule but before the :hover and :active rules, as defined by the lvha-order: :link — :visited — :hover — :active.
@charset - CSS: Cascading Style Sheets
WebCSS@charset
formal syntax @charset "<charset>"; examples valid and invalid charset declarations @charset "utf-8"; /* set the encoding of the style sheet to unicode utf-8 */ @charset 'iso-8859-15'; /* invalid, wrong quoting style used */ @charset "utf-8"; /* invalid, more than one space */ @charset "utf-8"; /* invalid, there is a character (a space) before the at-rule */ @charset utf-8; /* invalid, without ' or ", the charset is not a css <string> */ specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
@counter-style - CSS: Cascading Style Sheets
prefixes are added to the representation in the final stage, so in the final representation of the counter, it comes before the negative sign.
-webkit-transition - CSS: Cascading Style Sheets
instead, test for transition support using the css @supports at-rule, like this: @supports (transition: initial) { /* css to use if transitions are supported */ } obsolete example before this became obsolete, you could use -webkit-transition in your css like this: @media (-webkit-transition) { /* css to use if transitions are supported */ } specifications not part of any standard.
prefers-reduced-motion - CSS: Cascading Style Sheets
readers with vestibular motion disorders may wish to enable the reduce motion feature on their device before viewing the animation.
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
lengths specified as percentages are calculated relative to the initial viewport, which is the viewport before any user agent or authored styles have had an opportunity to adjust the viewport.
Border-image generator - CSS: Cascading Style Sheets
.span_5 { width: 40.7%; } .span_4 { width: 32.24%; } .span_3 { width: 23.78%; } .span_2 { width: 15.32%; } .span_1 { width: 6.86%; } /* sections * ========================================================================== */ .section { clear: both; padding: 0px; margin: 0px; } /* grouping * ========================================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all browsers except ie6 and lower */ ...
Box alignment in Flexbox - CSS: Cascading Style Sheets
set justify-content: flex-end and the extra space is placed before the items, justify-content: space-around and it is placed either side of the item in that dimension, etc.
Handling Overflow in Multicol - CSS: Cascading Style Sheets
in the example below we have used a min-height query to check the height before applying the column properties.
Using multi-column layouts - CSS: Cascading Style Sheets
therefore, if the height is constrained, by setting the css height or max-height properties on a multi-column block, each column is allowed to grow to that height and no further before adding new column.
CSS Multi-column Layout - CSS: Cascading Style Sheets
reference multiple-column layout properties column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns related css fragmentation properties break-after break-before break-inside orphans widows guides basic concepts of multicol an overview of the multiple-column layout specification styling columns how to use column rules and manage the spacing between columns.
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
as before, we need enough space in the cross axis to have some free space after displaying all of the items.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
the history of flexbox as with all css specifications the flexbox specification went through a large number of changes before it became the candidate recommendation that we have today.
Basic concepts of flexbox - CSS: Cascading Style Sheets
before we can make sense of these properties we need to consider the concept of available space.
Ordering Flex Items - CSS: Cascading Style Sheets
the value of the order property is taken into account before the items are displayed.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
the boxes around the words before the <strong> element and after the <strong> element are referred to as anonymous boxes, boxes introduced to ensure that everything is wrapped in a box, but ones that we cannot target directly.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
the start is where sentences start and the end is where a line of text ends before it would begin to wrap onto a new line.
CSS Flow Layout - CSS: Cascading Style Sheets
normal flow, or flow layout, is the way that block and inline elements are displayed on a page before any changes are made to their layout.
CSS Fragmentation - CSS: Cascading Style Sheets
reference box-decoration-break break-after break-before break-inside orphans widows specifications specification status comment css fragmentation module level 3 candidate recommendation initial definition.
Grid template areas - CSS: Cascading Style Sheets
before using any shorthand it is worth remembering that shorthands not only enable the setting of many properties in one go, they also act to reset things to their initial values that you do not, or cannot set in the shorthand.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
grid layout opens up possibilities that we have not had before, we don’t need to be tied to the same old layouts to use it.
Logical properties for sizing - CSS: Cascading Style Sheets
try playing with the below example in the same way as before.
CSS Paged Media - CSS: Cascading Style Sheets
WebCSSCSS Pages
reference css properties page-break-after page-break-before page-break-inside at-rules @page pseudo-classes :blank :first :left :right specifications specification status comment css paged media module level 3 working draft css fragmentation module level 3 candidate recommendation css level 2 (revision 1) recommendation ...
CSS Properties Reference - CSS: Cascading Style Sheets
ttom marginbottom margin-left marginleft margin-right marginright margin-top margintop overflow overflow padding padding padding-bottom paddingbottom padding-left paddingleft padding-right paddingright padding-top paddingtop page-break-after pagebreakafter page-break-before pagebreakbefore position position stroke-dasharray strokedasharray stroke-dashoffset strokedashoffset stroke-width strokewidth text-align textalign text-decoration textdecoration text-indent textindent text-transform texttransform top top vertical-align verticalalign ...
Overview of CSS Shapes - CSS: Cascading Style Sheets
if you do not have shapes support in the browser, the user will see content flowing around the sides of a rectangular box as before.
CSS values and units - CSS: Cascading Style Sheets
if a comma is used to separate arguments, white space is optional before and after the comma.
Layout and the containing block - CSS: Cascading Style Sheets
effects of the containing block before learning what determines the containing block of an element, it's useful to know why it matters in the first place.
Filter Effects - CSS: Cascading Style Sheets
filter effects is a module of css that defines a way of processing an element’s rendering before it is displayed in the document.
Center an element - CSS: Cascading Style Sheets
centering both horizontally and vertically was difficult before flexbox, with the box alignment properties it is now straightforward.
Testing media queries programmatically - CSS: Cascading Style Sheets
creating a media query list before you can evaluate the results of a media query, you need to create the mediaquerylist object representing the query.
Microsoft CSS extensions - CSS: Cascading Style Sheets
ll-rails -ms-scroll-snap-points-x -ms-scroll-snap-points-y -ms-scroll-snap-x -ms-scroll-snap-y -ms-scroll-translation -ms-text-autospace -ms-touch-select -ms-wrap-flow -ms-wrap-margin -ms-wrap-through zoom pseudo-elements ::-ms-browse ::-ms-check ::-ms-clear ::-ms-expand ::-ms-fill ::-ms-fill-lower ::-ms-fill-upper ::-ms-reveal ::-ms-thumb ::-ms-ticks-after ::-ms-ticks-before ::-ms-tooltip ::-ms-track ::-ms-value media features -ms-high-contrast css-related dom apis mscontentzoomfactor msgetpropertyenabled msgetregioncontent msrangecollection msregionoverflow ...
Paged media - CSS: Cascading Style Sheets
widely supported properties include: page-break-before page-break-after page-break-inside orphans widows @page ...
Privacy and the :visited selector - CSS: Cascading Style Sheets
before about 2010, the css :visited selector allowed websites to uncover a user's browsing history and figure out what sites the user had visited.
Pseudo-elements - CSS: Cascading Style Sheets
index of standard pseudo-elements ::after (:after) ::backdrop ::before (:before) ::cue ::cue-region ::first-letter (:first-letter) ::first-line (:first-line) ::grammar-error ::marker ::part() ::placeholder ::selection ::slotted() ::spelling-error browser lowest version support of internet explorer 8.0 :pseudo-element 9.0 :pseudo-element ::pseudo-element firefox (gecko) 1.0 (1.0) :pseudo...
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
source image examples before diving in to look at the results of using different kinds of source images and seeing how they look when used with background-size, it would be helpful to look at a few example source images that have different dimensions and sizing settings.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
the pair is separated by a colon, ':' (u+003a colon), and white spaces before, between, and after properties and values, but not necessarily inside, are ignored.
align-content - CSS: Cascading Style Sheets
the empty space before the first and after the last item equals half of the space between each pair of adjacent items.
animation-direction - CSS: Cascading Style Sheets
formal definition initial valuenormalapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-direction>#where <single-animation-direction> = normal | reverse | alternate | alternate-reverse examples see css animations for examples.
animation-duration - CSS: Cascading Style Sheets
formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples.
animation-name - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ none | <keyframes-name> ]#where <keyframes-name> = <custom-ident> | <string> examples see css animations for examples.
animation-play-state - CSS: Cascading Style Sheets
formal definition initial valuerunningapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-play-state>#where <single-animation-play-state> = running | paused examples see css animations for examples.
animation-timing-function - CSS: Cascading Style Sheets
formal definition initial valueeaseapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <timing-function>#where <timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several ...
attr() - CSS: Cascading Style Sheets
WebCSSattr
)where <type-or-unit> = string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | hz | khz | % examples content property html <p data-foo="hello">world</p> css [data-foo]::before { content: attr(data-foo) " "; } result <color> value html <div class="background" data-background="lime">background expected to be red if your browser does not support advanced usage of attr()</div> css .background { height: 100vh; } .background { background-color: red; } .background[data-background] { background-color: attr(data-background color, red); } specificatio...
background-attachment - CSS: Cascading Style Sheets
however, on the second time round, she came upon a low curtain she had not noticed before, and behind it was a little door about fifteen inches high: she tried the little golden key in the lock, and to her great delight it fitted!
background-size - CSS: Cascading Style Sheets
before this, they were treated as images with no intrinsic dimensions, but with intrinsic proportions identical to that of the background positioning area.
border-bottom - CSS: Cascading Style Sheets
and the value of border-bottom-style given before border-bottom is ignored.
border-left - CSS: Cascading Style Sheets
and the value of border-left-style given before border-left is ignored.
border-right - CSS: Cascading Style Sheets
and the value of border-right-style given before border-right is ignored.
border-top - CSS: Cascading Style Sheets
and the value of border-top-style given before border-top is ignored.
box-pack - CSS: Cascading Style Sheets
WebCSSbox-pack
justify the space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
{ margin: .5em; padding: .5em; background-color: #fff; overflow: hidden; text-align: center; flex: 1; } .note { background: #fff3d4; padding: 1em; margin: .5em .5em 0; font: .8em sans-serif; text-align: left; white-space: nowrap; } .note + .row .cell { margin-top: 0; } .container { display: inline-block; border: 1px dotted grey; position:relative; } .container:before { content: 'margin'; position: absolute; top: 2px; left: 2px; font: italic .6em sans-serif; } .viewbox { box-shadow: 1rem 1rem 0 #efefef inset, -1rem -1rem 0 #efefef inset; } .container.viewbox:after { content: 'viewbox'; position: absolute; left: 1.1rem; top: 1.1rem; font: italic .6em sans-serif; } .cell span { display: block; margin-bottom: .5em; } p { font-famil...
column-span - CSS: Cascading Style Sheets
content in the normal flow that appears before the element is automatically balanced across all columns before the element appears.
counter() - CSS: Cascading Style Sheets
WebCSScounter
check the browser compatibility table carefully before using this in production.
<easing-function> - CSS: Cascading Style Sheets
*/ cubic-bezier(-1.9, 0.3, -0.2, 2.1) steps() function examples these easing functions are valid: /* there is 5 treads, the last one happens right before the end of the animation.
flex-direction - CSS: Cascading Style Sheets
the main-start and main-end points are the same as the before and after points of the writing-mode.
font - CSS: Cascading Style Sheets
WebCSSfont
14px arial; overflow: hidden; } .propinputcont { float: left; text-align: center; margin-right: 5px; width: 80px; } .setpropcont { float: left; margin-right: 5px; width: 120px; } .propinputs, .setpropcont { margin-bottom: 1em; } .curcss { border: none; border-bottom: 1px solid black; text-align: center; width: 80px; } .mandatory { border-bottom-color: red; } .cf:before, .cf:after { content: " "; display: table; } .cf:after { clear: both; } .tar { width: 40px; text-align: right; } .fontfamily { display: inline-block; } javascript var textareas = document.getelementsbyclassname("curcss"), shorttext = "", getcheckedvalue, setcss, getproperties, injectcss; getproperties = function () { shorttext = getcheckedvalue("font_s...
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
note: named grid areas automatically generate implicit named lines of this form, so specifying grid-area: foo; will choose the start/end edge of that named grid area (unless another line named foo-start/foo-end was explicitly specified before it).
grid-column-end - CSS: Cascading Style Sheets
note: named grid areas automatically generate implicit named lines of this form, so specifying grid-column-end: foo; will choose the end edge of that named grid area (unless another line named foo-end was explicitly specified before it).
grid-column-start - CSS: Cascading Style Sheets
note: named grid areas automatically generate implicit named lines of this form, so specifying grid-column-start: foo; will choose the start edge of that named grid area (unless another line named foo-start was explicitly specified before it).
grid-row-end - CSS: Cascading Style Sheets
note: named grid areas automatically generate implicit named lines of this form, so specifying grid-row-end: foo; will choose the end edge of that named grid area (unless another line named foo-end was explicitly specified before it).
grid-row-start - CSS: Cascading Style Sheets
note: named grid areas automatically generate implicit named lines of this form, so specifying grid-row-start: foo; will choose the start edge of that named grid area (unless another line named foo-start was explicitly specified before it).
grid-template - CSS: Cascading Style Sheets
sets grid-template-areas to the strings listed, grid-template-rows to the track sizes following each string (filling in auto for any missing sizes), and splicing in the named lines defined before/after each size, and grid-template-columns to the track listing specified after the slash (or none, if not specified).
image-orientation - CSS: Cascading Style Sheets
if used in conjunction with other css properties, such as a <transform-function>, any image-orientation rotation is applied before any other transformations.
image() - CSS: Cascading Style Sheets
providing fallback images .help::before { content: image("try.webp", "try.svg", "try.gif"); } in this example, the browser will display an image as generated content before the content of the element with the class of help.
justify-content - CSS: Cascading Style Sheets
the empty space before the first and after the last item equals half of the space between each pair of adjacent items.
line-break - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | loose | normal | strict | anywhere examples setting text wrapping see whether the text is wrapped before "々", "ぁ" and "。".
orphans - CSS: Cascading Style Sheets
WebCSSorphans
(the paragraph continues on a following page.) syntax values <integer> the minimum number of lines that can stay by themselves at the bottom of a fragment before a fragmentation break.
place-content - CSS: Cascading Style Sheets
the empty space before the first and after the last item equals half of the space between each pair of adjacent items.
quotes - CSS: Cascading Style Sheets
WebCSSquotes
that's the question!</q> css q { quotes: '"' '"' "'" "'"; } q::before { content: open-quote; } q::after { content: close-quote; } result auto quotes for most browsers, the default value of quotes is auto (firefox 70+), or the browser otherwise had this default behavior (chromiums, safari, edge), so this example works without it being explicitly being set.
<ratio> - CSS: Cascading Style Sheets
WebCSSratio
spaces before and after the slash are optional.
shape-margin - CSS: Cascading Style Sheets
calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples adding a margin to a polygon html <section> <div class="shape"></div> we are not quite sure of any one thing in biology; our knowledge of geology is relatively very slight, and the economic laws of society are uncertain to every one except some individual who attempts to set them forth; but before the world was fashioned the square on the hypotenuse was equal to the sum of the squares on the other two sides of a right triangle, and it will be so after this world is dead; and the inhabitant of mars, if he exists, probably knows its truth as we know it.</section> css section { max-width: 400px; } .shape { float: left; width: 150px; height: 150px; background-color: maroon; clip...
text-align-last - CSS: Cascading Style Sheets
the text-align-last css property sets how the last line of a block or a line, right before a forced line break, is aligned.
text-indent - CSS: Cascading Style Sheets
the text-indent css property sets the length of empty space (indentation) that is put before lines of text in a block.
text-shadow - CSS: Cascading Style Sheets
it can be specified either before or after the offset values.
touch-action - CSS: Cascading Style Sheets
applications using touch events disable the browser handling of gestures by calling preventdefault(), but should also use touch-action to ensure the browser knows the intent of the application before any event listeners have been invoked.
rotate() - CSS: Cascading Style Sheets
for example, if you rotate before translating, the translation will be along the new axis of rotation!
transition-duration - CSS: Cascading Style Sheets
formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples transition-duration: 0.5s <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; ...
transition-property - CSS: Cascading Style Sheets
formal definition initial valueallapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | <single-transition-property>#where <single-transition-property> = all | <custom-ident> examples there are several examples of css transitions included in the main css transitions article.
transition-timing-function - CSS: Cascading Style Sheets
formal definition initial valueeaseapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <timing-function>#where <timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several ...
transition - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:transition-delay: 0stransition-duration: 0stransition-property: alltransition-timing-function: easeapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:transition-delay: as specifiedtransition-duration: as specifiedtransition-property: as specifiedtransition-timing-function: as specifiedanimation typediscrete formal syntax <single-transition>#where <single-transition> = [ none | <single-transition-property> ] | <time> | <timing-function> | <time>wher...
<url> - CSS: Cascading Style Sheets
WebCSSurl
if you choose to write the url without quotes, use a backslash (\) before any parentheses, whitespace characters, single quotes (') and double quotes (") that are part of the url.
user-select - CSS: Cascading Style Sheets
auto the used value of auto is determined as follows: on the ::before and ::after pseudo elements, the used value is none if the element is an editable element, the used value is contain otherwise, if the used value of user-select on the parent of this element is all, the used value is all otherwise, if the used value of user-select on the parent of this element is none, the used value is none otherwise, the used value is text text the text can be sel...
CSS: Cascading Style Sheets
WebCSS
the aim here is to provide you with a toolkit for writing competent css and help you understand all the essential theory, before moving on to more specific disciplines like text styling and css layout.
set:leading() - EXSLT
WebEXSLTsetleading
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes set:leading() returns the nodes in one node-set that come before the first node in the other node-set.
Sets (set) - EXSLT
WebEXSLTset
in other words, it returns a node-set containing all the nodes that exits in both nodeset1 and nodeset2.set:leading()set:leading() returns the nodes in one node-set that come before the first node in the other node-set.set:trailing()set:trailing() returns the nodes in one node-set that come after the first node in the other node-set.
EXSLT
<xsl:value-of select="regexp:replace(/root/@value, 'before', 'gi', 'after')"/> ...
Getting Started - Developer guides
for example, use the following before calling send() for form data sent as a query string: httprequest.setrequestheader('content-type', 'application/x-www-form-urlencoded'); step 2 – handling the server response when you sent the request, you provided the name of a javascript function to handle the response: httprequest.onreadystatechange = nameofthefunction; what should this function do?
Video player styling basics - Developer guides
preliminary modifications from the original example this section summarises the modifications that were made to the original video player example to make the styling task easier, before the bulk of the work was started.
Web Audio playbackRate explained - Developer guides
so defaultplaybackrate allows us to set the playback rate before playing the media, while playbackrate allows us to change it during media playback.
Creating a cross-browser video player - Developer guides
setup before dealing with the individual buttons, a number of initialisation calls are required.
Media events - Developer guides
playing sent when the media has enough data to start playing, after the play event, but also when recovering from being stalled, when looping media restarts, and after seeked, if it was playing before seeking.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
children experiment with color before they even have the manual dexterity to draw.
HTML attribute: required - HTML: Hypertext Markup Language
the boolean required attribute which, if present, indicates that the user must specify a value for the input before the owning form can be submitted.
Block-level elements - HTML: Hypertext Markup Language
browsers typically display the block-level element with a newline both before and after the element.
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
if either of the following attributes are specified, this element must come before other elements with attribute values of urls, such as <link>’s href attribute.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
you can add inner html content (think <i>, <br>, or even <img>), and use ::after and ::before pseudo-elements for complex rendering.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
the <colgroup> must appear after any optional <caption> element but before any <thead>, <th>, <tbody>, <tfoot> and <tr> element.
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
it is sent after the state is changed, although if the state changes multiple times before the browser can dispatch the event, the events are coalesced so that only one is sent.
<dt>: The Description Term element - HTML: Hypertext Markup Language
WebHTMLElementdt
permitted parents before a <dt> or a <dd> element, inside a <dl> or (in whatwg html) a <div> that is inside a <dl>.
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
there are a variety of ways an <hgroup> might be shown in a rendered outline; for example: an <hgroup> might be shown in a rendered outline in with a colon character and space (“: ”) or other such punctuation after the primary heading and before the first secondary heading (and with the same or similar punctuation before any other secondary headings an <hgroup> might be shown in a rendered outline in with the primary heading followed by parentheses around the secondary heading(s) consider the following html document: <!doctype html> <title>html standard</title> <body> <hgroup id="document-title"> <h1>html</h1> <h2>living st...
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
high the resource should be downloaded before other lower-priority page resources.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
use both width and height to set the intrinsic size of the image, allowing it to take up space before it loads, to mitigate content layout shifts.
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
if you have colors that are in any other format (such as css color names or css color functions such as rgb() or rgba()), you'll have to convert them to hexadecimal before setting the value.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
the input value is automatically validated to ensure that it's either empty or a properly-formatted e-mail address (or list of addresses) before the form can be submitted.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
padding-left: 10px; } form label, form button { background-color: #7f9ccb; padding: 5px 10px; border-radius: 5px; border: 1px ridge black; font-size: 0.8rem; height: auto; } form label:hover, form button:hover { background-color: #2d5ba3; color: white; } form label:active, form button:active { background-color: #0d3f8f; color: white; } this is similar to what we've seen before — nothing special to comment on.
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
; } form { width: 500px; } div { display: flex; margin-bottom: 10px; } label { flex: 2; line-height: 2; text-align: right; padding-right: 20px; } input, textarea { flex: 7; font-family: sans-serif; font-size: 1.1rem; padding: 5px; } textarea { height: 60px; } the server would set the value of the hidden input with the id "postid" to the id of the post in its database before sending the form to the user's browser and would use that information when the form is returned to know which database record to update with modified information.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
ativepicker.style.display = 'none'; fallbackpicker.style.display = 'block'; fallbacklabel.style.display = 'block'; // populate the years dynamically // (the months are always the same, therefore hardcoded) populateyears(); } function populateyears() { // get the current year as a number var date = new date(); var year = date.getfullyear(); // make this year, and the 100 years before it available in the year <select> for(var i = 0; i <= 100; i++) { var option = document.createelement('option'); option.textcontent = year-i; yearselect.appendchild(option); } } note: remember that some years have 53 weeks in them (see weeks per year)!
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
this looks very similar to the validation styling we saw before; nothing remarkable here.
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
making input required you can use the required attribute as an easy way of making entering a value required before form submission is allowed: <form> <div> <input type="search" id="mysearch" name="q" placeholder="search the site..." required> <button>search</button> <span class="validity"></span> </div> </form> input { margin-right: 10px; } input:invalid ~ span:after { content: '✖'; padding-left: 5px; position: absolute; } input:valid ~ span:after { content: '✓';...
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
; mystylesheet.onload = function() { // do something interesting; the sheet has been loaded } mystylesheet.onerror = function() { console.log("an error occurred loading the stylesheet!"); } </script> <link rel="stylesheet" href="mystylesheet.css" id="my-stylesheet"> note: the load event fires once the stylesheet and all of its imported content has been loaded and parsed, and immediately before the styles start being applied to the content.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
people navigating with the aid of assistive technology such as a screen reader may be unable to read through and understand the page's content before being automatically redirected.
<param>: The Object Parameter element - HTML: Hypertext Markup Language
WebHTMLElementparam
permitted parents an <object> before any flow content.
<plaintext>: The Plain Text element (Deprecated) - HTML: Hypertext Markup Language
implementation note: in gecko 1.9.2 and before, firefox implements the interface htmlspanelement for this element.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
<rp> must be positioned immediately before or after an <rt> element.
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
example before <div> <h1>heading</h1> <p>bunch of awesome content</p> </div> after <section> <h1>heading</h1> <p>bunch of awesome content</p> </section> specifications specification status comment html living standardthe definition of '<section>' in that specification.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
also note: on macos, the ctrl + up and ctrl + down shortcuts conflict with the os default shortcuts for mission control and application windows, so you'll have to turn these off before it will work.
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
implicit aria role no corresponding role permitted aria roles any dom interface htmlspanelement (before html5, the interface was htmlelement) attributes this element only includes the global attributes.
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
examples basic example <p>before proceeding, <strong>make sure you put on your safety goggles</strong>.</p> the resulting output: labeling warnings <p><strong>important:</strong> before proceeding, make sure you add plenty of butter.</p> this results in: specifications specification status comment html living standardthe definition of '<strong>' in that specification.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
some user-agents, such as speech readers, may present this description before the content itself.
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
some user-agents, such as speech readers, may present this description before the content itself.
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
the <thead> must appear after any <caption> or <colgroup> element, even implicitly defined, but before any <tbody>, <tfoot> and <tr> element.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
example the yahoo style guide recommends breaking a url before punctuation, to avoid leaving a punctuation mark at the end of the line, which the reader might mistake for the end of the url.
itemprop - HTML: Hypertext Markup Language
in the following example, the "a" property has the values "1" and "2", in that order, but whether the "a" property comes before the "b" property or not is not important <div itemscope> <p itemprop="a">1</p> <p itemprop="a">2</p> <p itemprop="b">test</p> </div> the following is equivalent <div itemscope> <p itemprop="b">test</p> <p itemprop="a">1</p> <p itemprop="a">2</p> </div> as is the following <div itemscope> <p itemprop="a">1</p> <p itemprop="b">test</p> <p itemprop="a">2</p> </div> and the following ...
tabindex - HTML: Hypertext Markup Language
that is, tabindex="4" is focused before tabindex="5" and tabindex="0", but after tabindex="3".
Preloading content with rel="preload" - HTML: Hypertext Markup Language
the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in.
HTML: Hypertext Markup Language
WebHTML
preloading content with rel="preload" the preload value of the <link> element's rel attribute allows you to write declarative fetch requests in your html <head>, specifying resources that your pages will need very soon after loading, which you therefore want to start preloading early in the lifecycle of a page load, before the browser's main rendering machinery kicks in.
Data URLs - HTTP
data:text/html,lots of text...<p><a name%3d"bottom">bottom</a>?arg=val this represents an html resource whose contents are: lots of text...<p><a name="bottom">bottom</a>?arg=val syntax the format for data urls is very simple, but it's easy to forget to put a comma before the "data" segment, or to incorrectly encode the data into base64 format.
Identifying resources on the Web - HTTP
the web server can use those parameters to do extra stuff before returning the resource to the user.
HTTP conditional requests - HTTP
the request will succeed, only if the resource didn't exist before: if-none-match will only work with http/1.1 (and later) compliant servers.
Configuring servers for Ogg media - HTTP
include regular key frames when the browser seeks through ogg media to a specified time, it has to seek to the nearest key frame before the seek target, then download and decode the video from there until the requested target time.
Using HTTP cookies - HTTP
WebHTTPCookies
on the application server, the web application must check for the full cookie name including the prefix—user agents do not strip the prefix from the cookie before sending it in a request's cookie header.
CSP: block-all-mixed-content - HTTP
the upgrade-insecure-requests directive is evaluated before block-all-mixed-content.
CSP: report-uri - HTTP
$current_domain; http_response_code(204); // http 204 no content $json_data = file_get_contents('php://input'); // we pretty print the json before adding it to the log file if ($json_data = json_decode($json_data)) { $json_data = json_encode($json_data, json_pretty_print | json_unescaped_slashes); if (!file_exists($log_file)) { // send an email $message = "the following content-security-policy violation occurred on " .
Expect-CT - HTTP
certificates before march 2018 were allowed to have a lifetime of 39 months, those will all be expired in june 2021.
Expect - HTTP
WebHTTPHeadersExpect
examples large message body a client sends a request with a expect header and waits for the server to respond before sending the message body.
Keep-Alive - HTTP
max: indicating the maximum number of requests that can be sent on this connection before closing it.
Pragma - HTTP
WebHTTPHeadersPragma
forces caches to submit the request to the origin server for validation before releasing a cached copy.
Strict-Transport-Security - HTTP
description if a website accepts a connection through http and redirects to https, visitors may initially communicate with the non-encrypted version of the site before being redirected, if, for example, the visitor types http://www.foo.com/ or even just foo.com.
Firefox user agent string reference - HTTP
before version 4.1, it sent a klar/<version> product/version token.
Link prefetching FAQ - HTTP
this header enables caching, but requires an if-modified-since or if-none-match validation request before the serving the document out of the browser's cache.
Protocol upgrade mechanism - HTTP
the client adds this if it wishes to do so, and the server will include in the response a key of its own, which the client will validate before delivering the upgrade response to you.
Redirections in HTTP - HTTP
<head> <meta http-equiv="refresh" content="0; url=https://example.com/"> </head> the content attribute should start with a number indicating how many seconds the browser should wait before redirecting to the given url.
100 Continue - HTTP
WebHTTPStatus100
to have a server check the request's headers, a client must send expect: 100-continue as a header in its initial request and receive a 100 continue status code in response before sending the body.
201 Created - HTTP
WebHTTPStatus201
the new resource is effectively created before this response is sent back and the new resource is returned in the body of the message, its location being either the url of the request, or the content of the location header.
429 Too Many Requests - HTTP
WebHTTPStatus429
a retry-after header might be included to this response indicating how long to wait before making a new request.
511 Network Authentication Required - HTTP
WebHTTPStatus511
network operators sometimes require some authentication, acceptance of terms, or other user interaction before granting access (for example in an internet café or at an airport).
HTTP response status codes - HTTP
WebHTTPStatus
this responses should be used for temporary conditions and the retry-after: http header should, if possible, contain the estimated time before the recovery of the service.
Closures - JavaScript
what's different (and interesting) is that the displayname() inner function is returned from the outer function before being executed.
Introduction - JavaScript
but for now, remember to always include the (function(){"use strict"; before your code, and add })(); to the end of your code.
Assertions - JavaScript
if the multiline flag is set to true, also matches immediately before a line break character.
Regular expression syntax cheatsheet - JavaScript
if the multiline flag is set to true, also matches immediately before a line break character.
Unicode property escapes - JavaScript
note: as there are many properties and values available, we will not describe them exhaustively here but rather provide various examples rationale before es2018 there was no performance-efficient way to match characters from different sets based on scripts (like macedonian, greek, georgian etc.) or propertyname (like emoji etc) in javascript.
Regular expressions - JavaScript
for instance, to search for the string "/example/" followed by one or more alphabetic characters, you'd use /\/example\/[a-z]+/i—the backslashes before each slash make them literal.
Text formatting - JavaScript
; const germanphonebook = new intl.collator('de-de-u-co-phonebk'); // as if sorting ["hochberg", "hoenigswald", "holzman"]: console.log(names.sort(germanphonebook.compare).join(', ')); // logs "hochberg, hönigswald, holzman" some german words conjugate with extra umlauts, so in dictionaries it’s sensible to order ignoring umlauts (except when ordering words differing only by umlauts: schon before schön).
Working with objects - JavaScript
before ecmascript 5, there was no native way to list all properties of an object.
Public class fields - JavaScript
public instance fields are added with object.defineproperty() either at construction time in the base class (before the constructor body runs), or just after super() returns in a subclass.
extends - JavaScript
class square extends polygon { constructor(length) { // here, it calls the parent class' constructor with lengths // provided for the polygon's width and height super(length, length); // note: in derived classes, super() must be called before you // can use 'this'.
Classes - JavaScript
if there is a constructor present in the subclass, it needs to first call super() before using "this".
ReferenceError: deprecated caller or arguments usage - JavaScript
'use strict'; function f(n) { g(n - 1); } function g(n) { console.log('before: ' + g.arguments[0]); if (n > 0) { f(n); } console.log('after: ' + g.arguments[0]); } f(2); console.log('returned: ' + g.arguments); // warning: referenceerror: deprecated arguments usage ...
RangeError: invalid array length - JavaScript
otherwise, you might want to clamp the length before setting the length property, or using it as argument of the constructor.
TypeError: Reduce of empty array with no initial value - JavaScript
var ints = [0, -1, -2, -3, -4, -5]; ints.filter(x => x > 0) // removes all elements .reduce((x, y) => x + y, 0) // the initial value is the neutral element of the addition another way would be two to handle the empty case, either before calling reduce, or in the callback after adding an unexpected dummy initial value.
ReferenceError: assignment to undeclared variable "x" - JavaScript
declared variables are created before any code is executed.
ReferenceError: reference to undefined property "x" - JavaScript
var foo = {}; foo.bar; // referenceerror: reference to undefined property "bar" valid cases to avoid the error, you need to either add a definition for bar to the object or check for the existence of the bar property before trying to access it; one way to do that is to use the object.prototype.hasownproperty() method), like this: var foo = {}; // define the bar property foo.bar = 'moon'; console.log(foo.bar); // "moon" // test to be sure bar exists before accessing it if (foo.hasownproperty('bar')) { console.log(foo.bar); } ...
Arrow function expressions - JavaScript
elements.map(({ length }) => length); // [8, 6, 7, 9] no separate this before arrow functions, every new function defined its own this value based on how the function was called: a new object in the case of a constructor.
Method definitions - JavaScript
when doing so: the asterisk (*) in the shorthand syntax must be before the generator property name.
arguments.callee - JavaScript
b * c : d * e; } if the javascript interpreter cannot guarantee that all the provided arguments are numbers at the point that the call is made, it needs to either insert checks for all the arguments before the inlined code, or it cannot inline the function.
Rest parameters - JavaScript
from arguments to an array rest parameters have been introduced to reduce the boilerplate code that was induced by the arguments // before rest parameters, "arguments" could be converted to a normal array using: function f(a, b) { let normalarray = array.prototype.slice.call(arguments) // -- or -- let normalarray = [].slice.call(arguments) // -- or -- let normalarray = array.from(arguments) let first = normalarray.shift() // ok, gives the first argument let first = arguments.shift() // error (arguments is not a ...
Array.prototype.every() - JavaScript
the range of elements processed by every is set before the first invocation of callback.
Array.prototype.find() - JavaScript
if so, the elements processed by find are set before the first invocation of callback.
Array.prototype.findIndex() - JavaScript
the range of elements processed by findindex() is set before the first invocation of callback.
Array.isArray() - JavaScript
polyfill running the following code before any other code will create array.isarray() if it's not natively available.
Array.of() - JavaScript
for more information, see: array.of() array.from() proposal array.of() polyfill polyfill running the following code before any other code will create array.of() if it's not natively available.
Array.prototype.slice() - JavaScript
end optional zero-based index before which to end extraction.
Array.prototype.some() - JavaScript
the range of elements processed by some() is set before the first invocation of callback.
Array.prototype.splice() - JavaScript
examples remove 0 (zero) elements before index 2, and insert "drum" let myfish = ['angel', 'clown', 'mandarin', 'sturgeon'] let removed = myfish.splice(2, 0, 'drum') // myfish is ["angel", "clown", "drum", "mandarin", "sturgeon"] // removed is [], no elements removed remove 0 (zero) elements before index 2, and insert "drum" and "guitar" let myfish = ['angel', 'clown', 'mandarin', 'sturgeon'] let removed = myfish.splice(2, 0, 'drum'...
ArrayBuffer.prototype.slice() - JavaScript
end optional byte index before which to end slicing.
Atomics - JavaScript
atomic operations make sure that predictable values are written and read, that operations are finished before the next operation starts and that operations are not interrupted.
BigInt64Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
BigUint64Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Date.prototype.getYear() - JavaScript
to take into account years before and after 2000, you should use getfullyear() instead of getyear() so that the year is specified in full.
Date.prototype.setDate() - JavaScript
-1 would result in the date being set to 1 day before the last day of the previous month.
Date - JavaScript
due to the differing lengths of days (due to daylight saving changeover), months, and years, expressing elapsed time in units greater than hours, minutes, and seconds requires addressing a number of issues, and should be thoroughly researched before being attempted.
Error.prototype.stack - JavaScript
argument values in the stack: prior to firefox 14, the function name would be followed by the argument values converted to string in parentheses immediately before the at (@) sign.
Float32Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Float64Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Function.arguments - JavaScript
examples using the arguments object function f(n) { g(n - 1) } function g(n) { console.log('before: ' + g.arguments[0]) if (n > 0) { f(n) } console.log('after: ' + g.arguments[0]) } f(2) console.log('returned: ' + g.arguments) // output // before: 1 // before: 0 // after: 0 // after: 1 // returned: null specifications not part of any standard.
Int16Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Int32Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Int8Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Intl.Collator.prototype.compare() - JavaScript
description the compare getter function returns a number indicating how string1 and string2 compare to each other according to the sort order of this collator object: a negative value if string1 comes before string2; a positive value if string1 comes after string2; 0 if they are considered equal.
JSON.stringify() - JavaScript
before this change json.stringify would output lone surrogates if the input contained any lone surrogates; such strings could not be encoded in valid utf-8 or utf-16: json.stringify("\ud800"); // '"�"' but with this change json.stringify represents lone surrogates using json escape sequences that can be encoded in valid utf-8 or utf-16: json.stringify("\ud800"); // '"\\ud800"' this change should b...
Number.NEGATIVE_INFINITY - JavaScript
when the if statement executes, smallnumber has the value -infinity, so smallnumber is set to a more manageable value before continuing.
Number.POSITIVE_INFINITY - JavaScript
when the if statement executes, bignumber has the value infinity, so bignumber is set to a more manageable value before continuing.
Object.assign() - JavaScript
in case of an error, for example if a property is non-writable, a typeerror is raised, and the target object is changed if any properties are added before the error is raised.
Object.prototype.constructor - JavaScript
child = object.assign(parentwithstatic) // notice that we assign it before we create(...) a prototype below child.prototype = object.create(parentwithstatic.prototype) ...
Object.is() - JavaScript
the == operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as "" == false being true), but object.is doesn't coerce either value.
Object.prototype.__proto__ - JavaScript
if some other __proto__ property is found before object.prototype is consulted, that property will hide the one found on object.prototype.
Promise.resolve() - JavaScript
resolving thenables and throwing errors // resolving a thenable object var p1 = promise.resolve({ then: function(onfulfill, onreject) { onfulfill('fulfilled!'); } }); console.log(p1 instanceof promise) // true, object casted to a promise p1.then(function(v) { console.log(v); // "fulfilled!" }, function(e) { // not called }); // thenable throws before callback // promise rejects var thenable = { then: function(resolve) { throw new typeerror('throwing'); resolve('resolving'); }}; var p2 = promise.resolve(thenable); p2.then(function(v) { // not called }, function(e) { console.error(e); // typeerror: throwing }); // thenable throws after callback // promise resolves var thenable = { then: function(resolve) { resolve('resolving'); th...
SharedArrayBuffer.prototype.slice() - JavaScript
end optional zero-based index before which to end extraction.
String.prototype.charCodeAt() - JavaScript
'abc'.charcodeat(0) // returns 65 fixing charcodeat() to handle non-basic-multilingual-plane characters if their presence earlier in the string is unknown this version might be used in for loops and the like when it is unknown whether non-bmp characters exist before the specified index position.
String.prototype.concat() - JavaScript
if the arguments are not of the type string, they are converted to string values before concatenating.
String.prototype.slice() - JavaScript
endindex optional the zero-based index before which to end extraction.
String.prototype.trim() - JavaScript
polyfill running the following code before any other code will create trim() if it's not natively available.
String - JavaScript
string.prototype.localecompare(comparestring [, locales [, options]]) returns a number indicating whether the reference string comparestring comes before, after, or is equivalent to the given string in sort order.
TypedArray.prototype.filter() - JavaScript
the range of elements processed by filter() is set before the first invocation of callback.
TypedArray.prototype.find() - JavaScript
the range of elements processed by find is set before the first invocation of callback.
TypedArray.prototype.findIndex() - JavaScript
the range of elements processed by findindex is set before the first invocation of callback.
TypedArray.prototype.map() - JavaScript
the range of elements processed by map() is set before the first invocation of mapfn.
TypedArray.prototype.slice() - JavaScript
end optional zero-based index before which to end extraction.
TypedArray - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Uint16Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Uint32Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Uint8Array() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Uint8ClampedArray() constructor - JavaScript
each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
WeakRef - JavaScript
if the target of a weakref is also in a finalizationregistry, the weakref's target is cleared at the same time or before any cleanup callback associated with the registry is called; if your cleanup callback calls deref on a weakref for the object, it will receive undefined.
WebAssembly.compile() - JavaScript
this function is useful if it is necessary to a compile a module before it can be instantiated (otherwise, the webassembly.instantiate() function should be used).
WebAssembly.compileStreaming() - JavaScript
this function is useful if it is necessary to a compile a module before it can be instantiated (otherwise, the webassembly.instantiatestreaming() function should be used).
Bitwise AND (&) - JavaScript
for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
Bitwise NOT (~) - JavaScript
for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
Bitwise OR (|) - JavaScript
for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
Bitwise XOR (^) - JavaScript
for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
Comma operator (,) - JavaScript
var a, b, c; a = b = 3, c = 4; // returns 4 in console console.log(a); // 3 (left-most) var x, y, z; x = (y = 5, z = 6); // returns 6 in console console.log(x); // 6 (right-most) processing and then returning another example that one could make with comma operator is processing before returning.
Equality (==) - JavaScript
if the operands are of different types, try to convert them to the same type before comparing: when comparing a number to a string, try to convert the string to a numeric value.
Exponentiation (**) - JavaScript
that is, you cannot put a unary operator (+/-/~/!/delete/void/typeof) immediately before the base number; doing so will cause a syntaxerror.
Logical AND (&&) - JavaScript
see example: function a(){ console.log('called a'); return false; } function b(){ console.log('called b'); return true; } console.log( a() && b() ); // logs "called a" due to the function call, // then logs false (which is the resulting value of the operator) operator precedence the following expressions might seem equivalent, but they are not, because the && operator is executed before the || operator (see operator precedence).
Logical OR (||) - JavaScript
see example: function a(){ console.log('called a'); return false; } function b(){ console.log('called b'); return true; } console.log( b() || a() ); // logs "called b" due to the function call, // then logs true (which is the resulting value of the operator) operator precedence the following expressions might seem equivalent, but they are not, because the && operator is executed before the || operator (see operator precedence).
Strict equality (===) - JavaScript
the most notable difference between this operator and the equality (==) operator is that if the operands are of different types, the == operator attempts to convert them to the same type before comparing.
await - JavaScript
an await can split execution flow, allowing the caller of the await's function to resume execution before the deferred continuation of the await's function.
Function expression - JavaScript
you can't use function expressions before you create them: console.log(nothoisted) // undefined // even though the variable name is hoisted, the definition isn't.
instanceof - JavaScript
(!mycar will be evaluated before instanceof, so you always try to know if a boolean is an instance of car).
block - JavaScript
for example: var x = 1; { var x = 2; } console.log(x); // logs 2 this logs 2 because the var x statement within the block is in the same scope as the var x statement before the block.
for await...of - JavaScript
in that case it internally awaits emitted values before assign them to the loop control variable.
function declaration - JavaScript
you can use the function before you declared it: hoisted(); // logs "foo" function hoisted() { console.log('foo'); } note that function expressions are not hoisted: nothoisted(); // typeerror: nothoisted is not a function var nothoisted = function() { console.log('bar'); }; examples using function the following code declares a function that returns the total amount of sales, when given the number of units sold of...
let - JavaScript
accessing the variable before the initialization results in a referenceerror.
switch - JavaScript
javascript will drop you back to the default if it can't find a match: var foo = 5; switch (foo) { case 2: console.log(2); break; // it encounters this break so will not continue into 'default:' default: console.log('default') // fall-through case 1: console.log('1'); } it also works when you put default before all other cases.
try...catch - JavaScript
function isvalidjson(text) { try { json.parse(text); return true; } catch { return false; } } the finally-block the finally-block contains statements to execute after the try-block and catch-block(s) execute, but before the statements following the try...catch...finally-block.
Statements and declarations - JavaScript
the condition is evaluated before executing the statement.
JavaScript typed arrays - JavaScript
we can confirm that it is indeed 16 bytes long, and that's about it: if (buffer.bytelength === 16) { console.log("yes, it's 16 bytes."); } else { console.log("oh no, it's the wrong size!"); } before we can really work with this buffer, we need to create a view.
categories - Web app manifests
note: categories values are lower-cased by the stores and catalogs before processing, so "news" and "news" are treated as the same value.
MathML attribute reference - MathML
lspace <mo>, <mpadded> the amount of space before the operator (see length for values and units).
<mo> - MathML
WebMathMLElementmo
lspace the amount of space before the operator (see length for values and units).
<mstyle> - MathML
WebMathMLElementmstyle
the values before, after and duplicate are allowed.
Web audio codec guide - Web media technologies
be sure to refer to the compatibility tables before committing to a given media format.
The "codecs" parameter in common media types - Web media technologies
this is not as widely used as it was before cbp was introduced.
Using images in HTML - Web media technologies
WebMediaimages
mapping the width and height attributes of media container elements to their aspect-ratio this changes how browsers load images so their aspect ratios are calculated by the browser early on and can later be used to correct the display size of an image before it's loaded.
OpenSearch description format
if you want to put your search plugin on amo, remove the auto-updating feature before submitting it.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
if an issue arises in production, synthetic monitoring can provide insight, helping identify, isolate, and resolve problems before they negatively user experience.
Introduction to progressive web apps - Progressive web apps (PWAs)
browser support as mentioned before, pwas don't depend on a single api, but rather using various technologies to achieve the goal of delivering the best web experience possible.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
as mentioned before, to be able to receive push messages, you have to have a service worker, the basics of which are already explained in the making pwas work offline with service workers article.
Graphic design for responsive sites - Progressive web apps (PWAs)
this means that the default layout before any media queries are encountered in the css is the small screen/mobile layout, not the wide screen/desktop layout.
SVG Conditional Processing Attributes - SVG: Scalable Vector Graphics
externalresourcesrequired requiredextensions requiredfeatures systemlanguage attributes externalresourcesrequired deprecated since svg 2 if set to true, it indicates that the browser must wait for all the external resources necessary to render that element to be loaded before processing the associated element.
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical|inherit; animatable: yes baseline-shift it allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element.
begin - SVG: Scalable Vector Graphics
WebSVGAttributebegin
those are: focus, blur, focusin, focusout, activate, auxclick, click, dblclick, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, wheel, beforeinput, input, keydown, keyup, compositionstart, compositionupdate, compositionend, load, unload, abort, error, select, resize, scroll, beginevent, endevent, and repeatevent.
class - SVG: Scalable Vector Graphics
WebSVGAttributeclass
unless explicitly described differently, lists within svg's xml attributes can be either comma-separated (with optional white space before or after the comma), or white space-separated.
dominant-baseline - SVG: Scalable Vector Graphics
text-before-edge the baseline-identifier for the dominant-baseline is set to be text-before-edge.
end - SVG: Scalable Vector Graphics
WebSVGAttributeend
those are: focus, blur, focusin, focusout, activate, auxclick, click, dblclick, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, wheel, beforeinput, input, keydown, keyup, compositionstart, compositionupdate, compositionend, load, unload, abort, error, select, resize, scroll, beginevent, endevent, and repeatevent .
href - SVG: Scalable Vector Graphics
WebSVGAttributehref
note: specifications before svg 2 defined an xlink:href attribute, which is now rendered obsolete by the href attribute.
text-anchor - SVG: Scalable Vector Graphics
then, the text string is mapped onto the path with this midpoint placed at the current text position.) end the rendered characters are shifted such that the end of the resulting rendered text (final current text position before applying the text-anchor property) is at the initial current text position.
vector-effect - SVG: Scalable Vector Graphics
vector effects are applied before any of the other compositing operations, i.e.
<feDiffuseLighting> - SVG: Scalable Vector Graphics
multiple light sources can be simulated by adding several of these light maps together before applying it to the texture image.
<feSpecularLighting> - SVG: Scalable Vector Graphics
multiple light sources can be simulated by adding several of these light maps before applying it to the texture image.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
vector effects are applied before any of the other compositing operations, i.e.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
general change notes length attribute and indexed property for list interfaces implementation status unknown <script> element in content model of all elements implementation status unknown initialize(), appenditem(), replaceitem(), and insertitembefore() on list objects making a copy of any list item being inserted that is already in another list implementation status unknown crossorigin attribute for <image> and <script> elements not implemented yet (at least for <image>; bug 1240357) rendering model change notes svg root and <foreignobject> not overflow:hidden in ua style sheet implementation...
SVG animation with SMIL - SVG: Scalable Vector Graphics
idth="300" height="100"> <title>svg smil animate with path</title> <rect x="0" y="0" width="300" height="100" stroke="black" stroke-width="1" /> <circle cx="0" cy="50" r="15" fill="blue" stroke="black" stroke-width="1"> <animatemotion path="m 0 0 h 300 z" dur="3s" repeatcount="indefinite" /> </circle> </svg> view live sample example 2: curved motion same example as before with a curved path and following the direction of the path.
Gradients in SVG - SVG: Scalable Vector Graphics
.25" r="0.25"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#radialgradient1)"/> <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#radialgradient2)"/> </svg> screenshotlive sample the stops used here are the same as before, but now the object will be red in the center, and in all directions gradually change to blue at the edge.
Tools for SVG - SVG: Scalable Vector Graphics
adobe illustrator url: www.adobe.com/products/illustrator/ before adobe acquired macromedia, it was the most prominent promoter of svg.
Subdomain takeovers - Web security
during provisioning an attacker sets up a virtual host for a subdomain name you bought on the hosting provider, before you get to do it.
Web security
privacy and the :visited selector before about 2010, the css :visited selector allowed websites to uncover a user's browsing history and figure out what sites the user had visited.
preceding-sibling - XPath
the preceding-sibling axis indicates all the nodes that have the same parent as the context node and appear before the context node in the source document.
Axes - XPath
WebXPathAxes
preceding-sibling indicates all the nodes that have the same parent as the context node and appear before the context node in the source document.
number - XPath
notes strings are converted to a number by stripping the leading whitespace in the string before the number and ignoring whitespace after the number.
string - XPath
decimal numbers between -1 and 1 are converted to a string with a single leading 0 before the decimal point.
Functions - XPath
ecific document() xslt-specific element-available() false() floor() format-number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not() number() position() round() starts-with() string() string-length() substring() substring-after() substring-before() sum() system-property() xslt-specific translate() true() unparsed-entity-url() xslt-specific (not supported) ...
<xsl:attribute> - XSLT: Extensible Stylesheet Language Transformations
the element must be defined before any other output document element inside the output document element for which it establishes attribute values.
<xsl:for-each> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementfor-each
if one or more <xsl:sort> elements appear as the children of this element, sorting occurs before processing.
<xsl:import> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementimport
type top-level, must appear before any other child of <xsl:stylesheet> or <xsl:transform> in the importing stylesheet.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementsort
type subinstruction, always appears as a child of <xsl:for-each>, where it must appear before the template proper or of <xsl:apply-templates>.
An Overview - XSLT: Extensible Stylesheet Language Transformations
before transformation can take place, the primary xml document(s) and the stylesheet document(s) must be run through a parser, which creates an abstract representation of the structure of the document in memory.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
ported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) translate() (supported) true() (supported) unparsed-entity-url() (not supported) ...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
ed) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) translate() (supported) true() (supported) unparsed-entity-url() (not supported) for further reading books online the world wide web consortium portals articles tutorials/examples mailing lists/newsgroups resources index original document information copyright information: copyright © 2001-200...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
creating an xsltprocessor to start, you need to create an xsltprocessor object: var processor = new xsltprocessor(); specifying the stylesheet before you can use it, you must import a stylesheet with the xsltprocessor.importstylesheet() method.
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
the stylesheet has to be passed in as an xml document, which means that the .xsl file has to be loaded by the page before calling xsltprocessor.importstylesheet().
Index - WebAssembly
8 index index, webassembly found 12 pages: 9 loading and running webassembly code fetch, javascript, webassembly, xmlhttprequest, bytecode to use webassembly in javascript, you first need to pull your module into memory before compilation/instantiation.
Loading and running WebAssembly code - WebAssembly
to use webassembly in javascript, you first need to pull your module into memory before compilation/instantiation.
Compiling from Rust to WebAssembly - WebAssembly
before we move on to the next section, we should talk a bit more about wasm-bindgen.
Converting WebAssembly text format to wasm - WebAssembly
we need to assemble this textual representation into the assembly language the browser actually reads before we can use it.
Compiling an Existing C Module to WebAssembly - WebAssembly
many projects rely on autoconf/automake to generate system-specific code before compilation.