Search completed in 2.90 seconds.
506 results for "Counter":
Your results are loading. Please wait...
@counter-style - CSS: Cascading Style Sheets
the @counter-style css at-rule lets you define counter styles that are not part of the predefined set of styles.
... a @counter-style rule defines how to convert a counter value into a string representation.
... @counter-style thumbs { system: cyclic; symbols: "\1f44d"; suffix: " "; } ul { list-style: thumbs; } the initial version of css defined a set of useful counter styles.
...And 18 more matches
Using CSS counters - CSS: Cascading Style Sheets
css counters let you adjust the appearance of content based on its location in a document.
... for example, you can use counters to automatically number the headings in a webpage.
... counters are, in essence, variables maintained by css whose values may be incremented by css rules to track how many times they're used.
...And 16 more matches
CSSCounterStyleRule - Web APIs
the csscounterstylerule interface represents an @counter-style at-rule.
...eight="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">cssrule</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/csscounterstylerule" target="_top"><rect x="116" y="1" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">csscounterstylerule</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this i...
... csscounterstylerule.name is a domstring object that contains the serialization of the <counter-style-name> defined for the associated rule.
...And 11 more matches
counters() - CSS: Cascading Style Sheets
WebCSScounters
the counters() css function enables nested counters, returning a concatenated string representing the current values of the named counters, if there are any.
... the counters() function has two forms: 'counters(name, string)' or 'counters(name, string, style)'.
...the generated text is the value of all counters with the given name, from outermost to innermost, separated by the specified string.
...And 11 more matches
counter-set - CSS: Cascading Style Sheets
the counter-set css property sets a css counter to a given value.
... it manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element.
... note: the counter's value can be incremented or decremented using the counter-increment css property.
...And 8 more matches
counter-reset - CSS: Cascading Style Sheets
the counter-reset css property resets a css counter to a given value.
... note: the counter's value can be increased or decreased using the counter-increment css property.
... syntax /* set "my-counter" to 0 */ counter-reset: my-counter; /* set "my-counter" to -1 */ counter-reset: my-counter -1; /* set "counter1" to 1, and "counter2" to 4 */ counter-reset: counter1 1 counter2 4; /* cancel any reset that could have been set in less specific rules */ counter-reset: none; /* global values */ counter-reset: inherit; counter-reset: initial; counter-reset: unset; the counter-reset property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
...And 7 more matches
counter() - CSS: Cascading Style Sheets
WebCSScounter
the counter() css function returns a string representing the current value of the named counter, if there is one.
... /* simple usage */ counter(countername); /* changing the counter display */ counter(countername, upper-roman) a counter has no visible effect by itself.
... the counter() function (and counters() function) is what makes it useful by returning developer defined strings (or images).
...And 7 more matches
counter-increment - CSS: Cascading Style Sheets
the counter-increment css property increases or decreases the value of a css counter by a given value.
... note: the counter's value can be reset to an arbitrary number using the counter-reset css property.
... syntax /* increment "my-counter" by 1 */ counter-increment: my-counter; /* decrement "my-counter" by 1 */ counter-increment: my-counter -1; /* increment "counter1" by 1, and decrement "counter2" by 4 */ counter-increment: counter1 counter2 -4; /* do not increment/decrement anything: used to override less specific rules */ counter-increment: none; /* global values */ counter-increment: inherit; counter-increment: initial; counter-increment: unset; the counter-increment property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
...And 6 more matches
CSSPrimitiveValue.getCounterValue() - Web APIs
the getcountervalue() method of the cssprimitivevalue interface is used to get the counter value.
... if this css value doesn't contain a counter value, a domexception is raised.
... modification to the corresponding style property can be achieved using the counter interface.
...And 4 more matches
JS_updateMallocCounter
this article covers features introduced in spidermonkey 17 decrement malloc counter.
... syntax void js_updatemalloccounter(jscontext *cx, size_t nbytes); name type description cx jscontext * pointer to a js context to decrement the malloc counter.
... nbytes size_t number of bytes to decrement from malloc counter.
...And 3 more matches
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
the ext_disjoint_timer_query.querycounterext() method of the webgl api records the current time into the corresponding query object.
... syntax void ext.querycounterext(query, target); parameters query a webglquery object for which to record the current time.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); var endquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); // ...
... ext.querycounterext(endquery, ext.timestamp_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
CSS Counter Styles - Web APIs
the css counter styles module allows to define custom counter styles, which can be used for css list-marker and generated-content counters.
... interfaces csscounterstylerule represents an @counter-style rule.
... specifications specification status comment css counter styles level 3 candidate recommendation initial definition ...
CSS Counter Styles - CSS: Cascading Style Sheets
css counter styles is a module of css that lets you define your own counter styles.
... reference properties counter-increment counter-reset at-rules @counter-style system additive-symbols negative prefix suffix range pad speak-as fallback guides using css counters describes how to use counters to number any html element or to perform complex counting.
... specifications specification status comment css counter styles level 3 candidate recommendation initial definition.
system - CSS: Cascading Style Sheets
the system descriptor specifies the algorithm to be used for converting the integer value of a counter to a string representation.
... it is used in a @counter-style to define the behavior of the defined style.
... if the algorithm specified in the system descriptor is unable to construct the representation for a particular counter value, then that value's representation will be constructed using the fallback system provided.
...And 36 more matches
Index - Web APIs
WebAPIIndex
217 authenticatorassertionresponse.authenticatordata api, authenticatorassertionresponse, property, reference, web authentication api, webauthn the authenticatordata property of the authenticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
... 391 css counter styles css, css counter styles, overview the css counter styles module allows to define custom counter styles, which can be used for css list-marker and generated-content counters.
... 404 csscounterstylerule api, css counter styles, interface, reference the csscounterstylerule interface represents an @counter-style at-rule.
...And 17 more matches
Closures - JavaScript
var counter = (function() { var privatecounter = 0; function changeby(val) { privatecounter += val; } return { increment: function() { changeby(1); }, decrement: function() { changeby(-1); }, value: function() { return privatecounter; } }; })(); console.log(counter.value()); // 0.
... counter.increment(); counter.increment(); console.log(counter.value()); // 2.
... counter.decrement(); console.log(counter.value()); // 1.
...And 12 more matches
content - CSS: Cascading Style Sheets
WebCSScontent
e; /* <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 normal and none, several values can be used simultaneously */ content: o...
...pen-quote chapter_counter; /* global values */ content: inherit; content: initial; content: unset; syntax values none the pseudo-element is not generated.
... <counter>() the value of a css counter, generally a number.
...And 11 more matches
AesCtrParams - Web APIs
this extra block is called the "counter block".
... a given counter block value must never be used more than once with the same key: given a message n blocks long, a different counter block must be used for every block.
... if the same key is used to encrypt more than one message, a different counter block must be used for all blocks across all messages.
...And 9 more matches
XPCOM Objects - Archive of obsolete content
} }; finally, here's a table summarizing the types you will most likely encounter in xpcom interfaces, and how to handle them: js type idl types notes strings autf8string, string, wstring, char*, others historically there have been several string types in xpcom.
...(your build will probably break, we'll cover this later on.) in the components directory, the file xsihellocounter.idl has the following contents: #include "nsisupports.idl" /** * counter for the hello world extension.
... */ [scriptable, uuid(bd46f689-6c1d-47d0-bc07-bb52b546b8b5)] interface xsihellocounter : nsisupports { /* the maximum allowed count.
...And 8 more matches
Index - Learn web development
10 wai-aria basics aria, accessibility, article, beginner, codingscripting, guide, html, javascript, learn, wai-aria, semantics this article has by no means covered all that's available in wai-aria, but it should have given you enough information to understand how to use it, and know some of the most common patterns you will encounter that require it.
... 54 introducing asynchronous javascript beginner, codingscripting, guide, introducing, javascript, learn, promises, async, asynchronous, await, callbacks in this article we briefly recap the problems associated with synchronous javascript, and take a first look at some of the different asynchronous techniques you'll encounter, showing how they can help us solve such problems.
... 56 client-side web apis api, articles, beginner, codingscripting, dom, graphics, javascript, landing, learn, media, module, webapi, data when writing client-side javascript for web sites or applications, you will quickly encounter application programming interfaces (apis).
...And 8 more matches
speak-as - CSS: Cascading Style Sheets
the speak-as descriptor specifies how a counter symbol constructed with a given @counter-style will be represented in the spoken form.
... for example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue.
... syntax /* keyword values */ speak-as: auto; speak-as: bullets; speak-as: numbers; speak-as: words; speak-as: spell-out; /* @counter-style name value */ speak-as: <counter-style-name>; values auto if the value of speak-as is specified as auto, then the effective value of speak-as will be determined based on the value of the system descriptor: if the value of system is alphabetic, the effective value of speak-as will be spell-out.
...And 8 more matches
list-style-type - CSS: Cascading Style Sheets
the list-style-type css property sets the marker (such as a disc, character, or custom counter style) of a list item element.
... syntax /* partial list of types */ list-style-type: disc; list-style-type: circle; list-style-type: square; list-style-type: decimal; list-style-type: georgian; list-style-type: trad-chinese-informal; list-style-type: kannada; /* <string> value */ list-style-type: '-'; /* identifier matching an @counter-style rule */ list-style-type: custom-counter-style; /* keyword value */ list-style-type: none; /* global values */ list-style-type: inherit; list-style-type: initial; list-style-type: unset; the list-style-type property may be defined as any one of: a <custom-ident> value a symbols() value a <string> value the keyword none.
... values <custom-ident> a identifier matching the value of a @counter-style or one of the predefined styles: symbols() defines an anonymous style of the list.
...And 7 more matches
Looping code - Learn web development
he might use the following loop to achieve this: a loop usually has one or more of the following features: a counter, which is initialized with a certain value — this is the starting point of the loop ("start: i have no food", above).
... a condition, which is a true/false test to determine whether the loop continues to run, or stops — usually when the counter reaches a certain value.
... an iterator, which generally increments the counter by a small amount on each successive loop, until the condition is no longer true.
...And 5 more matches
Tutorial: Embedding Rhino
context initializing standard objects collecting the arguments evaluating a script printing the result exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects counter example counter's constructors class name dynamic properties defining javascript "methods" adding counter to runscript runscript: a simple embedding about the simplest embedding of rhino possible is the runscript example.
... counter example the counter example is a simple host object.
...(note that because the java -jar option preempts the rest of the classpath, we can't use that and access the counter class.) $ java -cp "js.jar;examples" org.mozilla.javascript.tools.shell.main js> defineclass("counter") js> c = new counter(7) [object counter] js> c.count 7 js> c.count 8 js> c.count 9 js> c.resetcount() js> c.count 0 counter's constructors the zero-argument constructor is used by rhino runtime to create instances.
...And 5 more matches
negative - CSS: Cascading Style Sheets
when defining custom counter styles, the negative descriptor lets you alter the representations of negative counter values, by providing a way to specify symbols to be appended or prepended to the counter representation when the value is negative.
... syntax /* <symbol> values */ negative: "-"; /* prepends '-' if value is negative */ negative: "(" ")"; /* surrounds value by '(' and ')' if it is negative */ values first <symbol> this symbol will be prepended to the representation when the counter is negative.
... second <symbol> if present, this symbol will be appended to the representation when the counter is negative.
...And 5 more matches
range - CSS: Cascading Style Sheets
when defining custom counter styles, the range descriptor lets the author specify a range of counter values over which the style is applied.
... if a counter value is outside the specified range, then the fallback style will be used to construct the representation of that marker.
... syntax /* keyword value */ range: auto; /* range values */ range: 2 5; range: infinite 10; range: 6 infinite; range: infinite infinite; /* multiple range values */ range: 2 5, 8 10; range: infinite 6, 10 infinite; values auto the range depends on the counter system: for cyclic, numeric, and fixed systems, the range is negative infinity to positive infinity.
...And 4 more matches
JS::PerfMeasurement
the current implementation can measure eleven different types of low-level hardware and software events: events that can be measured bitmask passed to constructor counter variable what it measures perfmeasurement::cpu_cycles .cpu_cycles raw cpu clock cycles ::instructions .instructions total instructions executed ::cache_references .cache_references total number of memory accesses ::cache_misses .cache_misses memory accesses that missed the cache ::branch_instructions .branch_instruct...
... all the counter variables for events that are not being measured will have the fixed value (uint64)-1.
... the counter variables do not update in real time; they only change when stop is called.
...And 3 more matches
Redis Tips
counters set, incr, incrby list manipulation lpush, rpush, lpop, rpop, llen, linsert, lindex, etc.
... event logging lists, zsets, pubsub queues lists (rpush, blpop, blpoprpush, etc.) priority queues zsets membership sets, bitstrings state hashes heartbeats zsets hit counters zsets message broadcast pubsub search reverse indexes (never use keys in production) documentation redis has fantastic documentation.
... but some commands only work with numbers (like incr); for these, if your key can't be parsed as a number, it's an error: redis> set foo pie ok redis> incr foo (error) err value is not an integer or out of range atomic counters i guess that sounds like geiger counters.
...And 3 more matches
SubtleCrypto.encrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
...the web crypto api supports three different aes modes: ctr (counter mode) cbc (cipher block chaining) gcm (galois/counter mode) it's strongly recommended to use authenticated encryption, which includes checks that the ciphertext has not been modified by an attacker.
... aes-ctr this represents aes in counter mode, as specified in nist sp800-38a.
...And 3 more matches
<custom-ident> - CSS: Cascading Style Sheets
counter-reset counter-increment forbids the global css values (unset, initial, and inherit), as well as none.
... @counter-style list-style-type forbids the global css values (unset, initial, and inherit), as well as the values none, inline, and outside.
... css counter styles level 3the definition of '<custom-ident> for list-style-type' in that specification.
...And 3 more matches
Details of the object model - JavaScript
you could use the following definition for employee: var idcounter = 1; function employee(name, dept) { this.name = name || ''; this.dept = dept || 'general'; this.id = idcounter++; } with this definition, when you create a new employee, the constructor assigns it the next id in sequence and then increments the global id counter.
...however, idcounter gets incremented every time an employee object is created, for whatever purpose.
...suppose you have the following code: var idcounter = 1; function employee(name, dept) { this.name = name || ''; this.dept = dept || 'general'; this.id = idcounter++; } function manager(name, dept, reports) {...} manager.prototype = new employee; function workerbee(name, dept, projs) {...} workerbee.prototype = new employee; function engineer(name, projs, mach) {...} engineer.prototype = new workerbee; function salesperson(name, projs, quota) {...} salesperson.prototype = new workerbee; var mac = new engineer('wood, mac'); further assume that the definitions omitted here have the base property and call the constructor above them in the prototyp...
...And 3 more matches
CSS values and units - Learn web development
let's have a look at some of the types of value and unit you may frequently encounter, with examples so that you can try out different possible values.
... ems and rems em and rem are the two relative lengths you are likely to encounter most frequently when sizing anything from boxes to text.
... hexadecimal rgb values the next type of color value you are likely to encounter is hexadecimal codes.
...And 2 more matches
How CSS works - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, and html basics (study introduction to html.) objective: to understand the basics of how css and html are parsed by the browser, and what happens when a browser encounters css it does not understand.
... what happens if a browser encounters css it doesn't understand?
...given that css is being developed all the time, and is therefore ahead of what browsers can recognise, you might wonder what happens if a browser encounters a css selector or declaration it doesn't recognise.
...And 2 more matches
Plug-in Basics - Plugins
like a plug-in, the browser starts a helper application when the browser encounters a mime type that is mapped to it.
... when the browser encounters a mime type, it always searches for a registered plug-in first.
... the following stages outline the life of a plug-in from loading to deletion: when gecko encounters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it dynamically loads the plug-in code into memory, if it hasn't been loaded already, and it creates a new instance of the plug-in.
...And 2 more matches
CSSPrimitiveValue - Web APIs
css_counter the value is a counter or counters function.
... the value can be obtained by using the getcountervalue() method.
... methods cssprimitivevalue.getcountervalue() this method is used to get the counter value.
...And 2 more matches
symbols - CSS: Cascading Style Sheets
the symbols css descriptor is used to specify the symbols that the specified counter system will use to construct counter representations.
... values <symbol> represents a symbol used within the counter system.
...it is used within the @counter-style at-rule.
...And 2 more matches
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
--webkit-line-clampa:activeadditive-symbols (@counter-style)::after (:after)align-contentalign-itemsalign-selfall<an-plus-b><angle><angle-percentage>animationanimation-delayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-countanimation-nameanimation-play-stateanimation-timing-function@annotationannotation()attr()b::backdropbackdrop-filterbackface-visibilitybackgroundbackground-attachmentbackground-blend-modebackground-cli...
...terbox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counter>counter-incrementcounter-resetcounter-set@counter-stylecounters()cross-fade()cubic-bezier()::cue::cue-regioncursor<custom-ident>d:defaultdeg<dimension>:dirdirection:disableddisplay<display-box><display-inside><display-internal><display-legacy><display-listitem><display-outside>dpcmdpidppxdrop-shadow()eelement()ellipse()em:emptyempty-cells:enabledenv()exffallback (@counter-style)filter<filter-func...
...hmask-clipmask-compositemask-imagemask-modemask-originmask-positionmask-repeatmask-sizemask-typematrix()matrix3d()max()max-block-sizemax-heightmax-height (@viewport)max-inline-sizemax-widthmax-width (@viewport)max-zoom (@viewport)@mediamin()min-block-sizemin-heightmin-height (@viewport)min-inline-sizemin-widthmin-width (@viewport)min-zoom (@viewport)minmax()mix-blend-modemmmsn@namespacenegative (@counter-style):not:nth-child:nth-last-child:nth-last-of-type:nth-of-type<number>oobject-fitobject-positionoffsetoffset-anchoroffset-distanceoffset-pathoffset-rotate:only-child:only-of-typeopacityopacity():optionalorderorientation (@viewport)@ornamentsornaments()orphans:out-of-rangeoutlineoutline-coloroutline-offsetoutline-styleoutline-widthoverflowoverflow-anchoroverflow-blockoverflow-inlineoverflow-wrap...
...And 2 more matches
2D maze game with device orientation - Game development
ball.game = function(game) {}; ball.game.prototype = { create: function() {}, initlevels: function() {}, showlevel: function(level) {}, updatecounter: function() {}, managepause: function() {}, manageaudio: function() {}, update: function() {}, wallcollision: function() {}, handleorientation: function(e) {}, finishlevel: function() {} }; the create and update functions are framework-specific, while others will be our own creations: initlevels initializes the level data.
... updatecounter updates the time spent playing each level and records the total time spent playing the game..
...we have this printed out on the screen, but it would be good to update the values every second: this.time.events.loop(phaser.timer.second, this.updatecounter, this); this loop, also in the create function, will execute the updatecounter function every single second from the beginning of the game, so we can apply the changes accordingly.
... this is how the complete updatecounter function looks: updatecounter: function() { this.timer++; this.timertext.settext("time: "+this.timer); this.totaltimetext.settext("total time: "+(this.totaltimer+this.timer)); }, as you can see we’re incrementing the this.timer variable and updating the content of the text objects with the current values on each iteration, so the player sees the elapsed time.
How CSS is structured - Learn web development
specificity you may encounter scenarios where two selectors select the same html element.
...for example, @import imports a stylesheet into another css stylesheet: @import 'styles2.css'; one common @rule that you are likely to encounter is @media, which is used to create media queries.
... body { background-color: pink; } @media (min-width: 30em) { body { background-color: blue; } } you will encounter other @rules throughout these tutorials.
... lines of code: padding-top: 10px; padding-right: 15px; padding-bottom: 15px; padding-left: 5px; this one line: background: red url(bg-graphic.png) 10px 10px repeat-x fixed; is equivalent to these five lines: background-color: red; background-image: url(bg-graphic.png); background-position: 10px 10px; background-repeat: repeat-x; background-attachment: fixed; later in the course, you will encounter many other examples of shorthand properties.
Framework main features - Learn web development
this component should be responsible for tracking its own count state, and could be written like this: function counterbutton() { const [count] = usestate(0); return ( <button>clicked {count} times</button> ); } usestate() is a react hook which, given an initial data value, will keep track of that value as it is updated.
...let’s update our counterbutton code from above to allow it to count clicks: function counterbutton() { const [count, setcount] = usestate(0); return ( <button onclick={() => setcount(count + 1)}>clicked {count} times</button> ); } in this version we are using additional usestate() functionality to create a special setcount() function, which we can invoke to update the value of count.
... here’s a quick test for our counterbutton written with the help of react testing library — it tests a number of things, such as the button's existance, and whether the button is displaying the correct text after being clicked 0, 1, and 2 times: import react from "react"; import { render, fireevent } from "@testing-library/react"; import "@testing-library/jest-dom/extend-expect"; import counterbutton from "./counterbutton"; it(...
..."renders a semantic with an initial state of 0", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); expect(btn).tobeinthedocument(); expect(btn).tohavetextcontent("clicked 0 times"); }); it("increments the count when clicked", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); fireevent.click(btn); expect(btn).tohavetextcontent("clicked 1 times"); fireevent.click(btn); expect(btn).tohavetextcontent("clicked 2 times"); }); summary at this point you should have more of an idea about the actual languages, features, and tools you'll be using as you create applications with frameworks.
sslerr.html
-12283 (unused) ssl_error_bad_client -12282 "the server has encountered bad data from the client." this error code should occur only on sockets that are acting as servers.
... ssl_error_bad_server -12281 "the client has encountered bad data from the server." this error code should occur only on sockets that are acting as clients.
... ssl_error_unsupported_certificate_type -12280 "unsupported certificate type." the operation encountered a certificate that was not one of the well known certificate types handled by the certificate library.
...if encountered repeatedly on a server socket, this can indicate that the server is actively under a "million question" attack.
Shell global objects
makefinalizeobserver() get a special object whose finalization increases the counter returned by the finalizecount function.
... finalizecount() return the current value of the finalization counter that is incremented each time an object returned by the makefinalizeobserver is finalized.
... bailafter(number) start a counter to bail once after passing the given amount of possible bailout positions in ionmonkey.
...if denied types are encountered a typeerror will be thrown during cloning.
Console.countReset() - Web APIs
the console.countreset() method resets counter used with console.count().
...if omitted, countreset() resets the default counter to 0.
... examples for example, given code like this: let user = ""; function greet() { console.count(); return "hi " + user; } user = "bob"; greet(); user = "alice"; greet(); greet(); console.count(); console.countreset(); console output will look something like this: "default: 1" "default: 2" "default: 3" "default: 4" "default: 0" note that the call to console.counterreset() resets the value of the default counter to zero.
...with the string "bob" to the first invocation of count(), and the string "alice" to the second: let user = ""; function greet() { console.count(user); return "hi " + user; } user = "bob"; greet(); user = "alice"; greet(); greet(); console.countreset("bob"); console.count("alice"); we will see output like this: "bob: 1" "alice: 1" "alice: 2" "bob: 0" "alice: 3" resetting the value of the counter "bob" only changes the value of that counter.
ARIA: tab role - Accessibility
then, if the right arrow is being pressed, we increase our tab focus counter by one.
... if the counter is greater than the number of tab elements we have, we circle back to the first tab by setting that counter to 0.
... if the left arrow is being pressed, we decrease our tab focus counter by one, and if it is then less than 0, we set it number of tab elements minus one (to get to the last element).
... finally, we set focus to the tab element whose index is equal to the tab focus counter, and set its tabindex to 0 to make it tabbable.
pad - CSS: Cascading Style Sheets
the pad descriptor can be used with custom counter style definitions when you need the marker representations to have a minimum length.
... syntax pad: 3 "0"; values <integer> && <symbol> the <integer> specifies a minimum length that all counter representations must reach.
... formal definition related at-rule@counter-styleinitial value0 ""computed valueas specified formal syntax <integer> && <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...| <angle><linear-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples padding a counter html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style pad-example { system: numeric; symbols: "0" "1" "2" "3" "4" "5"; pad: 2 "0"; } .list { list-style: pad-example; } result specifications specification status comment css counter styles level 3the definition of 'pad' in that spe...
prefix - CSS: Cascading Style Sheets
the prefix descriptor of the @counter-style rule specifies content that will be prepended to the marker representation.
... formal definition related at-rule@counter-styleinitial value"" (the empty string)computed valueas specified formal syntax <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...near-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples adding a prefix to a counter html <ul class="index"> <li>the boy who lived</li> <li>the vanishing glass</li> <li>the letters from no one</li> <li>the keeper of the keys</li> <li>diagon alley</li> </ul> css @counter-style chapters { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; prefix: 'chapter '; } .index { list-style: chapters; padding-left: 15ch; } result specifications ...
... specification status comment css counter styles level 3the definition of 'prefix' in that specification.
symbols() - CSS: Cascading Style Sheets
WebCSSsymbols
the symbols() css function lets you define counter styles inline, directly as the value of a property such as list-style.
... unlike @counter-style, symbols() is anonymous (i.e., it can only be used once).
... although less powerful, it is shorter and easier to write than @counter-style.
... examples html <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ol> css ol { list-style: symbols(cyclic "*" "†" "‡"); } result specifications specification status comment css counter styles level 3the definition of 'symbols()' in that specification.
Extension Versioning, Update and Compatibility - Archive of obsolete content
(note the button caption is changed to hide information) problems you may encounter a problem where the content will not be displayed.
...unfortunately, i've encounter cases where adding the mime type to the server didnt help either.
...to enable the log: set the value of extensions.logging.enabled to true (using url about:config) run firefox from command with option -console if you encounter problems, search the output in console for your extension id, and see if failures were logged.
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
the simplest demonstration of the problem is as follows: typedef struct shareddata { prlock *ml; prcondvar *cv; print32 counter; } shareddata; static void forkedthread(void *arg) { shareddata *shared = (shareddata*)arg; while (--shared->counter > 0) pr_waitcondvar(shared->cv, pr_interval_no_timeout); return; } /* forkedthread */ printn main(printn argc, char **argv) { prthread *thread; shareddata shared; shared.ml = pr_newlock(); shared.cv = pr_newcondvar(shared.ml); shared.count...
...er = 10; thread = pr_createthread( pr_user_thread, forkedthread, &shared, pr_priority_normal, pr_local_thread, pr_joinable_thread, 0); do { pr_sleep(pr_secondstointerval(1)); pr_lock(shared.ml); if (0 == shared.counter) break; pr_notifycondvar(shared.cv); pr_unlock(shared.ml); } while (pr_true); rv = pr_jointhread(thread); return (pr_success == rv) ?
...it's difficult to tell exaclty where the updated <tt>counter</tt> is being stored.
Theme changes in Firefox 4 - Archive of obsolete content
overriding the default values themes can override the value of the iconsize attribute on each toolbar by specifying a special value for the counter-reset css property on the toolbar itself.
... css property on the toolbar element value forced on the iconsize attribute counter-reset: largeicons; large counter-reset: smallicons; small for toolbars in the upper part of the window, the counter-reset property can be set using a css rule that is applied depending on the user preference in the toolbar customization palette.
...thus, it includes this rule in browser.css: #nav-bar { counter-reset: smallicons; } to use large icons for add-on buttons in the bookmarks toolbar when the related user preference is set: #navigator-toolbox[iconsize="large"] > #personaltoolbar { counter-reset: largeicons; } to use large icons everywhere, including the menu bar, regardless of the user preference: #navigator-toolbox > toolbar, #addon-bar { counter-reset: largeicons; } creating a th...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
141 falsy codingscripting, glossary, javascript a falsy (sometimes written falsey) value is a value that is considered false when encountered in a boolean context.
...an example would be the process of getting an item of data and changing it, and then making sure some condition is checked such as, if a counter has reached a prescribed number.
... 464 truthy codingscripting, glossary, javascript in javascript, a truthy value is a value that is considered true when encountered in a boolean context.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
here we'll get the todo counter to update to show the correct number of todos still to complete, and correctly apply styling to completed todos (i.e.
... connecting the behavior in the footer to get the footer working, we need to implement the following thre areas of functionality: a pending todo counter.
... try restarting the dev server and going to localhost:4200 again, and you'll now see that we have a fully-operational battlestation “todos left” counter and clear button: if you're asking yourself why we're not just doing the toggle on the component, since the function is entirely self-contained and not at all needing anything from the service, then you are 100% right to ask that question!
Handling common JavaScript problems - Learn web development
javascript is not as permissive as html and css however — if the javascript engine encounters mistakes or unrecognized syntax, more often than not it will throw errors.
... note: again, there are many different ways to make use of the different polyfills you will encounter — consult each polyfill's individual documentation.
... finding help there are many other issues you'll encounter with javascript; the most important thing to know really is how to find answers online.
Memory reporting
counter-based reporters maintain a counter that is incremented on each relevant allocation and decremented on each relevant deallocation.
...we've had multiple bugs in the past with counter-based reporters.
... sometimes counter-based reporters are unavoidable, particularly when writing memory reporters for third-party code that cannot be modified.
Interval Timing
conceptually, they are based on free-running counters that increment at a fixed rate without possibility of outside influence (as might be observed if one was using a time-of-day clock that gets reset due to some administrative action).
... the counters have no fixed epoch and have a finite period.
... to make use of these counters, the application must declare a point in time, the epoch, and an amount of time elapsed since that epoch, the interval.
Tracing JIT
the trace monitor maintains some book-keeping information, as well as the collection of recorded fragments, held in a hashtable keyed by the interpreter's program counter and global object shape at the time of recording.
...every timespidermonkey interprets a backward-jump bytecode, the monitor makes note of the number of times the jump-target program-counter (pc) value has been jumped-to.
... if the side exit condition indicates that the trace exited unsuccessfully -- due to encountering sufficient memory pressure to trigger a garbage collection, running out of native stack space, expiring a timer or any similar abnormal condition -- the monitor returns to monitoring mode.
Background Tasks API - Web APIs
</p> <div class="container"> <div class="label">decoding quantum filament tachyon emissions...</div> <progress id="progress" value="0"></progress> <div class="button" id="startbutton"> start </div> <div class="label counter"> task <span id="currenttasknumber">0</span> of <span id="totaltaskcount">0</span> </div> </div> <div class="logbox"> <div class="logheader"> log </div> <div id="log"> </div> </div> the progress box uses a <progress> element to show the progress, along with a label with sections that are changed to present numeric information about the progress.
...der-bottom: 1px solid black; border-radius: 6px 6px 0 0; } #log { font: 12px "courier", monospace; padding: 6px; overflow: auto; overflow-y: scroll; width: 388px; height: 460px; } .container { width: 400px; padding: 6px; border-radius: 6px; border: 1px solid black; box-shadow: 4px 4px 2px black; display: block; overflow: auto; } .label { display: inline-block; } .counter { text-align: right; padding-top: 4px; float: right; } .button { padding-top: 2px; padding-bottom: 4px; width: 100px; display: inline-block; float: left; border: 1px solid black; cursor: pointer; text-align: center; margin-top: 0; color: white; background-color: darkgreen; } #progress { width: 100%; padding-top: 6px; } javascript content now that the document ...
... totaltaskcount is a counter of the number of tasks that have been added to the queue; it will only go up, never down.
CSSRule - Web APIs
WebAPICSSRule
e.font_face_rule 5 cssfontfacerule cssrule.page_rule 6 csspagerule cssrule.keyframes_rule 7 csskeyframesrule cssrule.keyframe_rule 8 csskeyframerule reserved for future use 9 should be used to define color profiles in the future cssrule.namespace_rule 10 cssnamespacerule cssrule.counter_style_rule 11 csscounterstylerule cssrule.supports_rule 12 csssupportsrule cssrule.document_rule 13 cssdocumentrule cssrule.font_feature_values_rule 14 cssfontfeaturevaluesrule cssrule.viewport_rule 15 cssviewportrule cssrule.region_style_rule 16 cssregionstylerule cssrule.unk...
... css counter styles level 3the definition of 'cssrule' in that specification.
... candidate recommendation added value counter_style_rule.
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
must be ext.current_query_ext or ext.query_counter_bits_ext.
... if pname is ext.query_counter_bits_ext: a glint indicating the number of bits used to hold the query result for the given target.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); var currentquery = ext.getqueryext(ext.timestamp_ext, ext.current_query_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
Intersection Observer API - Web APIs
the code snippet below shows a callback which keeps a counter of how many times elements transition from not intersecting the root to intersecting by at least 75%.
...the snippet thus first checks that the transition is a positive one, then determines whether intersectionratio is above 75%, in which case it increments the counter.
... intersectioncallback(entries) => { entries.foreach(entry => { if (entry.isintersecting) { let elem = entry.target; if (entry.intersectionratio >= 0.75) { intersectioncounter++; } } }); } interfaces intersectionobserver the primary interface for the intersection observer api.
Using server-sent events - Web APIs
the php code for the example we're using here follows: date_default_timezone_set("america/new_york"); header("cache-control: no-cache"); header("content-type: text/event-stream"); $counter = rand(1, 10); while (true) { // every second, send a "ping" event.
... $counter--; if (!$counter) { echo 'data: this is a message at time ' .
..."\n\n"; $counter = rand(1, 10); } ob_end_flush(); flush(); sleep(1); } the code above generates an event every second, with the event type "ping".
SubtleCrypto.decrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
...note that counter must match the value that was used for encryption.
... function decryptmessage(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-ctr", counter, length: 64 }, key, ciphertext ); } aes-cbc this code decrypts ciphertext using aes in cbc mode.
SubtleCrypto.importKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
... you are most likely to encounter this object in pem format.
... again, you are most likely to encounter this object in pem format.
Accessibility documentation index - Accessibility
77 aria: timer role aria, aria role, aria widget, reference, role timer the timer role indicates to assistive technologies that an element is a numerical counter the amount of elapsed time from a starting point or the remaining time until an end point.
...while this results in a widget that looks like its desktop counterpart, there usually isn't enough semantic information in the markup to be usable by an assistive technology.
...these widgets are typically composed of <div> and <span> elements that do not, by nature, offer the same keyboard functionality that their desktop counterparts do.
additive-symbols - CSS: Cascading Style Sheets
the additive-symbols descriptor lets you specify symbols when the value of a counter system descriptor is additive.
... formal definition related at-rule@counter-styleinitial valuen/acomputed valueas specified formal syntax [ <integer> && <symbol> ]#where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...ercentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples specifying additive symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style additive-symbols-example { system: additive; additive-symbols: v 5, iv 4, i 1; } .list { list-style: additive-symbols-example; } result specifications specification status comment css counter styles level 3the definition of 'additive-symbols' in that specification.
fallback - CSS: Cascading Style Sheets
the fallback descriptor can be used to specify a counter style to fall back to if the current counter style cannot create a marker representation for a particular counter value.
... a couple of scenarios where a fallback style will be used are: when the range descriptor is specified for a counter style, the fallback style will be used to represent values that fall outside the range.
... formal definition related at-rule@counter-styleinitial valuedecimalcomputed valueas specified formal syntax <counter-style-name>where <counter-style-name> = <custom-ident> examples specifying a fallback counter style html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style fallback-example { system: fixed; symbols: "\24b6" "\24b7" "\24b8"; fallback: upper-alpha; } .list { list-style: fallback-example; } result specifications specification status comment css counter styles level 3the definition of 'fallback' in that speci...
suffix - CSS: Cascading Style Sheets
the suffix descriptor of the@counter-style rule specifies content that will be appended to the marker representation.
... formal definition related at-rule@counter-styleinitial value".
...ear-color-stop> = <color> <color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting a suffix for a counter html <ul class="choices"> <li>one</li> <li>two</li> <li>three</li> <li>none of the above</li> </ul> css @counter-style options { system: fixed; symbols: a b c d; suffix: ") "; } .choices { list-style: options; } result specifications specification status comment css counter styles level 3the definition of 'suffix' in that specification.
CSS Containment - CSS: Cascading Style Sheets
the main use case is to prevent situations where a css counter could be changed in an element, which could then affect the rest of the tree.
... using contain: style would ensure that the counter-increment and counter-set properties created new counters scoped to that subtree only.
... special values there are two special values of contain: content strict we encountered the first in the example above.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
mappings for margins, borders, and padding the specification details mappings for each logical value to a physical counterpart.
... margin examples the mapped margin properties of margin-inline-start, margin-inline-end, margin-block-start, and margin-inline-end can be used instead of their physical counterparts.
... padding examples the mapped padding properties of padding-inline-start, padding-inline-end, padding-block-start, and padding-inline-end can be used instead of their physical counterparts.
Loops and iteration - JavaScript
this expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of complexity.
...if continue is encountered, the program terminates the current iteration of checkj and begins the next iteration.
... each time continue is encountered, checkj reiterates until its condition returns false.
switch - JavaScript
when break is encountered, the program breaks out of switch and executes the statement following switch.
... see example here: var foo = 0; switch (foo) { case -1: console.log('negative 1'); break; case 0: // foo is 0 so criteria met here so this block will run console.log(0); // note: the forgotten break would have been here case 1: // no break statement in 'case 0:' so this case will run as well console.log(1); break; // it encounters this break so will not continue into 'case 2:' case 2: console.log(2); break; default: console.log('default'); } can i put a default between cases?
...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.
Media - Progressive web apps (PWAs)
action: printing a document note: this snippet only works on firefox since it erroneously increments the css counter for fix-position elemnts.
...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); counter-increment: page; } } /* end print only */ view this document in your browser.
...if your browser supports counters, it adds a page number in the footer.
passwords - Archive of obsolete content
oncomplete is called when the operation has completed successfully and onerror is called when the function encounters an error.
... the options parameter may also include oncomplete and onerror callback functions, which are called when the function has completed successfully and when it encounters an error, respectively.
JavaScript Object Management - Archive of obsolete content
this message has been shown 5 times." keep the counter as a variable in the browseroverlay object, and increment it every time the message is going to be shown.
...each window keeps its own counter, and now the extension is not behaving as expected.
CSS3 - Archive of obsolete content
css counter styles level 3 candidate recommendation testing modules css images module level 3 candidate recommendation defines the <image> data type.
... css box alignment module level 3 working draft selectors level 4 working draft css lists module level 3 working draft extends the list counter mechanism so that list markers can be styled and web developers can define new list counter schemes.
Index - Archive of obsolete content
one way is to encounter a file with an unknown content type, the other is to choose "save link target as" from the context menu of a link.
...if this happens, gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated mime type is encountered on the web.
MMgc - Archive of obsolete content
for every object it encounters, it sets the mark bit.
...when the gc encounters a false positive, it has to assume that it might be a pointer since it doesn't have an exact description of whether that memory is a pointer or not.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
the two browsers possess few core javascript differences; issues encountered are often timing related.
...check the javascript console if you encounter css-related issues.
Space Manager High Level Design - Archive of obsolete content
during the incremental reflow of dirty lines the block frame may encounter lines that are not dirty.
... a non-dirty line is encountered by the block frame in reflowdirtylines block frame calls 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 ...
Venkman Internals - Archive of obsolete content
in order to set a breakpoint in a particular function, you'll want to call scriptwrapper.setbreakpoint(pc[, parentbp]); where |pc| is the program counter location to set the breakpoint, and |parentbp| is an optional "future breakpoint" object to use as the parent for this breakpoint.
...from here, you can set and clear breakpoints by line number (instead of by program counter), locate a scriptwrapper for a given line number, and do a few other useful things.
Venkman Introduction - Archive of obsolete content
(note that venkman displays usage data when it starts up: "recorded local startup x, global yyy." this data comes from a counter built in to the application.
... for more information about this counter and the data, see item 2.2 in the venkman faq.) when you first start venkman, the basic views are arranged as in the screenshot above—though you can customize the layout and presence of the different views however you want, as we describe in the view customization section below.
application/http-index-format specification - Archive of obsolete content
if a number is encountered that a parser does not understand the parser is required to ignore that line.
...note that a 201 line encountered before a 200 line should be ignored.
2006-10-20 - Archive of obsolete content
marcus claims that when he builds firefox using centos he encounters crashes (segmentation faults) under linux distributions such as gentoo, suse and fedora.
... he also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't encounter any problems on the same machine.
Browser Feature Detection - Archive of obsolete content
dertopstyle true true true borderrightstyle true true true borderbottomstyle true true true borderleftstyle true true true bottom true true true captionside true false true clear true true true clip true true true content true false true counterincrement true false true counterreset true false true cue true false false cueafter true false false cuebefore true false false cursor true true true direction true true true elevation true false false emptycells true false true fontsize...
...ordertopstyle', 'supported': false}, {name: 'borderrightstyle', 'supported': false}, {name: 'borderbottomstyle', 'supported': false}, {name: 'borderleftstyle', 'supported': 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', 's...
Finishing up - Game development
let's first add a variable to store the number of lives in the same place where we declared our other variables: var lives = 3; drawing the life counter looks almost the same as drawing the score counter — add the following function to your code, below the drawscore() function: function drawlives() { ctx.font = "16px arial"; ctx.fillstyle = "#0095dd"; ctx.filltext("lives: "+lives, canvas.width-65, 20); } instead of ending the game immediately, we will decrease the number of lives until they are no longer available.
...you can check out this series' counterpart, 2d breakout game using phaser or the cyber orb built in phaser tutorial.
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
parsing can continue when a css file is encountered, but <script> tags—particularly those without an async or defer attribute—blocks rendering, and pauses parsing of html.
... when the browser encounters css styles, it parses the text into the css object model (or cssom), a data structure it then uses for styling layouts and painting.
Overflowing content - Learn web development
as you go further with css layout and writing css, you will encounter more overflow situations.
...in a legacy application, you may encounter a box where content is overlaying other content on the page.
The box model - Learn web development
when you move on to learn about css layout in more detail, you will encounter flex, and various other inner values that your boxes can have, for example grid.
... you will encounter things like flex layout later in these lessons; the key thing to remember for now is that changing the value of the display property can change whether the outer display type of a box is block or inline, which changes the way it displays alongside other elements in the layout.
How to structure a web form - Learn web development
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.
...a screen reader will speak an asterisk as "star" when encountered.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
from the second counter, you can work out each of these.
...to reset it, you'll want to set the counter back to 0, clear the interval, and then immediately update the display.
Introduction to events - Learn web development
first, there is a counterpart function, removeeventlistener(), which removes a previously added listener.
...gh each one, adding an onclick handler to each that makes it so that a random color is applied to each one when selected: const divs = document.queryselectorall('div'); for (let i = 0; i < divs.length; i++) { divs[i].onclick = function(e) { e.target.style.backgroundcolor = bgchange(); } } the output is as follows (try clicking around on it — have fun): most event handlers you'll encounter have a standard set of properties and functions (methods) available on the event object; see the event object reference for a full list.
Drawing graphics - Learn web development
the third is the circle's radius, the fourth and fifth are the start and end angles at which to draw the circle (so specifying 0 and 360 degrees gives us a full circle), and the sixth parameter defines whether the circle should be drawn counterclockwise (anticlockwise) or clockwise (false is clockwise).
... let's try adding another arc: ctx.fillstyle = 'yellow'; ctx.beginpath(); ctx.arc(200, 106, 50, degtorad(-45), degtorad(45), true); ctx.lineto(200, 106); ctx.fill(); the pattern here is very similar, but with two differences: we have set the last parameter of arc() to true, meaning that the arc is drawn counterclockwise, which means that even though the arc is specified as starting at -45 degrees and ending at 45 degrees, we draw the arc around the 270 degrees not inside this portion.
Adding features to our bouncing balls demo - Learn web development
finally, we want to add a score counter to track the number of balls left to capture.
... implementing the score counter to implement the score counter, follow the following steps: in your html file, add a <p> element just below the <h1> element containing the text "ball count: ".
React interactivity: Events and state - Learn web development
</button> note: this may seem counter-intuitive regarding best-practice advice that tends to advise against use of inline event handlers on html, but remember that jsx is actually part of your javascript.
...in fact, react will give you a warning in your devtools console — "warning: encountered two children with the same key..." we need to fix this.
Using Vue computed properties - Learn web development
previous overview: client-side javascript frameworks next in this article we'll add a counter that displays the number of completed todo items, using a feature of vue called computed properties.
... adding a summary counter add the following code to your app component object, below the methods property.
Understanding client-side JavaScript frameworks - Learn web development
here we'll get the todo counter to update to show the correct number of todos still to complete, and correctly apply styling to completed todos (i.e.
...using vue computed properties in this article we'll add a counter that displays the number of completed todo items, using a feature of vue called computed properties.
Handling common accessibility problems - Learn web development
finding help there are many other issues you'll encounter with accessibility; the most important thing to know really is how to find answers online.
... summary hopefully this article has given you a good grounding in the main accessibility problems you might encounter, and how to test and overcome them.
Introduction to automated testing - Learn web development
note: one problem with our watch command above is that our csslint/autoprefixer combination throws full-blown errors when a css error is encountered, which stops the watch working.
... you'll have to restart the watch once a css error is encountered, or find another way to do this.
Handling common HTML and CSS problems - Learn web development
if a browser encounters a declaration or rule it doesn't understand, it just skips it completely without applying it or throwing an error.
... finding help there are many other issues you'll encounter with html and css, making knowledge of how to find answers online invaluable.
Strategies for carrying out testing - Learn web development
previous overview: cross browser testing next this article starts the module off by providing an overview of the topic of (cross) browser testing, answering questions such as "what is cross-browser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high level principles of cross-browser testing.
...there are a number of sites that provide such stats, for example: netmarketshare statcounter these are both very north america-centric, and not particularly accurate, but they can give you an idea of broad trends.
Gecko info for Windows accessibility vendors
this makes it important to check the state_readonly flag when encountering a role_list, because the html list form element also uses role_list, but without state_readonly set.
... dhtml accessibility is supported this means that you may encounter roles that are not typically in html content.
Eclipse CDT
headers are only parsed once for performance reasons, eclipse only processes header files that have include guards once, using the compiler options for the first source file it encounters that includes that header (eclipse bug 380511).
... troubleshooting here is a list of problems people have encountered, and suggestions for solutions.
mozbrowseropensearch
when an instance of <link rel="search" type="application/opensearchdescription+xml"> is encountered.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseropensearch", function( event ) { console.log("new search engine encountered: " + event.details.title); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange ...
How Mozilla determines MIME Types
this means that, for example, if mozilla encounters a <link type="text/css" rel="stylesheet" href="..."> element, a type of text/css will be assumed.
...when encountering a non-text byte, the helper app dialog will be shown, showing the mime type corresponding to the extension of the file.
PerfMeasurement.jsm
reset() resets all the enabled counters to zero.
...for each enabled counter, the number of measured events of that type that occurred are added to the appropriate visible variable.
Mozilla Web Developer FAQ
the usual counter argument is that there is no need to guess—mozilla should do whatever browser x does (where x is the favorite non-mozilla browser of whoever is presenting the counter argument).
... the usual counter argument is that mozilla doesn’t need to match the behavior of browser x in every possible case but only in the alleged common cases.
Measuring performance using the PerfMeasurement.jsm code module
the monitor object automatically accumulates counts over start/stop cycles (that is, it doesn't automatically zero the counters each time you start recording).
... when you're done benchmarking, you can read out each of the counters you asked for as properties: let report = "cpu cycles: " + monitor.cpu_cycles + "\n" + "cache refs: " + monitor.cache_references + "\n" + "cache misses: " + monitor.cache_misses + "\n"; monitor.reset(); alert(report); the reset() method clears all of the enabled counters, as you might expect.
Profiling with Instruments
how do we monitor performance counters (cache miss etc.)?
... instruments has a "counters" instrument that can do this.
Phishing: a short definition
past and current countermeasures various technical, and social approaches, exist to combat phishing attacks.
... a study on the efficacy of security indicators, presented at the 2007 ieee symposium on security and privacy, suggests that the above countermeasures fail to protect the majority of users.
A brief guide to Mozilla preferences
if the application encounters any error during loading of a default pref file, the application will issue a warning that a configuration file has failed to load and then quit.
...if the application encounters an error when loading user pref files, the application will issue a warning but will continue running.
NSPR Error Handling
pr_io_error the preceding i/o function encountered some sort of an error, perhaps an invalid device.
... pr_end_of_file_error unexpectedly encountered end of file (mac os only).
PRIntervalTime
important note the counters used for interval times are allowed to overflow.
... since the sampling of the counter used to define an arbitrary epoch may have any 32-bit value, some care must be taken in the use of interval times.
Notes on TLS - SSL 3.0 Intolerant Servers
this is the main symptom of the problem when mozilla based browsers encounter tls/ssl 3.0 intolerant servers.
... netscape 6.1 or mozilla 0.9.2 and later these browsers shipped with the tls option on but also included a graceful rollback mechanism on the client side when they encounter known tls/ssl 3.0 intolerant servers.
Rhino scopes and contexts
that context will be returned and an internal counter incremented.
... only when the counter reaches zero will it be disassociated from the thread.
Index
er's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) 108 jsfreeop jsapi reference, reference, référence(2), spidermonkey various finalization api takes not jscontext * but rather either jsfreeop structure or its library-private counterpart freeop.
... 507 js_updatemalloccounter jsapi reference, reference, référence(2), spidermonkey js_updatemalloccounter decrements malloc counter of gc and the zone of the context.
Garbage collection
that means that we can't trace weak references when we encounter them during gc graph traversal.
... gc/statistics.{h,cpp} defines struct statistics, which stores spidermonkey gc performance counters.
Introduction to the JavaScript shell
line2pc([function, ] line) returns the program counter value corresponding to the specified line of code.
...if you specify a program counter offset into the function, the line number of the line of code containing that offset is returned.
JS_SetBranchCallback
a common technique is to use a counter.
... the callback simply increments the counter and does nothing further (returning js_true immediately) unless the counter has reached the threshold value.
A Web PKI x509 certificate primer
extensions can be marked as critical or non-critical, conforming certificate verification libraries should stop processing verification when encountering a critical extension that they do not understand ( and should continue processing if the extension is marked as non-critical) mozila::pkix has this behavior.
... error codes in firefox here are some common errors that might be encountered when working with certificates in firefox.
Starting WebLock
internally, the object knows the number of elements it has in its enumeration, and every time a client calls getnext, it decrements a counter - or adjusts a pointer to the next element.
... when the counter goes to zero or the pointer points to a non-element, hasmoreelements will return false.
Introduction to XPCOM for the DOM
nscomptr<nsifoo> ifooptr; getinterfaceifoo(getter_addrefs(ifooptr)); ifooptr->functionofnsifoo(); the peculiar syntax, getter_addrefs(pointer), is the nscomptr counterpart to the usual "&" (address-of) c operator.
... here is a simple problem i encountered recently: in a member function of the nshtmlanchorelement class, i had to get a pointer to the nsicontent interface implemented by the nshtmlanchorelement object.
nsIDOMSimpleGestureEvent
the value is specified in degrees for rotation events (where positive values indicate clockwise rotation and negative values indicate counter-clockwise rotation).
... rotation constants constant value description rotation_counterclockwise 1 counter-clockwise rotation.
LDAP Support
some notes about the relationship: there is a many to one relationship between ldap attributes and its address book counterpart.
... there is a one to one relationship between a address book attribute and its ldap counterpart.
Source map errors - Firefox Developer Tools
you can sometimes encounter problems working with source maps.
... you may encounter this when trying to open one of the original sources in the debugger.
AudioNode.channelInterpretation - Web APIs
fill each output channel with its input counterpart, that is the input channel with the same index.
... fill each output channel with its input counterpart, that is the input channel with the same index.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
the authenticatordata property of the authenticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
...the server will use this counter to detect authenticator cloning.
CSSPrimitiveValue.primitiveType - Web APIs
css_counter the value is a counter or counters function.
... the value can be obtained by using the getcountervalue() method.
CSS Object Model (CSSOM) - Web APIs
reference animationevent caretposition css csscharsetrule cssconditionrule csscounterstylerule cssfontfacerule cssfontfeaturevaluesmap cssfontfeaturevaluesrule cssgroupingrule cssimportrule csskeyframerule csskeyframesrule cssmarginrule cssmediarule cssnamespacerule csspagerule cssrule cssrulelist cssstyledeclaration cssstylesheet cssstylerule csssupportsrule cssvariablesmap cssviewportrule elementcssinlinestyle fontface fontfaceset fontfacesetloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylistli...
... css device adaptation working draft css counter styles level 3 candidate recommendation document object model (dom) level 2 style specification obsolete initial definition.
EXT_disjoint_timer_query - Web APIs
ext.query_counter_bits_ext a glint indicating the number of bits used to hold the query result for the given target.
... ext.querycounterext() records the current time into the corresponding query object.
EventTarget.addEventListener() - Web APIs
if (document.readystate=="complete") { var e=new event(); e.srcelement=window; wrapper2(e); } } else { this.attachevent("on"+type,wrapper); eventlisteners.push({object:this,type:type,listener:listener,wrapper:wrapper}); } }; var removeeventlistener=function(type,listener /*, usecapture (will be ignored) */) { var counter=0; while (counter<eventlisteners.length) { var eventlistener=eventlisteners[counter]; if (eventlistener.object==this && eventlistener.type==type && eventlistener.listener==listener) { if (type=="domcontentloaded") { this.detachevent("onreadystatechange",eventlistener.wrapper); } else { this.detachevent("on"+type,eventlistener.wrapp...
...er); } eventlisteners.splice(counter, 1); break; } ++counter; } }; element.prototype.addeventlistener=addeventlistener; element.prototype.removeeventlistener=removeeventlistener; if (htmldocument) { htmldocument.prototype.addeventlistener=addeventlistener; htmldocument.prototype.removeeventlistener=removeeventlistener; } if (window) { window.prototype.addeventlistener=addeventlistener; window.prototype.removeeventlistener=removeeventlistener; } } })(); older way to register event listeners addeventlistener() was introduced with the dom 2 events specification.
GlobalEventHandlers.onanimationiteration - Web APIs
var box = document.getelementbyid("box"); var iterationcounter = 0; box.onanimationiteration = function(event) { box.style.animationplaystate = "paused"; document.getelementbyid("play").innerhtml = "start iteration #" + (iterationcounter+1); }; this sets up two global variables: box, which references the "box" element that we're animating, and iterationcounter, which is initially zero, which indicates how many iterations of the animation have occurred...
... finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { box.style.animationplaystate = "running"; iterationcounter++; }, false); this sets the box element's animation-play-state to "running" and increments the iteration counter.
HTMLOrForeignElement.dataset - Web APIs
name conversion dash-style to camelcase conversion a custom data attribute name is transformed to a key for the domstringmap entry with the following rules the prefix data- is removed (including the dash); for any dash (u+002d) followed by an ascii lowercase letter a to z, the dash is removed, and the letter is transformed into its uppercase counterpart; other characters (including other dashes) are left unchanged.
... 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.
Timing element visibility with the Intersection Observer API - Web APIs
then, for each of the ads that are being suspended, we call our updateadtimer() function, which handles updating the ad's total visible time counter, then we set their dataset.lastviewstarted property to 0, which indicates that the tab's timer isn't running.
... updating an ad's visibility timer previously (see handling document visibility changes and handling periodic actions), we've seen that when we need to update an ad's "total visible time" counter, we call a function named updateadtimer() to do so.
RTCPeerConnection - Web APIs
such an event is sent when the associated identity provider (idp) encounters an error while generating an identity assertion.onidpvalidationerror the rtcpeerconnection.onidpvalidationerror event handler is a property containing the code to execute whent the idpvalidationerror event, of type rtcidentityerrorevent, is received by this rtcpeerconnection.
... such an event is sent when the associated identity provider (idp) encounters an error while validating an identity assertion.onnegotiationneeded the rtcpeerconnection interface's onnegotiationneeded property is an eventlistener which specifies a function which is called to handle the negotiationneeded event when it occurs on an rtcpeerconnection instance.
ReadableStream.pipeTo() - Web APIs
the pipeto() method of the readablestream interface pipes the current readablestream to a given writablestream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
...the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
WebGL constants - Web APIs
constant name value description cw 0x0900 passed to frontface to specify the front face of a polygon is drawn in the clockwise direction ccw 0x0901 passed to frontface to specify the front face of a polygon is drawn in the counter clockwise direction hints constants passed to webglrenderingcontext.hint() constant name value description dont_care 0x1100 there is no preference for this behavior.
... ext_disjoint_timer_query constant name value description query_counter_bits_ext 0x8864 the number of bits used to hold the query result for the given target.
Basic concepts behind Web Audio API - Web APIs
fill each output channel with its input counterpart, that is the input channel with the same index.
... fill each output channel with its input counterpart, that is the input channel with the same index.
Web APIs
WebAPI
aambient light eventsbbackground tasksbattery api beaconbluetooth apibroadcast channel apiccss counter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and stre...
...ernode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule csscounterstylerule cssgroupingrule cssimagevalue csskeyframerule csskeyframesrule csskeywordvalue cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedval...
Variable fonts guide - CSS: Cascading Style Sheets
as defined in the specification, there are two kinds of axes: registered and custom: registered axes are simply those that are most frequently encountered, and common enough that the authors of the specification felt it was worth standardizing.
...italic designs often include dramatically different letterforms from their upright counterparts, so in the transition from upright to italic, a number of glyph (or character) substitutions usually occur.
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
when people first encounter this, they are often surprised that the values do not follow the same order as the shorthand for margin – which runs clockwise: top, right, bottom, left.
...ant winter purslane fennel azuki bean earthnut pea sierra leone bologi leek soko chicory celtuce parsley jícama salsify.</p> </div> <nav> <ul> <li><a href="">link 1</a></li> <li><a href="">link 2</a></li> <li><a href="">link 3</a></li> </ul> </nav> </div> physical values and grid layout we encounter physical properties frequently when building websites, and while the grid placement and alignment properties and values respect writing modes, there are things you may want to do with grid that force you to use physical properties and values.
CSS Tutorials - CSS: Cascading Style Sheets
WebCSSTutorials
css counters counting items and pages is an easy task in css.
... learn to use counter-reset, counter-increment, counters(), and counter().
<angle> - CSS: Cascading Style Sheets
WebCSSangle
positive numbers represent clockwise angles, while negative numbers represent counterclockwise angles.
... examples setting a clockwise right angle 90deg = 100grad = 0.25turn ≈ 1.5708rad setting a flat angle 180deg = 200grad = 0.5turn ≈ 3.1416rad setting a counterclockwise right angle -90deg = -100grad = -0.25turn ≈ -1.5708rad setting a null angle 0 = 0deg = 0grad = 0turn = 0rad specifications specification status comment css values and units module level 4the definition of '<angle>' in that specification.
animation-fill-mode - CSS: Cascading Style Sheets
forwards the target will retain the computed values set by the last keyframe encountered during execution.
... the last keyframe depends on the value of animation-direction and animation-iteration-count: animation-direction animation-iteration-count last keyframe encountered normal even or odd 100% or to reverse even or odd 0% or from alternate even 0% or from alternate odd 100% or to alternate-reverse even 100% or to alternate-reverse odd 0% or from backwards the animation will apply the values defined in the first relevant keyframe as soon as it is applied to the target, and retain this during the animation-delay period.
rotate() - CSS: Cascading Style Sheets
if positive, the movement will be clockwise; if negative, it will be counter-clockwise.
...a positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one.
rotate3d() - CSS: Cascading Style Sheets
the <angle> represents the angle of rotation; if positive, the movement will be clockwise; if negative, it will be counter-clockwise.
...a positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one.
rotateX() - CSS: Cascading Style Sheets
if positive, the movement will be clockwise; if negative, it will be counter-clockwise.
...a positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one.
rotateY() - CSS: Cascading Style Sheets
if positive, the movement will be clockwise; if negative, it will be counter-clockwise.
...a positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one.
rotateZ() - CSS: Cascading Style Sheets
if positive, the movement will be clockwise; if negative, it will be counter-clockwise.
...a positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one.
Mouse gesture events - Developer guides
positive values are clockwise and negative values are counterclockwise.
... simplegestureevent.rotation_counterclockwise counter-clockwise rotation.
A re-introduction to JavaScript (JS tutorial) - JavaScript
you can use named iifes (immediately invoked function expressions) as shown below: var charsinbody = (function counter(elm) { if (elm.nodetype == 3) { // text_node return elm.nodevalue.length; } var count = 0; for (var i = 0, child; child = elm.childnodes[i]; i++) { count += counter(child); } return count; })(document.body); the name provided to a function expression as above is only available to the function's own scope.
... this is also a great counter to the lure of global variables.
JSON.stringify() - JavaScript
if any such values are encountered during conversion they are either omitted (when found in an object) or changed to null (when found in an array).
... var a = json.stringify({ foo: "bar", baz: "quux" }) //'{"foo":"bar","baz":"quux"}' var b = json.stringify({ baz: "quux", foo: "bar" }) //'{"baz":"quux","foo":"bar"}' console.log(a !== b) // true // some memoization functions use json.stringify to serialize arguments, // which may cause a cache miss when encountering the same object like above example of using json.stringify() with localstorage in a case where you want to store an object created by your user and allowing it to be restored even after the browser has been closed, the following example is a model for the applicability of json.stringify(): // creating an example of json var session = { 'screens': [], 'state': true }; session.screens.pu...
String - JavaScript
for example: let s1 = '2 + 2' // creates a string primitive let s2 = new string('2 + 2') // creates a string object console.log(eval(s1)) // returns the number 4 console.log(eval(s2)) // returns the string "2 + 2" for these reasons, the code may break when it encounters string objects when it expects a primitive string instead, although generally, authors need not worry about the distinction.
... a string object can always be converted to its primitive counterpart with the valueof() method.
WeakRef - JavaScript
examples using a weakref object this example starts a counter shown in a dom element, stopping when the element doesn't exist anymore: class counter { constructor(element) { // remember a weak reference to the dom element this.ref = new weakref(element); this.start(); } start() { if (this.timer) { return; } this.count = 0; const tick = () => { // get the element from the weak reference, if it still exists ...
...; if (element) { element.textcontent = ++this.count; } else { // the element doesn't exist anymore console.log("the element is gone."); this.stop(); this.ref = null; } }; tick(); this.timer = setinterval(tick, 1000); } stop() { if (this.timer) { clearinterval(this.timer); this.timer = 0; } } } const counter = new counter(document.getelementbyid("counter")); counter.start(); settimeout(() => { document.getelementbyid("counter").remove(); }, 5000); specifications specification weakrefsthe definition of 'weakref' in that specification.
continue - JavaScript
if continue is encountered, the program continues at the top of the checkj statement.
... each time continue is encountered, checkj reiterates until its condition returns false.
for - JavaScript
typically used to initialize a counter variable.
...generally used to update or increment the counter variable.
let - JavaScript
for example: var x = 'global'; let y = 'global'; console.log(this.x); // "global" console.log(this.y); // undefined emulating private members in dealing with constructors it is possible to use the let bindings to share one or more private members without using closures: var thing; { let privatescope = new weakmap(); let counter = 0; thing = function() { this.someproperty = 'foo'; privatescope.set(this, { hidden: ++counter, }); }; thing.prototype.showpublic = function() { return this.someproperty; }; thing.prototype.showprivate = function() { return privatescope.get(this).hidden; }; } console.log(typeof privatescope); // "undefined" var thing = new thing(); console.log(thing);...
...} you may encounter errors in switch statements because there is only one block.
Media container formats (file types) - Web media technologies
common container formats while there are a vast number of media container formats, the ones listed below are the ones you are most likely to encounter.
...however, you may also encounter mp3, ogg, webm, avi, and other formats.
Populating the page: how browsers work - Web Performance
in our example above, the request is definitely less than 14kb, but the linked resources aren't requested until the browser encounters the links during parsing, described below.
...parsing can continue when a css file is encountered, but <script> tags—particularly those without an async or defer attribute—block rendering, and pause the parsing of html.
Using dns-prefetch - Web Performance
you can safely use them together like so: <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin> <link rel="dns-prefetch" href="https://fonts.gstatic.com/"> note: if a page needs to make connections to many third-party domains, preconnecting them all is counterproductive.
...if a non-supporting browser encounters a dns-prefetch hint—or any other resource hint—your site won’t break.
StringView - Archive of obsolete content
you rarely need to invoke the stringview.valueof() method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
Extension Etiquette - Archive of obsolete content
ids firefox/thunderbird 1.5 or later are much more strict about the ids of extensions than their 1.0 counterparts.
Install Manifests - Archive of obsolete content
if a value for the application's os is encountered that requires any specific abi, the abi is considered important for that os and the application will refuse to install the add-on if it does not find a matching os/abi combination.
Migrating raw components to add-ons - Archive of obsolete content
as we roll this new behavior out, this document will be updated with additional information addressing scenarios we see developers encountering.
Local Storage - Archive of obsolete content
we recommend that you at least keep an error log, so that you can request error data from your users when you encounter problems that are hard to debug.
Setting Up a Development Environment - Archive of obsolete content
on the other hand, firebug has a very friendly, integrated user interface, and sees much more development that its counterparts.
The Box Model - Archive of obsolete content
you can have even more control over the size of flexible elements using the minwidth, maxwidth, minheight and maxheight attributes, or their css counterparts: min-width, max-width, min-height and max-height.
Performance best practices in extensions - Archive of obsolete content
loading modules incurs a small cost, so breaking code up to an unnecessary degree can be counter-productive.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
what disadvantages did you encounter?
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
mail folders implementing that solution, we encounter difficulties with mail folder.
Creating a Microsummary - Archive of obsolete content
then just link to the microsummaries from within the pages themselves using a <link rel="microsummary"> element, f.e.: <head> <link rel="microsummary" href="index.php?view=microsummary"> </head> when firefox encounters a <link rel="microsummary"> element, it loads the url in the href attribute.
Dehydra Frequently Asked Questions - Archive of obsolete content
if you encounter bugs or crashes, report them.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
, "mywindow", "chrome,resizable,centerscreen", null); // set this as the active window windowwatcher.setactivewindow(win); // hand over the application to xpcom/xul, this will block: appstartup.run(); here is an example of a locationprovider that works : public class locationprovider implements iappfilelocprovider { private final file libxulpath; int counter = 0; public locationprovider(file grepath) { this.libxulpath = grepath; } public file getfile(string aprop, boolean[] apersistent) { file file = null; if (aprop.equals("gred") || aprop.equals("grecomsd")) { file = libxulpath; if (aprop.equals("grecomsd")) { file = new file(file, "components"); } } ...
Disabling interruptible reflow - Archive of obsolete content
add the following variables to your environment to disable gecko interruptible reflow: gecko_reflow_interrupt_mode=counter gecko_reflow_interrupt_frequency=1000000 gecko_reflow_interrupt_checks_to_skip=1000000 now start firefox within this environment.
generateCRMFRequest() - Archive of obsolete content
"error:usercancel" the user has canceled the key generation operation "error:internalerror" the software encountered some internal error, such as out of memory ...
importUserCertificates - Archive of obsolete content
if it fails, one of the following error strings will be returned: error string description "error:usercancel" the user canceled the import operation "error:invalidcertificate" one of the certificate packages was incorrectly formatted "error:internalerror" the software encountered some internal error, such as out of memory "error:invalidrequestid" the request id in the response message does not match any outstanding request ...
popChallengeResponse - Archive of obsolete content
"error:internalerror" the software encountered some internal error, such as out of memory challenge-response proof of possession expected input: popodeckeychallcontent ::= sequence of challenge -- one challenge per encryption key certification request (in the -- same order as these requests appear in fullcerttemplates).
Overview of how downloads work - Archive of obsolete content
one way is to encounter a file with an unknown content type, the other is to choose "save link target as" from the context menu of a link.
Frequently Asked Questions - Archive of obsolete content
alternatively, if you're an svg user you can help by testing the svg enabled nightlies and filing bugs with minimal testcases whenever you encounter a problem.
Table Cellmap - Archive of obsolete content
the current solution is to use nscellmap::getdataat with a special argument aupdatezerospan to repair the cellmap if it encounters a empty cell (nsnull), by looking for a origin of a zero row- or colspan that spans the queried place in the cellmap.
Table Layout Strategy - Archive of obsolete content
later the column widths are balanced by basictablelayoutstrategy::balancecolumnwidths or the fixed layout counter part.
Actionscript Acceptance Tests - Archive of obsolete content
when that keyword is encountered, the test harness will run the test against all possible -swfversion versions: uses_swfversion is the equivalent of: -swfversion 9 -swfversion 10 -swfversion 11 -swfversion 12 ...
Using Breakpoints in Venkman - Archive of obsolete content
one of the most important aspects of debugging a script or software program is the ability to examine variables—function return values, errors, counters, variable scopes—as they change over the course of the script execution.
Anonymous Content - Archive of obsolete content
the insertion point used for a given piece of content is the first encountered with a selector whose node set matches the element when doing a depth-first walk of the content template.
Binding Attachment and Detachment - Archive of obsolete content
<constructor> call as a document is loaded and style rules are matched for elements, any binding documents that are encountered will load as needed.
Menus - Archive of obsolete content
the first menubar encountered when parsing the xul window will be used as the main menu bar for the window, and on the macintosh, will be hidden from the main window and transformed into a native menu bar at the top of the screen.
Broadcasters and Observers - Archive of obsolete content
like its attribute counterpart, it allows you to define an element to be an observer.
Creating a Wizard - Archive of obsolete content
if it returns false, then the wizard does not close, which might occur if the function savedoginfo() encountered invalid input, for example.
Focus and Selection - Archive of obsolete content
they work just like their html counterparts.
More Button Features - Archive of obsolete content
the style attribute functions similar to its html counterpart.
Using Remote XUL - Archive of obsolete content
<?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <iframe src="https://www.mozilla.org/" flex="1" /> </window> the xul iframe element is just like its html counterpart: it defines an area within which web content can be displayed.
The Implementation of the Application Object Model - Archive of obsolete content
to implement some sort of pluggable system that could do local/remote merging and mimic the functionality of rdf would require a month or two of engineering time that we can't afford to spend." that answer was the incorrect counter to the question.
datepicker - Archive of obsolete content
however, as described in mozilla bug #799219, a change event handler may encounter erratic behavior when the date is changed using the keyboard instead of the mouse.
timepicker - Archive of obsolete content
however, as described in mozilla bug #799219, a change event handler may encounter erratic behavior when the time is changed using the keyboard instead of the mouse.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.builds - september 30th to october 6th 2006 tb mozilla_1_8_branch build problem on mac os x (10.4.7, universal build) ludwig hügelschäfer stated that he has been encountering an error when he executes a "make export" operation on thunderbird (part of the mozilla_1_8_branch) since september 15th.
2006-11-03 - Archive of obsolete content
when he builds using the disable.crypto option he encounters the following problem: no rule to make target `../../dist/lib/components/libpipboot.a', needed by `minimo'.
2006-12-01 - Archive of obsolete content
paul reed has also requested that if any problems are encountered he should be contacted via irc in #build @ irc.mozilla.org.
2006-11-17 - Archive of obsolete content
users are asked to file bugs on encountered problems that are not present on the current trunk builds.
2006-11-17 - Archive of obsolete content
discussions xpidl crashes imycomp.h problems: "xpidl.exe has encountered a problem and needs to close" meetings none during this week.
NPN_Write - Archive of obsolete content
this indicates that the browser encountered an error while processing the data, so the plug-in should terminate the stream by calling npn_destroystream().
The First Install Problem - Archive of obsolete content
if this happens, gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated mime type is encountered on the web.
Security Controls - Archive of obsolete content
the motivation for having multiple layers is that if one layer fails or otherwise cannot counteract a certain threat, other layers might prevent the threat from successfully breaching the system.
Introduction to Public-Key Cryptography - Archive of obsolete content
for the rest of the session, the client presents the user's certificate to authenticate the user to each new server it encounters.
azimuth - Archive of obsolete content
ArchiveWebCSSazimuth
leftwards: moves the sound counter-clockwise by 20 degrees, relative to the current angle.
Debug.write - Archive of obsolete content
var counter = 42; debug.write("the value of counter is " + counter); requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
Debug.writeln - Archive of obsolete content
var counter = 42; debug.writeln("the value of counter is " + counter); requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
Debug - Archive of obsolete content
var counter = 42; debug.write("the value of counter is " + counter); requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
ion with for...of (firefox 13) array.from() (firefox 32) array.of() (firefox 25) array.prototype.fill() (firefox 31) array.prototype.find(), array.prototype.findindex() (firefox 25) array.prototype.entries(), array.prototype.keys() (firefox 28), array.prototype.values() array.prototype.copywithin() (firefox 32) get array[@@species] (firefox 48) new map and set objects, and their weak counterparts map (firefox 13) map iteration with for...of (firefox 17) map.prototype.foreach() (firefox 25) map.prototype.entries() (firefox 20) map.prototype.keys() (firefox 20) map.prototype.values() constructor argument: new map(null) (firefox 37) monkey-patched set() in constructor (firefox 37) get map[@@species] (firefox 41) set (firefox 13) set iteration w...
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
this technote explains the source of the problems and how to avoid encountering them.
The Business Benefits of Web Standards - Archive of obsolete content
geeks, marketers and bean-counters can all benefit from a standard-based web site.
Introduction to game development for the Web - Game development
the range of games that can be created is on par with desktop and native os counterparts.
Game promotion - Game development
write about your development process, nasty bugs you encounter, funny stories, lessons learned, and the ups and downs of being a game developer.
2D breakout game using pure JavaScript - Game development
note: if you are interested in learning about 2d web game development using a game library, consult this series' counterpart, 2d breakout game using phaser.
2D breakout game using Phaser - Game development
if you are not already familiar with pure javascript game development, we would suggest that you first work through this series' counterpart, 2d breakout game using pure javascript.
Boolean - MDN Web Docs Glossary: Definitions of Web-related terms
/* javascript if statement */ if (boolean conditional) { // code to execute if the conditional is true } if (boolean conditional) { console.log("boolean conditional resolved to true"); } else { console.log("boolean conditional resolved to false"); } /* javascript for loop */ for (control variable; boolean conditional; counter) { // code to execute repeatedly if the conditional is true } for (var i=0; i < 4; i++) { console.log("i print only when the boolean conditional is true"); } the boolean value is named after english mathematician george boole, who pioneered the field of mathematical logic.
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
a typical cipher suite looks like ecdhe_rsa_with_aes_128_gcm_sha256 or ecdhe-rsa-aes128-gcm-sha256, indicating: ecdhe (elliptic curve diffie-hellman ephemeral) for key exchange rsa for authentication aes-128 as the cipher, with galois/counter mode (gcm) as the block cipher mode of operation sha-256 as the hash-based message authentication code (hmac) learn more mozilla recommended cipher suite choices for tls ...
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
a falsy (sometimes written falsey) value is a value that is considered false when encountered in a boolean context.
Truthy - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, a truthy value is a value that is considered true when encountered in a boolean context.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
an example would be the process of getting an item of data and changing it, and then making sure some condition is checked such as, if a counter has reached a prescribed number.
HTML: A good basis for accessibility - Learn web development
when a screen reader encounters the second image, it reads out the full alt attribute — "a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.".
HTML: A good basis for accessibility - Learn web development
when a screen reader encounters the second image, it reads out the full alt attribute — "a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.".
Mobile accessibility - Learn web development
in general, small screen devices won't need images that are as large as their desktop counterparts, and they are more likely to be on slow network connections.
WAI-ARIA basics - Learn web development
summary this article has by no means covered all that's available in wai-aria, but it should have given you enough information to understand how to use it, and know some of the most common patterns you will encounter that require it.
Debugging CSS - Learn web development
previous overview: building blocks next sometimes when writing css you will encounter an issue where your css doesn't seem to be doing what you expect.
Handling different text directions - Learn web development
previous overview: building blocks next many of the properties and values that we have encountered so far in our css learning have been tied to the physical dimensions of our screen.
Images, media, and form elements - Learn web development
summary this lesson has highlighted some of the differences you will encounter when working with images, media, and other unusual elements in css.
Organizing your CSS - Learn web development
oocss most of the approaches that you will encounter owe something to the concept of object oriented css (oocss), an approach made popular by the work of nicole sullivan.
CSS building blocks - Learn web development
debugging css sometimes when writing css you will encounter an issue where your css doesn't seem to be doing what you expect.
Legacy layout methods - Learn web development
you will however encounter "grid systems" using these legacy methods from time to time.
Multiple-column layout - Learn web development
in a similar way to the border property that you encountered in previous lessons, column-rule is a shorthand for column-rule-color, column-rule-style, and column-rule-width, and accepts the same values as border.
Responsive design - Learn web development
by changing the values for flex-grow and flex-shrink you can indicate how you want the items to behave when they encounter more or less space around them.
Supporting older browsers - Learn web development
if you have no analytics or this is a brand new site, then there are sites such as statcounter that can provide statistics filtered by location.
What are browser developer tools? - Learn web development
it allows you to run lines of javascript against the page currently loaded in the browser, and reports the errors encountered as the browser tries to execute your code.
What are hyperlinks? - Learn web development
on the other hand, if your site has more than about ten pages, it's counter-productive to link to every page from every other page.
Basic native form controls - Learn web development
all rich text editors you'll encounter are custom widgets created with html, css, and javascript.
Client-side form validation - Learn web development
different types of client-side validation there are two different types of client-side validation that you'll encounter on the web: built-in form validation uses html5 form validation features, which we've discussed in many places throughout this module.
The HTML5 input types - Learn web development
phone number field a special field for filling in phone numbers can be created using tel as the value of the type attribute: <input type="tel" id="tel" name="tel"> when accessed via a touch device with a dynamic keyboard, most devices will display a numeric keypad when type="tel" is encountered, meaning this type is useful whenever a numeric keypad is useful, and doesn't just have to be used for telephone numbers.
UI pseudo-classes - Learn web development
background-color: red; font-size: 1.2em; transform: translate(3px, 3px) scale(0); transform-origin: center; transition: all 0.3s ease-in; } input[type="radio"]:checked::before { transform: translate(3px, 3px) scale(1); transition: all 0.3s cubic-bezier(0.25, 0.25, 0.56, 2); } this is really useful — screenreaders already let their users know when a radio button or checkbox they encounter is checked/selected, so you don't want them to read out another dom element that indicates selection — that could be confusing.
What’s in the head? Metadata in HTML - Learn web development
if you encounter problems with the favicon not loading, verify that the content-security-policy header's img-src directive is not preventing access to it.
Making asynchronous programming easier with async and await - Learn web development
on encountering a browser that does not support async/await, babel's polyfill can automatically provide fallbacks that work in older browsers.
Introducing asynchronous JavaScript - Learn web development
previous overview: asynchronous next in this article we briefly recap the problems associated with synchronous javascript, and take a first look at some of the different asynchronous techniques you'll encounter, showing how they can help us solve such problems.
Graceful asynchronous programming with Promises - Learn web development
later on in the chapter, we'll look at how to write your own promise, but for now, we'll look at some simple examples that you'll encounter in web apis.
Asynchronous JavaScript - Learn web development
introducing asynchronous javascript in this article we briefly recap the problems associated with sychronous javascript, and take a first look at some of the different asynchronous javascript techniques you'll encounter, showing how they can help us solve such problems.
Functions — reusable blocks of code - Learn web development
note: the referenceerror: "x" is not defined error is one of the most common you'll encounter.
JavaScript building blocks - Learn web development
in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events.
Manipulating documents - Learn web development
you will also encounter various terms used to describe the type of node, and their position in the tree in relation to one another: element node: an element, as it exists in the dom.
Third-party APIs - Learn web development
this is a common pattern you'll encounter with apis.
Client-side web APIs - Learn web development
when writing client-side javascript for web sites or applications, you will quickly encounter application programming interfaces (apis).
A first splash into JavaScript - Learn web development
next, we encounter our first conditional code block (lines 3–5 above).
Basic math in JavaScript — numbers and operators - Learn web development
you may have encountered these numbers before when setting colors in css.
What is JavaScript? - Learn web development
javascript running order when the browser encounters a block of javascript, it generally runs it in order, from top to bottom.
Solve common problems in your JavaScript code - Learn web development
the following links point to solutions to common problems you may encounter when writing javascript.
JavaScript — Dynamic client-side scripting - Learn web development
javascript building blocks in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events.
Ember interactivity: Events, classes and state - Learn web development
next we'll move on to getting our footer functionality working, including the todo counter, and look at conditional rendering, including correctly styling todos when they've been checked.
Getting started with React - Learn web development
we'll cover them as we encounter them.
TypeScript support in Svelte - Learn web development
'checked' : 'unchecked'} ${todos.length} todos` } const removecompletedtodos = () => { $alert = `removed ${todos.filter(t => t.completed).length} todos` todos = todos.filter(t => !t.completed) } </script> todosstatus.svelte we are encountering the following errors related to passing todos to the todosstatus.svelte (and todo.svelte) components: ./src/components/todos.svelte:70:39 error: type 'todotype[]' is not assignable to type 'undefined'.
Working with Svelte stores - Learn web development
in the following example we create a counter store, which will only allow us to add one to the counter or reset its value: import { writable } from 'svelte/store'; function mystore() { const { subscribe, set, update } = writable(0); return { subscribe, addone: () => update(n => n + 1), reset: () => set(0) }; } if our to-do list app gets too complex, we could let our todos store handle every state modification.
Introduction to cross browser testing - Learn web development
overview: cross browser testing next this article starts the module off by providing an overview of the topic of (cross) browser testing, answering questions such as "what is cross browser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" prerequisites: familiarity with the core html, css, and javascript languages.
Cross browser testing - Learn web development
guides introduction to cross browser testing this article starts the module off by providing an overview of the topic of cross browser testing, answering questions such as "what is cross browser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" strategies for carrying out testing next, we drill down into carrying out testing, looking at identifying a target audience (e.g.
Command line crash course - Learn web development
try running the following, and you’ll see that in fact there are three redirects happening before we reach the final page: curl /docs/web/api/fetch -l -i | grep location your output should look something like this (curl will first output some download counters and suchlike): location: /docs/web/api/fetch location: /docs/web/api/globalfetch/globalfetch.fetch() location: /docs/web/api/globalfetch/fetch location: /docs/web/api/windoworworkerglobalscope/fetch although contrived, we could take this result a little further and transform the location: line contents, adding the base origin to the start of each one so that we get complete urls printed out.
Deploying our app - Learn web development
we've not encountered branches at all, but the (terribly named) "master" branch is the default place for our work and it's what git starts on.
Learn web development
getting our code examples the code examples you'll encounter in the learning area are all available on github.
Creating reftest-based unit tests
this idea can seem odd when first encountered.
Windows SDK versions
(this was certainly the case for 64 bit windows 7 on a late 2008 macbook pro.) warning: due to a bug in windows 7 sdk, if you get "sdksetup encountered an error: expecting path %systemroot% to represent a valid system volume" error you may require to set environmental variable %windir% to something like "c:\windows" instead of "%systemroot%".
Multiple Firefox profiles
while using the nightly channel, you may encounter some add-ons that have become temporarily incompatible with new api changes, until the add-on developer has a chance to update them.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
rowser.addeventlistener('mozbrowserfindchange', function(e) { // can react to find changes if required //}) reporting errors we've got one more piece of code to mention from our source: browser.addeventlistener('mozbrowsererror', function (e) { console.log("loading error: " + e.detail); }); this simple listener logs an error message to the console when an error with the browser iframe is encountered.
HTML parser threading
speculative loads when the tree builder on the parser thread encounters html script, stylesheet link, video (with a poster frame), base or img or svg script, style or image elements, preload operations are appended to a speculative load queue.
HTTP Cache
the open callback actually doesn't give the consumer directly the cacheentry object but a small wrapper class that manages the 'consumer reference counter' on its cache entry.
AddonInstall
error integer if an error has been encountered during the download or install this will hold the error code.
AddonManager
update status values constant description update_status_no_error no error was encountered.
Localization content best practices
use unicode characters over their ascii counterparts when possible strings should use directional quotation marks when possible.
perf
performance counter stats for 'system wide': 51.58 joules power/energy-pkg/ [100.00%] 14.80 joules power/energy-cores/ [100.00%] 9.93 joules power/energy-gpu/ [100.00%] 27.38 joules power/energy-ram/ [100.00%] 5.003049064 seconds time elapsed it's not clear from the output, but the following relationship holds.
Profile Manager
if you attempt to perform any operation on a locked profile, you'll get a warning; if you choose to continue despite the warning, you may encounter errors or corrupt a profile.
Debugging out-of-memory problems
out-of-memory exceptions from js setting memory.dump_reports_on_oom in about:config to true will cause the browser to automatically write about:memory dumps to a temp file printed to the browser console (note: not web console) when an oom crash is encountered.
NSPR's Position On Abrupt Thread Termination
to make this solution work requires that a function that encounters an error be designed such that it first repairs its immediate state, and then reports that error to its caller.
Optimizing Applications For NSPR
the casual client may not encounter a need to know the details of the shortcomings to the level described here, but if and when clients become more sophisticated, these issues will certainly surface.
Cached Monitors
important cached monitors are slower to use than their uncached counterparts.
PR_Read
description the thread invoking pr_read blocks until it encounters an end-of-stream indication, some positive number of bytes (but no more than amount bytes) are read in, or an error occurs.
PR_Wait
pr_failure means pr_wait encountered a system error (such as an invalid monitor reference) or the thread was interrupted by another thread.
NSPR API Reference
ment variables logging conditional compilation and execution log types and variables prlogmoduleinfo prlogmodulelevel nspr_log_modules nspr_log_file logging functions and macros pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_not_reached use example instrumentation counters named shared memory shared memory protocol named shared memory functions anonymous shared memory anonymous memory protocol anonymous shared memory functions ipc semaphores ipc semaphore functions thread pools thread pool types thread pool functions random number generator random number generator function hash tables hash tables and type constants hash table funct...
NSS Certificate Download Specification
when nss's certificate decoder encounters one of these collections of multiple certificates they are handled in the following way: the first certificate is processed in a context specific manner, depending upon how it is being imported.
HTTP delegation
(nss might choose to be smart, and only create a single http server session object for each server encountered.
HTTP delegation
(nss might choose to be smart, and only create a single http server session object for each server encountered.
NSS_3.12_release_notes.html
bug 330721: remove os/2 vacpp compiler support from nss bug 408260: certutil usage doesn't give enough information about trust arguments bug 410226: leak in create_objects_from_handles bug 415007: pk11_findcertfromdersubjectandnickname is dead code bug 416267: compiler warnings on solaris due to extra semicolon in sec_asn1_mksub bug 419763: logger thread should be joined on exit bug 424471: counter overflow in bltest bug 229335: remove certificates that expired in august 2004 from tree bug 346551: init secitem dertemp in crmf_encode_popoprivkey bug 395080: double backslash in sysdir filenames causes problems on os/2 bug 341371: certutil lacks a way to request a certificate with an existing key bug 382292: add support for camellia to cmd/symkeyutil bug 385642: add additional cert usage(s) fo...
NSS 3.24 release notes
counter mode and galois/counter mode (gcm) have checks to prevent counter overflow.
NSS 3.28 release notes
please give feedback to the nss developers for any compatibility issues that you encounter in your tests.
NSS 3.45 release notes
if a failure is encountered while fetching any of the matching certificates, secfailure is returned and *results will be null.
NSS API Guidelines
usually, every public routine has a private counterpart, and the implementation of the public routine looks like this: nssimplement rv * nsstype_method ( nsstype *t, nssfoo *arg1, nssbar *arg2 ) { nss_clearerrorstack(); #ifdef debug if( !nssfoo_verifypointer(arg1) ) return (rv *)null; if( !nssbar_verifypointer(arg2) ) return (rv *)null; #endif /* debug */...
Necko Architecture
after registering your protocol handler necko will use it to create channels for any uris it encounters that have the scheme your protocol handler registered for.
Rhino requirements and limitations
limitations liveconnect if a javaobject's field's name collides with that of a method, the value of that field is retrieved lazily, and can be counter-intuitively affected by later assignments: javaobj.fieldandmethod = 5; var field = javaobj.fieldandmethod; javaobj.fieldandmethod = 7; // now, field == 7 you can work around this by forcing the field value to be converted to a javascript type when you take its value: javaobj.fieldandmethod = 5; var field = javaobj.fieldandmethod + 0; // force conversion now javaobj.fieldandmethod = 7; // now,...
Rhino serialization
if in the process of serialization it encounters a reference to the scope it will serialize a marker that will be resolved to the new scope upon deserialization.
Shumway
limitations of shumway might be encountered through testing.
SpiderMonkey Internals
source notes generated by jsparse.cpp and jsemit.cpp are used in jsscript.cpp to map line number to program counter and back.
JS::CompileOptions
to counter this attack, html5 specifies that script errors should be sanitized ("muted") when the script is not same-origin with the global for which it is loaded.
JSErrorReport
to counter this attack, html5 specifies that script errors should be sanitized ("muted") when the script is not same-origin with the global for which it is loaded.
JSFreeOp
description various finalization api takes not jscontext * but rather either jsfreeop structure or its library-private counterpart freeop.
JS_PreventExtensions
var target = {}; var handler = {}; var pair = proxy.revocable(target, handler); var proxy = pair.proxy; var revoke = pair.revoke; revoke(); // bool succeeded; // bool rv = js_preventextensions(cx, proxy, &succeeded); // // rv == false, succeeded is indeterminate the second case occurs when no internal error is encountered, but the object simply refuses to be made non-extensible.
JSAPI reference
n spidermonkey 1.8 obsolete since jsapi 23 js_call_object_tracer added in spidermonkey 1.8 obsolete since jsapi 23 js_call_string_tracer added in spidermonkey 1.8 obsolete since jsapi 23 js_call_double_tracer added in spidermonkey 1.8 obsolete since javascript 1.8.5 js_printtracethinginfo (debug-only) added in spidermonkey 1.8 obsolete since jsapi 16 miscellaneous gc apis: js_updatemalloccounter added in spidermonkey 17 js::setlargeallocationfailurecallback added in spidermonkey 31 js::setoutofmemorycallback added in spidermonkey 31 js_enumeratediagnosticmemoryregions added in spidermonkey 17 jsval_lock obsolete since jsapi 18 jsval_unlock obsolete since jsapi 18 js_lockgcthing obsolete since jsapi 21 js_lockgcthingrt obsolete since jsapi 22 js_unlockgcthing obsolete since jsa...
Web Replay
note that while this could potentially be a big drag on performance during both replay and recording, many of the hottest atomics (refcounts, gc counters, and so forth) are associated with non-deterministic components and are not recorded.
Pinning violation reports
the error page displayed by firefox when you encounter a pin violation gives you the option of reporting this error.
Secure Development Guidelines
es real-life example (bug 440230) void addref() { ++mrefcnt; ns_log_addref(this, mrefcnt, "nscssvalue::array", sizeof(*this)); } void release() { --mrefcnt; ns_log_release(this, mrefcnt, "nscssvalue::array"); if (mrefcnt == 0) delete this; } reference counting issues: prevention use the largest data type available on your platform for your reference counter use a hard limit constructor/destructor issues if a constructor fails the destructor never gets called this can lead to memory leaks constructor/destructor issues example class foo { private: char *ptr; public: foo() {} ~foo() { if (ptr) free(ptr); } }; constructor/destructor issues: prevention initialize...
Animated PNG graphics
MozillaTechAPNG
it is strongly recommended that when any error is encountered decoders should discard all subsequent frames, stop the animation, and revert to displaying the default image.
Life After XUL: Building Firefox Interfaces with HTML
this page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.
History Service Design
old history system was instead only storing first and last visit date, and a generic visits counter, creating some problem due to the impossibility to represent real history flow in a timeframe.
Retrieving part of the bookmarks tree
rootnode.containeropen = false; if you encounter a node with a type of result_type_folder or another type of container, you can open these folders and descend into the hierarchy.
Using the Places history service
modifying pages in history nsiglobalhistory2.setpagetitle: called by gecko when the <title> element is encountered.
Index
MozillaTechXPCOMIndex
when a uri containing this port number is encountered, this method is called to ask if the protocol handler wants to override the ban.
Interfacing with the XPCOM cycle collector
if it encounters an unknown edge during its traversal, it gives up on that edge; this means that every edge involved in a cycle must be participating, otherwise the cycle will not be found.
Components.isSuccessCode
components.issuccesscode() is functionally equivalent to the following javascript: function issuccesscode(returncode) { return (returncode & 0x80000000) === 0; } since failure error codes are turned into exceptions when encountered in javascript, this function usually is not necessary.
Components.utils.import
import throws if it encounters an error (like a syntax error) in the file it reads.
XPCShell Reference
you can specify multiple js files to execute by using multiple -f arguments, and the scripts will be executed in the order encountered.
jsdIStackFrame
pc unsigned long current program counter in this stack frame.
nsIAppShellService
enterlastwindowclosingsurvivalarea() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) during application startup (and at other times!) we may temporarily encounter a situation where all application windows will be closed but we do not want to take this as a signal to quit the application.
nsIConverterInputStream
a value of 0x0000 will cause an exception to be thrown if unknown byte sequences are encountered in the stream.
nsIFaviconService
this cache will also be written to if you use setandloadfaviconforpage() method and it encounters an error while fetching an icon.
nsIFeedProgressListener
handlefeedatfirstentry() called when the first entry or item in the feed is encountered.
nsIHTMLEditor
aalign enum value for first encountered alignment (left/center/right) getbackgroundcolorstate() getfontcolorstate() returns what font face is in the selection.
nsIMicrosummaryObserver
onerror() called when an observed microsummary encounters an error during an update.
nsINavBookmarksService
for js or from other components, just please be very careful to close the batch, especially when encountering an error and returning early.
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
when a uri containing this port number is encountered, this method is called to ask if the protocol handler wants to override the ban.
nsIPushService
topic subject data description push api counterpart push-message nsipushmessage if the message has a payload; null for blank messages.
nsISupports
the point of those descriptions is to highlight the fact that addref() and release() do not necessarily correspond to incrementing and decrementing a counter, respectively, even though that is how they are usually implemented.
nsITelemetry
histogram_count 4 for storing counter values without bucketing.
nsIXULRuntime
if a component encounters startup errors that might prevent the app from showing proper ui, it should set this flag to true.
Storage
if we encounter an error, the transaction will // be rolled back.
wrappedJSObject
regular xpconnect wrappers which you can encounter, for example, when using xpcom components implemented in js.
Mozilla technologies
docshell is not fully completed, but the long-term goal is to remove webshell and switch over entirely to docshell.embedded dialog apifeed content access apifirefox 2 and thunderbird 2 introduce a series of interfaces that make it easy for extension authors to access rss and atom feeds.life after xul: building firefox interfaces with htmlthis page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source.
Activity Manager examples
isupports(reinterpret_cast<nsisupports*>(imapfolder)); copyevent->addsubject(srcfolder); copyevent->init(ns_literal_string("message copy event"), initiator, ns_literal_string("completed successfully"), pr_now() / pr_usec_per_msec, // start time pr_now() / pr_usec_per_msec); // completion time // do not forget to increase the ref counter if needed copyevent->setundohandler(undohandler); //////////////////////////////////////////////////////////////// //// adding the event into activity manager nscomptr<nsiactivitymanager> activitymgr(do_getservice("@mozilla.org/activity-manager;1")); pruint32 id; activitymgr->addactivity(copyevent, &id); adding an activity with a custom context type this sample shows how to provide a custom...
Using Objective-C from js-ctypes
*/ // struct is seen here in docs: http://clang.llvm.org/docs/block-abi-apple.html var block_descriptor_1 = ctypes.structtype('block_descriptor_1', [ { reserved: ctypes.unsigned_long_long }, { size: ctypes.unsigned_long_long } ]); /** * we have to simulate what the llvm compiler does when it encounters a block * literal expression (see `block-abi-apple.txt` above).
Examples
the js-macosx bridge has dependency on bridgesupport metadata: whenever a cocoa class, function, struct or const is encountered in the javascript code, js-macosx will replace it with the corresponding js-ctypes declaration based on the bridgesupport file from the framework that object belongs to.
ctypes
character types character types are 8-bit values that behave like their c counterparts.
Initialization and Destruction - Plugins
during initialization, when the browser encounters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it loads the plug-in code into memory (if it hasn't been loaded already) and creates a new instance of the plug-in.
URLs - Plugins
this function is the counterpart of npn_geturl.
Debugger.Environment - Firefox Developer Tools
spidermonkey creates exactly one debugger.environment instance for each environment it presents via a given debugger instance: if the debugger encounters the same environment through two different routes (perhaps two functions have closed over the same environment), spidermonkey presents the same debugger.environment instance to the debugger each time.
Debugger.Object - Firefox Developer Tools
spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
Debugger.Object - Firefox Developer Tools
spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
Index - Firefox Developer Tools
you can sometimes encounter problems working with source maps.
Console messages - Firefox Developer Tools
number of occurrences if a line that generates a warning or error is executed more than once, it is only logged once and this counter appears to indicate how many times it was encountered.
AuthenticatorAssertionResponse - Web APIs
authenticatorassertionresponse.authenticatordata secure contextread only an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence and user verification flags, and any extensions processed by the authenticator.
CanvasRenderingContext2D.arc() - Web APIs
if true, draws the arc counter-clockwise between the start and end angles.
CanvasRenderingContext2D.ellipse() - Web APIs
anticlockwise optional an optional boolean which, if true, draws the ellipse anticlockwise (counter-clockwise).
Drawing shapes with canvas - Web APIs
the statement for the clockwise parameter results in the first and third row being drawn as clockwise arcs and the second and fourth row as counterclockwise arcs.
CloseEvent - Web APIs
1011 internal error the server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
console - Web APIs
WebAPIConsole
console.countreset() resets the value of the counter with the given label.
Console API - Web APIs
interfaces console provides rudimentary debugging functionality, including logging, stack traces, timers, and counters.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
li { display: inline-block; width: 2rem; height: 2rem; margin-right: -0.25rem; } you can also solve this problem by putting your list items all on the same line in the source, which causes the whitespace nodes to not be created in the first place: <li></li><li></li><li></li><li></li><li></li> dom traversal and whitespace when trying to do dom manipulation in javascript, you can also encounter problems because of whitespace nodes.
Element: click event - Web APIs
this counter resets after a short interval without any clicks occurring; the specifics of how long that interval is may vary from browser to browser and across platforms.
Element: mouseup event - Web APIs
mouseup events are the counterpoint to mousedown events.
Element: underflow event - Web APIs
the counterpart overflow event is fired when overflow occurs.
Using Fetch - Web APIs
; startindex = re.lastindex; } if (startindex < chunk.length) { // last line didn't end in a newline char yield chunk.substr(startindex); } } async function run() { for await (let line of maketextfilelineiterator(urloffile)) { processline(line); } } run(); checking that the fetch was successful a fetch() promise will reject with a typeerror when a network error is encountered or cors is misconfigured on the server-side, although this usually means permission issues or similar — a 404 does not constitute a network error, for example.
FileError - Web APIs
WebAPIFileError
in the file system api, a fileerror represents error conditions that you might encounter while accessing the file system using the asynchronous api.
FileException - Web APIs
in the file system api, a fileexception object represents error conditions that you might encounter while accessing the file system using the synchronous api.
FileReader - Web APIs
this event is triggered each time the reading operation encounter an error.
Fullscreen API - Web APIs
element.onfullscreenerror an event handler for the fullscreenerror event when sent to an element which has encountered an error while transitioning into or out of full-screen mode.
HTMLTrackElement - Web APIs
loading 1 indicates that the text track is loading and there have been no fatal errors encountered so far.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
this value includes any dropped or corrupted frames, so it's not the same as "total number of frames played." var videoelem = document.getelementbyid("my_vid"); var counterelem = document.getelementbyid("counter"); var quality = videoelem.getvideoplaybackquality(); counterelem.innertext = quality.totalvideoframes; specifications specification status comment media playback qualitythe definition of 'htmlvideoelement.getvideoplaybackquality()' in that specification.
IDBDatabaseException - Web APIs
in the indexeddb api, an idbdatabaseexception object represents exception conditions that can be encountered while performing database operations.
IDBObjectStore.autoIncrement - Web APIs
note that every object store has its own separate auto increment counter.
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
the list describes problems that could occur when the request is being executed, but you might also encounter other problems when the request is being made.
Using IndexedDB - Web APIs
'mouseenter', function(evt) { setinviewer(evt.target.getattribute('href')); }); list_item.append(' / '); list_item.append(link); } else { list_item.append(" / no attached file"); } pub_list.append(list_item); }; // move on to the next object in store cursor.continue(); // this counter serves only to create distinct ids i++; } else { console.log("no more entries"); } }; } function newviewerframe() { var viewer = $('#pub-viewer'); viewer.empty(); var iframe = $('<iframe />'); viewer.append(iframe); return iframe; } function setinviewer(key) { console.log("setinviewer:", arguments); key = number(key); if (k...
IndexedDB API - Web APIs
idbdatabaseexception represents exception conditions that can be encountered while performing database operations.
IntersectionObserverEntry.isIntersecting - Web APIs
example in this simple example, an intersection callback is used to update a counter of how many targeted elements are currently intersecting with the intersection root.
LocalFileSystemSync - Web APIs
for more concepts, see the counterpart article for the asynchronous api.
Notification - Web APIs
it is triggered each time the notification encounters an error.
OfflineAudioContext.resume() - Web APIs
exceptions the promise is rejected when the following exception is encountered.
OfflineAudioContext.suspend() - Web APIs
exceptions the promise is rejected when any exception is encountered.
Pointer events - Web APIs
event types and global event handlers pointer events have ten event types, seven of which have similar semantics to their mouse event counterparts (down, up, move, over, out, enter, and leave).
RTCDataChannel.send() - Web APIs
since there are multiple techniques for breaking up large data into smaller pieces for transfer, it's possible to encounter scenarios in which the other peer does not support the same ones.
RTCDtlsTransport - Web APIs
if your code accesses rtcrtpsenders and/or rtcrtpreceivers directly, you may encounter situations where they're initially separate, then half or more of them get closed and the senders and receivers updated to refer to the appropriate remaining rtcdtlstransport objects.
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
RTCIceCandidatePairStats - Web APIs
a retransmission is a connectivity check request whose transaction_transmit_counter attribute's req field is greater than 1.
RTCIdentityErrorEvent.idp - Web APIs
syntax var idp = event.idp; event.idp = "developer.mozilla.org"; example pc.onidpassertionerror = function( ev ) { alert("the idp named '" + ev.idp + "' encountered an error " + "while generating an assertion."); } ...
RTCIdentityErrorEvent - Web APIs
examples pc.onidpassertionerror = function( ev ) { alert("the idp named '" + ev.idp + "' encountered an error " + "while generating an assertion."); } ...
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
note: this counter may also be incremented when fec packets arrive in-band along with media content; this can happen with opus, for example.
RTCInboundRtpStreamStats - Web APIs
this counter may also be incremented when fec packets arrive in-band along with media content; this can happen with opus, for example.
RTCPeerConnection: idpassertionerror event - Web APIs
an idpassertionerror event informs the target, a rtcpeerconnection object, that the identity provider (idp) encountered an error when trying to generate an identity assertion.
RTCPeerConnection: idpvalidationerror event - Web APIs
an idpvalidationerror event informs the target, a rtcpeerconnection object's onidpvalidationerror event handler, that the identity provider (idp) encountered an error while validating an identity assertion.
RTCPeerConnection.onidpassertionerror - Web APIs
such an event is sent when the associated identity provider (idp) encounters an error while generating an identity assertion.
RTCPeerConnection.onidpvalidationerror - Web APIs
such an event is sent when the associated identity provider (idp) encounters an error while validating an identity assertion.
RTCPeerConnection: removestream event - Web APIs
this is the counterpart to the addstream event, which is also obsolete.
RTCPeerConnection: idpvalidationerror event - Web APIs
an idpvalidationerror event informs the target, a rtcpeerconnection object, that the identity provider (idp) encountered an error when trying to validate an identity assertion.
ReadableStream.pipeThrough() - Web APIs
the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
ReadableStream - Web APIs
readablestream.pipeto() pipes the current readablestream to a given writablestream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
Request - Web APIs
WebAPIRequest
you can create a new request object using the request() constructor, but you are more likely to encounter a request object being returned as the result of another api operation, such as a service worker fetchevent.request.
Response - Web APIs
WebAPIResponse
you can create a new response object using the response.response() constructor, but you are more likely to encounter a response object being returned as the result of another api operation—for example, a service worker fetchevent.respondwith, or a simple windoworworkerglobalscope.fetch().
Service Worker API - Web APIs
installation is attempted when the downloaded file is found to be new — either different to an existing service worker (byte-wise compared), or the first service worker encountered for this page/site.
Storage Access API - Web APIs
in safari, successful use of the storage access api resets this counter.
SubtleCrypto.deriveBits() - Web APIs
exceptions the promise is rejected when one of the following exceptions are encountered: invalidaccesserror raised when the base key is not a key for the requested derivation algorithm or if the cryptokey.usages value of that key doesn't contain derivekey.
SubtleCrypto.deriveKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions are encountered: invalidaccesserror raised when the master key is not a key for the requested derivation algorithm or if the cryptokey.usages value of that key doesn't contain derivekey.
SubtleCrypto.exportKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when trying to export a non-extractable key.
SubtleCrypto.generateKey() - Web APIs
exceptions the promise is rejected when the following exception is encountered: syntaxerror raised when the result is a cryptokey of type secret or private but keyusages is empty.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
exceptions the promise is rejected when the following exception is encountered: invalidaccesserror raised when the signing key is not a key for the request signing algorithm or when trying to use an algorithm that is either unknown or isn't suitable for signing.
SubtleCrypto.unwrapKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when the unwrapping key is not a key for the requested unwrap algorithm or if the cryptokey.usages value of that key doesn't contain unwrap.
SubtleCrypto.verify() - Web APIs
exceptions the promise is rejected when the following exception is encountered: invalidaccesserror raised when the encryption key is not a key for the requested verifying algorithm or when trying to use an algorithm that is either unknown or isn't suitable for a verify operation.
SubtleCrypto.wrapKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when the wrapping key is not a key for the requested wrap algorithm.
WebGLRenderingContext.frontFace() - Web APIs
gl.ccw: counter-clock-wise winding.
Hello vertex attributes - Web APIs
<p>first encounter with attributes and sending data to gpu.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
the old way in the past, if you encountered an ice error and needed to restart negotiation, you might have done something like this: pc.onnegotiationneeded = async options => { await pc.setlocaldescription(await pc.createoffer(options)); signaler.send({ description: pc.localdescription }); }; pc.oniceconnectionstatechange = () => { if (pc.iceconnectionstate === "failed") { pc.onnegotiationneeded({ icerestart: true }); } }; ...
Signaling and video calling - Web APIs
rtcpeerconnection.onremovetrack this counterpart to ontrack is called to handle the removetrack event; it's sent to the rtcpeerconnection when the remote peer removes a track from the media being sent.
Using bounded reference spaces - Web APIs
if the points are listed counterclockwise it would suggest that the safe area lies outside the boundary, probably with undesirable results.
Rendering and the WebXR frame animation callback - Web APIs
for example, to reduce the frame rate by 50%, just skip every other frame: let tick = 0; function drawframe(time, frame) { animationframerequestid = frame.session.requestanimationframe(drawframe); if (!(tick % 2)) { /* draw the scene */ } tick++; } this version of the frame callback maintains a tick counter.
Migrating from webkitAudioContext - Web APIs
this article attempts to summarize the areas where developers are likely to encounter these problems and provide examples on how to port such code to standards based audiocontext, which will work across different browser engines.
Window.orientation - Web APIs
positive values are clockwise; negative values are counterclockwise.
WindowOrWorkerGlobalScope.fetch() - Web APIs
a fetch() promise only rejects when a network error is encountered (which is usually when there’s a permissions issue or similar).
WritableStreamDefaultWriter.close() - Web APIs
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.
XDomainRequest.onerror - Web APIs
an event handler which is called when an xdomainrequest encounters an error.
XMLHttpRequest: error event - Web APIs
the error event is fired when the request encountered an error.
XMLHttpRequest.setRequestHeader() - Web APIs
note: for your custom fields, you may encounter a "not allowed by access-control-allow-headers in preflight response" exception when you send requests across domains.
XMLHttpRequest - Web APIs
error fired when the request encountered an error.
XMLHttpRequestEventTarget - Web APIs
xmlhttprequesteventtarget.onerror contains the function to call when a request encounters an error and the error event is received by this object.
XMLSerializer.serializeToString() - Web APIs
the following types are also permitted as descendants of the root node, in addition to node and attr: documenttype document documentfragment element comment text processinginstruction attr if any other type is encountered, a typeerror exception is thrown.
XPathException - Web APIs
in the dom xpath api the xpathexception interface represents exception conditions that can be encountered while performing xpath operations.
Resources - Web APIs
at ibm developerworks xslt tutorial at zvon.org xpath tutorial at zvon.org using the mozilla javascript interface to do xsl transformations at mozilla.org mozilla.org's xslt project page, which includes a frequently encountered issues section.
XSL Transformations in Mozilla FAQ - Web APIs
having xslt stylesheet specific to particular media would require to retransform the original xml source, which counteracts the expectations of the user.
ARIA Test Cases - Accessibility
jaws - jaws announces landmarks as they are encountered in the virtual page.
ARIA: timer role - Accessibility
the timer role indicates to assistive technologies that an element is a numerical counter listing the amount of elapsed time from a starting point or the remaining time until an end point.
ARIA: grid role - Accessibility
keyboard interactions when a keyboard user encounters a grid, they navigate the rows and columns using the left, right, top and down keys.
WAI-ARIA Roles - Accessibility
aria: timer rolethe timer role indicates to assistive technologies that an element is a numerical counter the amount of elapsed time from a starting point or the remaining time until an end point.
An overview of accessible web applications and widgets - Accessibility
while this results in a widget that looks like its desktop counterpart, there usually isn't enough semantic information in the markup to be usable by an assistive technology.
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.
Keyboard-navigable JavaScript widgets - Accessibility
these widgets are typically composed of <div> and <span> elements that do not, by nature, offer the same keyboard functionality that their desktop counterparts do.
font-style - CSS: Cascading Style Sheets
true italics use different glyphs and are a bit different from their upright counterparts, having some unique features and generally have a rounded and calligraphic quality.
@keyframes - CSS: Cascading Style Sheets
resolving duplicates if multiple keyframe sets exist for a given name, the last one encountered by the parser is used.
At-rules - CSS: Cascading Style Sheets
WebCSSAt-rule
(currently at the working draft stage) @counter-style — defines specific counter styles that are not part of the predefined set of styles.
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
what this means in practice is that counters ignore it, and things like transitions do not run.
Grid template areas - CSS: Cascading Style Sheets
naming a grid area you have already encountered the grid-area property.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
now when grid encounters this item, it will assign it two tracks.
Using CSS gradients - CSS: Cascading Style Sheets
negative angles run in the counterclockwise direction.
CSS Lists - CSS: Cascading Style Sheets
using css counters explains how to use the css counter properties to control list counters.
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
the logical properties and values specification defines mappings for these physical values to their logical, or flow relative, counterparts — e.g.
CSS Overflow - CSS: Cascading Style Sheets
ink overflow and scrollable overflow there are two types of overflow that you might encounter in css.
CSS data types - CSS: Cascading Style Sheets
WebCSSCSS Types
index the data types defined by the set of css specifications include the following: <angle> <angle-percentage> <angular-color-hint> <angular-color-stop> <attr-fallback> <attr-name> <basic-shape> <blend-mode> <calc-product> <calc-sum> <calc-value> <color> <color-stop> <color-stop-angle> <counter-style> <custom-ident> <dimension> <filter-function> <flex> <frequency> <frequency-percentage> <gradient> <ident> <image> <integer> <length> <length-percentage> <number> <number-percentage> <percentage> <position> <quote> <ratio> <resolution> <shape-box> <shape-radius> <string> <time> <time-percentage> <timing-function> <toggle-value> <transform-function> <type-or-unit>...
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
but there is other information that a web author wants to convey in the style sheet, like the character set, other external style sheets to import, font face or list counter descriptions and many more.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
when the browser encounters an invalid var() substitution, the initial or inherited value of the property is used.
Viewport concepts - CSS: Cascading Style Sheets
css the layout viewport and visual viewport described above are not the only viewports you will encounter.
font-style - CSS: Cascading Style Sheets
italic font faces are generally cursive in nature, usually using less horizontal space than their unstyled counterparts, while oblique faces are usually just sloped versions of the regular face.
font-variation-settings - CSS: Cascading Style Sheets
registered axes are the most commonly encountered — common enough that the authors of the specification felt they were worth standardizing.
image-rendering - CSS: Cascading Style Sheets
note: the values optimizequality and optimizespeed present in an early draft (and coming from its svg counterpart image-rendering) are defined as synonyms for the smooth and pixelated values respectively.
<image> - CSS: Cascading Style Sheets
WebCSSimage
symbols for @counter-style at risk feature.
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
integers can be used in numerous css properties, such as column-count, counter-increment, grid-column, grid-row, and z-index.
<length> - CSS: Cascading Style Sheets
WebCSSlength
for high-dpi devices, inches (in), centimeters (cm), and millimeters (mm) are the same as their physical counterparts.
repeating-conic-gradient() - CSS: Cascading Style Sheets
like the non-repeating gradient counterpart, if you don't specify an angle for the first or last color stop, the values are will be 0deg and 360deg.
url() - CSS: Cascading Style Sheets
WebCSSurl()
the url() function can be included as a value for background, background-image, list-style, list-style-image, content, cursor, border, border-image, border-image-source, mask, mask-image, src as part of a @font-face block, and @counter-style/symbol in css level 1, the url() functional notation described only true urls.
Guide to Web APIs - Developer guides
WebGuideAPI
web apis from a to z aambient light eventsbbackground tasksbattery api beaconbluetooth apibroadcast channel apiccss counter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and stre...
Cross-browser audio basics - Developer guides
error an error is encountered while media data is being download.
Challenge solutions - Developer guides
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.
Media events - Developer guides
encrypted the user agent has encountered initialization data in the media data.
Localizations and character encodings - Developer guides
it should be set to the canonical name of the legacy encoding that users of the localizations are most likely to encounter when browsing non-conforming legacy web content that doesn't declare its encoding.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
handling multiple checkboxes the example we saw above only contained one checkbox; in real-world situations you'll be likely to encounter multiple checkboxes.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
finally, we rotate counter-clockwise by 90°.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
if they aren't grouped together in source order, if one of the group is checked, tabbing into the group starts when the first one in the group is encountered, skipping all those that aren't checked.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
in ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
if you encounter problems with the favicon not loading, verify that the content-security-policy header's img-src directive is not preventing access to it.
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
usage notes related elements other elements that are used in contexts in which <var> is commonly used include: <code>: the html code element <kbd>: the html keyboard input element <samp>: the html sample output element if you encounter code that is mistakenly using <var> for style purposes rather than semantic purposes, you should either use a <span> with appropriate css or, an appropriate semantic element among the following: <em> <i> <q> default style most browsers apply font-style to "italic" when rendering <var>.
Microformats - HTML: Hypertext Markup Language
for example if they wanted to identify themselves they could use an h-card such as: html example <a class="h-card" href="http://alice.example.com">alice blogger</a> when a parser encounters this data, it will know that this page contains a "card" which describes a person or organization named alice blogger with a url of http://alice.example.com/.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
a complete data transmission security strategy includes not only enforcing https for data transfer, but also marking all cookies with the secure attribute and providing automatic redirects from http pages to their https counterparts.
Compression in HTTP - HTTP
in fact, this is often counter productive as the cost of the overhead (algorithms usually need a dictionary that add to the initial size) can be higher than the extra gain in compression resulting in a larger file.
Configuring servers for Ogg media - HTTP
this information may also be useful if you encounter other media types your server isn't already configured to recognize.
Large-Allocation - HTTP
you'll encounter them in the web console.
HTTP Index - HTTP
WebHTTPIndex
261 500 internal server error http, server error, status code the hypertext transfer protocol (http) 500 internal server error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
PATCH - HTTP
WebHTTPMethodsPATCH
for example if an auto-incrementing counter field is an integral part of the resource, then a put will naturally overwrite it (since it overwrites everything), but not necessarily so for patch.
Redirections in HTTP - HTTP
if you encounter such an error soon after modifying a server configuration, this is likely a redirection loop.
500 Internal Server Error - HTTP
WebHTTPStatus500
the hypertext transfer protocol (http) 500 internal server error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
508 Loop Detected - HTTP
WebHTTPStatus508
it indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "depth: infinity".
HTTP response status codes - HTTP
WebHTTPStatus
server error responses 500 internal server error the server has encountered a situation it doesn't know how to handle.
Equality comparisons and sameness - JavaScript
even if your requirements involve having comparisons between two nan values evaluate to true, generally it is easier to special-case the nan checks (using the isnan method available from previous versions of ecmascript) than it is to work out how surrounding computations might affect the sign of any zeros you encounter in your comparison.
Control flow and error handling - JavaScript
when break is encountered, the program exits the switch and continues execution from the statement following switch.
Iterators and generators - JavaScript
when a value is consumed by calling the generator's next method, the generator function executes until it encounters the yield keyword.
Text formatting - JavaScript
you should use string literals unless you specifically need to use a string object, because string objects can have counterintuitive behavior.
Public class fields - JavaScript
as such, unlike their private counterparts, they participate in prototype inheritance.
SyntaxError: JSON.parse: bad parsing - JavaScript
this string has to be valid json and will throw this error if incorrect syntax was encountered.
Functions - JavaScript
here is an example of an anonymous function expression (the name is not used): var myfunction = function() { statements } it is also possible to provide a name inside the definition in order to create a named function expression: var myfunction = function namedfunction(){ statements } one of the benefits of creating a named function expression is that in case we encountered an error, the stack trace will contain the name of the function, making it easier to find the origin of the error.
Array.prototype.forEach() - JavaScript
[2, 5, , 9].foreach(logarrayelements) // logs: // a[0] = 2 // a[1] = 5 // a[3] = 9 using thisarg the following (contrived) example updates an object's properties from each entry in the array: function counter() { this.sum = 0 this.count = 0 } counter.prototype.add = function(array) { array.foreach((entry) => { this.sum += entry ++this.count }, this) // ^---- note } const obj = new counter() obj.add([2, 5, 9]) obj.count // 3 obj.sum // 16 since the thisarg parameter (this) is provided to foreach(), it is passed to callback each time it's invoked.
Date.prototype[@@toPrimitive] - JavaScript
you rarely need to invoke the [@@toprimitive]() method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
Math.atan2() - JavaScript
this is the counterclockwise angle, measured in radians, between the positive x axis, and the point (x, y).
Object.prototype.valueOf() - JavaScript
you rarely need to invoke the valueof method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
RangeError - JavaScript
this can be encountered when: passing a value that is not one of the allowed string values to string.prototype.normalize(), or when attempting to create an array of an illegal length with the array constructor, or when passing bad values to the numeric methods number.prototype.toexponential(), number.prototype.tofixed() or number.prototype.toprecision().
Reflect.get() - JavaScript
receiver optional the value of this provided for the call to target if a getter is encountered.
Reflect.set() - JavaScript
receiver optional the value of this provided for the call to target if a setter is encountered.
Planned changes to shared memory - JavaScript
and their cross-origin (and cross-site) counterparts need to set the same header with cross-origin as value.
Symbol.prototype[@@toPrimitive] - JavaScript
you rarely need to invoke the [@@toprimitive]() method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
Symbol.prototype.valueOf() - JavaScript
you rarely need to invoke the valueof method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
SyntaxError - JavaScript
it is thrown when the javascript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code.
WeakRef() constructor - JavaScript
class counter { constructor(element) { // remember a weak reference to a dom element this.ref = new weakref(element); this.start(); } } specifications specification weakrefsthe definition of 'weakref constructor' in that specification.
parseFloat() - JavaScript
if parsefloat encounters a character other than a plus sign (+), minus sign (- u+002d hyphen-minus), numeral (0–9), decimal point (.), or exponent (e or e), it returns the value up to that character, ignoring the invalid character and characters following it.
parseInt() - JavaScript
if parseint encounters a character that is not a numeral in the specified radix, it ignores it and all succeeding characters and returns the integer value parsed up to that point.
Lexical grammar - JavaScript
a semicolon is inserted before, when a line terminator or "}" is encountered that is not allowed by the grammar.
Nullish coalescing operator (??) - JavaScript
in other words, if you use || to provide some default value to another variable foo, you may encounter unexpected behaviors if you consider some falsy values as usable (eg.
yield - JavaScript
'step' evaluates as a return value in this syntax [rv] = yield [expression] function* counter(value) { let step; while (true) { step = yield ++value; if (step) { value += step; } } } const generatorfunc = counter(0); console.log(generatorfunc.next().value); // 1 console.log(generatorfunc.next().value); // 2 console.log(generatorfunc.next().value); // 3 console.log(generatorfunc.next(10).value); // 14 console.log(generatorfunc.next().value); // 15 console.log(ge...
return - JavaScript
function counter() { for (var count = 1; ; count++) { // infinite loop console.log(count + 'a'); // until 5 if (count === 5) { return; } console.log(count + 'b'); // until 4 } console.log(count + 'c'); // never appears } counter(); // output: // 1a // 1b // 2a // 2b // 3a // 3b // 4a // 4b // 5a returning a function see also the article about closures.
JavaScript
javascript building blocks continues our coverage of javascript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events.
Web video codec guide - Web media technologies
this guide introduces the video codecs you're most likely to encounter or consider using on the web, summaries of their capabilities and any compatibility and utility concerns, and advice to help you choose the right codec for your project's video.
Performance fundamentals - Web Performance
from this comes an important but counter-intuitive corollary: a well-designed system does not maximize the amount of free memory.
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.
Mobile first - Progressive web apps (PWAs)
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)
this is created using the css rules included at the top of the stylesheet, before any media queries are encountered.
Namespaces crash course - SVG: Scalable Vector Graphics
the table below lists the dom1 methods that shouldn't be used in svg, along with their equivalent dom2 counterparts that should be used instead.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
opacity="0.5"/> <circle cx="150.71" cy="170.29" r="2" fill="red"/> <circle cx="110" cy="215" r="2" fill="red"/> <ellipse cx="144.931" cy="229.512" rx="36" ry="60" fill="transparent" stroke="blue"/> <ellipse cx="115.779" cy="155.778" rx="36" ry="60" fill="transparent" stroke="blue"/> </svg> notice that each of the blue ellipses are formed by two arcs, depending on travelling clockwise or counter-clockwise.
Texts - SVG: Scalable Vector Graphics
WebSVGTutorialTexts
svg offers a set of attributes, many similar to their css counterparts, to enable font selection.
Subresource Integrity - Web security
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.
Tutorials
javascript building blocks in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events.
<xsl:preserve-space> - XSLT: Extensible Stylesheet Language Transformations
preserving whitespace is the default setting, so this element only needs to be used to counteract an <xsl:strip-space> element.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
preserving whitespace is the default setting, so this element only needs to be used to counteract an <xsl:strip-space> element.
Resources - XSLT: Extensible Stylesheet Language Transformations
resources using the mozilla javascript interface to xsl transformations mozilla.org's xslt project page, which includes a frequently encountered issues section.
Using the WebAssembly JavaScript API - WebAssembly
these methods are easier than their non-streaming counterparts, because they can turn the byte code directly into module/instance instances, cutting out the need to separately put the response into an arraybuffer.