Search completed in 0.88 seconds.
AudioTrack.kind - Web APIs
the
kind property contains a string indicating the category of audio contained in the audiotrack.
... the
kind can be used to determine the scenarios in which specific tracks should be enabled or disabled.
... see audio track
kind strings for a list of the
kinds available for audio tracks.
...And 6 more matches
DataTransferItem.kind - Web APIs
the read-only datatransferitem.
kind property returns a datatransferitem representing the drag data item
kind: some text or some file.
... syntax var item
kind = datatransferitem.
kind; return value a domstring representing the drag data item's
kind.
... 'string' if the
kind of drag data item is a plain unicode string.
...And 5 more matches
VideoTrack.kind - Web APIs
the
kind property contains a string indicating the category of video contained in the videotrack.
... the
kind can be used to determine the scenarios in which specific tracks should be enabled or disabled.
... see video track
kind strings for a list of the
kinds available for video tracks.
...And 5 more matches
MediaDeviceInfo.kind - Web APIs
the
kind readonly property of the mediadeviceinfo interface returns an enumerated value, that is either "videoinput", "audioinput" or "audiooutput".
... syntax var
kind = mediadeviceinfo.
kind value a domstring.
... specifications specification status comment media capture and streamsthe definition of '
kind' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
kindchrome full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfilledge full support 12firefox full support 39ie no support ...
RTCRtpStreamStats.kind - Web APIs
the
kind property of the rtcrtpstreamstats dictionary is a string indicating whether the described rtp stream contains audio or video media.
... syntax media
kind = rtcrtpstreamstats.
kind; value a domstring whose value is "audio" if the track whose statistics are given by the rtcrtpstreamstats object contains audio, or "video" if the track contains video media.
... this string will always be the same as the one provided by the associated mediastreamtrack object's
kind property.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.
kind' in that specification.
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
the webgl2renderingcontext.getuniformbloc
kindex() method of the webgl 2 api retrieves the index of a uniform block within a webglprogram.
... syntax gluint gl.getuniformbloc
kindex(program, uniformblockname); parameters program a webglprogram containing the uniform block.
... examples // assuming a shader with the following declaration: // uniform ubodata { // mat4 foo; // } instancename; // use the block name, not the instance name: var bloc
kindex = gl.getuniformbloc
kindex(program, 'ubodata'); specifications specification status comment webgl 2.0the definition of 'getuniformbloc
kindex' in that specification.
... opengl es 3.0the definition of 'glgetuniformbloc
kindex' in that specification.
MediaStreamTrack.kind - Web APIs
the mediastreamtrack.
kind read-only property returns a domstring set to "audio" if the track is an audio track and to "video", if it is a video track.
... syntax const type = track.
kind value the possible values are a domstring with on of the following values: "audio": the track is an audio track.
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.
kind' in that specification.
TrackDefault.kinds - Web APIs
the
kinds read-only property of the trackdefault interface returns default
kinds for an associated sourcebuffer to use when an initialization segment does not contain label information for a new track.
... syntax var my
kinds = trackdefault.
kinds; value an array of domstrings.
GetLinkIndex
this content is now available at nsiaccessiblehypertext.getlin
kindex().
Index - Web APIs
189 audiotrack.
kind api, audio, audio track, audiotrack, html dom, media, property, read-only, reference, id, track the
kind property contains a string indicating the category of audio contained in the audiotrack.
...it is an audionode that can represent different
kinds of filters, tone control devices, and graphic equalizers.
... 369 broadcastchannel.postmessage() api, broadcast channel api, broadcastchannel, experimental, html api, method, reference the broadcastchannel.postmessage() sends a message, which can be of any
kind of object, to each listener in any browsing context with the same origin.
...And 33 more matches
Bytecode Descriptions
iteration checkisobj operands: (checkisobject
kind kind) stack: result ⇒ result check that the top value on the stack is an object, and throw a typeerror if not.
...
kind is used only to generate an appropriate error message.
...format: jof_object setfunname operands: (functionprefix
kind prefix
kind) stack: fun, name ⇒ fun set the name of a function.
...And 20 more matches
The Implementation of the Application Object Model - Archive of obsolete content
this gives you a feature called aggregation, the ability to put completely different
kinds of data into the same place.
...in other words, the traditional relationship of "containment" is not the only
kind of relationship expressible in rdf.
...for rdf, an extra tag has to be inserted between two other tags to indicate exactly what
kind of relationship should exist between the two nodes.
...And 7 more matches
JIT Optimization Strategies
it provides information on what they attempt to do, what general level of speed-up they provide, what
kind of program characteristics can prevent them from being used, and common ways to enable the engine to utilize that optimization.
...unique (or "singleton") types are assigned to certain
kinds of objects, like global objects, top-level functions, and object literals declared at the top-level of a script.
...unboxed property reads are possible on properties which satisfy all the characteristics of a definite slot, and additionally have been observed to only store values of one
kind of value.
...And 7 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
this makes certain
kinds of brute-force atacks more difficult.
...their usage varies depending on the
kind of trust they are used to ensure.
... some
kinds of certificates are used to verify the identity of the presenter; others are used to verify that an object or item has not been tampered with.
...And 6 more matches
nss tech note1
a "null template" is a template that is all zeros, having a zero
kind.† the term "null-terminated array", as used throughout this document, means an array of templates, the last of which is a null template.
...this structure contains four fields :
kind .
...if
kind is an asn.1 sequence tag (sec_asn1_sequence), then you must specify additional templates in a null-terminated array to define the content of the of the asn.1 sequence.
...And 6 more matches
JS_DumpHeap
syntax bool js_dumpheap(jsruntime *rt, file *fp, void* startthing, jsgctrace
kind kind, void *thingtofind, size_t maxdepth, void *thingtoignore); name type description cx jscontext * pointer to a js context.
... start
kind jsgctrace
kind trace
kind of startthing, if startthing is not null.
... enum jsgctrace
kind { // these trace
kinds have a publicly exposed, although opaque, c++ type.
...And 5 more matches
Strategies for carrying out testing - Learn web development
you should also be encouraged to look at the different options on the left hand side, and see what
kinds of data you can find out.
...if you are creating some
kind of company intranet for delivering sales figures to managers, and all the managers have been provided with windows phones for example, you will probably want to make mobile ie support a priority.
... emulators emulators are basically programs that run inside your computer and emulate a device or particular device conditions of some
kind, allowing you to do some of your testing more conveniently than having to find a particular combination of hardware/software to test.
...And 4 more matches
Overview of events and handlers - Developer guides
the pattern starts with an agreement over a
kind of event and: the name string used for the event, the type of the data structure used to represent the key properties of that event, and the javascript object which will 'emit' that event.
...we could define in the html page a button as: <button id="buttonone">click here to emit a 'click' event</button> and, in our javascript code, we could first define a function to listen to that 'click' event: var example_click_handler = function (ev){ var obj
kind = (ev instanceof event) ?
... "eventprototype" : "objectprototype"; alert("we got a click event at " + ev.timestamp + " with an argument object derived from: " + obj
kind ); }; and second register our function with the the button object, either on the scripting side using the dom (document object model) representation of the html page: var buttondomelement = document.queryselector('#buttonone'); buttondomelement.addeventlistener('click', example_click_handler); or within the html page by adding the function as the value of the 'onclick' attribute, although this second approach is usually only used in very simple web pages.
...And 4 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
--> </window> listing 2: general structure of a xul document even with the internationalization of firefox and extensions, this
kind of xml function is being used.
... the xul box model in principle, xul lays out all ui components using combinations of two
kinds of boxes: horizontal and vertical.
...there are also special
kinds of element that only come into play after being referenced by another element.
...And 3 more matches
Responsive images - Learn web development
vector images are great for simple graphics, patterns, interface elements, etc., but it starts to get very complex to create a vector-based image with the
kind of detail that you'd find in say, a photo.
... raster image formats such as jpegs are more suited to the
kind of images we see in the above example.
... this
kind of problem didn't exist when the web first existed, in the early to mid 90s — back then the only devices in existence to browse the web were desktops and laptops, so browser engineers and spec writers didn't even think to implement solutions.
...And 3 more matches
Video and audio content - Learn web development
video and audio on the web web developers have wanted to use video and audio on the web for a long time, ever since the early 2000s when we started to have bandwidth fast enough to support any
kind of video (video files are much larger than text or even images.) in the early days, native web technologies such as html didn't have the ability to embed video and audio on the web, so proprietary (or plugin-based) technologies like flash (and later, silverlight) became popular for handling such content.
... this
kind of technology worked ok, but it had a number of problems, including not working well with html/css features, security issues, and accessibility issues.
...we'll be discussing this
kind of service a bit more in the next article.
...And 3 more matches
nsIAccessibleHyperText
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview nsiaccessiblehyperlink getlink(in long lin
kindex); long getlin
kindex(in long charindex); long getselectedlin
kindex(); obsolete since gecko 1.9 attributes attribute type description linkcount long the number of links contained within this hypertext object.
... nsiaccessiblehyperlink getlink( in long lin
kindex ); parameters lin
kindex 0-based index of the link that is to be retrieved.
... this can be retrieved via getlin
kindex().
...And 3 more matches
nsIMemoryReporter
kind print32 the memory
kind, one of the memory reporter
kind constants below.
... constants memory reporter
kind constants these allocation
kind constants describe the types of memory allocation described by memory use reporters.
... constant value description
kind_mapped 0 this is deprecated synonym for
kind_nonheap.
...And 3 more matches
XUL Structure - Archive of obsolete content
it is important to note that when accessing content through a chrome url, it gains the enhanced privileges described above that other
kinds of urls do not.
...this distinction is not based on the
kind of content being displayed; only on the type of url used.
... document types: html xml xul css mozilla uses a distinctly different
kind of document object (dom) for html and xul, although they share much of the same functionality.
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
47 cms cms, composing, content management system, glossary a cms (content management system) is software that allows users to publish, organize, change, or remove various
kinds of content, not only text but also embedded images, video, audio, and interactive code.
... 63 callback function callback, callback function, codingscripting, glossary a callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some
kind of routine or action.
...there are two
kind of methods: instance methods which are built-in tasks performed by an object instance, or static methods which are tasks that are called directly on an object constructor.
...And 2 more matches
Index - Learn web development
44 the web and web standards beginner, front-end, learn, web, web standards this article provides some useful background on the web — how it came about, what web standard technologies are, how they work together, why "web developer" is a great career to choose, and what
kinds of best practices you'll learn about through the course.
...we've begun with just theory, to start getting you used to why you'd use javascript and what
kind of things you can do with it.
... 105 advanced styling effects article, beginner, blend modes, boxes, css, codingscripting, filters, styling, box shadows, effects, shapes we hope this article was fun — playing with shiny toys generally is, and it is always interesting to see what
kinds of advanced styling tools are becoming available in modern browsers.
...And 2 more matches
Accessibility API cross-reference
banner a portion of quoted content which is 'too long' to appear 'inline' n/a blockquote <blockquote> entire window border as 1 object border n/a n/a n/a specific
kind of button that drops down a list of items, msaa only buttondropdown n/a n/a expressed with aria-haspopup on an element with a button role specific
kind of button that drops down a grid, msaa only buttondropdowngrid n/a n/a specific
kind of button that drops down a menu, msaa only buttonmenu n/a n/a expresse...
... a checkbox; aria has two
kinds: use checkbox if you need to express 'mixed' state (some of the descendents are true, some are false), otherwise use switch or (preferred in html) <input type=checkbox>, which are true/false only.
... definition <dd>, <dfn> <lbody> iconified version of an app (n/a - use either pushbutton or listitem) desktop_icon desktop_icon n/a a specific
kind of a graphic - a diagram.
...And 2 more matches
PKCS11 Implement
functions for different
kinds of tokens.
... summarizes the support nss expects from different
kinds of tokens.
... c_logout the nss calls c_logout on a token's initial session when the password is timed out when performing any
kind of private key operation if "ask always" is turned on when changing a password when the user logs out object management c_createobject the nss calls c_createobject when loading new private keys and new certificates into a token.
...And 2 more matches
Garbage collection
allocation
kind cells are classified by allocation
kind.
... the allocation
kind determines the size of the object and the finalization behavior.
... allocation
kind is defined by enum alloc
kind.
...And 2 more matches
Parser API
interface variabledeclaration <: declaration { type: "variabledeclaration"; declarations: [ variabledeclarator ];
kind: "var" | "let" | "const"; } a variable declaration, via one of var, let, or const.
... interface property <: node { type: "property"; key: literal | identifier; value: expression;
kind: "init" | "get" | "set"; } a literal property in an object expression can have either a string or number as its value.
... ordinary property initializers have a
kind value "init"; getters and setters have the
kind values "get" and "set", respectively.
...And 2 more matches
IAccessibleHypertext
method overview [propget] hresult hyperlink([in] long index, [out] iaccessiblehyperlink hyperlink ); [propget] hresult hyperlin
kindex([in] long charindex, [out] long hyperlin
kindex ); [propget] hresult nhyperlinks([out] long hyperlinkcount ); methods hyperlink() returns the specified link.
... the returned iaccessiblehyperlink object encapsulates the hyperlink and provides several
kinds of information describing it.
...hyperlin
kindex() returns the index of the hyperlink that is associated with this character index.
...And 2 more matches
WebIDL bindings
; void setmyattr(jscontext* cx, js::handle<jsobject*> value); void mymethod(jscontext* cx, js::handle<jsobject*> arg1, js::handle<jsobject*> arg2, const sequence<jsobject*>& arg3, const optional<js::handle<jsobject*> >& arg4, const optional<js::handle<jsobject*> >& arg5, js::mutablehandle<jsobject*> retval); interface types there are four
kinds of interface types in the webidl bindings.
...there are two
kinds of union structs: one
kind does not keep its members alive (is "non-owning"), and the other does (is "owning").
...see the indexed getter implementation section for more information on building this
kind of structure.
...And 2 more matches
AudioTrack - Web APIs
kind read only a domstring specifying the category into which the track falls.
... for example, the main audio track would have a
kind of "main".
... example this example returns an array of track
kinds and labels for potential use in a user interface to select audio tracks for a specified media element.
...And 2 more matches
DataTransferItem.getAsString() - Web APIs
the datatransferitem.getasstring() method invokes the given callback with the drag data item's string data as the argument if the item's
kind is a plain unicode string (i.e.
...
kind is string).
... function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
...And 2 more matches
Using Service Workers - Web APIs
if successful, the service worker is executed in a serviceworkerglobalscope; this is basically a special
kind of worker context, running off the main script execution thread, with no dom access.
...this is really the same
kind of procedure as installing a native or firefox os app — making everything available for use offline.
... instead, we could build our own promise to handle this
kind of case.
...And 2 more matches
TextTrack.mode - Web APIs
the activecues list is being maintained and events are firing at the appropriate times; the track's text is also being drawn appropriately based on the styling and the track's
kind.
...the exact appearance and manner of that performance varies depending on each text track's
kind.
... in general: tracks whose
kind is "subtitles" or "captions" are rendered with the cues overlaid over the top of the video.
...And 2 more matches
WebRTC Statistics API - Web APIs
new rtcpeerconnection(pcoptions); statsinterval = window.setinterval(getconnectionstats, 1000); /* add event handlers, etc */ } catch(err) { console.error("error creating rtcpeerconnection: " + err); } function getconnectionstats() { mypeerconnection.getstats(null).then(stats => { var statsoutput = ""; stats.foreach(report => { if (report.type === "inbound-rtp" && report.
kind === "video") { object.keys(report).foreach(statname => { statsoutput += `<strong>${statname}:</strong> ${report[statname]}<br>\n`; }); } }); document.queryselector(".stats-box").innerhtml = statsoutput; }); } when the promise returned by getstats() is fulfilled, the resolution handler receives as input an rtcstatsreport object containing the statistics ...
... this example specifically looks for the report whose type is inbound-rtp and whose
kind is video.
...the dictionary this key maps to depends on the track's
kind.
...And 2 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
finally, voice dictation software needs to know what's in the current document or ui in order to implement "say what you see"
kinds of features.
... on microsoft windows, these
kinds of assistive technology acquire this necessary information via a combination of hacks, msaa and proprietary doms.
... dueling text equivalents problem: there are three
kinds of text equivalents, and it is difficult to know when to use each.
...And 2 more matches
<input type="email"> - HTML: Hypertext Markup Language
placeholder the placeholder attribute is a string that provides a brief hint to the user as to what
kind of information is expected in the field.
...you must verify the e-mail address on the server side of any transaction in which the provided text may have any security implications of any
kind.
... <input type="email" size="40" list="defaultemails"> <datalist id="defaultemails"> <option value="jbond007@mi6.defence.gov.uk"> <option value="jbourne@unknown.net"> <option value="nfury@shield.org"> <option value="tony@star
kindustries.com"> <option value="hulk@grrrrrrrr.arg"> </datalist> with the <datalist> element and its <option>s in place, the browser will offer the specified values as potential values for the e-mail address; this is typically presented as a popup or drop-down menu containing the suggestions.
...And 2 more matches
Digital audio concepts - Web media technologies
with so much competition for network capacity, especially on slower networks, this amount of data may be too much to viably transmit during any
kind of real-time applications.
... audio compression basics unlike text and many other
kinds of data, audio data tends to be noisy, meaning the data rarely consists of a series of exactly repeated bytes or byte sequences.
... psychoacoustics if you know what
kind of audio you're most likely to handle, you can potentially find special filtering techniques applicable specifically to that
kind of sound, that will optimize the encoding.
...And 2 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
three
kinds of packages make up chrome the content package this package is used to contain the main xul and javascript source files.
... an extension’s gui, or chrome, can consist of three
kinds of package: content, locale, and skin.
...this
kind of xpi file will run fine, but will slow down firefox’s launch time.
... initializing when opening browser window with extensions, there are a lot of situations where you want to perform some
kind of initialization when the browser window opens.
Adding sidebars - Archive of obsolete content
a tabpanel can hold any
kind of content.
...this
kind of positioning can be useful for various artistic effects, as well as some type of desktop-like or dashboard-like interface, where items are located in positions determined by the user, and they can overlap with each other.
...this topic will be covered later when we look at different
kinds of datasources and templates.
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
Local Storage - Archive of obsolete content
it is very common for an extension to require some
kind of local persistent storage.
... logging good logging is essential in all
kinds of software projects.
... and then logging is done with any of the following methods, depending on the
kind of message being logged: this._logger.fatal("this is a fatal message."); this._logger.error("this is an error message."); this._logger.warn("this is a warning message."); this._logger.info("this is an info message."); this._logger.config("this is a config message."); this._logger.debug("this is a debug message."); this._logger.trace("this is a trace message."); you can filter the output of the...
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
User Notifications and Alerts - Archive of obsolete content
this
kind of notification is implemented with a notificationbox.
... this
kind on notification is very easy to implement, it doesn't interrupt the user and is easy to read and dismiss, so it is our recommended way of displaying alerts and notifications.
...the best locations for this
kind of box are above and below the tab browser.
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
Performance best practices in extensions - Archive of obsolete content
zombie compartments are a particular
kind of memory leak that you can detect with minimal effort.
... see common causes of memory leaks in extensions for ways to avoid zombie compartments and other
kinds of leaks.
... as well as looking for these specific
kinds of leaks, it's worth exercising your extension's functionality and checking the contents of about:memory for any excessive memory usage.
... any
kind of i/o on the main thread, be it disk or network i/o, can cause serious ui responsiveness issues.
HTML: A good basis for accessibility - Learn web development
sometimes you are not in the position to get rid of lousy markup — your pages might be generated by some
kind of server-side framework over which you don't have full control, or you might have third party content on your page (such as ad banners) over which you have no control.
...in this example the user will at least know it is a dinosaur of some
kind, but often files may be uploaded with machine-generated file names (e.g.
... html5 includes two new elements — <figure> and <figcaption> — which are supposed to associate a figure of some
kind (it could be anything, not necessarily an image) with a figure caption: <figure> <img src="dinosaur.png" alt="the mozilla tyrannosaurus"> <figcaption>a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.</figcaption> </figure> unfortunately, most screen readers don't seem to associate figure captions with th...
... link that opens a new tab or window <a target="_blank" href="https://www.wikipedia.org/">wikipedia (opens in a new window)</a> link to a non-html resource <a target="_blank" href="2017-annual-report.ppt">2017 annual report (powerpoint)</a> if an icon is used in place of text to signify this
kind of links behavior, make sure it includes an alternate description.
HTML: A good basis for accessibility - Learn web development
sometimes you are not in the position to get rid of lousy markup — your pages might be generated by some
kind of server-side framework over which you don't have full control, or you might have third party content on your page (such as ad banners) over which you have no control.
...in this example the user will at least know it is a dinosaur of some
kind, but often files may be uploaded with machine-generated file names (e.g.
... html5 includes two new elements — <figure> and <figcaption> — which are supposed to associate a figure of some
kind (it could be anything, not necessarily an image) with a figure caption: <figure> <img src="dinosaur.png" alt="the mozilla tyrannosaurus"> <figcaption>a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.</figcaption> </figure> unfortunately, most screen readers don't seem to associate figure captions with th...
... link that opens a new tab or window <a target="_blank" href="https://www.wikipedia.org/">wikipedia (opens in a new window)</a> link to a non-html resource <a target="_blank" href="2017-annual-report.ppt">2017 annual report (powerpoint)</a> if an icon is used in place of text to signify this
kind of links behavior, make sure it includes an alternate description.
Introducing asynchronous JavaScript - Learn web development
related to blocking), many web api features now use asynchronous code to run, especially those that access or fetch some
kind of resource from an external device, such as fetching a file from the network, accessing a database and returning data from it, accessing a video stream from a web cam, or broadcasting the display to a vr headset.
... the catch() block at the end runs if any of the .then() blocks fail — in a similar way to synchronous try...catch blocks, an error object is made available inside the catch(), which can be used to report the
kind of error that has occurred.
... in a less trivial code example, this
kind of setup could cause a problem — you can't include an async code block that returns a result, which you then rely on later in a sync code block.
...but web browsers define functions and apis that allow us to register functions that should not be executed synchronously, and should instead be invoked asynchronously when some
kind of event occurs (the passage of time, the user's interaction with the mouse, or the arrival of data over the network, for example).
Graceful asynchronous programming with Promises - Learn web development
essentially, a promise is an object that represents an intermediate state of an operation — in effect, a promise that a result of some
kind will be returned at some point in the future.
...the decoded response bodies),
kind of like [coffee-results, tea-results, description-results].
... the above example is not very flexible — the promise can only ever fulfil with a single string, and it doesn't have any
kind of reject() condition specified (admittedly, settimeout() doesn't really have a fail condition, so it doesn't matter for this simple example).
...in the code you'll see the same
kind of techniques we discussed above being used there.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
note: if you want to perform some
kind of simple constant dom animation, css animations are probably faster.
...you're going to create a simple "spinner animation"—the
kind you might see displayed in an app when it is busy connecting to the server, etc.
... note: in a real world example, you should probably use css animations to run this
kind of simple animation.
... however, this
kind of example is very useful to demonstrate requestanimationframe() usage, and you'd be more likely to use this
kind of technique when doing something more complex such as updating the display of a game on each frame.
Introduction to client-side frameworks - Learn web development
consider a common
kind of application: a to-do list creator, which we'll look at implementing using a variety of frameworks in future chapters.
... javascript frameworks were created to make this
kind of work a little easier — they exist to provide a better developer experience.
...this rfc serves as a great example of the
kind of research you should do for yourself when planning to use a front-end framework.
... our next article goes down to a lower level, looking at the specific
kinds of features frameworks tend to offer, and why they work like they do.
TypeScript support in Svelte - Learn web development
this
kind of developer assistance is another good reason to start using typescript in your projects.
... we will get the following error: by now you should get an idea about the
kind of assistance we can get from typescript when building svelte projects.
... for these
kinds of cases, typescript provides several utility types to make it easier to apply these common transformations.
...we shouldn't need to store any
kind of value — we know that the alert store should contain string messages, and the todos store should contain an array of todotype, etc.
Handling common JavaScript problems - Learn web development
this
kind of operation has been made easier to handle by the introduction of promises to the javascript language.
...you need some
kind of a feature detection test that detects whether the browser supports the feature we are trying to use: if (browsersupportsallfeatures()) { main(); } else { loadscript('polyfills.js', main); } function main(err) { // actual app code goes in here } so first we run a conditional that checks whether the function browsersupportsallfeatures() returns true.
...browser sniffing causes all
kind of interesting bugs, like bug 1308462.
...javascript libraries/polyfills also make use of this
kind of code, to abstract browser differences away from the developer as much as possible.
Client-side tooling overview - Learn web development
overview: understanding client-side tools next in this article we provide an overview of modern web tooling, what
kinds of tools are available and where you’ll meet them in the lifecycle of web app development, and how to find help with individual tools.
... this part of the tooling should be specific to your own development environment, though it’s not uncommon for companies to have some
kind of policy or pre-baked configuration available to install so that all their developers are all using the same processes.
... postcss: does the same
kind of thing as babel, but for cutting-edge css features.
...have a look at the featured extensions on the front page, and again, try searching for the
kind of extension you want (or the tool name, for example search for "eslint" on the vscode extensions page).
SVG Guidelines
although this
kind of data is supported by the browser, it can only be displayed when the svg is opened in a new tab.
... plus, in most of the cases, the filename is quite descriptive so it's recommended to remove that
kind of metadata since it doesn't bring much value.
... invisible shapes there are two
kinds of invisible shapes: the off-screen ones and the uncolored ones.
...those
kinds of shapes are visible but off the svg view box.
Power profiling overview
the first is the ability to switch frequently (thousands of times per second) between active and idle states, and there are actually several different
kinds of idle states.
...this happens when the os schedules a process to run due to some
kind of event.
... one consequence of the existence of c-states is that observations made during power profiling — even more than with other
kinds of profiling — can disturb what is being observed.
... power and power-related measurements there are several
kinds of power and power-related measurements.
nsIDOMMozNetworkStatsManager
to know in advance which
kind of origin is available, the moznetworkstatsmanager.getavailablenetworks method returns an array of interfaces.
...to know in advance which
kind of origin is available, the moznetworkstatsmanager.getavailablenetworks method returns an array of interfaces.
...to know in advance which
kind of origin is available, the moznetworkstatsmanager.getavailablenetworks method returns an array of interfaces.
...to know in advance which
kind of origin is available, the moznetworkstatsmanager.getavailablenetworks method returns an array of interfaces.
AudioTrack.enabled - Web APIs
function swapcommentarymain() { var videoelem = document.getelementbyid("main-video"); var audiotrackmain; var audiotrackcommentary; videoelem.audiotracks.foreach(track) { if (track.
kind === "main") { audiotrackmain = track; } else if (track.
kind === "commentary") { audiotrackcommentary = track; } } if (audiotrackmain && audiotrackcommentary) { var commentaryenabled = audiotrackcommentary.enabled; audiotrackcommentary.enabled = audiotrackmain.enabled; audiotrackmain.enabled = commentaryenabled; } } the swapcommentarymain() function above f...
...inds within the audio tracks of the <video> element "main-video" the audio tracks whose
kind values are "main" and "commentary".
... note: this example assumes that there is only one of each
kind of track in the video, but this is not necessarily the case.
... the scan looks for the tracks whose
kind values are "main" and "commentary" and remembers those audiotrack objects.
AudioTrack.label - Web APIs
for example, a track whose
kind is "commentary" might have a label such as "commentary with director mark markmarkimark and star donna donnalidon".
... example this example returns an array of track
kinds and labels for potential use in a user interface to select audio tracks for a specified media element.
... the list is filtered to only allow certain track
kinds through.
... function gettracklist(el) { var tracklist = []; const wanted
kinds = [ "main", "alternative", "main-desc", "translation", "commentary" ]; el.audiotracks.foreach(function(track) { if (wanted
kinds.includes(track.
kind)) { tracklist.push({ id: track.id,
kind: track.
kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of audio tracks whose
kind is one of those in the array wanted
kinds, with each entry providing the track's id,
kind, and label.
Introduction to the DOM - Web APIs
node every object located within a document is a node of some
kind.
...in an html document, elements are further enhanced by the html dom api's htmlelement interface as well as other interfaces describing capabilities of specific
kinds of elements (for instance, htmltableelement for <table> elements).
... nodelist a nodelist is an array of elements, like the
kind that is returned by the method document.getelementsbytagname().
...these elements may also have specific interfaces for dealing with the
kind of data those elements hold, as in the table object example in the previous section.
MediaDevices.ondevicechange - Web APIs
function updatedevicelist() { navigator.mediadevices.enumeratedevices() .then(function(devices) { audiolist.innerhtml = ""; videolist.innerhtml = ""; devices.foreach(function(device) { let elem = document.createelement("li"); let [
kind, type, direction] = device.
kind.match(/(\w+)(input|output)/i); elem.innerhtml = "<strong>" + device.label + "</strong> (" + direction + ")"; if (type === "audio") { audiolist.appendchild(elem); } else if (type === "video") { videolist.appendchild(elem); } }); }); } updatedevicelist() consists entirely of a call to the function enumeratedevices() on ...
... the line let [
kind, type, direction] = device.
kind.match(/(\w+)(input|output)/i); deserves special notice.
... this uses destructuring assignment (a new feature of ecmascript 6) to assign the values of the first three items in the array returned by string.match() to the variables
kind, type, and direction.
... we do this because the value of mediadeviceinfo.
kind is a single string that includes both the media type and the direction the media flows, such as "audioinput" or "videooutput".
RTCRtpReceiver.getCapabilities() static function - Web APIs
syntax let rtpcapabilities = rtcrtpreceiver.getcapabilities(
kind); parameters
kind a domstring indicating the type of media for which you wish to get the device's capability to receive.
... all browsers support the primary media
kinds: audio and video.
... return value an rtcrtpcapabilities object stating what capabilities the browser has for receiving the specified media
kind over an rtcpeerconnection.
... if the browser doesn't have any support for the given media
kind, the returned value is null.
RTCRtpSender.getCapabilities() static function - Web APIs
syntax let rtpcapabilities = rtcrtpsender.getcapabilities(
kind); parameters
kind a domstring indicating the type of media for which you wish to get the sender's capability to receive.
... all browsers support the primary media
kinds: audio and video.
... return value an rtcrtpcapabilities object stating what capabilities the browser has for sending the specified media
kind over an rtcpeerconnection.
... if the browser doesn't have any support for the given media
kind, the returned value is null.
RTCRtpSender.replaceTrack() - Web APIs
the new track must be of the same media
kind (audio, video, etc) and switching the track should not require negotiation.
...the new track's
kind must be the same as the current track's, or the replace track request will fail.
... typeerror the new track's
kind doesn't match the original track.
...xample to change video camera, suppose selected value saved into window.selectedcamera navigator.mediadevices .getusermedia({ video: { deviceid: { exact: window.selectedcamera } } }) .then(function(stream) { let videotrack = stream.getvideotracks()[0]; pcs.foreach(function(pc) { var sender = pc.getsenders().find(function(s) { return s.track.
kind == videotrack.
kind; }); console.log('found sender:', sender); sender.replacetrack(videotrack); }); }) .catch(function(err) { console.error('error happens:', err); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.replacetrack()' in that specification.
RTCRtpStreamStats - Web APIs
kind a domstring whose value is "audio" if the associated mediastreamtrack is audio-only or "video" if the track contains video.
... this value will match that of the media type indicated by rtccodecstats.codec, as well as the track's
kind property.
... obsolete fields mediatype renamed to
kind in the specification in february 2018.
... see browser compatibility in rtcrtpstreamstats.
kind to determine when browsers made the transition.
VideoTrack.label - Web APIs
for example, a track whose
kind is "sign" might have a label such as "a sign-language interpretation.".
... example this example returns an array of track
kinds and labels for potential use in a user interface to select video tracks for a specified media element.
... the list is filtered to only allow certain track
kinds through.
... function gettracklist(el) { var tracklist = []; const wanted
kinds = [ "main", "alternative", "commentary" ]; el.videotracks.foreach(function(track) { if (wanted
kinds.includes(track.
kind)) { tracklist.push({ id: track.id,
kind: track.
kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of video tracks whose
kind is one of those in the array wanted
kinds, with each entry providing the track's id,
kind, and label.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
points of view since the camera is a virtual object which, rather than necessarily representing a physical object in the virtual world, represents a viewer's position and viewing direction, it's useful to think about the
kinds of situation that call for the use of a camera.
... cameras in gaming there are many
kinds of games, and as such, there are several ways in which cameras might be used in games.
...there are several
kinds of perspective; those are defined and their mathematics explained in the article webgl model view projection.
... trucking (moving left or right) trucking using a physical camera uses the same
kind of rigging as dollying, but instead of moving the camera forward and backward, it moves from left to right or vice-versa.
Content negotiation - HTTP
the determination of the best suited representation is made through one of two mechanisms: specific http headers by the client (server-driven negotiation or proactive negotiation), which is the standard way of negotiating a specific
kind of resource.
... server-driven content negotiation in server-driven content negotiation, or proactive content negotiation, the browser (or any other
kind of user-agent) sends several http headers along with the url.
...client hints advertise what
kind of device the user agent runs on (for example, if it is a desktop computer or a mobile device).
... the accept-charset header the accept-charset header indicates to the server what
kinds of character encodings are understood by the user-agent.
Web audio codec guide - Web media technologies
for example, if the encoder is configured to reduce the sample rate, the sample rate's effect on the output file will be reduced in
kind.
...this and its free and open license, make it a good choice for many
kinds of audio data as long as its high latency isn't a problem.
... container support ogg, webm rtp / webrtc compatible yes licensing fully open and free of any licensing requirements choosing an audio codec typically, regardless of what codec you use, it will generally get the job done, even if it's not the ideal choice, as long as you choose a codec not specifically designed for a totally different
kind of source audio.
... what
kind of audio content will the codec be handling?
Codecs used by WebRTC - Web media technologies
let codeclist = null; peerconnection.addeventlistener("icegatheringstatechange", (event) => { if (peerconnection.icegatheringstate === "complete") { const senders = peerconnection.getsenders(); senders.foreach((sender) => { if (sender.track.
kind === "video") { codeclist = sender.getparameters().codecs; return; } }); } codeclist = null; }); the event handler for icegatheringstatechange is established; in it, we look to see if the ice gathering state is complete, indicating that no further candidates will be collected.
... with that in hand, we walk through the list of senders, looking for the first one whose mediastreamtrack indicates that it's track's
kind is video, indicating that the track's data is video media.
... function changevideocodec(mimetype) { const transceivers = peerconnection.gettransceivers(); transceivers.foreach(transceiver => { const
kind = transceiver.sender.track.
kind; let sendcodecs = rtcrtpsender.getcapabilities(
kind).codecs; let recvcodecs = rtcrtpreceiver.getcapabilities(
kind).codecs; if (
kind === "video") { sendcodecs = prefercodec(mimetype); recvcodecs = prefercodec(mimetype); transceiver.setcodecpreferences([...sendcodecs, ...recvcodecs]); } }); peerconnection.onnegotiationneeded();...
... then, for each transceiver, we get the
kind of media represented by the transceiver from the rtcrtpsender's track's
kind.
widget - Archive of obsolete content
any
kind of jsonable value (object, array, string, etc.) can be used here.
... any
kind of jsonable value (object, array, string, etc.) can be used here.
... any
kind of jsonable value (object, array, string, etc.) can be used here.
Adding windows and dialogs - Archive of obsolete content
the prompt service has a very rich set of functions that allow different
kinds of inputs, such as text, passwords, usernames and passwords, and checkboxes that can be used for "never ask this again"-type dialogs.
... input controls most additional xul windows and dialogs in extensions are some
kind of input form.
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
Connecting to Remote Content - Archive of obsolete content
unlike javascript, the json format doesn't allow any
kind of code that can be run, only data.
...do not allow event handlers or any other
kinds of code to be passed through your parsers.
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
Setting Up a Development Environment - Archive of obsolete content
« previousnext » getting the right tools there are 3 tools that we think are essential for effective add-on development (or any
kind of development, really): a source code editor, a source control system, and a build system.
...mozilla has proven with time that they take memory usage seriously, improving performance on several critical areas and removing all
kinds of memory leaks.
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
When To Use ifdefs - Archive of obsolete content
in this document, the term is used more loosely to discuss any
kind of conditional that differentiates between different build configurations.
... there are three major
kinds of ifdefs in use in the mozilla tree: platform/widget ifdefs, feature ifdefs, and application-specific ifdefs: platform/widget ifdefs the mozilla code will frequently need to differentiate between code for different platforms or widget sets.
...this is the trickiest
kind of ifdef, because it is frequently hard to determine what code is "shared" and what code is "application-specific".
Document Object Model - Archive of obsolete content
mozilla provides several different document objects depending on the
kind of document.
... a namespace is a uri which specifies the
kind of element.
...in fact, the actual text used for the prefix is irrelevant when determining what
kind of element is used.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
here's an example of this
kind of usage for ie: <!-- ie only code --> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="366" height="142" id="myflash"> <param name="movie" value="javascript-to-flash.swf" /> <param name="quality" value="high" /> <param name="swliveconnect" value="true" /> </object> in ...
... with the release of netscape 7.1, this
kind of activex use of the object element is supported for use with the microsoft® windows media player.
... browsers such as netscape 7 will not render the flash plugin if the above
kind of markup is used, because netscape 7 does not support activex or activex-based component invocations, with the exception of windows media player in netscape 7.1.
Common causes of memory leaks in extensions - Extensions
causes of zombie compartments zombie compartments are a particular
kind of memory leak.
... // this
kind of subtle bug is very common.
... causes of other
kinds of leaks other than javascript compartments, add-ons may also leak entities that do not get a dedicated compartment, most commonly chrome dom windows and javascript code modules.
asm.js - Game development
it pushes js engines to optimize this
kind of code, and gives compilers like emscripten a clear definition of what
kind of code to generate.
...however, by defining an explicit standard we can work on optimizing this
kind of code even more and getting as much performance as we can out of it.
...the idea is that this
kind of code should run very fast in each engine, and if it doesn't, it's a bug and there's a clear spec that engines should optimize for.
Accessible multimedia - Learn web development
audio descriptions on occasions where there are visuals accompanying your audio, you'll need to provide audio descriptions of some
kind to describe that extra content.
...use the
kind attribute to specify whether the cues are subtitles, captions, or descriptions.
... here's an example: <video controls> <source src="example.mp4" type="video/mp4"> <source src="example.webm" type="video/webm"> <track
kind="subtitles" src="subtitles_en.vtt" srclang="en"> </video> this will result in a video that has subtitles displayed,
kind of like this: for more details, please read adding captions and subtitles to html5 video.
What is accessibility? - Learn web development
what
kinds of disability are we looking at?
... this
kind of disability can also be a result of old age, rather than any specific trauma or condition, and it could also result from hardware limitations — some users might not have a mouse.
..."100% accessibility" is an unobtainable ideal — you will always come across some
kind of edge case that results in a certain user finding certain content difficult to use — but you should do as much as you can.
Beginner's guide to media queries - Learn web development
media query basics the simplest media query syntax looks like this: @media media-type and (media-feature-rule) { /* css rules go here */ } it consists of: a media type, which tells the browser what
kind of media this code is for (e.g.
...this feature means you can test if the user has the ability to hover over an element, which essentially means they are using some
kind of pointing device; touchscreen and keyboard navigation does not hover.
...typically these small tweaks are the
kind of thing you will do to make the design look good at each breakpoint.
Advanced form styling - Learn web development
neither of them will apply any
kind of spacing (e.g.
... if you really need full control over the option styling, you'll have to either use some
kind of library to generate a custom control, or build your own custom control, or in the case of select use the multiple attribute, which makes all the options appear on the page, sidestepping this particular problem: <select id="select" name="select" multiple> ...
...if you really need full control over the styling, you'll have to either use some
kind of library to generate a custom control, or build your own.
Getting started with HTML - Learn web development
with the
kind of overlap in the example above, the browser has to guess at your intent.
... this
kind of guessing can result in unexpected results.
...this example (below) shows a
kind of mixing quotes that will go wrong: <a href="http://www.example.com'>a link to my example.</a> however, if you use one type of quote, you can include the other type of quote inside your attribute values: <a href="http://www.example.com" title="isn't this fun?">a link to my example.</a> to use quote marks inside other quote marks of the same type (single quote or double quote), use html entit...
Introduction to events - Learn web development
a series of fortunate events as mentioned above, events are actions or occurrences that happen in the system you are programming — the system produces (or "fires") a signal of some
kind when an event occurs, and provides a mechanism by which an action can be automatically taken (that is, some code running) when the event occurs.
... the example output is as follows: it's not just web pages another thing worth mentioning at this point is that events are not unique to javascript — most programming languages have some
kind of event model, and the way the model works often differs from javascript's way.
...when you fill in the details and select the submit button, the natural behavior is for the data to be submitted to a specified page on the server for processing, and the browser to be redirected to a "success message" page of some
kind (or the same page, if another is not specified.) the trouble comes when the user has not submitted the data correctly — as a developer, you want to prevent the submission to the server and give an error message saying what's wrong and what needs to be done to put things right.
Function return values - Learn web development
generally, a return value is used where the function is an intermediate step in a calculation of some
kind.
...it is generally a good idea to check that any necessary parameters are validated, and that any optional parameters have some
kind of default value provided.
...as you go further into your programming career, you'll start doing the same
kinds of things over and over again.
Working with Svelte stores - Learn web development
if you’ve already worked with redux or vuex, then you'll be familiar with how this
kind of store works.
...these
kind of widgets might also be known as popup notifications, toast, or notification bubbles.
...app.svelte is completely transparent in terms of what
kind of store we are using.
Handling common accessibility problems - Learn web development
important: you should perform this
kind of test on any new page you write — make sure the functionality can be accessed by the keyboard.
... javascript javascript has the same
kind of problems as css with respect to accessibility — it can be disastrous for accessibility if used badly, or overused.
...if you are inventing them yourself, you need to make sure that they are keyboard accessible; if you are using some
kind of third-party framework, carefully review the options available to see how accessible they are before diving in.
Displaying Places information using views
but recall that all trees—places view or not—display their data using another
kind of view, nsitreeview.
... regardless of the
kind of view you are writing, it should implement interface nsiplacesview.
... switch (acol.id || acol.element.getattribute("anonid")) { // uri for all nodes (like folders), not just uri nodes (like bookmarks) case "fulluri": return this.nodefortreeindex(arowindex).uri; break; // index of node in parent container case "indexinparent": return this.nodefortreeindex(arowindex).bookmar
kindex; break; // is the row even or odd?
Index
the crmf library, which is used to produce certain
kinds of certificate requests, is available as a library for static linking only.
...an object-signing certificate is a special
kind of certificate that allows you to associate your digital signature with one or more files.
...when testing is finished and you are ready to disitribute your software, you should obtain an object-signing certificate from one of two
kinds of sources: * an independent certificate authority (ca) that authenticates your identity and charges you a fee.
Hacking Tips
thus when dumping the assembly under gdb, this
kind of instructions would be easily noticeable.
... example output might look as follows: 0x1234abcd b global object ========== # zone 0x56789123 # compartment http://gmail.com [in zone 0x56789123] # compartment http://gmail.com/iframe [in zone 0x56789123] # arena alloc
kind=3 size=64 0x1234abcd b object > 0x1234abcd b prop1 > 0xabcd1234 w prop2 0xabcd1234 w object > 0xdeadbeef b prop3 # arena alloc
kind=5 size=72 0xdeadbeef w object > 0xabcd1234 w prop4 the output is textual.
...a gc thing starts with a line giving its address, its color, and the thing
kind (object, function, whatever).
Property cache
this special
kind of entry is used only for jof_get instructions and only when the property has a stub getter and has a slot (i.e.
... this special
kind of entry is used only for jof_call instructions and only when the result is a function.
... the jit uses a fourth
kind of pcval, having pcval.isnull(), internally to indicate that a property lookup missed entirely.
JSAPI User Guide
your application will expose objects that are relevant for the
kind of scripts you want to write.
...in designing this
kind of application, it's important to think through the security concerns ahead of time.
...note that the
kind of attack we're talking about here is where a hacker uses javascript to attack the c++ code of the engine itself (or your embedding).
JS_SetNativeStackQuota
each
kind of code may have a different stack quota, allowing embedders to keep higher-priority machinery running in the face of scripted stack exhaustion by something else.
... the stack quotas for each
kind of code should be monotonically descending, and may be specified with this function.
... if 0 is passed for a given
kind of code, it defaults to the value of the next-highest-priority
kind.
An Overview of XPCOM
the dosomethinguseful method may do some
kind of checking to ensure that the condition - that init has been called - has been satisfied.
...this
kind of "future-proofing" is a key advantage that comes along with deriving from nsisupports.
... but there is also a
kind of object known as a service, of which there is always only one copy (though there may be many services running at any one time).
Creating the Component Code
the registerself method the first parameter is the nsicomponentmanager, which provides a
kind of entry point into managing the registration process.
... the last parameter specifies what
kind of loader to use on the component.
...since xpcom already knows internally what
kind of file it has just loaded and called registerself on, passing this value to the registration methods is a shortcut for determining what
kind of component is being registered.
Using XPCOM Utilities to Make Things Easier
to avoid these
kinds of redundancies, to regulate the way generic code is written, and to save typing, xpcom providesgeneric module macros that expand into the module code you've already seen.
...clearly from a code maintenance point of view, this
kind of reduction is outstanding.
...other
kinds of strings like "wide" strings use two bytes to represent each character, and are often used to deal with unicode strings.
Index
this interface could also be applied to other
kinds of objects with multiple actions such as "smart tags" which are objects, typically strings, which have multiple actions such as "activate uri", "bookmark uri", end so on.
...however, in some cases that
kind of implementation will not be possible.
... 298 getlin
kindex no summary!
nsIMemoryMultiReporterCallback
1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview void callback(in acstring process, in autf8string path, in print32
kind, in print32 units, in print64 amount, in autf8string description, in nsisupports closure); methods callback() called to provide information from a multi-reporter.
...void callback( in acstring process, in autf8string path, in print32
kind, in print32 units, in print64 amount, in autf8string description, in nsisupports closure ); parameters process the value of the process attribute for the memory reporter.
...
kind the value of the
kind attribute.
DataTransferItem.getAsFile() - Web APIs
function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
... drop: html"); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("...
... drop: uri"); } else if ((data[i].
kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("...
DataTransferItem.type - Web APIs
function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
... drop: html"); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("...
... drop: uri"); } else if ((data[i].
kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("...
DataTransferItemList.add() - Web APIs
exceptions notsupportederror a string data parameter was provided, and the list already contains an item whose
kind is "plain unicode string" and whose type is equal to the specified type parameter.
...paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
Using IndexedDB - Web APIs
wait for the operation to complete by listening to the right
kind of dom event.
... the following table shows the different ways the keys are supplied: key path (keypath) key generator (autoincrement) description no no this object store can hold any
kind of value, even primitive values like numbers and strings.
... no yes this object store can hold any
kind of value.
MediaStream.onaddtrack - Web APIs
this happens when a new track of any
kind is added to the media stream.
... example this example adds a listener which, when a new track is added to the stream, appends a new item to a list of tracks; the new item shows the track's
kind ("audio" or "video") and label.
... stream.onaddtrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = event.track.
kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onaddtrack' in that specification.
MediaStream - Web APIs
mediastream.getaudiotracks() returns a list of the mediastreamtrack objects stored in the mediastream object that have their
kind attribute set to audio.
... mediastream.gettracks() returns a list of all mediastreamtrack objects stored in the mediastream object, regardless of the value of the
kind attribute.
... mediastream.getvideotracks() returns a list of the mediastreamtrack objects stored in the mediastream object that have their
kind attribute set to "video".
TrackDefault.TrackDefault() - Web APIs
syntax var trackdefault = new trackdefault(type, language, label,
kinds, bytestreamtrackid); parameters type a domstring specifying a media segment data type for the sourcebuffer to contain.
...
kinds an array (sequence) of domstrings specifying default
kinds for the sourcebuffer to use when an initialization segment does not contain
kind information for a new track.
... typeerror there are values specified in the
kinds array that do not apply to the specified type.
VideoTrack - Web APIs
kind read only a domstring specifying the category into which the track falls.
... for example, the main video track would have a
kind of "main".
...for example, a track whose
kind is "sign" might have a label of "a sign-language interpretation".
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
syntax any gl.getactiveuniformblockparameter(program, uniformbloc
kindex, pname); parameters program a webglprogram containing the active uniform block.
... uniformbloc
kindex a gluint specifying the index of the active uniform block within the program.
... examples var blocksize = gl.getactiveuniformblockparameter(program, bloc
kindex, gl.uniform_block_data_size); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockparameter' in that specification.
Data in WebGL - Web APIs
shader programs have access to three
kinds of data storage, each of which has a specific use case.
... each
kind of variable is accessible by one or both types of shader program (depending on the data store type) and possibly by the site's javascript code, depending on the specific type of variable.
... glsl data types <<document the basic types, vectors, etc; see data type (glsl) on the khronos webgl wiki>> glsl variables there are three
kinds of "variable" or data storage available in glsl, each of which with its own purpose and use cases: attributes, varyings, and uniforms.
Fundamentals of WebXR - Web APIs
a system with two degrees of freedom can sense when the user looks left and right or up and down, but can't report any other
kind of movement.
...this is done by specifying the appropriate session mode string for the
kind of session you want to create.
... headsets most immersive vr experiences take place using goggles or a headset of some
kind.
Syntax - CSS: Cascading Style Sheets
it is important to note that even if a ruleset characterized by a group of selectors is a
kind of shorthand replacing rulesets with a single selector each, this doesn't apply to the validity of the ruleset itself.
...it will use other and specific
kinds of statements to do that.
... there are two
kinds of statements: rulesets (or rules) that, as seen, associate a collection of css declarations to a condition described by a selector.
<input type="tel"> - HTML: Hypertext Markup Language
placeholder the placeholder attribute is a string that provides a brief hint to the user as to what
kind of information is expected in the field.
...this information is used to decide what
kind of label to use on the enter key on the virtual keyboard.
...when creating any
kind of registration or e-commerce site, for example, you will likely need to ask the user for a telephone number, whether for business purposes or for emergency contact purposes.
<input type="url"> - HTML: Hypertext Markup Language
placeholder the placeholder attribute is a string that provides a brief hint to the user as to what
kind of information is expected in the field.
...this information is used to decide what
kind of label to use on the enter key on the virtual keyboard.
...you must verify the url on the server-side of any transaction in which the provided text may have any security implications of any
kind.
MIME types (IANA media types) - HTTP
the subtype identifies the exact
kind of data of the specified type the mime type represents.
... discrete types the discrete types currently registered with the iana are: applicationlist at iana any
kind of binary data that doesn't fall explicitly into one of the other types; either data that will be executed or interpreted in some way or binary data that requires a specific application or category of application to use.
... note that text/plain does not mean "any
kind of textual data." if they expect a specific
kind of textual data, they will likely not consider it a match.
HTTP conditional requests - HTTP
such values are called validators, and are of two
kinds: the date of last modification of the document, the last-modified date.
... comparing versions of the same resource is a bit tricky: depending on the context, there are two
kinds of equality checks: strong validation is used when byte to byte identity is expected, for example when resuming a download.
... the
kind of validation is independent of the validator used.
Mobile first - Progressive web apps (PWAs)
in our planning your app article, we provided a high level look into the
kinds of planning and functionality decisions you should make before you start coding an app, including some ideas for desktop and mobile design.
... usage context on top of everything else, you must consider the
kinds of situations mobile devices will be used in, and the
kinds of tasks users most commonly want to perform on mobiles.
...imagine you wanted to include some
kind of webgl chart in the desktop version of the site requiring a webgl library like three but didn't want it included in the mobile version?
Communicating using "postMessage" - Archive of obsolete content
now we have to embed the event type in the message payload, and implement a switch function in the receiver to dispatch the message: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + " self.postmessage({" + "
kind: 'mouseover'," + " element: event.target.tostring()" + " });" + "}, false);" + "window.addeventlistener('mouseout', function(event) {" + " self.postmessage({" + "
kind: 'mouseout'," + " element: event.target.tostring()" + " });...
..." + " }, false);" var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pagemodscript, onattach: function(worker) { worker.on('message', function(message) { switch(message.
kind) { case 'mouseover': console.log('mouseover: ' + message.element); break; case 'mouseout': console.log('mouseout: ' + message.element); break; } }); } }); implementing the same add-on with user-defined events is shorter and more readable: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + " self.port.emit('mouseover', event.target.tostring());" + "}, false);" + "window.addeventlistener('mouseout', function(event) {"...
panel - Archive of obsolete content
any
kind of jsonable value (object, array, string, etc.) can be used here.
... any
kind of jsonable value (object, array, string, etc.) can be used here.
core/promise - Archive of obsolete content
another simple example may be a delay function that returns a promise which is fulfilled with a given value after a given time ms --
kind of promise based alternative to settimeout: function delay(ms, value) { let { promise, resolve } = defer(); settimeout(resolve, ms, value); return promise; } delay(10, 'hello world').then(console.log); // after 10ms => 'helo world' advanced usage if general defer and promised should be enough to doing almost anything you may think of with promises, but once you start using promises exte...
... treat errors as promises now that we can create all
kinds of eventual values, it's useful to have a way to create eventual errors.
StringView - Archive of obsolete content
it can be: another stringview a string a number an arraybuffer a typed array of uint8array, uint16array, or uint32array subclass any other
kind of ordered object (like arrays, collections, etc.) if it is a number it will become the length of the new stringview; otherwise it will become its content.
... length optional a number expressing in codepoints the length of the new stringview if the input argument is a string or a stringview, or in raw elements if the input is a typed array, an arraybuffer or any other
kind of ordered object (like array, collections, etc.).
Adding Events and Commands - Archive of obsolete content
you should also avoid this
kind of events to trigger actions that could be destructive to the user's data, because a malicious site could try to trigger these events and cause damage.
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
The Box Model - Archive of obsolete content
the margin determines the space between an element and the elements surrounding it, while the padding determines the space between the borders of a container element and its child nodes,
kind of like an inner margin.
... « previousnext » this tutorial was
kindly donated to mozilla by appcoast.
Add-ons - Archive of obsolete content
extension etiquette this article describes best practices when making extensions, including how to be
kind to your users.
... how to convert an overlay extension to restartless first off, what
kind of add-on are we talking about here?
Index - Archive of obsolete content
413 creating regular expressions for a microsummary generator microsummaries, obsolete a regular expression is a special
kind of string (i.e.
... 714 xpinstall api reference xpinstall, xpinstall_api_reference see complete list 715 examples trigger scripts and install scripts describes typical
kinds of script that use the xpinstall api.
JXON - Archive of obsolete content
in order to avoid conflicts, the representation of nodes and attributes names is case insensitive (always rendered in lower case), so objects' local property names set using javascript must always have some
kind of capitalization (that is, at least one capital letter somewhere in their names), as you can see below.
...yarray>hot dogs</myarray> <myarray>false</myarray> <myobject> <nickname>jack</nickname> <registration_date>dec 25, 1995</registration_date> <privileged_user /> </myobject> <mynumber>99</mynumber> <mytext>hello world!</mytext> this example also shows how the ideal jxon document is an xml document designed specifically to be converted in json format, though our algorithms work fine with any
kind of xml document.
MMgc - Archive of obsolete content
class object { public: object() { refcount = 0; } void addref() { refcount++; } void release() { if (!--refcount) delete this; } int refcount; } reference counting is a
kind of automatic memory management.
...so, some
kind of reference counting is still attractive to lower the amount of work the gc has to do, and to get more immediacy on memory reclamation.
Notes on HTML Reflow - Archive of obsolete content
isn't information lost if a reflowdirty incremental reflow coalesces different
kinds of incremental reflows (e.g., a contentchanged with a stylechanged)?
... no, because these
kinds of reflows aren't coalesced; instead, they're directly enqueued to the presentation shell's reflow queue.
Layout System Overview - Archive of obsolete content
the layout module looks at the 'display' field of the style context to determine what
kind of frame to create (block, inline, table, etc.).
...it is also important to see the presentation shell as an observer of many
kinds of events in the system.
Content Panels - Archive of obsolete content
this url may point to any
kind of file, although it will usually point to an html file or another xul file.
...there are three classes of browser, depending on the
kind of content that you want to display inside.
Manifest Files - Archive of obsolete content
a package can contain any
kinds of files and may be split into subdirectories for different parts of the package.
...the method used depends on what
kind of application you are creating.
2006-10-27 - Archive of obsolete content
the owner of the site probably browsed on the releases/2.0 dir on the ftp and got the releases, which is
kind of unpolite.
... cédric wanted to know if the release directory should be closed before a major release to avoid this
kind of thing to happen.
Table Reflow Internals - Archive of obsolete content
kinds of reflows initial - reflowee's first reflow must be of this type (reflower's responsibility).
...a text run) user defined - currently only used for fixed positioned frames
kinds of reflows incremental reflow (continued) reflower not allowed to change available size of reflowee reflow commands get coalesced to streamline processing style change a target changed stylistic if there is a target, otherwise every frame may need to respond parent of target usually turns it into an incremental reflow with a style changed command type table frames ...
Old Proxy API - Archive of obsolete content
there are two
kinds of proxies: object proxies var proxy = proxy.create(handler, proto); and function proxies : var proxy = proxy.createfunction(handler, calltrap, constructtrap); where: proto is an optional object representing the proxy’s prototype (defaults to null if none is provided).
... handler api there are two
kinds of traps: fundamental and derived traps.
XForms Custom Controls - Archive of obsolete content
if you need to have xforms in other
kinds of documents like svg, mathml or some other tag language that mozilla supports, then you'll need to implement xforms controls for your desired document format.
...if you would like to do this
kind of heroic work then please contact the mozilla xforms developers before you start.
XUL Parser in Python - Archive of obsolete content
but mozilla's upcoming support for languages like perl and python will really open up the mozilla platform to tools and approaches of this
kind--and make now a good time to start thinking about how these various technologies will be put together.
...extending on the approach in this script, then, you could imagine a
kind of introspective xul chrome that could modify and replicate itself by calling services from the xulparser and xulwriter xpcom objects.
Visual-js game engine - Game development
3) please read the following terms and conditions before using this application: disclaimer of warranty 'visual js' is provided "as-is" and without warranty of any
kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose.
... in no event shall the author of this software be held liable for data loss, damages, loss of profits or any other
kind of loss while using or misusing this software.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
type is a characteristic of a value affecting what
kind of data it can store, and the structure that the data will adhere to.
... for example, a boolean data type can hold only a true or false value at any given time, whereas a string has the ability to hold a string or a sequence of characters, a number can hold numerical values of any
kind, and so on.
Assessment: Accessibility troubleshooting - Learn web development
the audio player the <audio> player isn't accessible to hearing impaired (deaf) people — can you add some
kind of accessible alternative for these users?
... the table the data table is not currently very accessible — it is hard for screenreader users to associate data rows and columns together, and the table also has no
kind of summary to make it clear what it shows.
CSS and JavaScript accessibility best practices - Learn web development
this has all
kinds of accessibility and other issues associated with it, so it is not advised.
... this
kind of form validation is unobtrusive — you can still use the form absolutely fine without the javascript being available, and any sensible form implementation will have server-side validation active as well, because it is too easy for malicious users to bypass client-side validation (for example, by turning javascript off in the browser).
WAI-ARIA basics - Learn web development
this is a fairly trivial example, but just imagine if you were creating a complex ui with lots of constantly updating content, like a chat room, or a strategy game ui, or a live updating shopping cart display — it would be impossible to use the app in any effective way without some
kind of way of alerting the user to the updates.
...you might be trying to fix some bad code you've inherited, or you might be building some
kind of complex widget that requires it.
Pseudo-classes and pseudo-elements - Learn web development
instead of adding the class, we could use the :first-child pseudo-class selector — this will always target the first child element in the article, and we will no longer need to edit the html (this may not always be possible anyway, maybe due to it being generated by a cms.) all pseudo-classes behave in this same
kind of way.
...use this as a reference to see the
kind of things that are available for you to target.
How CSS is structured - Learn web development
recognizing that more than one rule could apply to an element, is the first step in fixing these
kinds of issues.
...with this
kind of commenting in place, searching for comments in your code editor becomes a way to efficiently find a section of code.
CSS FAQ - Learn web development
you can use dom inspector's css style rules view to debug problems of this
kind, but the most frequent instances of ignored style rules are listed below.
...</div> to avoid this
kind of error, try to define rules only once for a certain selector, and group all rules belonging to that selector.
The HTML5 input types - Learn web development
one problem with sliders is that they don't offer any
kind of visual feedback as to what the current value is.
... html date controls are available to handle this specific
kind of data, providing calendar widgets and making the data uniform.
Other form controls - Learn web development
less obvious datalist uses according to the html specification, the list attribute and the <datalist> element can be used with any
kind of widget requiring a user input.
...this is for implementing any
kind of meter, for example a bar showing total space used on a disk, which turns red when it starts to get full.
Sending form data - Learn web development
to get it to work, you need to run the example through a php server of some
kind.
...this header is very important because it tells the server what
kind of data is being sent.
Test your skills: Styling basics - Learn web development
but your css should aim to fulfill the following requirements: add some
kind of lightweight "reset" to make fonts, padding, margin, and sizing more consistent to begin with.
... use some
kind of layout technique to make the inputs and labels line up neatly.
Your first form - Learn web development
it represents a basic single-line text field that accepts any
kind of text input.
...this turns a basic text field into a
kind of "intelligent" field that will perform some validation checks on the data typed by the user.
The web and web standards - Learn web development
this article provides some useful background on the web — how it came about, what web standard technologies are, how they work together, why "web developer" is a great career to choose, and what
kinds of best practices you'll learn about through the course.
... accessibility means making your websites usable by as many different
kinds of people as possible (related concepts are diversity and inclusion, and inclusive design).
Creating hyperlinks - Learn web development
the title contains additional information about the link, such as which
kind of information the page contains, or things to be aware of on the web site.
... let's look at some examples, to see what
kind of text can be used here: <p><a href="http://www.example.com/large-report.pdf"> download the sales report (pdf, 10mb) </a></p> <p><a href="http://www.example.com/video-stream/" target="_blank"> watch the video (stream opens in separate tab, hd quality) </a></p> <p><a href="http://www.example.com/car-game"> play the car game (requires flash) </a></p> use the download attribute when linki...
Document and website structure - Learn web development
basic sections of a document webpages can and will look pretty different from one another, but they all tend to share similar standard components, unless the page is displaying a fullscreen video or game, is part of some
kind of art project, or is just badly structured: header: usually a big strip across the top with a big heading, logo, and perhaps a tagline.
...you should use these preferably with a suitable class attribute, to provide some
kind of label for them so they can be easily targeted.
From object to iframe — other embedding technologies - Learn web development
clickjacking is one
kind of common iframe attack where hackers embed an invisible iframe into your document (or embed your document into their own malicious website) and use it to capture users' interactions.
... if you find yourself needing to embed plugin content, this is the
kind of information you'll need, at a minimum: <embed> <object> url of the embedded content src data accurate media type of the embedded content type type height and width (in css pixels) of the box controlled by the plugin height width height width names and values, to feed the plugin as parameters ad hoc attributes...
HTML table basics - Learn web development
a table allows you to quickly and easily look up values that indicate some
kind of connection between different types of data, for example a person and their age, or a day of the week, or the timetable for a local swimming pool.
... actual rendered table: knocky flor ella juan breed jack russell poodle streetdog cocker spaniel age 16 9 10 5 owner mother-in-law me me sister-in-law eating habits eats everyone's leftovers nibbles at food hearty eater will eat till he explodes the problem here is that, while you can
kind of make out what's going on, it is not as easy to cross reference data as it could be.
Introduction to web APIs - Learn web development
we'll also take a look at what the different main classes of apis are, and what
kind of uses they have.
... to provide another example, instances of the xmlhttprequest object (each one represents an http request to the server to retrieve a new resource of some
kind) has a number of events available on them, for example, the load event is fired when a response has been successfully returned containing the requested resource, and it is now available.
JavaScript object basics - Learn web development
every time we've been working through an example that uses a built-in browser api or javascript object, we've been using objects, because such features are built using exactly the same
kind of object structures that we've been looking at here, albeit more complex ones than in our own basic custom examples.
... note: it is useful to think about the way objects communicate as message passing — when an object needs another object to perform some
kind of action often it sends a message to another object via one of its methods, and waits for a response, which we know as a return value.
Aprender y obtener ayuda - Learn web development
this is more the
kind of thinking you do while you are in the shower, or during a coffee break.
... interactive code playgrounds you might be the
kind of person that prefers minimal instructions and would prefer to jump straight in and start playing with code.
Learning area release notes - Learn web development
learn why frameworks exist, when you should use one (and when you shouldn't), what
kinds of features are common to all frameworks, and how they relate to the vanilla javascript you may already know.
...learn the essentials of web development tooling, including what
kind of tools exist, the command line, package managers, and how to assemble your own functioning tool chain.
Framework main features - Learn web development
writing components as mentioned in the previous chapter, most frameworks have some
kind of component model.
...it is not a virtual dom nor an incremental dom; it is a separate process through which ember's templates are transpiled into a
kind of "byte code" that is easier and faster to read than javascript.
Getting started with React - Learn web development
you could just as well write the header expression like this: const header = <header> <h1>mozilla developer network</h1> </header> however, this looks
kind of awkward, because the <header> tag that starts the expression is not indented to the same position as its corresponding closing tag.
...a few other html attributes are written differently in jsx than they are in html too, for the same
kind of reason.
Handling common HTML and CSS problems - Learn web development
or you might find that html generated by some
kind of third party api (generating ad banners, for example) includes a class name or id that you are already using for a different purpose.
... for example, in the firefox dev tools, you get this
kind of output at the bottom of the dom inspector: if for example you were trying to use this selector, you'd be able to see that it wouldn't select the input element as desired: form > #date (the date form input isn't directly inside the <form>; you'd be better off using a general descendant selector instead of a child selector).
Introduction to cross browser testing - Learn web development
if you need to support older browsers, you might have to not use those, or convert your code to old fashioned syntax using some
kind of cross-compiler where needed.
...there are commercial tools available such as sauce labs, browser stack, endtest, lambdatest, testingbot, and crossbrowsertesting that do this
kind of thing for you, without you having to worry about the setup, if you wish to invest some money in your testing.
Git and GitHub - Learn web development
all developers will use some
kind of version control system (vcs), a tool to allow them to collaborate with other developers on a project without danger of them overwriting each other's work, and roll back to previous versions of the code base if a problem is discovered later on.
...you need to have some
kind of mechanism in place to manage the occurences, and help avoid loss of work as a result.
Package management basics - Learn web development
this is not too painful for a couple of dependencies, but in larger projects with many dependencies this
kind of thing can become really challenging to keep track of.
... you can add all
kinds of things to the scripts property that help you do your job.
Tools and testing - Learn web development
once you've started to become comfortable programming with core web technologies (like html, css, and javascript), and you start to get more experience, read more resources, and learn more tips and tricks, you'll start to come across all
kind of tools, from javascript frameworks, to testing and automation tools, and more besides.
... git and github all developers will use some
kind of version control system (vcs), a tool to allow them to collaborate with other developers on a project without danger of them overwriting each other's work, and roll back to previous versions of the code base if a problem is discovered later on.
Mozilla accessibility architecture
the implementations for each
kind of object (document, text, table, edit box, button, etc.) exist in accessible/src.
...the accessibility client can find out what
kind of event occurred as well as what accessible node the event occured on.
Gecko info for Windows accessibility vendors
gecko is the internal engine that mozilla uses to render any
kind of web content.
... event_focus is fired for focus changes on any
kind of focusable object event_statechange is used in check boxes, radio buttons, text fields, combo boxes and list boxes.
Accessible Toolkit Checklist
the approaches there are two basic
kinds of toolkits, which each provide different challenges when implementing accessibility: native widget toolkits , like eclipse and wxwidgets, already have some accessibility built-in.
...often these
kinds of toolkits don't use a separate window for each control; in that case remember to generate a unique 32 bit child id for each control so that the msaa event system can call back for the right iaccessible for each event.
Creating a Firefox sidebar
an extension an extension is a
kind of add-ons that adds new functionalities to firefox.
...such
kind of sidebar can be a simple web panel or a full-featured extension that is completely integrated with the browser.
Limitations of chrome scripts
for each pattern we've noted: whether a shim exists and what
kind of behavior it provides how to update your add-on so you don't need the shim gbrowser.contentwindow, window.content...
...however, there are various limitations on the
kinds of things you can do with a cpow.
Script security
privileged to unprivileged code the most obvious example of this
kind of security relation is between system-privileged chrome code and untrusted web content, but there are other examples in gecko.
... (a is the start of the arrow, and b is the end.) computing a wrapper the following diagram shows the factors that determine the
kind of wrapper that compartment a would get when trying to access an object in compartment b.
Extending a Protocol
in ipdl there two
kinds of "actors" - a "parent" and "child" - these actors are literally implemented as c++ classes, so they are more than just abstract ideas.
... includes: this is
kinda like "#includes" in c++, except it's not a preprocessor directive.
Investigating leaks using DMD heap scan mode
clamping is the same
kind of analysis that a conservative gc does: if a word-aligned value in a heap block points to somewhere within another heap block, replace that value with the address of the block.
... both
kinds of preprocessing are done by the dmd.py script, which can be invoked like this: $objdir/dist/bin/dmd.py --clamp-contents dmd-$pid.log.gz this can take a few minutes due to symbolification, but you only need to run it once on a log file.
Gecko Profiler FAQ
[ehsan] this is similar to the previous question to some extent, but the specific answer really depends on what
kind of compiler flag we’re talking about and what performance impact we’re interested to study.
... [jesup] ok, that's the equivalent to itimer_real,
kinda, except that per the previous question it doesn't interrupt every thread at once and snapshot the thread you started the itimer on, it interrupts each thread one at a time, which likely means distortion of the measurement if the number of threads monitored is significant (especially at high sample rates).
Memory reporting
two ways to measure memory reporters can be divided into the two following
kinds.
... return moz_collect_report( "explicit/mystring",
kind_heap, units_bytes, gmystring->sizeofincludingthis(mallocsizeof), "memory used for mystring."); } }; ns_impl_isupports1(mystringreporter, nsimemoryreporter) note that moz_define_malloc_size_of defines a function of type mozilla::mallocsizeof that is specific to this memory reporter (and will be identified as such in dmd's output).
TimerFirings logging
next is the timer
kind, one of fn (function), iface (interface) or obs (observer), which are the three
kinds of timers that gecko supports.
... then comes the function
kind, one of one_shot (a single-use timer), slack or precise (repeating timers of differing precision).
Performance
dmd dmd is a tool that identifies shortcomings in about:memory's measurements, and can also do multiple
kinds of general heap profiling.
... leak gauge leak gauge is a tool that can be used to detect certain
kinds of leaks in gecko, including those involving documents, window objects, and docshells.
I/O Types
prfiledesc priomethods prfileprivate prdescidentity note that the nspr documentation follows the unix convention of using the termfiles to refer to many
kinds of i/o objects.
...different
kinds of i/o objects (such as files and sockets) have different i/o methods tables, thus implementing different behavior in response to the same i/o function call.
NSS API Guidelines
search functions there are several different
kinds of searches done via the security library.
... the second
kind of search, looks for all the objects that match a given criteria.
PKCS11 FAQ
can this
kind of division lead to problems?
... pkcs #11 defines how these
kinds of devices work.
Python binding for NSS
cert_dump.py extended to print ns_cert_type_extension cert_usage_flags, nss_init_flags now support optional repr_
kind parameter the following classes were added: nss.certverifylognode nss.certverifylog error.certverifyerror (exception) nss.authorityinfoaccess nss.authorityinfoaccesses the following class methods were added: nss.certificate.is_ca_cert nss.certificate.verify nss.certificate.verify_with_log nss...
... add repr_
kind parameter to cert_trust_flags_str() add support for repr_
kind asenumname to bitstring table lookup.
sslfnc.html
applications will find it desirable to determine, at run time, what ssl2 cipher
kinds and ssl3 cipher suites are actually implememted in a particular release.
... ssl_implementedciphers[] is an external array of unsigned 16-bit integers whose values are either ssl2 cipher
kinds or ssl3 cipher suites.
NSS tools : signtool
an object-signing certificate is a special
kind of certificate that allows you to associate your digital signature with one or more files.
...when testing is finished and you are ready to disitribute your software, you should obtain an object-signing certificate from one of two
kinds of sources: * an independent certificate authority (ca) that authenticates your identity and charges you a fee.
Introduction to the JavaScript shell
countheap([start[,
kind]]) added in spidermonkey 1.8 count the number of live gc things in the heap, or things reachable from start when it is given and is not null.
...
kind is either 'all' (default) to count all things or one of 'object', 'double', 'string', 'function', 'qname', 'namespace', 'xml' to count only things of that
kind.
JS_TracerInit
callback syntax typedef void (*jstracecallback)(jstracer *trc, void *thing, uint32
kind); name type description trc jstracer * the tracer visiting obj.
...
kind uint32 one of the constants jstrace_object, jstrace_double, jstrace_string; or a tag denoting an internal implementation-specific traversal
kind.
Redis Tips
but obviously, calling ice cream a nowhale food doesn't give you any sense of how good the ice cream is, or what sets it apart from other
kinds of food that aren't made from whale meat but that are also very unlike ice cream -- it just gives the whaling industry a way to lump together people who don't use their products.
... so rather than thinking about redis as a database with some
kind of non-existent relationship to sql, think of it as a data structure server with a rich set of commands for querying and manipulating those data structures over a network connection.
Embedded Dialog API
the application should respond with whatever
kind of window it normally uses to contain an embedded instance of gecko.
...this is the
kind of window used by gecko to display xul dialogs.
Mork
the first is the
kind column (k), where the mid is typically column-scoped (:c).
... next is the status column (s), which is defined as a single digit that is the priority (which appears to be unused), a 'u' if it is unique (i.e., the only table of its
kind), and a 'v' if it is verbose (which also appears to be unused).
Finishing the Component
if uris of this
kind are blocked, then gecko will not be able to start up, so we'll restrict the content policy to the http and ftp protocols.
... these three are the only
kinds of uri that weblock will try to block.
Starting WebLock
this
kind of implementation does not exist, but this expandability shows some of the flexibility that interface-based programming can provide.
...url data is accessed as in the diagram below: you might construct hash values for each of the url strings instead, or add them to some
kind of database.
Mozilla internal string guide
as a result, you cannot assign a 8-bit string to a 16-bit string without some
kind of conversion helper class or routine.
...note that this
kind of "latin1" is not available for encoding html, css, js, etc.
nsIScriptError
category a string indicating what
kind of code caused the message.
... flags one of the script error flag constants category a string indicating what
kind of code caused the message.
Weak reference
what is actually needed in this case, is either out-of-band signaling, where when the observer wants to go away, it unregisters itself from the observable, which then releases its owning reference, allowing the observer to die, or else a new
kind of reference.
...in the following example, an nsobservable must keep some
kind of a reference to each observer, in order to report events.
wrappedJSObject
there are two
kinds of xpconnect wrappers that support the wrappedjsobject property: xpcnativewrappers which are used to protect the chrome code working with content objects.
... this article focuses on the latter
kind of wrappers, which hide any properties or methods on the component that are not part of the supported interfaces as declared in xpidl.
XUL Overlays
though overlays often define ui elements that have been added as a result of an update or enhancement of some
kind, they can be used in many different ways.
...though there is no formal restriction on what
kind of xul content is located in "base" xul files and what
kind should be put in overlays, xul overlays generally define items that are not present in the basic versions of the ui, such as additional components.
Zombie compartments
this page tells you how to detect and avoid zombie compartments, which are a particular
kind of memory leak.
... these are a particular
kind of memory leak, and they cause firefox's memory usage to increase gradually over time, slowing it down and making it more likely to crash.
Debugger - Firefox Developer Tools
function properties of the debugger prototype object the functions described below may only be called with a this value referring to a debugger instance; they may not be used as methods of other
kinds of objects.
...otherwise, if value is some other
kind of object, and hence not a proper debuggee value, throw a typeerror instead.
Debugger-API - Firefox Developer Tools
however, debugger is quite general, and can be used to implement other
kinds of tools like tracers, coverage analysis, patch-and-continue, and so on.
...this is not inherent in the api’s design, but simply that the self-hosting infrastructure isn’t prepared for the
kind of invasions the debugger api can perform.
Migrating from Firebug - Firefox Developer Tools
in both tools there are different tabs containing different
kinds of information for the selected request.
...in contrast to firebug the storage inspector not only allows to inspect cookies but also other
kinds of storages like the local and session storage, the cache and indexeddb databases.
Waterfall - Firefox Developer Tools
restyle hint a string indicating what
kind of restyling is needed.
... filtering markers you can control which markers are displayed using a button in the toolbar: waterfall patterns exactly what you'll see in the waterfall is very dependent on the
kind of thing your site is doing: javascript-heavy sites will have a lot of orange, while visually dynamic sites will have a lot of purple and green.
AudioTrack.language - Web APIs
example this example locates all of a media element's primary language and translated audio tracks and returns a list of objects containing each of those tracks' id,
kind, and language.
... function getavailablelanguages(el) { var tracklist = []; const wanted
kinds = [ "main", "translation" ]; el.audiotracks.foreach(function(track) { if (wanted
kinds.includes(track.
kind)) { tracklist.push({ id: track.id,
kind: track.
kind, language: track.language }); } }); return tracklist; } specifications specification status comment html living standardthe definition of 'audiotrack.language' in that specification.
BiquadFilterNode - Web APIs
it is an audionode that can represent different
kinds of filters, tone control devices, and graphic equalizers.
... biquadfilternode.type is a string value defining the
kind of filtering algorithm the node is implementing.
Broadcast Channel API - Web APIs
an example string message: // example of sending of a very simple message bc.postmessage('this is a test message.'); any
kind of object can be sent, not just a domstring.
... the api doesn't associate any semantics to messages, so it is up to the code to know what
kind of messages to expect and what to do with them.
DataTransfer.items - Web APIs
types[" + i + "] = " + ev.datatransfer.types[i]); } } // print each item's "
kind" and "type" if (ev.datatransfer.items != null) { for (var i=0; i < ev.datatransfer.items.length; i++) { console.log("...
... items[" + i + "].
kind = " + ev.datatransfer.items[i].
kind + " ; type = " + ev.datatransfer.items[i].type); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } </script> <body> <h1>examples of <code>datatransfer</code>.{<code>types</code>, <code>items</code>} properties</h1> <ul> <li id="i1" ondragstart="dragstart_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html ...
DataTransfer.types - Web APIs
types[" + i + "] = " + ev.datatransfer.types[i]); } } // print each item's "
kind" and "type" if (ev.datatransfer.items != null) { for (var i=0; i < ev.datatransfer.items.length; i++) { console.log("...
... items[" + i + "].
kind = " + ev.datatransfer.items[i].
kind + " ; type = " + ev.datatransfer.items[i].type); } } } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } </script> <body> <h1>examples of <code>datatransfer</code>.{<code>types</code>, <code>items</code>} properties</h1> <ul> <li id="i1" ondragstart="dragstart_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html ...
DataTransferItemList.DataTransferItem() - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.clear() - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.length - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.remove() - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].
kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].
kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
Cross-global fetch usage - Web APIs
this article explains an edge case that occurs with fetch (and potentially other apis exhibiting the same
kind of resource retrieval behavior).
...it is just that different apis that exhibit this
kind of behavior were doing it inconsistently with the behavior defined in the spec, which could lead to problems further down the line.
HTMLMediaElement.textTracks - Web APIs
examples we start with a <video> that has several <track> children <video controls poster="/images/sample.gif"> <source src="sample.mp4" type="video/mp4"> <source src="sample.ogv" type="video/ogv"> <track
kind="captions" src="samplecaptions.vtt" srclang="en"> <track
kind="descriptions" src="sampledescriptions.vtt" srclang="en"> <track
kind="chapters" src="samplechapters.vtt" srclang="en"> <track
kind="subtitles" src="samplesubtitles_de.vtt" srclang="de"> <track
kind="subtitles" src="samplesubtitles_en.vtt" srclang="en"> <track
kind="subtitles" src="samplesubtitles_ja.vtt" srclang="ja"> <tra...
...ck
kind="subtitles" src="samplesubtitles_oz.vtt" srclang="oz"> <track
kind="metadata" src="keystage1.vtt" srclang="en" label="key stage 1"> <track
kind="metadata" src="keystage2.vtt" srclang="en" label="key stage 2"> <track
kind="metadata" src="keystage3.vtt" srclang="en" label="key stage 3"> </video> the htmlmediaelement.texttracks returns a texttrackslist thru which we can iterate.
Checking when a deadline is due - Web APIs
if they do, we want to let the user know with some
kind of notification.
...we want all the values to match before we show the user some
kind of notification to tell them their deadline is up.
IndexedDB API - Web APIs
storage limits and eviction criteria there are a number of web technologies that store data of one
kind or another on the client side (i.e.
...you create a transaction on a database, specify the scope (such as which object stores you want to access), and determine the
kind of access (read only or readwrite) that you want.
Intersection Observer API - Web APIs
as the web has matured, the need for this
kind of information has grown.
...this way, sites no longer need to do anything on the main thread to watch for this
kind of element intersection, and the browser is free to optimize the management of intersections as it sees fit.
MediaDeviceInfo - Web APIs
mediadeviceinfo.
kindread only returns an enumerated value that is either "videoinput", "audioinput" or "audiooutput".
... navigator.mediadevices.enumeratedevices() .then(function(devices) { devices.foreach(function(device) { console.log(device.
kind + ": " + device.label + " id = " + device.deviceid); }); }) .catch(function(err) { console.log(err.name + ": " + err.message); }); this might produce: videoinput: id = cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: id = rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: id = r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= or if one or more media streams are ac...
MediaError.code - Web APIs
the read-only property mediaerror.code returns a numeric value which represents the
kind of error that occurred on a media element.
... media_err_network 2 some
kind of network error occurred which prevented the media from being successfully fetched, despite having previously been available.
MediaError - Web APIs
a mediaerror object describes the error in general terms using a numeric code categorizing the
kind of error, and a message, which provides specific diagnostics about what went wrong.
... media_err_network 2 some
kind of network error occurred which prevented the media from being successfully fetched, despite having previously been available.
MediaStream.getAudioTracks() - Web APIs
the getaudiotracks() method of the mediastream interface returns a sequence that represents all the mediastreamtrack objects in this stream's track set where mediastreamtrack.
kind is audio.
...audio tracks are those tracks whose
kind property is audio.
MediaStream.onremovetrack - Web APIs
this happens when a track of any
kind is removed from the media stream.
... stream.onremovetrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = "removed: " + event.track.
kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onremovetrack' in that specification.
MediaStreamAudioSourceNode - Web APIs
the mediastreamaudiosourcenode takes the audio from the first mediastreamtrack whose
kind attribute's value is audio.
... track ordering for the purposes of the mediastreamtrackaudiosourcenode interface, the order of the audio tracks on the stream is determined by taking the tracks whose
kind is audio, then sorting the tracks by their id property's values, in unicode code point order (essentially, in alphabetical or lexicographical order, for ids which are simple alphanumeric strings).
MutationObserver.MutationObserver() - Web APIs
dom observation does not begin immediately; the observe() method must be called first to establish which portion of the dom to watch and what
kinds of changes to watch for.
... the
kind of change that took place (either a change to the list of children, or a change to an attribute) is detected by looking at the mutation.type property.
Node - Web APIs
in addition, every
kind of dom node is represented by an interface based on node.
... obsolete the methods insertbefore(), replacechild(), removechild(), and appendchild() returns one more
kind of error (not_supported_err) if called on a document.
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
a user-verifying platform authenticator is a
kind of multi-factor authenticator that is part of the client device (it is generally not removable) and that involves an action from the user in order to identify them.
... examples publickeycredential.isuserverifyingplatformauthenticatoravailable() .then(function(available){ if(available){ // we can proceed with the creation of a publickeycredential // with this authenticator } else { // use another
kind of authenticator or a classical login/password // workflow } }).catch(function(err){ // something went wrong console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'isuserverifyingplatformauthenticatoravailable' in that specification.
RTCIceCandidatePairStats.packetsReceived - Web APIs
the rtcicecandidatepairstats dictionary's packetsreceived property indicates the total number of packets of any
kind that have been received on the connection described by the pair of candidates.
... syntax packetsreceived = rtcicecandidatepairstats.packetsreceived; value an integer value indicating the total number of packets, of any
kind, which have been received on the connection described by the two candidates comprising this pair.
RTCPeerConnection.addTrack() - Web APIs
the rtcrtptransceiver associated with the sender has a rtcrtpreceiver whose track property specifies a mediastreamtrack whose
kind is the same as the
kind of the track parameter specified when calling rtcpeerconnection.addtrack().
...this track's
kind is set to match the
kind of the track provided as an input parameter.
RTCPeerConnection.addTransceiver() - Web APIs
syntax rtptransceiver = rtcpeerconnection.addtransceiver(trackor
kind, init); parameters trackor
kind a mediastreamtrack to associate with the transceiver, or a domstring which is used as the
kind of the receiver's track, and by extension of the rtcrtpreceiver itself.
... exceptions typeerror a string was specified as trackor
kind which is not valid.
RTCRtpEncodingParameters - Web APIs
dtx only used for an rtcrtpsender whose
kind is audio, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the absence of voice activity).
... scaleresolutiondownby only used for senders whose track's
kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during encoding.
RTCRtpSendParameters.encodings - Web APIs
dtx only used for an rtcrtpsender whose
kind is audio, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the absence of voice activity).
... scaleresolutiondownby only used for senders whose track's
kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during encoding.
RTCStatsReport - Web APIs
the statistics object is an rtcaudioreceiverstats object if
kind is audio; if
kind is video, the object is an rtcvideoreceiverstats object.
...if
kind is "audio", this object is of type rtcaudiosenderstats; if
kind is "video", this is an rtcvideosenderstats object.
RTCStatsType - Web APIs
the statistics object is an rtcaudioreceiverstats object if
kind is audio; if
kind is video, the object is an rtcvideoreceiverstats object.
...if
kind is "audio", this object is of type rtcaudiosenderstats; if
kind is "video", this is an rtcvideosenderstats object.
Resize Observer API - Web APIs
the resize observer api provides a solution to exactly these
kinds of problems, and more besides, allowing you to easily observe and respond to changes in the size of an element’s content or border box in a performant way.
... the code will usually follow this
kind of pattern (taken from resize-observer-border-radius.html): const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.contentboxsize) { entry.target.style.borderradius = math.min(100, (entry.contentboxsize.inlinesize/10) + (entry.contentboxsize.blocksize/10)) + 'px'; } else { entry.targ...
Streams API concepts - Web APIs
the chunks inside the stream are read by a reader — this processes the data one chunk at a time, allowing you to do whatever
kind of operation you want to do on it.
...there are two methods available in the spec to facilitate this: readablestream.pipethrough() — pipes the stream through a transform stream, which is a pair comprised of a writable stream that has data written to it, and a readable stream that then has the data read out of it — this acts as a
kind of treadmill that constantly takes data in and transforms it to a new state.
TextTrack - Web APIs
needs details texttrack.
kind read only returns a domstring indicating what
kind of text track the texttrack describes.
... the value must be one of those in the texttrack
kind enum.
TrackDefault - Web APIs
the trackdefault interface provides a sourcebuffer with
kind, label, and language information for tracks that do not contain this information in the initialization segments of a media chunk.
... trackdefault.
kinds read only returns the default
kinds used when an initialization segment does not contain
kind information for a new track.
TrackEvent - Web APIs
"removetrack", handletrackevent, false); videoelem.audiotracks.addeventlistener("addtrack", handletrackevent, false); videoelem.audiotracks.addeventlistener("removetrack", handletrackevent, false); videoelem.texttracks.addeventlistener("addtrack", handletrackevent, false); videoelem.texttracks.addeventlistener("removetrack", handletrackevent, false); function handletrackevent(event) { var track
kind; if (event.target instanceof(videotracklist)) { track
kind = "video"; } else if (event.target instanceof(audiotracklist)) { track
kind = "audio"; } else if (event.target instanceof(texttracklist)) { track
kind = "text"; } else { track
kind = "unknown"; } switch(event.type) { case "addtrack": console.log("added a " + track
kind + " track"); break; case ...
..."removetrack": console.log("removed a " + track
kind + " track"); break; } } the event handler uses the javascript instanceof operator to determine which type of track the event occurred on, then outputs to console a message indicating what
kind of track it is and whether it's being added to or removed from the element.
WebGL2RenderingContext.uniformBlockBinding() - Web APIs
syntax void gl.uniformblockbinding(program, uniformbloc
kindex, uniformblockbinding); parameters program a webglprogram containing the active uniform block whose binding to assign.
... uniformbloc
kindex a gluint specifying the index of the active uniform block within the program.
Web Video Text Tracks Format (WebVTT) - Web APIs
if the webvtt file is being used for chapters (<track>
kind is chapters) then the file cannot have overlapping timings.
...however, if the webvtt file is used in a <track> element where the attribute
kind is chapters then you cannot use tags.
Web Animations API Concepts - Web APIs
as of this writing, there’s only one
kind of timeline object: the one based on the active document’s timeline.
...potentially we could have all
kinds of animation effects in the future—e.g.
Web Workers API - Web APIs
web worker interfaces abstractworker abstracts properties and methods common to all
kind of workers (i.e.
... sharedworker represents a specific
kind of worker that can be accessed from several browsing contexts, being several windows, iframes or even workers.
ARIA live regions - Accessibility
status a status bar or area of the screen that provides an updated status of some
kind.
... timer or any
kind of timer or clock, such as a countdown timer or stopwatch readout.
ARIA annotations - Accessibility
for example: <p id="description-id">an extended text description of some
kind...</p> <div aria-describedby="description-id"> <!-- some
kind of ui feature that needs an accessible description --> </div> aria-details is appropriate when linking to descriptions or annotations that are a bit more complex — rather than a simple text string, it might contain multiple bits of semantic information: <div id="detail-id"> <h2>a heading</h2> <p>an extended text description...
... of some
kind…</p> <p><time datetime="...">a timestamp</time></p> </div> <div aria-details="detail-id"> <!-- some
kind of ui feature that needs an accessible description --> </div> this difference really becomes apparent when you get to how the content is actually interpreted in the accessibility layer, and read out by screenreaders.
ARIA - Accessibility
var progressbar = document.getelementbyid("percent-loaded"); // set its aria roles and states, // so that assistive technologies know what
kind of widget it is.
...support is based on the operating system and browser being used, as well as the
kind of assistive technology interfacing with it.
Accessibility and Spacial Patterns - Accessibility
these oscillations in the brain are a different
kind of response than other
kinds of neurological responses believed to cause photosensitive seizures.
... stripes and patterns are typical of the
kinds of images that create problems, and stripes have been studied most closely.
Accessibility documentation index - Accessibility
since the html4 specification doesn't provide built-in tags that semantically describe these
kinds of widgets, developers typically resort to using generic elements such as and .
... 96 keyboard accessibility, keyboard if an element can be focused using the keyboard, then it should be interactive; that is, the user should be able to do something to it and produce a change of some
kind (for example, activating a link or changing an option).
Web accessibility for seizures and physical reactions - Accessibility
photosensitive epilepsy is actually a
kind of "reflex epilepsy"—seizures occurring in response to a trigger.
...velopment center’s photosensitive epilepsy analysis tool notes that “photosensitive seizures can be provoked by certain types of flashing in web or computer content, including mouse-overs that cause large areas of the screen to rapidly flash on and off repeatedly.” other physical reactions nausea, vertigo (or dizziness), and disorientation are very nonspecific symptoms associated with all
kinds of diseases and not particularly suggestive of seizures (except maybe disorientation, which is seen in seizures).
Web Accessibility: Understanding Colors and Luminance - Accessibility
these queries will allow users to choose contrast levels that is right for them, and enable them to adjust these levels depending upon where they are, and what
kind of screen they are using.
... there's (at least) two
kinds of adaptation that take place: local adaptation, and adaptation to an ambient environment.
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.
... slant slant (represented by the slnt tag), or as it's often referred to, 'oblique' — is different to true italics in that it changes the angle of the letterforms but doesn’t perform any
kind of character substitution.
Value definition syntax - CSS: Cascading Style Sheets
data types basic data types some
kind of data are used throughout css, and are defined once for all values in the specification.
... non-terminal data types are of two
kinds: data types sharing the same name of a property, put between quotes.
<easing-function> - CSS: Cascading Style Sheets
for some properties, such as left or right, this creates a
kind of "bouncing" effect.
... easing functions css supports three
kinds of easing functions: linear, the subset of the cubic bézier curves that are functions, and staircase functions.
<image> - CSS: Cascading Style Sheets
description css can handle the following
kinds of images: images with intrinsic dimensions (a natural size), like a jpeg, png, or other raster format.
... css determines an object's concrete size using (1) its intrinsic dimensions; (2) its specified size, defined by css properties like width, height, or background-size; and (3) its default size, determined by the
kind of property the image is used with:
kind of object (css property) default object size background-image the size of the element's background positioning area list-style-image the size of a 1em character border-image-source the size of the element's border image area cursor the browser-defined size matching the usual cursor size on th...
Cross-browser audio basics - Developer guides
it is good practice to display some
kind of 'loader' at this point.
... myaudio.addeventlistener("canplaythrough", function() { //audio is ready to play all the way through }); media loading event order to recap, the order of the media loading events are: loadstart > durationchange > loadedmetadata > loadeddata > progress > canplay > canplaythrough loading interruption events we also have a few events available that will fire when there is some
kind of interruption to the media loading process.
<input type="number"> - HTML: Hypertext Markup Language
placeholder the placeholder attribute is a string that provides a brief hint to the user as to what
kind of information is expected in the field.
...you must verify on the server side any transaction in which the provided value may have any security implications of any
kind.
<input type="search"> - HTML: Hypertext Markup Language
placeholder the placeholder attribute is a string that provides a brief hint to the user as to what
kind of information is expected in the field.
...this information is used to decide what
kind of label to use on the enter key on the virtual keyboard.
<input type="text"> - HTML: Hypertext Markup Language
placeholder the placeholder attribute is a string that provides a brief hint to the user as to what
kind of information is expected in the field.
...this information is used to decide what
kind of label to use on the enter key on the virtual keyboard.
HTTP caching - HTTP
different
kinds of caches caching is a technique that stores a copy of a given resource and serves it back when requested.
... there are several
kinds of caches: these can be grouped into two main categories: private or shared caches.
HTTP Index - HTTP
the error is not directly related to cors, but is a fundamental network error of some
kind.
...http provides a special
kind of response, called http redirect, to perform this operation and is used for numerous goals: temporary redirection while site maintenance is ongoing, permanent redirection to keep external links working after a change of the site's architecture, progress pages when uploading a file, and so on.
Lexical grammar - JavaScript
note also that no whitespace of any
kind is permitted before the #!.
... identifiers with special meanings a few identifiers have a special meaning in some contexts without being keywords of any
kind.
import - JavaScript
name name of the module object that will be used as a
kind of namespace when referring to the imports.
... description the name parameter is the name of the "module object" which will be used as a
kind of namespace to refer to the exports.
Image file type and format guide - Web media technologies
tiff (tagged image file format) tiff is a raster graphics file format which was created to store scanned photos, although it can be any
kind of image.
... every value in a tiff file is specified using its tag (indicating what
kind of information it is, such as the width of the image) and its type (indicating the format the data is stored in), followed by the length of the array of values to assign to that tag (all properties are stored in arrays, even for single values).
Content Scripts - Archive of obsolete content
passing configuration options the contentscriptoptions is a json object that is exposed to content scripts as a read-only value under the self.options property: // main.js var tabs = require("sdk/tabs"); tabs.on('ready', function(tab) { tab.attach({ contentscript: 'window.alert(self.options.message);', contentscriptoptions: {"message" : "hello world"} }); }); any
kind of jsonable value (object, array, string, etc.) can be used here.
Content Processes - Archive of obsolete content
a full discussion of the different
kinds of security wrappers and how they work is out of scope for this document, but the main point is this: security wrappers are very complex, and very error-prone.
context-menu - Archive of obsolete content
label: "my menu", contentscript: 'self.on("click", function (node, data) {' + ' console.log("you clicked " + data);' + '});', items: [ cm.item({ label: "item 1", data: "item1" }), cm.item({ label: "item 2", data: "item2" }), cm.item({ label: "item 3", data: "item3" }) ] }); communicating with the add-on often you will need to collect some
kind of information in the click listener and perform an action unrelated to content.
ui - Archive of obsolete content
if it's standalone, it appears in the toolbar at the top right of the browser window: togglebutton a toggle button is a special
kind of button that's for representing a binary on/off state, like a checkbox.
XPath - Archive of obsolete content
[i].text); } } else { var tobj = obj.evaluate("/root/field/item",obj.documentelement,null, xpathresult.any_type, null); var tmp = tobj.iteratenext(); while(tmp) { fields.push(tmp.textcontent); tmp = tobj.iteratenext(); } } alert(fields); } //here is the demo xml file for xpath <?xml version="1.0"?> <root> <field> <item>art_id</item> <item>psection</item> <item>q
kind</item> <item>qtitle</item> <item>question</item> <item>pic</item> <item>answer1</item> <item>answer2</item> <item>answer3</item> <item>answer4</item> </field> </root> //add by mooring 2008-11-15 16:16 china ...
Code snippets - Archive of obsolete content
autocomplete code used to enable form autocomplete in a browser boxes tips and tricks when using boxes as containers tabbox removing and manipulating tabs in a tabbox windows-specific finding window handles (hwnd) (firefox) how to use windows api calls to find various
kinds of mozilla window handles.
Repackaging Firefox - Archive of obsolete content
there are two
kinds of preferences in firefox, both set in the partner.js file: localizable preferences, which have a value of a chrome:// uri pointing to the properties file where firefox can fetch the localized value from.
Abc Assembler Tests - Archive of obsolete content
you may obtain a copy of the license at * http://www.mozilla.org/mpl/ * * software distributed under the license is distributed on an "as is" basis, * without warranty of any
kind, either express or implied.
Learn XPI Installer Scripting by Example - Archive of obsolete content
in this most common form of the registerchrome function (it can also be used to support the now-deprecatedmanifest.rdf style of installation archive), the three parameters represent, in order, the chrome switch used to indicate what
kind of software is being registered, the target destination of the software (e.g., the "chrome" folder in the example above), and the path within the xpi (or jar theme archive) where the contents.rdf file is located.
Menus - Archive of obsolete content
this item will be highlighted, and will do certain functions depending on the
kind of item it is, and the way in which it has been activated, whether via the keyboard or mouse.
Simple Query Syntax - Archive of obsolete content
the equivalent triple for the above example might be: <triple subject="?photo" predicate="http://www.xulplanet.com/rdf/country" object="http://www.daml.org/2001/09/countries/iso#it"/> adjusting simple query conditions the simple syntax is limited in the
kind of filtering it can do, however it is often sufficient for many purposes.
Template Logging - Archive of obsolete content
unexpected <queryset> element a <queryset> element was placed in an invalid location; they should be placed directly inside the <template> element with no other
kinds of elements as siblings.
Custom Tree Views - Archive of obsolete content
since the view can store and retrieve the data in the most suitable manner for the
kind of data used, the tree can be used even when there are hundreds of thousands of rows to be displayed.
Trees - Archive of obsolete content
naturally, if you are using a different
kind of view, the data will be supplied from another source, and there won't be any treeitem elements at all.
xbDesignMode.js - Archive of obsolete content
you may obtain a copy of the license at * http://www.mozilla.org/mpl/ * * software distributed under the license is distributed on an "as is" basis, * without warranty of any
kind, either express or implied.
SAX - Archive of obsolete content
set the handlers handlers are user-defined objects implementing sax handler interfaces, depending on what
kind of information they need to get from the parser.
Developing cross-browser and cross-platform pages - Archive of obsolete content
// bad sample if (navigator.appversion.charat(0) == "8") { if (navigator.appname == "netscape") { isns8 = true; alert("netscape 8"); }; } else if (navigator.appversion.indexof("msie") != -1) { isie = true; alert("internet explorer"); }; while this
kind of checking in the above code can work in a crude sense, sharp readers may wonder what happens when internet explorer 8 is released or when an opera 8.x user visits the page or even when an user with any non-netscape browser starting with a "8" character in the appversion string visits that page.
Array comprehensions - Archive of obsolete content
syntax [for (x of iterable) x] [for (x of iterable) if (condition) x] [for (x of iterable) for (y of iterable) x + y] description inside array comprehensions, these two
kinds of components are allowed: for...of and if the for-of iteration is always the first component.
Generator comprehensions - Archive of obsolete content
syntax (for (x of iterable) x) (for (x of iterable) if (condition) x) (for (x of iterable) for (y of iterable) x + y) description inside generator comprehensions, these two
kinds of components are allowed: for...of and if the for-of iteration is always the first component.
Tools for game development - Game development
a lot of this is going to be covered by will in tools, but here we should provide a
kind of practical toolchain tutorial for debugging games, with links to will's stuff: basic tools overview shader editor performance tools (still in production, estimated early 2014) ...
Game over - Game development
var interval = setinterval(draw, 10); then replace the second if statement with the following: if(y + dy < ballradius) { dy = -dy; } else if(y + dy > canvas.height-ballradius) { alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } letting the paddle hit the ball the last thing to do in this lesson is to create some
kind of collision detection between the ball and the paddle, so it can bounce off it and get back into the play area.
Physics - Game development
this
kind of functionality is just the tip of the iceberg — there are various functions and variables that can help you manipulate the physics objects.
Latency - MDN Web Docs Glossary: Definitions of Web-related terms
latency can be a factor in any
kind of data flow, but is most commonly discussed in terms of network latency (the time it takes for a packet of data to travel from source to destination) and media codec latency (the time it takes for the source data to be encoded or decoded and reach the consumer of the resulting data).
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
your data model is probably contained in some
kind of database (be it a traditional server-side database like mysql, or a client-side solution such as indexeddb [en-us].) your app's controlling code is probably written in html/javascript, and your user interface is probably written using html/css/whatever else you like.
Mobile accessibility - Learn web development
there are certain situations where zooming might break the ui; in such cases, if you feel that you absolutely need to disable zoom, you should provide some other
kind of equivalent, such as a control for increasing the text size in a way that doesn't break your ui.
Advanced styling effects - Learn web development
summary we hope this article was fun — playing with shiny toys generally is, and it is always interesting to see what
kinds of advanced styling tools are becoming available in modern browsers.
Flexbox - Learn web development
the following simple layout requirements are either difficult or impossible to achieve with such tools, in any
kind of convenient, flexible way: vertically centering a block of content inside its parent.
Styling links - Learn web development
border-bottom: 1px solid;\n background: #cdfeaa;\n}\n\na:active {\n background: #265301;\n color: #cdfeaa;\n}'; drawoutput(); }); htmlinput.addeventlistener("input", drawoutput); cssinput.addeventlistener("input", drawoutput); window.addeventlistener("load", drawoutput); including icons on links a common practice is to include icons on links to provide more of an indicator as to what
kind of content the link points to.
What are browser developer tools? - Learn web development
alert('hello!); document.cheeseselector('html').style.backgroundcolor = 'purple'; const mywordmark = document.createelement('img'); mybanana.setattribute('src','https://blog.mozilla.org/press/wp-content/themes/onemozilla/img/mozilla-wordmark.png'); document.queryselector('h1').appendchild(mywordmark); you'll start to see the
kind of errors that the browser returns.
Define terms with HTML - Learn web development
a simple example here's a simple example describing
kinds of food and drink: <dl> <dt>jambalaya</dt> <dd> rice-based entree typically containing chicken, sausage, seafood, and spices </dd> <dt>sukiyaki</dt> <dd> japanese specialty consisting of thinly sliced meat, vegetables, and noodles, cooked in sake and soy sauce </dd> <dt>chianti</dt> <dd> dry italian red wine originating in tuscany </...
Debugging HTML - Learn web development
debugging isn't scary when writing code of some
kind, everything is usually fine, until that dreaded moment when an error occurs — you've done something wrong, so your code doesn't work — either not at all, or not quite how you wanted it to.
Client-side storage - Learn web development
most major modern web sites are dynamic — they store data on the server using some
kind of database (server-side storage), then run server-side code to retrieve needed data, insert it into static page templates, and serve the resulting html to the client to be displayed by the user's browser.
Drawing graphics - Learn web development
efining draw(), we'll add a couple of lights to the scene, to liven things up a bit; add the following blocks next: let light = new three.ambientlight('rgb(255, 255, 255)'); // soft white light scene.add(light); let spotlight = new three.spotlight('rgb(255, 255, 255)'); spotlight.position.set( 100, 1000, 1000 ); spotlight.castshadow = true; scene.add(spotlight); an ambientlight object is a
kind of soft light that lightens the whole scene a bit, like the sun when you are outside.
Accessibility in React - Learn web development
let's try it now — update your useeffect() call like so: useeffect(() => { if (isediting) { editfieldref.current.focus(); } else { editbuttonref.current.focus(); } }, [isediting]); this
kind of mostly works.
Beginning our React todo list - Learn web development
further down, you can find our <ul> element: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > the role attribute helps assistive technology explain what
kind of element a tag represents.
Starting our Svelte Todo list app - Learn web development
further down, you can find the following <ul> element: <ul role="list" classname="todo-list stack-large" aria-labelledby="list-heading"> the role attribute helps assistive technology explain what
kind of semantic value an element has — or what its purpose is.
Getting started with Svelte - Learn web development
to create your starter app template, run the following terminal commands: npx degit sveltejs/template moz-todo-svelte cd moz-todo-svelte npm install npm run dev note: degit doesn't do any
kind of magic — it just lets you download and unzip the latest version of a git repo's contents.
Accessibility Features in Firefox
the mozilla firefox community welcomes bug reports, ideas, documentation, answering questions in the support forums -- and nearly any
kind of community involvement resulting in a browser built for a broader audience of users and developers.
CSUN Firefox Materials
the mozilla firefox community welcomes bug reports, ideas, documentation, answering questions in the support forums -- and nearly any
kind of community involvement resulting in a browser built for a broader audience of users and developers.
Continuous Integration
each taskcluster job is represented by a colored label; green means a job has succeeded, while other colors represent different
kinds of problems.
Debugging Table Reflow
the index of the column, whether it is anonymous and what
kind of constrained has been appliedcolindex=0 isanonymous=0 constraint=0.
Developer guide
managing multiple profiles when working with prerelease versions of firefox, it's often helpful to have multiple firefox profiles, such as one for each channel, or for different
kinds of testing.
Communicating with frame scripts
removemessagelistener() to stop listening for messages from content, use the message manager's removemessagelistener() method: // chrome script messagemanager.removemessagelistener("my-addon@me.org:my-e10s-extension-message", listener); chrome to content to send a message from chrome to content, you need to know what
kind of message manager you're using.
Message manager overview
this usage is deprecated because the add-on sdk uses "content script" to refer to a similar but different
kind of script.
Performance
better: // addon.js function onunload() { services.mm.removedelayedframescript("resources://my-addon/framescript.js"); services.ppmm.removedelayedprocessscript("resources://my-addon/processcript.js"); services.mm.broadcastasyncmessage("my-addon:unload"); services.ppmm.broadcastasyncmessage("my-addon:unload"); } in the frame/process scripts: remove all
kinds of listeners remove observer notifications remove custom categories and services nuke sandboxes unload jsms restore content dom states where necessary, e.g.
Process scripts
however, process scripts are subject to the same
kinds of limitations as frame scripts (for example, no file system access).
Message manager overview
ts" use a frame message manager to load these frame scripts into the content process use the frame message manager api to communicate with the frame script some older articles on multiprocess firefox and the message manager might refer to "content scripts" instead of "frame scripts", but this usage is deprecated because the add-on sdk uses "content script" to refer to a similar but different
kind of script.
Performance best practices for Firefox front-end engineers
use requestidlecallback() if you simply cannot avoid doing some
kind of long job on the main thread, try to break it up into smaller pieces that you can run when the browser has a free moment to spare, and the user isn't doing anything.
Security best practices for Firefox front-end engineers
developers are able to avoid tripping the rule by using escaping functions in combination with template strings, for example: bar.innerhtml = escapehtml`<a href='${url}'>about</a>`; in system-privileged chrome code, any
kind of remaining scripts will still be removed by our sanitizer.
Embedding the editor
fixing this would require js changes of the following
kind: standardize the way that clients get at the editorshell (or its replacement, post-embedding work) from the window.
How to Report a Hung Firefox
submit a crash report for a hung firefox the easiest way to help the firefox stability team to debug these
kinds of hangs is to make the hung firefox crash and submit a crash report.
IPDL Best Practices
when to run code here's a rundown on appropriate places to run certain
kinds of code: manager::allocpprotocol - allocation manager::recvpprotocolconstructor - initialization, protocol deletion (the typeaheadfind protocol uses one-shot protocols like this) actor::recv__delete__ - cleanup, ipdl calls still valid but ill-advised actor::actordestroy - non-ipdl cleanup manager::deallocpprotocol - deallocation one construct to avoid: class protocolparent { public: ...
JavaScript-DOM Prototypes in Mozilla
this registration is done with the nsscriptnamespacemanager, which is in charge of keeping track of what names are registered in the global namespace, and what
kinds of names those names are (i.e.
Addon
the interface can represent many different
kinds of add-ons and as such, some of the methods and properties are considered "required" and others "optional," which means that the optional methods or property may not exist on addon instances for some types of add-ons.
AddonManager
one of the forces of the addonmanager is that it deals with any
kind (type) of add-on in a generic manner.
InstallListener
void oninstallended(in addoninstall install, in addon addon) void oninstallcancelled(in addoninstall install) void oninstallfailed(in addoninstall install) void onexternalinstall(in addon install, in addon existingaddon, in boolean needsrestart) methods onnewinstall() called when a new instance of addoninstall is created, primarily so ui can display some
kind of progress for all installs.
CustomizableUI.jsm
getareatype() check what
kind of area (toolbar or menu panel) an area is.
WebRequest.jsm
types resource types the resource type string identifies the
kind of resource being fetched.
Webapps.jsm
ls.import("resource://gre/modules/webapps.jsm"); // exported symbol is domapplicationregistry method overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) app
kind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: function() loadandupdateapps: function() updatedatastore: function(aid, aorigin, amanifesturl, amanifest) _registersystemmessagesforentrypoint: functi...
Application Translation with Mercurial
this can be done in a text editor or word processor or any other tool in which you can attach different
kind of states to the individual texts to translate.
Localization content best practices
every time you use this
kind of structure, you should have a localizable string behind it, and let localizers decide the best order for their language.
GC and CC logs
calling find_roots.py on a cc log with a specific object or
kind of object will produce paths from rooting objects to the specified objects.
Leak-hunting strategies and tips
tool finds platforms requires leak tools for large object graphs leak gauge windows, documents, and docshells only all platforms any build gc and cc logs js objects, dom objects, many other
kinds of objects all platforms any build leak tools for medium-size object graphs bloatview, refcount tracing and balancing objects that implement nsisupports or use moz_count_{ctor,dtor} all tier 1 platforms debug build (or build opt with --enable-logrefcnt) leaksoup (part of tracemalloc) all objects?
Leak Gauge
leak gauge is a tool that can be used to detect certain
kinds of leaks in gecko, including those involving documents, window objects, and docshells.
Scroll-linked effects
in order to do so, we need you (yes, you!) to tell us more about the
kinds of scroll-linked effects you are trying to implement, so that we can find good ways to support them in the compositor.
about:memory
this structure is just text, so you can copy and paste some or all of this text into any
kind of text buffer.
A brief guide to Mozilla preferences
browser/app/profile/firefox.js - defaults specific to firefox browser/app/profile/firefox-branding.js - defaults specific to the specific
kind of firefox being installed (nightly, aurora, beta, release) browser/defaults/preferences/firefox-l10n.js - defaults specific to the installed language of firefox.
Firefox Sync
general the always prolific richard newman has written a couple of notes about bookmark syncing (first, second) and has a blog where he talks about the various challenges syncing this
kind of data.
I/O Functions
pr_createfilemap pr_memmap pr_memunmap pr_closefilemap anonymous pipe function pr_createpipe polling functions this section describes two of the most important polling functions provided by nspr: pr_poll pr_getconnectstatus pollable events a pollable event is a special
kind of file descriptor.
PRFileInfo
description the prfileinfo structure provides information about a file, a directory, or some other
kind of file system object, as specified by the type field.
PRFileInfo64
description the prfileinfo64 structure provides information about a file, a directory, or some other
kind of file system object, as specified by the type field.
PRFileType
pr_file_other the information in the structure describes some other
kind of file system object.
PR_Poll
on successful return, the out_flags field of the prpolldesc data structure is set to indicate what
kind of i/o is ready on the respective descriptor.
PR_Shutdown
how the
kind of disallowed operations on the socket.
An overview of NSS Internals
the crmf library, which is used to produce certain
kinds of certificate requests, is available as a library for static linking only.
nss tech note3
used by an ocsp responder certusageverifyca ............ a ca of any
kind.
gtstd.html
other
kinds of pkcs #11 modules include the netscape fortezza module, used by the government, and the litronic pkcs #11 module for smart card readers.
Creating JavaScript jstest reftests
it is easy to make a test silently pass; anyone who has written js code for the web has written this
kind of if-statement: if (typeof gc === 'function') { var arr = []; arr[10000] = 'item'; gc(); asserteq(arr[10000], 'item', 'gc must not wipe out sparse array elements'); } else { print('test skipped: no gc function'); } reportcompare(0, 0, 'ok'); handling abnormal test terminations some tests can terminate abnormally even though the test has technically passed.
SpiderMonkey Internals
(otherwise, spidermonkey converts primitive values to objects before invoking their methods, per ecma 262-3 §11.2.1.) error handling spidermonkey has two interdependent error-handling systems: javascript exceptions (which are not implemented with, or even compatible with, any
kind of native c/c++ exception handling) and error reporting.
JIT Optimization Outcomes
singleton types are assigned to objects that are "one of a
kind", such as global objects, literal objects declared in the global scope, and top-level function objects.
JSNewResolveOp
the flags describe what
kind of property access triggered the resolve callback.
JS_CheckAccess
the mode parameter specifies what
kind of access to check for.
JS_SetOptions
mxr id search for jsoption_compile_n_go jsoption_atline //@line number ["filename"] option supported for the xul preprocessor and
kindred beasts.
JSAPI reference
ple, these apis support very smooth integration between the js garbage collector and other garbage collectors.) struct jstracer added in spidermonkey 1.8 js_tracechildren added in spidermonkey 1.8 js_traceruntime added in spidermonkey 1.8 jsval_is_traceable added in spidermonkey 1.8 obsolete since jsapi 31 jsval_to_traceable added in spidermonkey 1.8 obsolete since jsapi 31 jsval_trace_
kind added in spidermonkey 1.8 obsolete since jsapi 31 js_tracer_init added in spidermonkey 1.8 obsolete since jsapi 12 js_tracerinit added in spidermonkey 12 obsolete since jsapi 31 js_calltracer added in spidermonkey 1.8 obsolete since jsapi 22 js_set_tracing_details added in spidermonkey 1.8 obsolete since jsapi 26 js_set_tracing_index added in spidermonkey 1.8 obsolete since jsapi 26 js_set_...
Split object
...and yet, there is special code in jsobj.h with a comment about fixing some
kind of interaction between with an split objects.
Web Replay
when execution is paused, the debugger js object and its various child objects can be used to inspect the execution state in the same way for a either
kind of process.
Exploitable crashes
any other crash where firefox tries to use memory it does not have access to indicates some
kind of memory safety bug.
Secure Development Guidelines
a/b : 0; } writing secure code: memory management string handling c-style strings are byte arrays that end with a \0 byte some string handling functions won’t perform any
kind of length checking, so don’t use them ensure your string is always \0 terminated!
Task graph
these tasks include build and test tasks, along with lots of other
kinds of tasks to build docker images, build toolchains, perform analyses, check syntax, and so on.
Gecko object attributes
applied to: any role exposed in aria: aria-live relevant space delimited string with keywords describing what
kinds of changes in the subtree are informational, as opposed to presentational.
Gecko Roles
the status bar has multiple fields, which display different
kinds of information.
Gecko states
ext_state_supports_autocompletion for editable areas that have any
kind of autocompletion ext_state_defunct object no longer exists ext_state_selectable_text for text which is selectable, object must implement nsiaccessibletext ext_state_editable implements nsiaccessibleeditabletext ext_state_active this window is currently the active window ext_state_modal must do something with control before leaving it ext_state_multi_line edit control that can take mu...
Building the WebLock UI
the separator that appears at the top of this snippet creates a little divider between widgets like the
kind you see in menus that divide sets of functionality available there.
Observer Notifications
user-interaction-active nsidomwindow null sent once every 5000ms while this chrome document sees some
kind of user activity (for example, keyboard or mouse events), and at the exact moment of the state transition from idle to active.
NS_Alloc
return values this function returns a pointer to the allocated block of memory, which is suitably aligned for any
kind of variable, or null if the allocation failed.
NS_Realloc
return values this function returns a pointer to the allocated block of memory, which is suitably aligned for any
kind of variable, or null if the allocation failed.
IAccessibleHyperlink
this interface could also be applied to other
kinds of objects with multiple actions such as "smart tags" which are objects, typically strings, which have multiple actions such as "activate uri", "bookmark uri", end so on.
IAccessibleTable
however, in some cases that
kind of implementation will not be possible.
nsIAccessibleRole
the status bar has multiple fields, which display different
kinds of information.
nsIAccessibleStates
state_checkable state_marqueed extended state constants extended state flags (for now non-msaa, for java and gnome/atk support) constant value description ext_state_supports_autocompletion 0x00000001 for editable areas that have any
kind of auto completion.
nsIAppShellService
achromemask chrome flags affecting the
kind of os border given to the window.
nsIConsoleService
acategory — a string indicating what
kind of code caused the error message.
nsIContentPrefService2
this parameter relates to private browsing and determines the
kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions.
nsIMemoryMultiReporter
attributes attribute type description explicitnonheap print64 the sum of all of this multi-reporter's measurements that have a path that starts with "explicit" and are of the
kind kind_nonheap.
nsIMsgDBHdr
it is also mandatory to set msghdr.folder.msgdatabase = null after performing this
kind of operations to prevent leaking.
nsINavHistoryContainerResultNode
toolkit/components/places/public/nsinavhistoryservice.idlscriptable a foundation for the interfaces that provide a description of a query result on the places service that describes a container (which is any
kind of grouping, including bookmark folders).
nsINavHistoryResultNode
bookmar
kindex long when this item is in a bookmark folder (its parent is of type folder), this is the index into that folder at which this node resides.
nsIPlacesView
controllers should not be concerned with these details; controller code should not be required to decode the meaning of a selection depending on what
kind of view produced the selection.
nsIRequest
constant value description inhibit_caching 1 << 7 this flag prevents caching of any
kind.
nsIScriptError2
category a string indicating what
kind of code caused the message.
nsIScriptableUnescapeHTML
parser/html/nsiscriptableunescapehtml.idlscriptable this interface is a utility interface that exposes the
kind of markup parser behavior that the feed service needs.
nsISessionStore
this
kind of domwindow object can be obtained from other nsidomwindow objects (like the sidebar window object) by applying the 'mainwindow' statement from working_with_windows_in_chrome_code.
nsITimer
they used to be distinct, but the old type_repeating_precise
kind was similar to type_repeating_precise_can_skip while also being less useful.
nsIWebBrowser
the embedder may set this property to their own implementation if they intend to override or prevent how certain
kinds of content are loaded.
nsIXULTemplateBuilder
this allows the query processor to be specific to a particular
kind of input data or query syntax, while the template builder remains independent of the
kind of data being used.
XPCOM primitive
(however, if you are designing that
kind of api today, you should probably use nsivariant instead.) idl data type interface component idl nsidptr nsisupportsid @mozilla.org/supports-id;1 [scriptable, uuid(d18290a0-4a1c-11d3-9890-006008962422)] interface nsisupportsid : nsisupportsprimitive { attribute nsidptr data; string tostring(); }; astring nsisupportsstring @mozilla.org/supports-string;1 [scriptable, uuid(d79dc970-4a...
Setting HTTP request headers
and yes, converting objects from one
kind to another is very ugly, and lacks (what is usually called) syntactic sugar.
Reference Manual
you're more likely to see it in a form like this nscomptr<nsifoo> foo( do_queryinterface(alist->elementat(i)) ); // |elementat|, like all good getters, |addrefs| it's result // which would be dropped on the floor, after querying it for the needed // interface bugzilla bug 8221 is specifically about finding and fixing this particular
kind of leak.
Working with Multiple Versions of Interfaces
to include both retrieval interfaces (and remember the old iid without having to cut and paste) i followed the
kind advice of mike shaver and did: #define nsiaccessibleretrieval nsiaccessibleretrieval_old #include "accessibility/nsiaccessibleretrieval_old.h" static const nsiid ns_iaccessibleretrieval_iid_old = ns_iaccessibleretrieval_iid; #undef nsiaccessibleretrieval #undef __gen_nsiaccessibleretrieval_h__ #include "accessibility/nsiaccessibleretrieval.h" and following the identical principle for the docume...
XPIDL Syntax
st] ["readonly"] "attribute" type_spec *(ident ",") ident ; descending order of precedence expr /= expr ("|" / "^" / "&") expr ; unequal precedence "|" is lowest expr /= expr ("<<" / ">>") expr expr /= expr ("+" / "-") expr expr /= expr ("*" / "/" / "%") expr expr /= ["-" / "+" / "~"] (scoped_name / literal / "(" expr ")" ) ; numeric literals: quite frankly, i'm sure you know how these
kinds of ; literals work, and these are annoying to specify in abnf.
Xray vision
waiving xray vision xray vision is a
kind of security heuristic, designed to make most common operations on untrusted objects simple and safe.
The Valgrind Test Job
errors in system libraries can generally be ignored, because they are out of our control and the
kind of thing we suppress on the test machines.
Gloda examples
this requires two chained asynchronous calls: //first take an email address and turn it into an identity object id_q = gloda.newquery(gloda.noun_identity); id_q.
kind("email"); id_q.value("test@example.com"); id_coll = id_q.getcollection({ onitemsadded: function _onitemsadded(aitems, acollection) { }, onitemsmodified: function _onitemsmodified(aitems, acollection) { }, onitemsremoved: function _onitemsremoved(aitems, acollection) { }, onquerycomplete...
Index
this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same
kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
MailNews Protocols
these implement nsimsgprotocol, inherit from nsmsgprotocol, and implement their own protocol-specific interface (nsiimapprotocol, nsipop3protocol, nsinntpprotocol) in addition, in mailnews/db/msgdb/public, we have protocol-specific msg db classes (and in the case of news, a nsinewsdatabase interface), so that we can use polymorphism when msg db operations need to be specialized for different
kinds of folders.
Mailbox
this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same
kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
CType
there are several
kinds of types: primitive types these are typical unstructured data, such as the predefined types listed in predefined data types.
js-ctypes reference
types and data to use js-ctypes effectively, it is important to understand the different
kinds of objects that the module provides.
Mozilla
zombie compartments this page tells you how to detect and avoid zombie compartments, which are a particular
kind of memory leak.
Debugger.Environment - Firefox Developer Tools
function properties of the debugger.environment prototype object the methods described below may only be called with a this value referring to a debugger.environment instance; they may not be used as methods of other
kinds of objects.
Debugger.Frame - Firefox Developer Tools
function properties of the debugger.frame prototype object the functions described below may only be called with a this value referring to a debugger.frame instance; they may not be used as methods of other
kinds of objects.
Debugger.Object - Firefox Developer Tools
function properties of the debugger.object prototype the functions described below may only be called with a this value referring to a debugger.object instance; they may not be used as methods of other
kinds of objects.
Debugger.Script - Firefox Developer Tools
function properties of the debugger.script prototype object the functions described below may only be called with a this value referring to a debugger.script instance; they may not be used as methods of other
kinds of objects.
Debugger.Object - Firefox Developer Tools
function properties of the debugger.object prototype the functions described below may only be called with a this value referring to a debugger.object instance; they may not be used as methods of other
kinds of objects.
Index - Firefox Developer Tools
however, debugger is quite general, and can be used to implement other
kinds of tools like tracers, coverage analysis, patch-and-continue, and so on.
Call Tree - Firefox Developer Tools
with this
kind of digging, we can figure out the whole call graph, with associated sample count: sortall() // 8 -> sort() // 37 -> bubblesort() // 1345 -> swap() // 252 -> selectionsort() // 190 -> swap() // 1 -> quicksort() // 103 -> ...
Animation() - Web APIs
although in the future other effects such as sequenceeffects or groupeffects might be possible, the only
kind of effect currently available is keyframeeffect.
Animation - Web APIs
additionally, certain
kinds of motion can be a trigger for vestibular disorders, epilepsy, and migraine, and scotopic sensitivity.
AudioParam - Web APIs
there are two
kinds of audioparam, a-rate and k-rate parameters: an a-rate audioparam takes the current audio parameter value for each sample frame of the audio signal.
BiquadFilterNode.type - Web APIs
the type property of the biquadfilternode interface is a string (enum) value defining the
kind of filtering algorithm the node is implementing.
CDATASection - Web APIs
]]> for example: <foo>here is a cdata section: <![cdata[ < > & ]]> with all
kinds of unescaped text.</foo> the only sequence which is not allowed within a cdata section is the closing sequence of a cdata section itself, ]]>: <![cdata[ ]]> will cause an error ]]> note that cdata sections should not be used within html; they only work in xml.
CSSRule - Web APIs
the relationships between these constants and the interfaces are: type value rule-specific interface comments and examples cssrule.style_rule 1 cssstylerule the most common
kind of rule: selector { prop1: val1; prop2: val2; } cssrule.import_rule 3 cssimportrule an @import rule.
console - Web APIs
each of these results in output styled differently in the log, and you can use the filtering controls provided by your browser to only view the
kinds of output that interest you.
Constraint validation API - Web APIs
even though client-side validation can prevent many common
kinds of invalid values, invalid ones can still be sent by older browsers or by attackers trying to trick your web application.
CrashReportBody - Web APIs
if you want to receive other
kinds of reports, but not crash reports, make sure to use a different name for the endpoint group that you choose for those reports.
Document - Web APIs
width="80" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">document</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} the document interface describes the common properties and methods for any
kind of document.
ElementTraversal - Web APIs
it has been split into two interfaces, containing the useful methods and properties for each
kind of nodes: childnode parentnode as it was a pure interface, with no object of this type, this change has no effect on the web.
Event.cancelable - Web APIs
event listeners that handle multiple
kinds of events may want to check cancelable before invoking their preventdefault() methods.
Fetch API - Web APIs
this will allow them to be used wherever they are needed in the future, whether it’s for service workers, cache api, and other similar things that handle or modify requests and responses, or any
kind of use case that might require you to generate your responses programmatically (that is, the use of computer program or personal programming instructions).
File - Web APIs
a file object is a specific
kind of a blob, and can be used in any context that a blob can.
FileSystemEntrySync - Web APIs
[ todo: specify what
kind of metadata ] metadata getmetada () raises (fileexception); parameter none returns metadata exceptions this method can raise a fileexception with the following codes: exception description not_found_err the entry does not exist.
GlobalEventHandlers.onerror - Web APIs
error events are fired at various targets for different
kinds of errors: when a javascript runtime error (including syntax errors and exceptions thrown within handlers) occurs, an error event using interface errorevent is fired at window and window.onerror() is invoked (as well as handlers attached by window.addeventlistener (not only capturing)).
GlobalEventHandlers.onpointerdown - Web APIs
the handledown() function, in turn, looks at the value of pointertype to determine what
kind of pointing device was used, then uses that information to customize a string to replace the contents of the target box.
HTMLElement: change event - Web APIs
bubbles yes cancelable no interface event event handler property onchange depending on the
kind of element being changed and the way the user interacts with the element, the change event fires at a different moment: when the element is :checked (by clicking or using the keyboard) for <input type="radio"> and <input type="checkbox">; when the user commits the change explicitly (e.g., by selecting a value from a <select>'s dropdown with a mouse click, by selecting a date from a date picker ...
HTMLMediaElement.setSinkId() - Web APIs
exceptions exception explanation domexception no permission to use the requested device examples const devices = await navigator.mediadevices.enumeratedevices(); const audiodevices = devices.filter(device => device.
kind === 'audiooutput'); const audio = document.createelement('audio'); await audio.setsinkid(audiodevices[0].deviceid); console.log('audio is being played on ' + audio.sinkid); specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
HTMLOListElement - Web APIs
htmlolistelement.type is a domstring value reflecting the type and defining the
kind of marker to be used to display.
HTMLTrackElement - Web APIs
htmltrackelement.
kind is a domstring that reflects the
kind html attribute, indicating how the text track is meant to be used.
HTMLUListElement - Web APIs
htmlulistelement.type is a domstring value reflecting the type and defining the
kind of marker to be used to display.
File drag and drop - Web APIs
function drophandler(ev) { console.log('file(s) dropped'); // prevent default behavior (prevent file from being opened) ev.preventdefault(); if (ev.datatransfer.items) { // use datatransferitemlist interface to access the file(s) for (var i = 0; i < ev.datatransfer.items.length; i++) { // if dropped items aren't files, reject them if (ev.datatransfer.items[i].
kind === 'file') { var file = ev.datatransfer.items[i].getasfile(); console.log('...
HTML Drag and Drop API - Web APIs
a datatransferitem object represents a single drag item, each with a
kind property (either string or file) and a type property for the data item's mime type.
IDBIndex - Web APIs
an index is a
kind of object store for looking up records in another object store, called the referenced object store.
KeyboardEvent - Web APIs
the event type (keydown, keypress, or keyup) identifies what
kind of keyboard activity occurred.
MediaDevices.enumerateDevices() - Web APIs
navigator.mediadevices.enumeratedevices() .then(function(devices) { devices.foreach(function(device) { console.log(device.
kind + ": " + device.label + " id = " + device.deviceid); }); }) .catch(function(err) { console.log(err.name + ": " + err.message); }); this might produce: videoinput: id = cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: id = rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: id = r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= or if one or more mediastreams are ac...
MediaSession.setPositionState() - Web APIs
the mediasession method setpositionstate() is used to update the current document's media playback position and speed for presentation by user's device in any
kind of interface that provides details about ongoing media.
MediaSource.endOfStream() - Web APIs
when you make an xmlhttprequest call for a media chunk, and onabort or onerror triggers, you might want to call endofstream('network'), display a descriptive message in the ui, and maybe retry the network request immediately or wait until the network is back up (via some
kind of polling.) decode: terminates playback and signals that a decoding error has occured.
MediaStream: addtrack event - Web APIs
bubbles no cancelable no interface mediastreamtrackevent event handler property onaddtrack examples using addeventlistener(): let stream = new mediastream(); stream.addeventlistener('addtrack', (event) => { console.log(`new ${event.track.
kind} track added`); }); using the onaddtrack event handler property: let stream = new mediastream(); stream.onaddtrack = (event) => { console.log(`new ${event.track.
kind} track added`); }; specifications specification status media capture and streamsthe definition of 'addtrack' in that specification.
MediaStream.getTracks() - Web APIs
the gettracks() method of the mediastream interface returns a sequence that represents all the mediastreamtrack objects in this stream's track set, regardless of mediastreamtrack.
kind.
MediaStream: removetrack event - Web APIs
bubbles no cancelable no interface mediastreamtrackevent event handler property onremovetrack examples using addeventlistener(): let stream = new mediastream(); stream.addeventlistener('removetrack', (event) => { console.log(`${event.track.
kind} track removed`); }); using the onremovetrack event handler property: let stream = new mediastream(); stream.onremovetrack = (event) => { console.log(`${event.track.
kind} track removed`); }; specifications specification status media capture and streamsthe definition of 'removetrack' in that specification.
MediaStreamConstraints.audio - Web APIs
the mediastreamconstraints dictionary's audio property is used to indicate what
kind of audio track, if any, should be included in the mediastream returned by a call to getusermedia().
MediaStreamConstraints.video - Web APIs
the mediastreamconstraints dictionary's video property is used to indicate what
kind of video track, if any, should be included in the mediastream returned by a call to getusermedia().
MediaStreamConstraints - Web APIs
the mediastreamconstraints dictionary is used when calling getusermedia() to specify what
kinds of tracks should be included in the returned mediastream, and, optionally, to establish constraints for those tracks' settings.
MediaStreamTrack - Web APIs
mediastreamtrack.
kind read only returns a domstring set to "audio" if the track is an audio track and to "video", if it is a video track.
MediaStream Image Capture API - Web APIs
though a mediastream holds several types of tracks and provides multiple methods for retrieving them, the imagecapture constructor will throw a domexception of type notsupportederror if mediastreamtrack.
kind is not "video".
MediaStream Recording API - Web APIs
navigator.mediadevices.enumeratedevices() .then(function(devices) { devices.foreach(function(device) { let menu = document.getelementbyid("inputdevices"); if (device.
kind == "audioinput") { let item = document.createelement("option"); item.innerhtml = device.label; item.value = device.deviceid; menu.appendchild(item); } }); }); code similar to this can be used to let the user restrict the set of devices they wish to use.
MediaTrackConstraints.deviceId - Web APIs
however, the value of the deviceid is determined by the source of the track's content, and there's no particular format mandated by the specification (although some
kind of guid is recommended).
MediaTrackConstraints.groupId - Web APIs
however, the value of the groupid is determined by the source of the track's content, and there's no particular format mandated by the specification (although some
kind of guid is recommended).
Media Source API - Web APIs
trackdefault provides a sourcebuffer with
kind, label, and language information for tracks that do not contain this information in the initialization segments of a media chunk.
Media Capture and Streams API (Media Stream) - Web APIs
blobevent canvascapturemediastreamtrack inputdeviceinfo mediadevice
kind mediadeviceinfo mediadevices mediastream mediastreamconstraints mediastreamevent mediastreamtrack mediastreamtrackevent mediatrackconstraints mediatracksettings mediatracksupportedconstraints overconstrainederror url early versions of the media capture and streams api specification included separate audiostreamtrack and videostreamtrack interfaces—each based upon mediastrea...
Metadata.modificationTime - Web APIs
the read-only modificationtime property of the metadata interface is a date object which specifies the date and time the file system entry (or the data referenced by the entry) was last modified.a file system entry is considered to have been modified if the metadata or the contents of the referenced file (or directory, or whatever other
kind of file system entry might exist on the platform in use) has changed.
MouseEvent.buttons - Web APIs
the mouseevent.buttons property indicates the state of buttons pressed during any
kind of mouse event, while the mouseevent.button property only guarantees the correct value for mouse events caused by pressing or releasing one or multiple buttons.
Using Navigation Timing - Web APIs
performance.navigation.type indicates what
kind of load operation took place: a navigation, a reload, or a shift through the browser's history.
Navigator.requestMediaKeySystemAccess() - Web APIs
the fulfillment handler receives as input just one parameter: mediakeysystemaccess a mediakeysystemaccess object representing the media key system configuration described by keysystem and supportedconfigurations exceptions in case of an error, the returned promise is rejected with a domexception whose name indicates what
kind of error occurred.
Navigator.share() - Web APIs
the javascript looks like this: const sharedata = { title: 'mdn', text: 'learn web development on mdn!', url: 'https://developer.mozilla.org', } const btn = document.queryselector('button'); const resultpara = document.queryselector('.result'); // must be triggered some
kind of "user activation" btn.addeventlistener('click', async () => { try { await navigator.share(sharedata) resultpara.textcontent = 'mdn shared successfully' } catch(err) { resultpara.textcontent = 'error: ' + err } }); sharing files to share files, first test for and call navigator.canshare().
NavigatorID.appVersion - Web APIs
the window.navigator.appversion, window.navigator.appname and window.navigator.useragent properties have been used in "browser sniffing" code: scripts that attempt to find out what
kind of browser you are using and adjust pages accordingly.
Using the Payment Request API - Web APIs
ediate success: paymentresponse.complete('success') .then(function() { // for demo purposes: intropanel.style.display = 'none'; successpanel.style.display = 'block'; }); }).catch(function(error) { if (error.code == domexception.not_supported_err) { window.location.href = 'https://bobpay.xyz/#download'; } else { // other
kinds of errors; cancelled or failed payment.
Proximity Events - Web APIs
once captured, the event object gives access to different
kinds of information: the deviceproximityevent event provides an exact match for the distance between the device and the object through its value property.
RTCIceCandidatePairStats.packetsSent - Web APIs
syntax packetssent = rtcicecandidatepairstats.packetssent; value an integer value indicating the total number of packets, of any
kind, which have been sent on the connection described by the two candidates comprising this pair.
RTCIceCandidateStats - Web APIs
candidatetype optional a string matching one of the values in the rtcicecandidatetype enumerated type, indicating what
kind of candidate the object provides statistics for.
RTCIceProtocol - Web APIs
the tcptype property provides additional information about the
kind of tcp candidate represented by the object.
RTCIceServer - Web APIs
credentialtype optional if the rtciceserver represents a turn server, this attribute specifies what
kind of credential is to be used when connecting.
RTCPeerConnection - Web APIs
the answer is delivered to the returned promise, and should then be sent to the source of the offer to continue the negotiation process.createdatachannel() the createdatachannel() method on the rtcpeerconnection interface creates a new channel linked with the remote peer, over which any
kind of data may be transmitted.createoffer()the createoffer() method of the rtcpeerconnection interface initiates the creation of an sdp offer for the purpose of starting a new webrtc connection to a remote peer.generatecertificate()the generatecertificate() method of the rtcpeerconnection interface creates and stores an x.509 certificate and corresponding private key then returns an rtccertificate, ...
RTCRtpReceiver - Web APIs
static methods rtcrtpreceiver.getcapabilities() returns the most optimistic view of the capabilities of the system for receiving media of the given
kind.
RTCRtpSender - Web APIs
static methods rtcrtpsender.getcapabilities() returns an rtcrtpcapabilities object describing the system's capabilities for sending a specified
kind of media data.
Screen Capture API - Web APIs
displaycapturesurfacetype an enumerated string type which is used to identify the
kind of display surface to capture.
Using server-sent events - Web APIs
event: userconnect data: {"username": "bobby", "time": "02:33:48"} data: here's a system message of some
kind that will get used data: to accomplish some task.
ServiceWorker.onstatechange - Web APIs
var serviceworker; if (registration.installing) { serviceworker = registration.installing; document.queryselector('#
kind').textcontent = 'installing'; } else if (registration.waiting) { serviceworker = registration.waiting; document.queryselector('#
kind').textcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#
kind').textcontent = 'active'; } if (serviceworker) { logstate(serviceworker.state); serviceworker.addeventlistener('statechange',...
ServiceWorker.state - Web APIs
var serviceworker; if (registration.installing) { serviceworker = registration.installing; document.queryselector('#
kind').textcontent = 'installing'; } else if (registration.waiting) { serviceworker = registration.waiting; document.queryselector('#
kind').textcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#
kind').textcontent = 'active'; } if (serviceworker) { logstate(serviceworker.state); serviceworker.addeventlistener('statechange',...
ServiceWorker - Web APIs
if ('serviceworker' in navigator) { navigator.serviceworker.register('service-worker.js', { scope: './' }).then(function (registration) { var serviceworker; if (registration.installing) { serviceworker = registration.installing; document.queryselector('#
kind').textcontent = 'installing'; } else if (registration.waiting) { serviceworker = registration.waiting; document.queryselector('#
kind').textcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#
kind').textcontent = 'active'; } if (serviceworker) { ...
SharedWorker - Web APIs
the sharedworker interface represents a specific
kind of worker that can be accessed from several browsing contexts, such as several windows, iframes or even workers.
SourceBuffer.trackDefaults - Web APIs
the trackdefaults property of the sourcebuffer interface specifies the default values to use if
kind, label, and/or language information is not available in the initialization segment of the media to be appended to the sourcebuffer.
SourceBuffer - Web APIs
sourcebuffer.trackdefaults specifies the default values to use if
kind, label, and/or language information is not available in the initialization segment of the media to be appended to the sourcebuffer.
Storage API - Web APIs
site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches notification data other
kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted with using the storage api consists of a single site storage unit for each origin.
Using the Storage Access API - Web APIs
}); note that access requests are automatically denied unless the embedded content is currently processing a user gesture such as a tap or click — so this code needs to be run inside some
kind of user gesture-based event handler, for example: btn.addeventlistener('click', () => { // run code here }); ...
Using readable streams - Web APIs
; readstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); in the readstream() function itself, we lock a reader to the stream using readablestream.getreader(), then follow the same
kind of pattern we saw earlier — reading each chunk with read(), checking whether done is true and then ending the process if so, and reading the next chunk and processing it if not, before running the read() method again.
Streams API - Web APIs
previously, if we wanted to process a resource of some
kind (be it a video, or a text file, etc.), we'd have to download the entire file, wait for it to be deserialized into a suitable format, then process the whole lot after it is fully received.
TouchEvent - Web APIs
there are several possible reasons why this might happen (and the exact reasons will vary from device to device, as well as browser to browser): an event of some
kind occurred that canceled the touch; this might happen if a modal alert pops up during the interaction.
Using Touch Events - Web APIs
together, these interfaces define a relatively low-level set of features, yet they support many
kinds of touch-based interaction, including the familiar multi-touch gestures such as multi-finger swipe, rotation, pinch and zoom.
WEBGL_debug_shaders - Web APIs
this extension is not directly available to web sites as the way of how the shader is translated may uncover personally-identifiable information to the web page about the
kind of graphics card in the user's computer.
WebGLQuery - Web APIs
another
kind of queries are disjoint timer queries, which allow you to measure performance and profiling of your gpu.
WebGL constants - Web APIs
rendering primitives constants passed to webglrenderingcontext.drawelements() or webglrenderingcontext.drawarrays() to specify what
kind of primitive to render.
WebRTC connectivity - Web APIs
the description includes information about the
kind of media being sent, its format, the transfer protocol being used, the endpoint's ip address and port, and other information needed to describe a media transfer endpoint.
Lifetime of a WebRTC session - Web APIs
the caller creates and shares with the receiving peer a unique identifier or token of some
kind so that the call between them can be identified by the code on the signaling server.
Signaling and video calling - Web APIs
this means our signaling messages will be in json format, with contents which specify what
kind of messages they are as well as any additional information needed in order to handle the messages properly.
Using WebRTC data channels - Web APIs
in this guide, we'll examine how to add a data channel to a peer connection, which can then be used to securely exchange arbitrary data; that is, any
kind of data we wish, in any format we choose.
Lighting a WebXR setting - Web APIs
components of a light source a light source has three major components; each component is in essence a type of light there are three
kinds of light that can affect the color and brightness of objects and their pixels as displayed on the viewer's screen or headset.
WebXR performance guide - Web APIs
they can be thought of as being similar to the registers in a microprocessor: a limited set of memory storage slots for specific
kinds of data or use cases.
Rendering and the WebXR frame animation callback - Web APIs
thus it's the other
kinds of input that you need to handle yourself: pointing device target and button presses gamepad inputs non-xr input device inputs to learn more about how to handle user inputs while presenting a scene using webxr, see the article inputs and input sources.
Controlling multiple parameters with ConstantSourceNode - Web APIs
could use a loop and change the value of each affected audioparam one at a time, but there are two drawbacks to doing it that way: first, that's extra code that, as you're about to see, you don't have to write; and second, that loop uses valuable cpu time on your thread (likely the main thread), and there's a way to offload all that work to the audio rendering thread, which is optimized for this
kind of work and may run at a more appropriate priority level than your code.
Migrating from webkitAudioContext - Web APIs
var isfinished = (src.playbackstate == src.finished_state); // new audiocontext code: var src = context.createbuffersource(); function endedhandler(event) { isfinished = true; } var isfinished = false; src.onended = endedhandler; the exact same changes have been applied to both audiobuffersourcenode and oscillatornode, so you can apply the same techniques to both
kinds of nodes.
Web Audio API - Web APIs
it is an audionode that can represent different
kinds of filters, tone control devices, or graphic equalizers.
Attestation and Assertion - Web APIs
this provides a root of trust for a newly generated key pair as well as being able to identify the attributes of a device being used (how the private key is protected; if / what
kind of biometric is being used; whether a device has been certified; etc.).
Window.updateCommands() - Web APIs
syntax window.updatecommands("scommandname") parameters scommandname is a particular string which describes what
kind of update event this is (e.g.
Worklet - Web APIs
the worklet interface abstracts properties and methods common to all
kind of worklets, and cannot be created directly.
XRReferenceSpace: reset event - Web APIs
however, if that
kind of "teleportation" is being used, you actually want to avoid jumping the user's position after tracking recovery, this can introduce additional and potentially jarring jumping.
XRSession: select event - Web APIs
examples of comon
kinds of primary action are users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
XRSession: selectend event - Web APIs
after checking to ensure that the received event is a tracked-pointer event (the only
kind we handle here), the target ray's pose is obtained using getpose().
XRSession: selectstart event - Web APIs
after checking to ensure that the received event is a tracked-pointer event (the only
kind we handle here), the target ray's pose is obtained using getpose().
XRSession: squeeze event - Web APIs
examples of comon
kinds of primary action are users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
XRSession: squeezeend event - Web APIs
after checking to ensure that the received event is a tracked-pointer event (the only
kind we handle here), the target ray's pose is obtained using getpose().
XRSessionMode - Web APIs
the webxr device api's xrsessionmode enumerated type defines the string values used to identify the possible
kinds of session mode that can be used.
ARIA: textbox role - Accessibility
the hint should be a sample value or a brief description of the expected format.this information should not be used as a substitute for a label: a label is focusable, permanent, indicates what
kind of information is expected, and increases the hit area for setting focus on the control, whereas placeholder text is only temporary hint about the expected value, which if implemented incorrectly can decrease accessibility.
Architecture - Accessibility
how does an at deal with text (a) to get the embedded object for an embedded object char: lin
kindex = iahypertext::getlin
kindex(offset) iahyperlink*object = iahypertext::getlink(lin
kindex) iaccessible* accessible = qi/qs(object) (b) to get the offset in the parent text for a given embedded object: qi/qa to iahyperlink if not successful, then it is not embedded in text, so it's position in parent should be determined just by ia2::indexinparent, which will return its child offset with...
Cognitive accessibility - Accessibility
providing guidance on how to pronounce words helps many different
kinds of people, including those who prefer to read aloud, non-native language speakers, and people who may unfamiliar with the meaning of a term in context.
Keyboard - Accessibility
focusable elements should have interactive semantics if an element can be focused using the keyboard, then it should be interactive; that is, the user should be able to do something to it and produce a change of some
kind (for example, activating a link or changing an option).
::placeholder - CSS: Cascading Style Sheets
syntax ::placeholder accessibility concerns color contrast contrast ratio placeholder text typically has a lighter color treatment to indicate that it is a suggestion for what
kind of input will be valid, and is not actual input of any
kind.
Using CSS transitions - CSS: Cascading Style Sheets
as usual, you can use the addeventlistener() method to monitor for this event: el.addeventlistener("transitionend", updatetransition, true); you detect the beginning of a transition using transitionrun (fires before any delay) and transitionstart (fires after any delay), in the same
kind of fashion: el.addeventlistener("transitionrun", signalstart, true); el.addeventlistener("transitionstart", signalstart, true); note: the transitionend event doesn't fire if the transition is aborted before the transition is completed because either the element is made display: none or the animating property's value is changed.
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
source image examples before diving in to look at the results of using different
kinds of source images and seeing how they look when used with background-size, it would be helpful to look at a few example source images that have different dimensions and sizing settings.
font-variant-caps - CSS: Cascading Style Sheets
for example: in turkic languages, such as turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two
kinds of i (one with the dot, one without) and two case pairings: i/İ and ı/i.
text-transform - CSS: Cascading Style Sheets
the text-transform property takes into account language-specific case mapping rules such as the following: in turkic languages, like turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two
kinds of i, with and without the dot, and two case pairings: i/İ and ı/i.
transition-timing-function - CSS: Cascading Style Sheets
however, some animations can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd) and certain
kinds of motion can be a trigger for vestibular disorders, epilepsy, and migraine and scotopic sensitivity.
Getting Started - Developer guides
the idea would be that a server-side script of some
kind would continually update the text file with new timestamps, and our xhr code would be used to report the latest timestamp on the client-side.
Adding captions and subtitles to HTML5 video - Developer guides
ally have our subtitles in three different languages — english, german, and spanish — so we will reference all three of the relevant vtt files by adding <track> elements inside our html5 <video> element: <video id="video" controls preload="metadata"> <source src="video/sintel-short.mp4" type="video/mp4"> <source src="video/sintel-short.webm" type="video/webm"> <track label="english"
kind="subtitles" srclang="en" src="captions/vtt/sintel-en.vtt" default> <track label="deutsch"
kind="subtitles" srclang="de" src="captions/vtt/sintel-de.vtt"> <track label="español"
kind="subtitles" srclang="es" src="captions/vtt/sintel-es.vtt"> </video> as you can see, each <track> element has the following attributes set:
kind is given a value of subtitles, indicating the type of content ...
Audio and Video Delivery - Developer guides
for further info see cross browser audio basics (html5 audio in detail) html video <video controls width="640" height="480" poster="initialimage.png" autoplay muted> <source src="videofile.mp4" type="video/mp4"> <!-- fallback for browsers that don't support mp4 --> <source src="videofile.webm" type="video/webm"> <!-- specifying subtitle files --> <track src="subtitles_en.vtt"
kind="subtitles" srclang="en" label="english"> <track src="subtitles_no.vtt"
kind="subtitles" srclang="no" label="norwegian"> <!-- fallback for browsers that don't support video tag --> <a href="videofile.mp4">download video</a> </video> the code above creates a video player of dimensions 640x480 pixels, displaying a poster image until the video is played.
DOM onevent handlers - Developer guides
the specific handling of the return value depends on the
kind of event; for details, see "the event handler processing algorithm" in the html specification.
<input type="color"> - HTML: Hypertext Markup Language
the element's presentation may vary substantially from one browser and/or platform to another—it might be a simple textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some
kind of custom color picker window.
<label> - HTML: Hypertext Markup Language
terms-and-conditions"> i agree to the <a href="terms-and-conditions.html">terms and conditions</a> </label> do <label for="tac"> <input id="tac" type="checkbox" name="terms-and-conditions"> i agree to the terms and conditions </label> <p> <a href="terms-and-conditions.html">read our terms and conditions</a> </p> headings placing heading elements within a <label> interferes with many
kinds of assistive technology, because headings are commonly used as a navigation aid.
HTML: Hypertext Markup Language
html content categories html is comprised of several
kinds of content, each of which is allowed to be used in certain contexts and is disallowed in others.
Evolution of HTTP - HTTP
he envisioned a web where people can add and move documents remotely, a
kind of distributed file system.
Common MIME types - HTTP
this table lists some important mime types for the web: extension
kind of document mime type .aac aac audio audio/aac .abw abiword document application/x-abiword .arc archive document (multiple files embedded) application/x-freearc .avi avi: audio video interleave video/x-msvideo .azw amazon
kindle ebook format application/vnd.amazon.ebook .bin any
kind of binary data ap...
Cross-Origin Resource Sharing (CORS) - HTTP
note: these are the same
kinds of cross-site requests that web content can already issue, and no response data is released to the requester unless the server sends an appropriate header.
Compression in HTTP - HTTP
as compression works better on a specific
kind of files, it usually provides nothing to compress them a second time.
CSP: media-src - HTTP
examples violation cases given this csp header: content-security-policy: media-src https://example.com/ the following <audio>, <video> and <track> elements are blocked and won't load: <audio src="https://not-example.com/audio"></audio> <video src="https://not-example.com/video"> <track
kind="subtitles" src="https://not-example.com/subtitles"> </video> specifications specification status comment content security policy level 3the definition of 'media-src' in that specification.
Location - HTTP
in cases of redirection, the http method used to make the new request to fetch the page pointed to by location depends of the original method and of the
kind of redirection: if 303 (see also) responses always lead to the use of a get method, 307 (temporary redirect) and 308 (permanent redirect) don't change the method used in the original request; 301 (permanent redirect) and 302 (found) doesn't change the method most of the time, though older user-agents may (so you basically don't know).
HTTP headers - HTTP
accept-signature a client can send the accept-signature header field to indicate intention to take advantage of any available signatures and to indicate what
kinds of signatures it supports.
Link prefetching FAQ - HTTP
when the user clicks on a link, or initiates any
kind of page load, link prefetching will stop and any prefetch hints will be discarded.
HTTP
http messages describes the type and structure of the different
kind of messages of http/1.x and http/2.
Functions - JavaScript
function parameters starting with ecmascript 2015, there are two new
kinds of parameters: default parameters and rest parameters.
Loops and iteration - JavaScript
console.log('walking east one step'); } there are many different
kinds of loops, but they all essentially do the same thing: they repeat an action some number of times.
Error - JavaScript
etc } custom error types you might want to define your own error types deriving from error to be able to throw new myerror() and use instanceof myerror to check the
kind of error in the exception handler.
handler.getPrototypeOf() - JavaScript
roxy(obj, { getprototypeof(target) { return array.prototype; } }); console.log( object.getprototypeof(p) === array.prototype, // true reflect.getprototypeof(p) === array.prototype, // true p.__proto__ === array.prototype, // true array.prototype.isprototypeof(p), // true p instanceof array // true ); two
kinds of exceptions const obj = {}; const p = new proxy(obj, { getprototypeof(target) { return 'foo'; } }); object.getprototypeof(p); // typeerror: "foo" is not an object or null const obj = object.preventextensions({}); const p = new proxy(obj, { getprototypeof(target) { return {}; } }); object.getprototypeof(p); // typeerror: expected same prototype value specific...
String.raw() - JavaScript
// all
kinds of escape characters will be ineffective // and backslashes will be present in the output string.
WebAssembly.Module.exports() - JavaScript
{ console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); var exports = webassembly.module.exports(mod); console.log(exports[0]); }; the exports[0] output looks like this: { name: "exported_func",
kind: "function" } specifications specification webassembly javascript interfacethe definition of 'exports()' in that specification.
WebAssembly.Module.imports() - JavaScript
webassembly.compilestreaming(fetch('simple.wasm')) .then(function(mod) { var imports = webassembly.module.imports(mod); console.log(imports[0]); }); the output looks like this: { module: "imports", name: "imported_func",
kind: "function" } specifications specification webassembly javascript interfacethe definition of 'imports()' in that specification.
yield* - JavaScript
// {value: 1, done: false} console.log(iterator.next()); // {value: 2, done: false} console.log(iterator.next()); // {value: 3, done: false} console.log(iterator.next()); // {value: 4, done: false} console.log(iterator.next()); // {value: 5, done: false} console.log(iterator.next()); // {value: undefined, done: true} other iterable objects besides generator objects, yield* can also yield other
kinds of iterables (e.g., arrays, strings, or arguments objects).
Authoring MathML - MathML
you must run the programs on your computer and have some
kind of workflow to get the web pages at the end ; that may be a bit tedious.
Web media technologies
this includes recommendations for what formats to use for what
kinds of content, best practices including how to provide fallbacks and how to prioritize media types, and also includes general browser support information for each media container and codec.
Privacy, permissions, and information security
personal and private information <what
kind of information is private or personal?> privacy risks <what are ways personal information can be gotten by third parties?> fingerprinting fingerprinting is a technique used to gather a variety of information that's made available by a user's browser and collating it until it becomes possible to uniquely identify that user's browser.
How to make PWAs installable - Progressive web apps (PWAs)
the js13kpwa.webmanifest file of the js13kpwa web app is included in the <head> block of the index.html file using the following line of code: <link rel="manifest" href="js13kpwa.webmanifest"> there are a few common
kinds of manifest file that have been used in the past: manifest.webapp was popular in firefox os app manifests, and many use manifest.json for web manifests as the contents are organized in a json structure.
<a> - SVG: Scalable Vector Graphics
see warning below */ svg|a:link, svg|a:visited { cursor: pointer; } svg|a text, text svg|a { fill: blue; /* even for text, svg uses fill over color */ text-decoration: underline; } svg|a:hover, svg|a:active { outline: dotted 1px blue; } since this element shares its tag name with html's <a> element, selecting a with css or queryselector may apply to the wrong
kind of element.
Subresource Integrity - Web security
subresource integrity enables you to mitigate some risks of attacks such as this, by ensuring that the files your web application or web document fetches (from a cdn or anywhere) have been delivered without a third-party having injected any additional content into those files — and without any other changes of any
kind at all having been made to those files.
Web security
this article provides an overview of tls and the
kinds of decisions you need to make when securing your content.