Search completed in 1.25 seconds.
478 results for "declare":
Your results are loading. Please wait...
ReferenceError: assignment to undeclared variable "x" - JavaScript
the javascript strict mode-only exception "assignment to undeclated variable" occurs when the value has been assigned to an undeclared variable.
... message referenceerror: assignment to undeclared variable "x" (firefox) referenceerror: "x" is not defined (chrome) referenceerror: variable undefined in strict mode (edge) error type referenceerror warning in strict mode only.
... a value has been assigned to an undeclared variable.
...And 10 more matches
TypeError: variable "x" redeclares argument - JavaScript
the javascript strict mode-only exception "variable redeclares argument" occurs when the same variable name occurs as a function parameter and is then redeclared using a var assignment in a function body again.
... message typeerror: variable "x" redeclares argument (firefox) error type typeerror warning in strict mode only.
... the same variable name occurs as a function parameter and is then redeclared using a var assignment in a function body again.
... examples invalid cases in this case, the variable "arg" redeclares the argument.
WebIDL bindings
note that this allows callees to declare their methods as taking an nsastring& or nsstring& if desired.
...this can mean xpcom interfaces (whether declared in xpidl or not) or it can mean some type that there's a castable native unwrapping function for.
... on-stack typed arrays can be declared as rootedtypedarray<typedarraytype> (e.g.
...And 19 more matches
Grammar and types - JavaScript
var declares a variable, optionally initializing it to a value.
... let declares a block-scoped, local variable, optionally initializing it to a value.
... const declares a block-scoped, read-only named constant.
...And 19 more matches
Add to iPhoto
declaring the apis the first thing we have to do is declare the mac os x apis we'll be using.
... for the sake of organization, i chose to implement each system framework (and, mind you, i only declare the apis i actually use, not all of them) as a javascript object containing all the types and methods that framework's api.
...these are declared near the top of the code: const osstatus = ctypes.int32_t; const cfindex = ctypes.long; const optionbits = ctypes.uint32_t; osstatus used to represent the status code resulting from an operation.
...And 18 more matches
Following the Android Toasts Tutorial from a JNI Perspective
declare the types we will start by declaring the types needed.
...when something is declared, we are stating the sig and the name.
... so let us now declare the types for our toast example.
...And 13 more matches
Introduction to XPCOM for the DOM
furthermore, a class can be de declared to be "abstract" if it declares some methods but does not implement them entirely.
... pushing this concept to its maximum, a class can be "purely virtual" if it declares methods without implementing any of them.
...pure virtual methods are declared with the following syntax: virtual nsresult functionfoo() = 0; an interface is thus simply a c++ class where all the member functions are declared as pure virtual functions.
...And 12 more matches
Declaring types
the ctypes object offers a number of constructor methods that let you declare types.
...each type you declare using js-ctypes corresponds to a compatible c declaration.
... types are declared in terms of other, already defined types.
...And 12 more matches
IPDL Tutorial
all messages for multi-process plugins and tabs in firefox are declared in the ipdl language.
...an ipdl protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent.
... the parent actor is typically the more permanent side of the conversation: parent/child actors parent child ipc tabs chrome process content process ipc plugins content process plugin process each protocol is declared in a separate file.
...And 11 more matches
Using js-ctypes
on windows, for example, you might load the system user32 library like this: var lib = ctypes.open("user32.dll"); on mac os x, you can load the core foundation library from the core foundation framework like this: var corefoundation = ctypes.open("/system/library/frameworks/corefoundation.framework/corefoundation"); the returned object is a library object that you use to declare functions and data types for use with the loaded library.
... using the library you may need to declare new types.
...you will almost certainly need to declare one or more functions, so that you can call them.
...And 11 more matches
XPIDL
types can of course be one of the fundamental types, or any other type declared via a typedef, interface, or a native type.
...to declare a webidl interface in xpidl, write webidl interfacename;.
... methods and attributes interfaces declare a series of attributes and methods.
...And 10 more matches
Standard OS Libraries
); /* note: if you go to getcursorpos page on msdn, it says first argument is of structure point, so lets create that structure, * the link here shows that that x and y are type long which is ctypes.long */ // https://msdn.microsoft.com/en-us/library/windows/desktop/dd162805%28v=vs.85%29.aspx var point = new ctypes.structtype("tagpoint", [ { "x": ctypes.long }, { "y": ctypes.long } ]); /* declare the signature of the function we are going to call */ var getcursorpos = lib.declare('getcursorpos', ctypes.winapi_abi, ctypes.bool, point.ptr ); /* use it like this */ var point = point(); var ret = getcursorpos(point.address()); components.utils.reporterror(ret); components.utils.reporterror(point); lib.close(); resources for winapi githubgists :: noitidart / search · winap...
...esource://gre/modules/ctypes.jsm'); var gdk = ctypes.open('libgdk-x11-2.0.so.0'); // types var gint = ctypes.int; var gdkdevice = ctypes.structtype('gdkdevice'); var gdkmodifiertype = ctypes.int; var gdkwindow = ctypes.structtype('gdkwindow'); var void = ctypes.void_t; // https://developer.gnome.org/gdk3/stable/gdk3-windows.html#gdk-get-default-root-window var gdk_get_default_root_window = gdk.declare('gdk_get_default_root_window', ctypes.default_abi, gdkwindow.ptr // return - the root window, which is top most parent of all windows ); // in gdk2 we have to use gdk_window_get_pointer, but in gdk3 it was deprecated and have to use gdk_window_get_device_position https://developer.gnome.org/gdk3/stable/gdk3-windows.html#gdk-window-get-pointer var gdk_window_get_pointer = gdk.declare('gdk_...
... types var gint = ctypes.int; var gdkdevice = ctypes.structtype('gdkdevice'); var gdkdevicemanager = ctypes.structtype('gdkdevicemanager'); var gdkdisplay = ctypes.structtype('gdkdisplay'); var gdkmodifiertype = ctypes.int; var gdkwindow = ctypes.structtype('gdkwindow'); // https://developer.gnome.org/gdk3/stable/gdk3-windows.html#gdk-get-default-root-window var gdk_get_default_root_window = gdk.declare('gdk_get_default_root_window', ctypes.default_abi, gdkwindow.ptr // return - the root window, which is top most parent of all windows ); // in gdk2 we have to use gdk_window_get_pointer, but in gdk3 it was deprecated and have to use gdk_window_get_device_position // https://developer.gnome.org/gdk3/stable/gdk3-windows.html#gdk-window-get-device-position var gdk_window_get_device_position ...
...And 10 more matches
Understanding WebAssembly text format - WebAssembly
all code in a webassembly module is grouped into functions, which have the following pseudo-code structure: ( func <signature> <locals> <body> ) the signature declares what the function takes (parameters) and returns (return values).
... the locals are like vars in javascript, but with explicit types declared.
... each parameter has a type explicitly declared; wasm currently has four available number types (plus reference types; see the reference types) section below): i32: 32-bit integer i64: 64-bit integer f32: 32-bit float f64: 64-bit float a single parameter is written (param i32) and the return type is written (result i32), hence a binary function that takes two 32-bit integers and returns a 64-bit float would be written like this: (fun...
...And 10 more matches
Using Objective-C from js-ctypes
get a reference to a class class definitions are retrieved with the objc_getclass function, declared in /usr/include/objc/runtime.h.
...*name); in /usr/include/objc/objc.h, class is defined as an opaque type by the following: typedef struct objc_class *class; in this example, we need the classnsspeechsynthesizer, which is retrieved with the following code: class nsspeechsynthesizer = objc_getclass("nsspeechsynthesizer"); registering a selector selectors can be registered and retrieved with sel_registername function, also declared in /usr/include/objc/runtime.h.
...this message can be sent using the objc_msgsend function, and its variants, which are declared in /usr/include/objc/message.h.
...And 9 more matches
var - JavaScript
the var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value.
... the scope of a variable declared with var is its current execution context and closures thereof, which is either the enclosing function and functions declared within it, or, for variables declared outside any function, global.
... 'use strict'; function foo() { var x = 1; function bar() { var y = 2; console.log(x); // 1 (function `bar` closes over `x`) console.log(y); // 2 (`y` is in scope) } bar(); console.log(x); // 1 (`x` is in scope) console.log(y); // referenceerror in strict mode, `y` is scoped to `bar` } foo(); variables declared using var are created before any code is executed in a process known as hoisting.
...And 9 more matches
Localization - Archive of obsolete content
xml has a syntax which allows you to declare custom entities.
...in english, the &findlabel; entity will probably be declared to have the text "find".
... dtd files entities are declared in document type definition (dtd) files.
...And 7 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
we'll talk about variables later, but in javascript it is possible to declare a variable without assigning a value to it.
... variables new variables in javascript are declared using one of three keywords: let, const, or var.
... let allows you to declare block-level variables.
...And 7 more matches
Index - Archive of obsolete content
662 tamarin-central rev 703:2cee46be9ce0 tamarin-central rev 703:2cee46be9ce0 was declared stable on 12/02/08.
...an element declared in a bound document using a single tag can then be constructed out of multiple child elements, and this implementation is hidden from the bound document.
...a query is declared with the query tag (new to ff3; ff2 only worked with rdf datasources and had no query tag), which you would place directly inside the <template>.
...And 6 more matches
Library
its methods let you declare symbols exported by the library, and to manage the library.
... method overview close(); cdata declare(name, [abi, ], returntype[, argtype1, ...]); methods close() closes the library.
... declare() declares an api from the native library, allowing it to be used from javascript.
...And 6 more matches
let - JavaScript
the let statement declares a block-scoped local variable, optionally initializing it to a value.
... syntax let var1 [= value1] [, var2 [= value2]] [, ..., varn [= valuen]; parameters var1, var2, …, varn the names of the variable or variables to declare.
... value1, value2, …, valuen optional for each variable declared, you may optionally specify its initial value to any legal javascript expression.
...And 6 more matches
Finding window handles - Archive of obsolete content
nterfacerequestor) .getinterface(ci.nsibasewindow); var hwndstring = basewindow.nativehandle; components.utils.import('resource://gre/modules/ctypes.jsm'); var user32 = ctypes.open('user32.dll'); /* http://msdn.microsoft.com/en-us/library/ms633539%28v=vs.85%29.aspx * bool winapi setforegroundwindow( * __in_ hwnd hwnd * ); */ var setforegroundwindow = user32.declare('setforegroundwindow', ctypes.winapi_abi, ctypes.bool, // return bool ctypes.voidptr_t // hwnd ); var hwnd = ctypes.voidptr_t(ctypes.uint64(hwndstring)); var rez_setforegroundwindow = setforegroundwindow(hwnd); console.log('rez_setforegroundwindow:', rez_setforegroundwindow, rez_setforegroundwindow.tostring()); user32.close(); mac os x objective-c components.utils.import('resource:/...
...rfacerequestor) .getinterface(ci.nsibasewindow); var nswindowstring = basewindow.nativehandle; components.utils.import('resource://gre/modules/ctypes.jsm'); var objc = ctypes.open(ctypes.libraryname('objc')); // types let id = ctypes.voidptr_t; let sel = ctypes.voidptr_t; // constants let nil = ctypes.voidptr_t(0); //common functions let sel_registername = objc.declare('sel_registername', ctypes.default_abi, sel, ctypes.char.ptr); let objc_msgsend = objc.declare('objc_msgsend', ctypes.default_abi, id, id, sel, '...'); /* https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/nsapplication_class/index.html#//apple_ref/occ/instp/nsapplication/orderfront: * [nswindowptr orderfront:nil] */ var orderfront = sel_registername...
...ctypes.unsigned_int : ctypes.unsigned_long; var xid = card32; var gdk = ctypes.open('libgdk-x11-2.0.so.0'); var gdk_x11_drawable_get_xid = gdk.declare('gdk_x11_drawable_get_xid', ctypes.default_abi, xid, gdkdrawable.ptr); var gdkwindowptrstring = basewindow.nativehandle; var gdkwinptr = gdkwindow.ptr(ctypes.uint64(gdkwindowptrstring)); var gdkdrawptr = ctypes.cast(gdkwinptr, gdkdrawable.ptr); var xidofwin = gdk_x11_drawable_get_xid(gdkdrawptr); gdkwindow* to gtkwindow* how to get the gtkwindow* from the gdkwindow*?
...And 5 more matches
Storing the information you need — Variables - Learn web development
initializing a variable once you've declared a variable, you can initialize it with a value.
...again, you can return your variable values by simply typing their name into the console — try these again: myname; myage; you can declare and initialize a variable at the same time, like this: let mydog = 'rover'; this is probably what you'll do most of the time, as it is quicker than doing the two actions on two separate lines.
... for a start, if you write a multiline javascript program that declares and initializes a variable, you can actually declare a variable with var after you initialize it and it will still work.
...And 5 more matches
Index - Web APIs
WebAPIIndex
354 body api, body, experimental, fetch, fetch api, interface, reference, request the body mixin of the fetch api represents the body of the response/request, allowing you to declare what its content type is and how it should be handled.
... 940 document.onbeforescriptexecute api, dom, non-standard, property, reference, element.onbeforescriptexecute fired when the code in a <script> element declared in an html document is about to start executing.
...may declare format of an unparsed entity or formally declare the document's processing instruction targets.
...And 5 more matches
Closures - JavaScript
lexical scoping consider the following example code: function init() { var name = 'mozilla'; // name is a local variable created by init function displayname() { // displayname() is the inner function, a closure alert(name); // use variable declared in the parent function } displayname(); } init(); init() creates a local variable called name and a function called displayname().
...however, since inner functions have access to the variables of outer functions, displayname() can access the variable name declared in the parent function, init().
... run the code using this jsfiddle link and notice that the alert() statement within the displayname() function successfully displays the value of the name variable, which is declared in its parent function.
...And 5 more matches
JavaScript Object Management - Archive of obsolete content
notice how the 〈namespace〉 namespace is declared using var.
...if you have to use a reference to this inside the function, declare a variable called that that equals this, and use that in the anonymous function.
... a javascript code module is a regular js file that specifies which of the declared elements in it are public.
...And 4 more matches
Building accessible custom components in XUL - Archive of obsolete content
by implementing dhtml accessibility techniques, web developers can declare that generic html elements are really acting as specific gui controls (such as a treeitem within a treeview).
...further reading grid element reference description element reference label element reference grid tutorial label tutorial adding roles with dhtml accessibility download stage-2.zip install stage-2.xpi using the new dhtml accessibility techniques in firefox 1.5, we can declare the role of each element in our spreadsheet.
...we will need to declare the namespace (xmlns:x2="http://www.w3.org/tr/xhtml2") so we can add an xhtml2:role attribute to each xul element.
...And 4 more matches
Grids - Archive of obsolete content
ArchiveMozillaXULTutorialGrids
inside a grid, you declare two things, the columns that are used and the rows that are used.
... declaring a grid to declare a set of rows, use the rows tag, which should be a child element of grid.
... similarly, the columns are declared with the columns element, which should be placed as a child element of the grid.
...And 4 more matches
JNI.jsm
functions are declared similar to js-ctypes but in a very different syntax.
... unlike c from js-ctypes, defining constants is not a manual magic number method in jni, it is declared the same way we define functions, except in jni they are called fields.
... method overview cdata getforthread(); cdata loadclass(cdata ajenv, string aclassfullyqualifiedname, [optional] object adeclares); cdata newstring(cdata ajenv, string astr); string readstring(cdata ajenv, cdata ajavastring); void unloadclasses(); methods getforthread() blah blah cdata getforthread(); parameters this function does not take any arguments.
...And 4 more matches
Using XPCOM Utilities to Make Things Easier
modules such as the networking libraries in gecko ("necko") have over 50 components declared in a single nsmodulecomponentinfo array like this.
...the usual practice is to put the class id (cid) into a #define and use the define to declare the cid in the components list.
...when you use these implementation macros, you must declare a constructor for the object, and this keeps you from having to write a factory object.
...And 4 more matches
Detailed XPCOM hashtable guide
mozilla's hashtable implementations mozilla has several hashtable implementations, which have been tested and, tuned, and hide the inner complexities of hashtable implementations: pldhash - low-level c api; stores keys and data in one large memory structure; uses the heap efficiently; client must declare an "entry class" and may not hold onto entry pointers.
... nsdatahashtable/nsinterfacehashtable/nsclasshashtable - high-level c++ wrappers around pldhash; simplifies the common usage pattern mapping a simple keytype to a simple datatype; client does not need to declare or manage an entry class; nsdatahashtable datatype is a scalar such as pruint32; nsinterfacehashtable datatype is an interface; nsclasshashtable datatype is a class pointer owned by the hashtable.
... you must declare an entry struct type, deriving from pldhashentryhdr.
...And 4 more matches
repeating-conic-gradient() - CSS: Cascading Style Sheets
like in non-repeating gradients, the first and last color stops are assumed to be 0 and either 100% or 360deg if not explicitly declared.
...the colors transition as as if spun around the center of a circle, starting at the top if no from <angle> is declared, and going clockwise for the the size of the angle that is the different between the largest and smallest color angle, then repeating.
...if you don't declare an angle for either, you'll get a non-repeating conic gradient.
...And 4 more matches
Localizations and character encodings - Developer guides
the html specification recommends the use of the utf-8 encoding (which can represent all of unicode) and regardless of the encoding used requires web content to declare what encoding was used.
... to specify that a page is using, for example, the utf-8 character encoding (as per the recommendation), simply place the following line in the <head> block: <meta charset="utf-8"> details and browser internals when the encoding is declared by web content like the html specification requires, firefox will use that encoding for turning the bytes into the internal representation.
...in the 1990s, it was common to leave the encoding undeclared and to use a region-specific encoding that wasn't able to represent all of unicode.
...And 4 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
to set a maximum length in characters, declare the maxlength attribute with a positive integer value.
... in certain circumstances, you may want to declare type="content-primary".
...in firefox itself, the content region of the active tab is declared as a browser element with type="content-primary".
...And 3 more matches
Dehydra Object Reference - Archive of obsolete content
for example, class types and typedefs are declared and will have a .loc property.
... intrinsic types such as "int" are not declared and will not have a .loc.
... .isdecl boolean flag the variable is being declared (local variables only).
...And 3 more matches
Document Object Model - Archive of obsolete content
for example, the following two lines which open a new window are functionally equivalent: window.open("test.xul","_new"); open("test.xul","_new"); when you declare a function or a variable at the top level of a script, that is outside another function, you are actually declaring a property of the global object.
... in xul, each function you declare will be set as a property of the window object.
... function gettext(){ return "message"; } alert(gettext()); alert(window.gettext()); thus, if you want to access variables or call a function declared in a script used by another window, you just need to access it using the other window's window object.
...And 3 more matches
Declaring and Calling Functions
functions are declared using the library object's declare() method.
... once declared, functions can be called using standard function syntax.
... example: no input parameters in this example, we declare the libc clock() function, which returns the elapsed time since system startup, then fetch and output that value.
...And 3 more matches
TypeError: invalid assignment to const "x" - JavaScript
javascript const declarations can't be re-assigned or redeclared.
...it cannot change through re-assignment, and it can't be redeclared.
... in javascript, constants are declared using the const keyword.
...And 3 more matches
SyntaxError: missing = in const declaration - JavaScript
it cannot change through re-assignment, and it can't be redeclared.
... in javascript, constants are declared using the const keyword.
... an initializer for a constant is required; that is, you must specify its value in the same statement in which it's declared (which makes sense, given that it can't be changed later).
...And 3 more matches
const - JavaScript
the value of a constant can't be changed through reassignment, and it can't be redeclared.
... description this declaration creates a constant whose scope can be either global or local to the block in which it is declared.
...you must specify its value in the same statement in which it's declared.
...And 3 more matches
Statements and declarations - JavaScript
declarations var declares a variable, optionally initializing it to a value.
... let declares a block scope local variable, optionally initializing it to a value.
... const declares a read-only named constant.
...And 3 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
the functions are implemented by the nsdraganddrop object, which is declared in the file nsdraganddrop.js, which was included in one of the script tags.
...the observer is an object that you declare yourself.
...the observer is declared in a script which you would include in the xul file using the script tag.
...And 2 more matches
Elements - Archive of obsolete content
it should usually declare xbl as the default namespace (unless an xbl namespace prefix is used) and it may additionally declare other namespace prefixes used in your binding.
...namespaces in xml besides the default namespace, you can declare any amount of additional namespaces to handle your content.
...the part before the colon is a namespace prefix so you must declare the xul namespace as well.
...And 2 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
a query is declared with the query tag (new to ff3; ff2 only worked with rdf datasources and had no query tag), which you would place directly inside the <template>.
... 1152 preference preferences system, xul elements, xul reference declares a preference that may be adjusted in a prefpane.
...the children of the rule are used to declare the conditions in which the rule matches and the content that is generated.
...And 2 more matches
Anonymous Content - Archive of obsolete content
declaring scrollbar example the example below shows how a scrollbar might be declared (it has been simplified a bit from the real thing): <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="scrollbarbinding"> <content> <xul:scrollbarbutton type="decrement"/> <xul:slider flex="1"> <xul:thumb/> </xul:slider> <xul:scrollbarbutton type="increment"/> </c...
...ontent> </binding> </bindings> this file contains a single binding, declared with the binding element.
...the content tag is used to declare anonymous content that will be added to the scroll bar.
...And 2 more matches
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical example one of the advantages of javascript putting function declarations into memory before it executes any code segment is that it allows you to use a function before you declare it in your code.
...the variables can be initialized and used before they are declared.
...if a variable is declared and initialized after using it, the value will be undefined.
...And 2 more matches
SyntaxError: redeclaration of formal parameter "x" - JavaScript
the javascript exception "redeclaration of formal parameter" occurs when the same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again.
... message syntaxerror: let/const redeclaration (edge) syntaxerror: redeclaration of formal parameter "x" (firefox) syntaxerror: identifier "x" has already been declared (chrome) error type syntaxerror what went wrong?
... the same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again.
...And 2 more matches
Functions - JavaScript
however, object references are values, too, and they are special: if the function changes the referred object's properties, that change is visible outside the function, as shown in the following example: /* declare the function 'myfunc' */ function myfunc(theobject) { theobject.brand = "toyota"; } /* * declare variable 'mycar'; * create and initialize a new object; * assign reference to it to 'mycar' */ var mycar = { brand: "honda", model: "accord", year: 1998 }; /* logs 'honda' */ console.log(mycar.brand); /* pass object reference to the function */ myfunc(mycar); /* * logs 'toyota' as the...
... (function() { statements })(); iife are function expressions that are invoked as soon as the function is declared.
...attempting to use it outside the function's body results in an error (or undefined if the function name was previously declared via a var statement).
...And 2 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
<html xmlns="http://www.w3.org/1999/xhtml"> <body> <!-- some xhtml tags here --> <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="200px"> <!-- some svg tags here --> </svg> <!-- some xhtml tags here --> </body> </html> in this example the xmlns parameter on the root <html> element declares the default namespace to be xhtml.
...the <svg> element has its own xmlns parameter, and by redeclaring the default namespace, this tells the user agent that the <svg> element and its descendants (unless they also redeclare the default namespace) belong to svg.
...tml xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <body> <h1>svg embedded inline in xhtml</h1> <svg:svg width="300px" height="200px"> <svg:circle cx="150" cy="100" r="50" fill="#ff0000"/> </svg:svg> </body> </html> note that because a namespace prefix is used for the <svg:svg> element and its child <svg:circle>, it wasn't necessary to redeclare the default namespace.
...And 2 more matches
The Essentials of an Extension - Archive of obsolete content
the first word in a line tells firefox what it is that is being declared (content, skin, locale, or others mentioned later on).
...you can declare overlays for any window or dialog in firefox, but overlaying the main browser window is the most common case by far.
...the first line in the body of the function declares a variable that will hold the stringbundle element defined in the overlay.
... the variable is declared using let, which is similar to var but with more restricted scope.
Introduction to XBL - Archive of obsolete content
each binding element declares a single binding.
...this declares that we are using xbl syntax.
...a binding has five types of things that it declares: content: child elements that are added to the element that the binding is bound to.
...the box has been declared to have a class of okcancelbuttons.
TypeScript support in Svelte - Learn web development
let's import the type and use it to declare the todo property.
...in those cases you can declare the typed variable in a different statement, like this: let completetodos: number $: completedtodos = todos.filter((t: todotype) => t.completed).length you can't specify the type in the reactive assignment itself.
... then import the todotype and declare the todos prop as an array of todotype.
... give it the following content: export type jsonvalue = string | number | boolean | null | jsonvalue[] | { [key: string]: jsonvalue } the | operator lets us declare variables that could store values of two or more types.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
we will also see how to declare and clean-up event listeners on dom elements.
...'check' : 'uncheck'} all</button> <button type="button" class="btn btn__primary" disabled={completedtodos === 0} on:click={removecompleted}>remove completed</button> </div> we've also declared a reactive completedtodos variable to enable or disable the remove completed button.
...to declare props.
... note: you might be wondering why we need to declare a new variable for component binding — why can't we just call todosstatus.focus()?
JS::PersistentRooted
bool operator==(const t& other) const description js::persistentrooted<t> declares a variable of type t whose value is always rooted.
... before spidermonkey 38, persistentrooted<t> itself cannot be a global variable, but from spidermonkey38, it can be declared as a global variable, and initialized later with init() method (bug 1107639).
...#include <mozilla/maybe.h> // declare global variable.
...mozilla::maybe<js::persistentrootedvalue> persistentval; // you can also declare it just as a pointer, instead of using maybe.
XPCOM array guide
MozillaTechXPCOMGuideArrays
it is also usually declared as an inline member rather than a pointer.
... for example, here is its use in a class: class nodecontainer { public: void addnode(nsinode* node); private: nscomarray<nsinode> mnodes; }; // typesafety of mnodes ensures that we only append an nsinode* void nodecontainer::addnode(nsinode* node) { mnodes.appendobject(node); } nscomarray<t> can also be declared on the stack to collect a temporary list of objects and manipulate them.
...it is also usually declared as an inline member rather than a pointer.
... for example, here is its use in a class: class medialist { public: void addmedium(const nsstring& amedium); private: nstarray<nsstring> mmedia; }; // typesafety of mmedia ensures that we only append an nsstring void nodecontainer::addmedium(const nsstring& amedium) { mmedia.appendelement(amedium); } nstarray<t> can also be declared on the stack to collect a temporary list of objects and manipulate them.
js-ctypes reference
the library object is used mostly to declare native functions provided by the library so that js-ctypes knows how to call them.
... see library.declare() for instructions on how to declare these functions.
...first, they provide a concrete representation of different data types, allowing the programmer to describe the arguments and return type of a native function (see library.declare()).
...you declare the arguments and return value of a native function with ctype objects.
cross-fade() - CSS: Cascading Style Sheets
-fade( url(white.png) 25%, url(black.png)); /* 25% white, 75% black */ cross-fade( url(white.png), url(black.png)); /* 50% white, 50% black */ cross-fade( url(white.png) 75%, url(black.png)); /* 75% white, 25% black */ cross-fade( url(white.png) 100%, url(black.png)); /* fully white */ cross-fade( url(green.png) 75%, url(red.png) 75%); /* both green and red at 75% */ if no percentages are declared, both the images will be 50% opaque, with a cross-fade rendering as an even merge of both images.
... if no percentages are declared and three images are included, each image will be 33.33% opaque.
...black.png), 0%); /* fully black */ cross-fade(url(white.png), url(black.png), 25%); /* 25% white, 75% black */ cross-fade(url(white.png), url(black.png), 50%); /* 50% white, 50% black */ cross-fade(url(white.png), url(black.png), 75%); /* 75% white, 25% black */ cross-fade(url(white.png), url(black.png), 100%); /* fully white */ in the implemented syntax, the two comma-separated images are declared first, followed by a comma and required percent value.
...the percent is the opacity of the first declared image.
linear-gradient() - CSS: Cascading Style Sheets
linear-gradient(red 10%, 30%, blue 90%); if two or more color stops are at the same location, the transition will be a hard line between the first and last colors declared at that location.
...a color can be declared as two adjacent color stops by including both positions in the css declaration.
... the following three gradients are equivalent: linear-gradient(red 0%, orange 10%, orange 30%, yellow 50%, yellow 70%, green 90%, green 100%); linear-gradient(red, orange 10% 30%, yellow 50% 70%, green 90%); linear-gradient(red 0%, orange 10% 30%, yellow 50% 70%, green 90% 100%); by default, if there is no color with a 0% stop, the first color declared will be at that point.
... similarly, the last color will continue to the 100% mark, or be at the 100% mark if no length has been declared on that last stop.
Functions - JavaScript
function map(f, a) { let result = []; // create a new array let i; // declare variable for (i = 0; i != a.length; i++) result[i] = f(a[i]); return result; } in the following code, the function receives a function defined by a function expression and executes it for every element of the array received as a second argument.
... function map(f, a) { let result = []; // create a new array let i; // declare variable for (i = 0; i != a.length; i++) result[i] = f(a[i]); return result; } const f = function(x) { return x * x * x; } let numbers = [0, 1, 2, 5, 10]; let cube = map(f,numbers); console.log(cube); function returns: [0, 1, 8, 125, 1000].
...*/ function square(n) { return n * n } the scope of a function is the function in which it is declared (or the entire program, if it is declared at the top level).
... using the arguments object, you can call a function with more arguments than it is formally declared to accept.
Classes - JavaScript
to declare a class, you use the class keyword with the name of the class ("rectangle" here).
...you first need to declare your class and then access it, otherwise code like the following will throw a referenceerror: const p = new rectangle(); // referenceerror class rectangle {} class expressions a class expression is another way to define a class.
... as seen above, the fields can be declared with or without a default value.
... private fields can only be declared up-front in a field declaration.
undefined - JavaScript
typeof operator and undefined alternatively, typeof can be used: var x; if (typeof x === 'undefined') { // these statements execute } one reason to use typeof is that it does not throw an error if the variable has not been declared.
... // x has not been declared before if (typeof x === 'undefined') { // evaluates to true without errors // these statements execute } if (x === undefined) { // throws a referenceerror } however, there is another alternative.
... javascript is a statically scoped language, so knowing if a variable is declared can be read by seeing whether it is declared in an enclosing context.
... var x; if (x === void 0) { // these statements execute } // y has not been declared before if (y === void 0) { // throws uncaught referenceerror: y is not defined } specifications specification ecmascript (ecma-262)the definition of 'undefined' in that specification.
typeof - JavaScript
(logical not) operator are equivalent to boolean() // symbols typeof symbol() === 'symbol' typeof symbol('foo') === 'symbol' typeof symbol.iterator === 'symbol' // undefined typeof undefined === 'undefined'; typeof declaredbutundefinedvariable === 'undefined'; typeof undeclaredvariable === 'undefined'; // objects typeof {a: 1} === 'object'; // use array.isarray or object.prototype.tostring.call // to differentiate regular objects from arrays typeof [1, 2, 4] === 'object'; typeof new date() === 'object'; typeof /regex/ === 'object'; // see regular expressions section for historical results // the following are...
...even with undeclared identifiers, typeof will return 'undefined'.
... but with the addition of block-scoped let and statements/const using typeof on let and const variables (or using typeof on a class) in a block before they are declared will throw a referenceerror.
... typeof undeclaredvariable === 'undefined'; typeof newletvariable; // referenceerror typeof newconstvariable; // referenceerror typeof newclass; // referenceerror let newletvariable; const newconstvariable = 'hello'; class newclass{}; exceptions all current browsers expose a non-standard host object document.all with type undefined.
class - JavaScript
but unlike a class expression, a class declaration doesn't allow an existing class to be declared again and will throw a syntaxerror if attempted.
... class polygon { constructor(height, width) { this.name = 'polygon'; this.height = height; this.width = width; } } class square extends polygon { constructor(length) { super(length, length); this.name = 'square'; } } attempting to declare a class twice re-declaring a class using the class declaration throws a syntaxerror.
... class foo {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has already been declared the same error is thrown when a class has been defined before using the class expression.
... let foo = class {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has already been declared specifications specification ecmascript (ecma-262)the definition of 'class definitions' in that specification.
Introduction to XUL - Archive of obsolete content
and finally, any namespaces used in the document must be declared.
...broadcaster nodes are declared as <broadcaster> elements in the xul description, and are involved with the communication of changes of state between widgets.
... the next element in the example declares the menubar.
Adding HTML Elements - Archive of obsolete content
xhtml namespace in order to use html elements in a xul file, you must declare that you are doing so using the xhtml namespace.
...xmlns:html="http://www.w3.org/1999/xhtml" this is a declaration of html much like the one we used to declare xul.
...href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> then, you can use html tags as you would normally, keeping in mind the following: you must add a html: prefix to the beginning of each tag, assuming you declared the html namespace as above.
Creating a Window - Archive of obsolete content
here is a line by line breakdown of the code above: <?xml version="1.0"?> this line simply declares that this is an xml file.
... <window this line declares that you are describing a window.
... xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> this line declares the namespace for xul, which you should put on the window element to indicate that all of its children are xul.
Introduction to RDF - Archive of obsolete content
you can see the namespace for rdf was declared so that the rdf elements are recognized properly.
...each of three fields have been given a namespace of animals, the url of which has been declared on the rdf tag.
...this is much like how html lists are declared.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
essentially, a constructor in javascript is usually declared at the instance of a class.
... 174 global variable codingscripting, glossary a global variable is a variable that is declared in the global scope in other words, a variable that is visible from all other scopes.
... 528 undefined codingscripting, glossary, javascript, needscontent undefined is a primitive value automatically assigned to variables that have just been declared, or to formal arguments for which there are no actual arguments.
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
initially css didn't provide a "default" keyword and the only way to restore the default value of a property is to explicitly re-declare that property.
...</div> if the same property is declared in both rules, the conflict is resolved first through specificity, then according to the order of the css declarations.
...using shorthand with only some attributes is possible and correct, but it must be remembered that undeclared attributes are automatically reset to their default values.
Solve common problems in your JavaScript code - Learn web development
one of the most common errors is to declare the function, but not call it anywhere.
... for example: function myfunction() { alert('this is my function.'); }; this code won't do anything unless you call it with the following statement: myfunction(); function scope remember that functions have their own scope — you can't access a variable value set inside a function from outside the function, unless you declared the variable globally (i.e.
... variables how do you declare a variable?
Componentizing our Svelte app - Learn web development
inside this file we will declare a filter prop, and then copy the relevant markup over to it from todos.svelte.
... we will just declare the onclick prop assigning a dummy handler to prevent errors, like this: export let onclick = (clicked) => {} and we'll declare the following reactive statement — $: onclick(filter) — to call the onclick handler whenever the filter variable is updated.
...let's declare the todo prop and move the code from the todos component.
Working with Svelte stores - Learn web development
behind the scenes svelte has generated the code to declare the local variable $alert, subscribe to the alert store, update $alert whenever the store's content is modified, and unsubscribe when the component is unmounted.
... we can declare a region that contains dynamic content that should be announced by assistive technologies with the aria-live property followed by the politeness setting, which is used to set the priority with which screen readers should handle updates to that regions.
... unsubscribe function } const set = (new_value) => { if (value === new_value) return // same value, exit value = new_value // update value subs.foreach(sub => sub(value)) // update subscribers } const update = (update_fn) => set(update_fn(value)) // update function return { subscribe, set, update } // store contract } here we declare subs, which is an array of subscribers.
Mozilla DOM Hacking Guide
in idl, location is declared to be a readonly attribute.
... the nsixpcscriptable, nsisupports, and nsiclassinfo member functions, declared with ns_decl_x macros.
...a static array of pointers to objects of type nsiid is then declared.
NSS Developer Tutorial
variables can be declared, at the point they are first used.
... the exact-width integer types in nspr should be used, in preference to those declared in <stdint.h> (which will be used by nspr in the future).
...unfortunately, public headers may declare private functions, for historical reasons.
TLS Cipher Suite Discovery
the table and the number of entries are declared in "ssl.h", as follows: /* constant table enumerating all implemented ssl 2 and 3 cipher suites.
...this function is declared in "ssl.h" as follows: ssl_import secstatus ssl_getciphersuiteinfo( pruint16 ciphersuite, sslciphersuiteinfo *info, pruintn len); the application provides the cipher suite number for which it wants information, the address of a block of memory allocated to receive that information, and the size in bytes of that block of memory.
...the sslciphersuiteinfo structure contains this information, declared in "sslt.h": typedef struct sslciphersuiteinfostr { pruint16 length; pruint16 ciphersuite; /* cipher suite name */ const char * ciphersuitename; /* server authentication info */ const char * authalgorithmname; sslauthtype authalgorithm; /* key exchange algorithm info */ const char * keatypename; sslkeatype keatype; /* symmetric encryption info */ const char * symciphername; sslcipheralgorithm symcipher; pruint16 symkeybits; pr...
JSAPI User Guide
to make native functions callable from javascript, declare a table of jsfunctionspecs describing the functions.
... declare a jspropertyspec array containing information about your custom object's properties, including getters and setters.
... declare a jsfunctionspec array containing information about your custom object's methods.
JSPropertyDescriptor
a descriptor is used to declare whether an attribute can be written to whether it can delete an object that can enumerate and specify content.
... value describes the value of the specified property, which can be any valid javascript value (function, object, string...) configurable declare that the property can be modified and deleted enumerable declare that the property can be enumerated, and the enumerable genus can be traversed by the for...in loop.
... writable declare whether the specified attribute can be rewritten description a descriptor is a property that describes an object's properties.
mozIJSSubScriptLoader
any top-level functions or variables created by the loaded script via var are created as properties of the targetobj target object (but things declared via let and const are not).
... note: undeclared variables in the loaded script will be created as global variables in the caller (ie.: in the caller's global object).
...note: undeclared variables in the loaded script will be created as global variables in the caller (ie.: in the caller's global object).
nsIAccessibleText
coordtype specifies if the coordinates are relative to the screen or to the parent window (see constants declared in nsiaccessiblecoordinatetype.constants).
...coordtype screen coordinates or window coordinates (see constants declared in nsiaccessiblecoordinatetype).
...coordtype specifies if the coordinates are relative to the screen or to the parent window (see constants declared in nsiaccessiblecoordinatetype.constants.
Working with Multiple Versions of Interfaces
getwindowhandle is the tenth method declared in the nsiaccessibledocument.h that firefox 2 was built with, but actually the eighth method in the sdk that i used to build my extension (and hence xpcom component).
...if there is any truth to the story i weave here, then this is because getaccessiblefor is still the very first method declared in nsiaccessibleretrieval.h.
...i did have to delve into my old versions and change: ns_define_static_iid_accessor(...) to ns_declare_static_iid_accessor(...) this ugliness aside, my plan b routine now looks like: hwnd gethwndb(nsidomnode *node){ hwnd self = null; nsresult rv; nscomptr<nsicomponentmanager> compmgr; rv = ns_getcomponentmanager(getter_addrefs(compmgr)); if (ns_failed(rv)){ return self; } nscomptr<nsiaccessibleretrieval_old> refp; //n.b.
Working with windows in chrome code
if we're sure the window that opened the progress dialog declares the canceloperation function, we can use window.opener.canceloperation() to notify it, like this: <button label="cancel" oncommand="opener.canceloperation(); close();" /> using a callback function.
...you could declare a local variable in each window along with corresponding setter functions to keep the "instances" of the variable in sync across windows, but fortunately, there's a better way.
... to declare a shared variable, we need to find a place that exists while the application is running and is easily accessible from the code in different chrome windows.
Working with data
using arrays of pointers if you need to work with c functions that accept arrays of pointers as inputs, you can construct an array of pointers like this: var ptrarraytype = ctypes.char.ptr.array(5); var myarray = ptrarraytype(); var somecfunction = library.declare("somecfunction", ctypes.default_abi, ctypes.void_t, ctypes.char.ptr.array() /*same as ctypes.char.ptr.ptr*/); somecfunction(myarray); line 1 declares a new array type, capable of containing 5 arrays of pointers to c characters.
...line 4 declares the c function that accepts the array as an input, and the last line calls that function.
... using arrays of non-pointers if a function expects an argument that is a pointer to a list of elements, this is how it is accomplished: var myarraytype = ctypes.char.array(5); var myarray = myarraytype(); var somecfunction = library.declare("somecfunction", ctypes.default_abi, ctypes.void_t, ctypes.char.array() /*same as ctypes.char.ptr*/); somecfunction(myarray); second example: var mystruct = ctypes.structtype('foo', [{bar: ctypes.bool}]); var mystructarraytype = mystruct.array(5); var myarray = mystructarraytype(); var somecfunction = library.declare("somecfunction", ctypes.default_abi, ctypes.void_t, mystruct.ptr); somecfunction(myarray); this shows how to pass a buffer containing 5 elements of mystruct, the elements in myarray are not pointers.
ctypes
stdcall_abi used for calling functions declared with stdcall on windows.
...these are declared as stdcall on windows, but do not have mangled names like those used by stdcall_abi above.
...credit for this example is to nmaier (stackoverflow :: getting tb_button is crashing and not working) example of cast and functiontype on windows components.utils.import("resource://gre/modules/ctypes.jsm"); var kernel = ctypes.open("kernel32.dll"); var hmodule = ctypes.uint32_t; var hwnd = ctypes.uint32_t; var lpctstr = ctypes.jschar.ptr; var lpcstr = ctypes.char.ptr; var loadlibrary = kernel.declare("loadlibraryw", ctypes.winapi_abi, hmodule, lpctstr); var getprocaddress = kernel.declare("getprocaddress", ctypes.winapi_abi, ctypes.void_t.ptr, hmodule, lpcstr); var huser = loadlibrary("user32"); var funcptr = getprocaddress(huser, "messageboxw"); // now we have a pointer to a function, let's cast it to the right type var messageboxtype = ctypes.functiontype(ctypes.winapi_abi, ctypes.int32_t...
EventTarget.addEventListener() - Web APIs
getting data into an event listener using the outer scope property when an outer scope contains a variable declaration (with const, let), all the inner functions declared in that scope have access to that variable (look here for information on outer/inner functions, and here for information on variable scope).
... therefore, one of the simplest ways to access data from outside of an event listener is to make it accessible to the scope in which the event listener is declared.
...in the second case, the same previously declared function is used as an event handler, which results in smaller memory consumption because there is only one handler function created.
USBDevice - Web APIs
WebAPIUSBDevice
usbdevice.usbversionmajor read only one of three properties that declare the usb protocol version supported by the device.
... usbdevice.usbversionminor read only one of three properties that declare the usb protocol version supported by the device.
... usbdevice.usbversionsubminor read only one of three properties that declare the usb protocol version supported by the device.
WebGLRenderingContext.getUniformLocation() - Web APIs
the uniform itself is declared in the shader program using glsl.
... the possible values correspond to the uniform names returned by getactiveuniform; see that function for specifics on how declared uniforms map to uniform location names.
... additionally, for uniforms declared as arrays, the following names are also valid: the uniform name without the [0] suffix.
Synchronous and asynchronous requests - Web APIs
xhr.callback = callback; xhr.arguments = array.prototype.slice.call(arguments, 2); xhr.onload = xhrsuccess; xhr.onerror = xhrerror; xhr.open("get", url, true); xhr.send(null); } usage: function showmessage(message) { console.log(message + this.responsetext); } loadfile("message.txt", showmessage, "new message!\n\n"); the signature of the utility function loadfile declares (i) a target url to read (via an http get request), (ii) a function to execute on successful completion of the xhr operation, and (iii) an arbitrary list of additional arguments that are passed through the xhr object (via the arguments property) to the success callback function.
... line 1 declares a function invoked when the xhr operation completes successfully.
... line 5 declares a function invoked when the xhr operation fails to complete successfully.
ARIA: form role - Accessibility
inputs are not forms you do not need to declare role="form" on every form element (inputs, text areas, selects, etc.).
... it should be declared on the html element that wraps the form elements.
... ideally, use the <form> element as the wrapping element and do not declare role="form".
right - CSS: Cascading Style Sheets
WebCSSright
if the element cannot stretch to satisfy both -- for example, if a width is declared -- the position of the element is over-constrained.
...positioned</div> <div id="absolute">absolutely positioned</div> css #relative { width: 100px; height: 100px; background-color: #ffc7e4; position: relative; top: 20px; left: 20px; } #absolute { width: 100px; height: 100px; background-color: #ffd7c2; position: absolute; bottom: 10px; right: 20px; } result declaring both left and right when both left and right are declared, the element will stretch to meet both, unless other constraints prevent it from doing so.
... html <div id="parent">parent <div id="nowidth">no width</div> <div id="width">width: 100px</div> </div> css div { outline: 1px solid #cccccc; } #parent { width: 200px; height: 200px; background-color: #ffc7e4; position: relative; } /* declare both a left and a right */ #width, #nowidth { background-color: #c2ffd7; position: absolute; left: 0; right: 0; } /* declare a width */ #width { width: 100px; top: 60px; } result specifications specification status comment css positioned layout module level 3the definition of 'right' in that specification.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
34 x-ms-acceleratorkey attribute, html, html:microsoft extensions, non-standard, reference, x-ms-acceleratorkey the x-ms-acceleratorkey attribute accessibly declares that an accelerator key has been assigned to an element: the element is activated via javascript when the key(s) are pressed on a keyboard.
...if no size is specified, or an invalid value is specified, the input has no size declared, and the form control will be the default width based on the user agent.
... 235 preloading content with rel="preload" guide, html, javascript, link, media, performance, web performance, as, preload, rel the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in.
Introduction - JavaScript
you do not have to declare all variables, classes, and methods.
... variable data types are not declared (dynamic typing, loosely typed).
... variable data types must be declared (static typing, strongly typed).
block - JavaScript
examples block scoping rules with var or function declaration in non-strict mode variables declared with var or created by function declarations in non-strict mode do not have block scope.
... block scoping rules with let, const or function declaration in strict mode by contrast, identifiers declared with let and const do have block scope: let x = 1; { let x = 2; } console.log(x); // logs 1 the x = 2 is limited in scope to the block in which it was defined.
... note that the block-scoped const c = 2 does not throw a syntaxerror: identifier 'c' has already been declared because it can be declared uniquely within the block.
export - JavaScript
exported modules are in strict mode whether you declare them as such or not.
...each type corresponds to one of the above syntax: named exports: // export features declared earlier export { myfunction, myvariable }; // export individual features (can export var, let, // const, function, class) export let myvariable = math.sqrt(2); export function myfunction() { ...
... }; default exports: // export feature declared earlier as default export { myfunction as default }; // export individual features as default export default function () { ...
for - JavaScript
this expression may optionally declare new variables with var or let keywords.
... variables declared with var are not local to the loop, i.e.
...variables declared with let are local to the statement.
Chrome Authority - Archive of obsolete content
to obtain these privileges, the module must declare its intent with a statement like the following: var {cc, ci} = require("chrome"); the "chrome" built-in pseudo module is provided by the "toolkit/loader" module.
...var xhr = require("x"+"hr"); var modname = "xpcom"; var xpcom = require(modname); var one = require("one"); var two = require("two"); the intention is that developers use require() statements for two purposes: to declare (to security reviewers) what sorts of powers the module wants to use, and to control how those powers are mapped into the module's local namespace.
MMgc - Archive of obsolete content
declare a destructor that zeros out all of the fields of your rcobject.
...dwb dwb stands for declared write barrier.
Mozilla Crypto FAQ - Archive of obsolete content
also, the case itself may be declared moot in light of the new u.s.
... in light of the new encryption export regulations it is also possible that the bernstein case may be declared moot on the basis that professor bernstein is now free to do what he originally requested to do, i.e., publish his encryption source code online.
Building Trees - Archive of obsolete content
<treecol id="date" label="date" flex="1"/> </treecols> <template> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> <treecell label="rdf:http://purl.org/dc/elements/1.1/date"/> </treerow> </treeitem> </treechildren> </template> </tree> note: the tree columns (treecols) are declared outside the template as static content, since they only need to be declared once.
...when using the tree builder, the uri attribute must be declared on the treeitem element.
Rule Compilation - Archive of obsolete content
a query is declared with the query tag (new to ff3; ff2 only worked with rdf datasources and had no query tag), which you would place directly inside the <template>.
...each rule is declared with a rule tag, and you may have more than one.
XML Assignments - Archive of obsolete content
it allows us to declare additional variables that may be used in the action body.
...if a variable is used in the action that doesn't correspond to one declared in an assign element, the default behaviour is to take the corresponding attribute on the result node.
Adding Methods to XBL-defined Elements - Archive of obsolete content
each parameter element is used to declare one parameter for the method.
...none of the elements declared inside the content tag have these properties or methods.
Property Files - Archive of obsolete content
properties in the file are declared with the syntax name=value.
...use a chrome url to read a file from the locale: <stringbundleset id="stringbundleset"> <stringbundle id="strings" src="chrome://myplugin/locale/strings.properties"/> </stringbundleset> like other non-displayed elements, you should declare all your stringbundles inside a stringbundleset element so that they are all kept together.
Templates - Archive of obsolete content
this is used to declare what rdf datasource will be providing the data to create the elements.
...however, the elements inside the template need to be declared differently.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
treecol this is used to declare a column of the tree.
...this declares an element that is used as a table or tree.
New in JavaScript 1.5 - Archive of obsolete content
functions can now be declared inside an if clause.
... functions can now be declared inside an expression.
Common causes of memory leaks in extensions - Extensions
for example: var windows = []; function injavascriptcodemodule(window) { // forgetting or failing to pop the window again windows.push(window); } both of these cases can happen if you forget to declare local variables with var or let, which means they end up belonging to the global scope.
... for example: function implicitdeclarationleak(window) { // implicit variable declaration in the js global, holding a strong ref to the document doc = window.document; } implicitly declared variables can be avoided by using ecmascript 5's strict mode.
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
that means you don't have to declare the type of a variable ahead of time.
...you have to declare types of variables in your code in order to be able to run the java code.
HTML forms in legacy browsers - Learn web development
for example, if you declare input { font-size: 2rem; }, it will impact number, date, and text, but not color or range.
...you can declare appearance: none; to remove the browser styles, but that generally defeats the purpose: as you lose all styling, removing the default look and feel your visitors are used to.
Client-side storage - Learn web development
the javascript file contains five declared constants containing references to the <ul> element the notes will be displayed in, the title and body <input> elements, the <form> itself, and the <button>.
...we will use this in a few places, so we've declared it globally here to make things easier.
Test your skills: variables - Learn web development
variables 1 in this task we want you to: declare a variable called myname.
... declare a variable called myage and initialize it with a value, on the same line.
Ember interactivity: Events, classes and state - Learn web development
when beginning to think about interactivity, it's good to declare what each component's goals and responsibilities are.
...the @action decorator declares that the function is an "action", meaning it's a type of function that will be invoked from an event that occurred in the template.
Getting started with Svelte - Learn web development
variables declared (or imported) at the top level are 'visible' from the component's markup.
... component props are declared with the export keyword.
Dynamic behavior in Svelte: working with variables and props - Learn web development
just like the export keyword being used to declare props, this may look a little alien.
... let's declare a newtodoid variable calculated from the number of todos plus 1, and make it reactive.
Multiprocess on Windows
since gecko's main thread uses com, and com requires threads to declare their threading model, the main thread must initialize itself to live inside its own single threaded apartment (sta).
... for those interfaces that do contain length_is or size_is annotations, we need to use another api declared in mozilla/mscom/registration.h: registerarraydata().
Gecko Logging
logging framework declaring a log module lazylogmodule defers the creation the backing logmodule in a thread-safe manner and is the preferred method to declare a log module.
... multiple lazylogmodules with the same name can be declared, all will share the same backing logmodule.
XPCOMUtils.jsm
declare the class (or multiple classes) implementing the component(s).
... function mycomponent() { // initialize the component here } class declaration declare the class prototype, using a form similar to this.
Optimizing Applications For NSPR
nspr functions are normally declared <tt>__cdecl</tt>.
...nspr functions returning floating point types and structs by value, including the derived types print64, are declared <tt>__pascal</tt>.
Interval Timing
this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
...to make use of these counters, the application must declare a point in time, the epoch, and an amount of time elapsed since that epoch, the interval.
Index
there are several things to keep in mind with this file: o it must be declared in the jar archive's manifest file.
...to declare meta-information in the manifest file, put it in a file that is passed to signtool.
NSS 3.12.6 release notes
bug 494603: update nss's copy of sqlite3 to 3.6.22 to get numerous bug fixes bug 496993: add accessor functions for ssl_implementedciphers bug 515279: cert_pkixverifycert considers a certificate revoked if cert_processocspresponse fails for any reason bug 515870: gcc compiler warnings in nss 3.12.4 bug 518255: the input buffer for sgn_update should be declared const bug 519550: allow the specification of an alternate library for sqlite bug 524167: crash in [[@ find_objects_by_template - nsstoken_findcertificatebyissuerandserialnumber] bug 526910: maxresponselength (initialized to pkix_default_max_response_length) is too small for downloading some crls.
... bug 527759: add multiple roots to nss (single patch) bug 528741: pkix_hash throws a null-argument exception on empty strings bug 530907: the peerid argument to ssl_setsockpeerid should be declared const bug 531188: decompression failure with https://livechat.merlin.pl/ bug 532417: build problem with spaces in path names bug 534943: clean up the makefiles in lib/ckfw/builtins bug 534945: lib/dev does not need to include headers from lib/ckfw bug 535669: move common makefile code in if and else to the outside bug 536023: der_utctimetotime and der_generalizedtimetotime ignore all bytes after an embedded null bug 536474: add support for logging pre-master secrets bug 537356: implement new safe ssl3 & t...
NSS_3.12_release_notes.html
e_alert ssl_error_rx_unexpected_new_session_ticket ssl_error_rx_malformed_new_session_ticket new tls cipher suites (see sslproto.h): tls_rsa_with_camellia_128_cbc_sha tls_dhe_dss_with_camellia_128_cbc_sha tls_dhe_rsa_with_camellia_128_cbc_sha tls_rsa_with_camellia_256_cbc_sha tls_dhe_dss_with_camellia_256_cbc_sha tls_dhe_rsa_with_camellia_256_cbc_sha note: the following tls cipher suites are declared but are not yet implemented: tls_dh_dss_with_camellia_128_cbc_sha tls_dh_rsa_with_camellia_128_cbc_sha tls_dh_anon_with_camellia_128_cbc_sha tls_dh_dss_with_camellia_256_cbc_sha tls_dh_rsa_with_camellia_256_cbc_sha tls_dh_anon_with_camellia_256_cbc_sha tls_ecdh_anon_with_null_sha tls_ecdh_anon_with_rc4_128_sha tls_ecdh_anon_with_3des_ede_cbc_sha tls_ecdh_anon_with_aes_128_cbc_sha tls_ecdh_anon_...
...n root certs slot description is empty bug 177184: nss_cmsdecoder_cancel might have a leak bug 232392: erroneous root ca tests in nss libraries bug 286642: util should be in a shared library bug 287052: function to get crl entry reason code has incorrect prototype and implementation bug 299308: need additional apis in the crl cache for libpkix bug 335039: nssckfwcryptooperation_updatecombo is not declared bug 340917: crlutil should init nss read-only for some options bug 350948: freebl macro change can give 1% improvement in rsa performance on amd64 bug 352439: reference leaks in modutil bug 369144: certutil needs option to generate subjectkeyid extension bug 391771: pk11_config_name and pk11_config_strings leaked on shutdown bug 401194: crash in lg_findobjects on win64 bug 405652: in the tls cli...
nss tech note8
these two variables were private, declared in a private header file.
...however since nss was delivered as archive libraries, client programs merely declared these two variables for themselves, and then were able to alter those variables directly.
NSS tools : modutil
there are several things to keep in mind with this file: o it must be declared in the jar archive's manifest file.
...to declare meta-information in the manifest file, put it in a file that is passed to signtool.
NSS Tools modutil
this information file contains special scripting and must be declared in the jar archive's manifest file.
...to declare meta-information in the manifest file, put it in a file that is passed to the netscape signing tool.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
there are several things to keep in mind with this file: o it must be declared in the jar archive's manifest file.
...to declare meta-information in the manifest file, put it in a file that is passed to signtool.
TPS Tests
you can use as many profiles or phases as you need, but every phase you define later must be declared here, or it will not be run by the python test runner.
... any phases declared here but not implemented later will cause the test to fail when it hits that phase.
XForms Accessibility
you can try the following link to test xforms accessibility: visual xforms elements in xhtml document at bugzilla.mozilla.org visual xforms elements in xul document at bugzilla.mozilla.org you can see xforms sample tests at mozilla xforms project there are set of tests at beaufour.dk w3c's xforms test at w3.org keyboard navigation issues navigation sequence though xforms spec declares navindex attribute to define the navigation sequence (see 1.0 specs or 1.1 specs) but rich schwerdtfeger (distinguished engineer, swg accessibility architect/strategist chair, ibm accessibility architecture review board) gave some clarification about navindex.
...instance node states are mapped to accessibility state constants declared in nsiaccessiblestates interface like it shown below: relevant - state_unavailable readonly - state_readonly required - state_required invalid - state_invalid out of range - state_invalid attributes redefines datatype aria attribute.
An Overview of XPCOM
this simple macro declares a constant with the value of the cid: static ns_define_cid(kwebshellcid, ns_web_shell_cid); a cid is sometimes also referred to as a class identifier.
... xpcom types there are many xpcom declared types and simple macros that we will use in the following samples.
Starting WebLock
again, this is similar to the forward declare in c++ (except that c++ does not have the interface keyword seen here).
...in these cases you have to manually declare the methods in your class.
Mozilla internal string guide
// these store utf-8 and utf-16 values respectively nscstring mlocalname; nsstring mtitle; }; note that the strings are declared directly in the class, not as pointers to strings.
...operations that undo the benefits of setcapacity() include but are not limited to: setlength() truncate() assign() assignliteral() adopt() copyasciitoutf16() lossycopyutf16toascii() appendutf16toutf8() appendutf8toutf16() copyutf16toutf8() copyutf8toutf16() if your string is an nsauto[c]string and you are calling setcapacity() with a constant n, please instead declare the string as nsauto[c]stringn<n+1> without calling setcapacity() (while being mindful of not using such a large n as to overflow the run-time stack).
mozIRegistry
the nsrepository functions are declared in nsrepository.h.
... moziregistry this is the new interface that will surface essentially the same function as is currently provided by libreg (aka "netscape registry") as declared in mozilla/modules/libreg/include/nsreg.h.
Using COM from js-ctypes
e': ctypes.voidptr_t }, { 'setsyncspeaktimeout': ctypes.voidptr_t }, { 'getsyncspeaktimeout': ctypes.voidptr_t }, { 'speakcompleteevent': ctypes.voidptr_t }, { 'isuisupported': ctypes.voidptr_t }, { 'displayui': ctypes.voidptr_t } // end ispvoice ]); // functions // http://msdn.microsoft.com/en-us/library/windows/desktop/ms695279%28v=vs.85%29.aspx let coinitializeex = lib.declare('coinitializeex', winabi, hresult, // result lpvoid, // pvreserved dword // dwcoinit ); // http://msdn.microsoft.com/en-us/library/windows/desktop/ms688715%28v=vs.85%29.aspx let couninitialize = lib.declare('couninitialize', winabi, void // return ); // http://msdn.microsoft.com/en-us/library/windows/desktop/ms686615%28v=vs.85%29.aspx let cocreateinstance = lib.d...
...eclare('cocreateinstance', winabi, hresult, // return refclsid, // rclsid lpunknown, // punkouter dword, // dwclscontext refiid, // riid lpvoid // *ppv ); // helper functions function checkhresult(hr /*primative hresult*/, funcname /*jsstr*/) { // primative because thats what is returned by declared functions that // return hresult hr = hr.tostring(); // makes it primative if (hr < 0) { console.error('hresult', hr, 'returned from function ', funcname /*, 'getstrofresult:', getstrofresult(hr)*/); throw new error('hresult ' + hr + ' returned from function ' + funcname); } } let clsidfromarr = iidfromarr = function(jsarr_pieces) { let guid = guid(); // clsid and iid are...
Declaring and Using Callbacks
prerequiste understanding abi functiontype declaring callbacks a callback is declared by using ctypes.functiontype.
... the return type of the javascript callback must match the return type declared, otherwise js-ctypes will throw an error saying "unexpected return type".
ABI
ctypes.stdcall_abi used for calling functions declared with stdcall on windows.
...these are declared as stdcall on windows, but do not have mangled names like those used by stdcall_abi above.
CType
all data types declared using the js-ctypes api are represented by ctype objects.
... ctype array( [n] }; parameters n optional the number of elements in the declared array type.
Version, UI, and Status Information - Plugins
this code declares variables to hold the version numbers and calls npn_version to return the major and minor version numbers for the browser and the plug-in api.
... int plugin_major, plugin_minor, netscape_major, netscape_minor; // declare variables to hold version numbers void npn_version( &plugin_major, &plugin_minor, &netscape_major, &netscape_minor ); // find version numbers finding out if a feature exists a plug-in can figure out whether it is running in a version of the browser that supports a particular feature by using version or npvers constants (see version feature constants).
DocumentType - Web APIs
documenttype.entities read only a namednodemap of entities declared in the dtd.
... documenttype.notations read only a namednodemap with notations declared in the dtd.
HTMLElement: transitionend event - Web APIs
if there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired.
... if there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired.
HTMLObjectElement - Web APIs
htmlobjectelement.declare is a boolean that reflects the declare html attribute, indicating that this is a declaration, not an instantiation, of the object.
... the following properties are now obsolete: align, archive, border, code, codebase, codetype, declare, hspace, standby, and vspace.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
here we declare a keyrangevalue = idbkeyrange.bound("a", "f"); — a range between values of "a" and "f".
...this range includes the values "a" and "f", as we haven't declared that they should be open bounds.
IDBKeyRange - Web APIs
here we declare a keyrangevalue as a range between values of "a" and "f".
...this range includes the values "a" and "f", as we haven't declared that they should be open bounds.
USBDevice.usbVersionMajor - Web APIs
the usbversionmajor read only property of the usbdevice interface is one of three properties that declare the usb protocol version supported by the device.
... syntax var serialnumber = usbdevice.usbversionmajor value the last of three properties that declare the usb protocol version supported by the device.
USBDevice.usbVersionMinor - Web APIs
the usbversionminor read only property of the usbdevice interface is one of three properties that declare the usb protocol version supported by the device.
... syntax var serialnumber = usbdevice.usbversionminor value the second of three properties that declare the usb protocol version supported by the device.
USBDevice.usbVersionSubminor - Web APIs
the usbversionsubminor read only property of the usbdevice interface is one of three properties that declare the usb protocol version supported by the device.
... syntax var serialnumber = usbdevice.usbversionsubminor value the first of three properties that declare the usb protocol version supported by the device.
WebGLRenderingContext.getActiveUniform() - Web APIs
webgl generates one or more entries in the list depending on the declared type of the uniform in the shader: single basic type: one entry with the name of the uniform.
... the size attribute of the return value corresponds to the length of the array for uniforms declared as arrays.
Movement, orientation, and motion: A WebXR example - Web APIs
setup and utility functions next, we declare the variables and constants used throughout the application, starting with those used to store webgl and webxr specific information: let polyfill = null; let xrsession = null; let xrinputsources = null; let xrreferencespace = null; let xrbutton = null; let gl = null; let animationframerequestid = 0; let shaderprogram = null; let programinfo = null; let buffers = null; let texture = null; let mou...
... the last four variables declared are storage for references to the <div> elements into which we'll output the matrices when we want to show them to the user.
HTML in XMLHttpRequest - Web APIs
view on jsfiddle character encoding if the character encoding is declared in the http content-type header, that character encoding is used.
...failing that, if there is a <meta> element that declares the encoding within the first 1024 bytes of the file, that encoding is used.
An overview of accessible web applications and widgets - Accessibility
the techniques described above should be used to declare css to visually hide an element using display:none.
...javascript to update the aria-checked attribute var showtip = function(el) { el.setattribute('aria-hidden', 'false'); } role changes aria allows developers to declare a semantic role for an element that otherwise offers incorrect or no semantics.
Cognitive accessibility - Accessibility
declare the language of the page and any content not in that main language.
... the language of every page must be declared by using the lang attribute on the <html> element.
Basic Concepts of Multicol - CSS: Cascading Style Sheets
if you declare a column-width, the browser will work out how many columns of that width will fit into the multicol container and distribute any extra space equally between the columns.
... the column box will only shrink to be smaller than the declared column width in the case of a single column with less available width than the value of column-width.
Using CSS gradients - CSS: Cascading Style Sheets
if neither is declared, the gradient line is 100% meaning the linear and conic gradients will not repeat and the radial gradient will only repeat if the radius of the gradient is smaller than the length between the center of the gradient and the farthest corner.
... if the first color stop is declared, and the value is greater than 0, the gradient will repeat, as the size of the line or arc is the difference between the first color stop and last color stop is less than 100% or 360 degrees.
Specificity - CSS: Cascading Style Sheets
(the selectors declared inside :not() do, however.) for more information, visit: "specificity" in "cascade and inheritance", you can also visit: https://specifishity.com inline styles added to an element (e.g., style="font-weight: bold;") always overwrite any styles in external stylesheets, and thus can be thought of as having the highest specificity.
...will render as: this is because the two declarations have equal selector type counts, but the html h1 selector is declared last.
Writing forward-compatible websites - Developer guides
this happens even if there is a var ownerdocument declared in global scope.
... what this means is that any time you access a global variable in an event handler content attribute, including calling any function declared globally, you can end up with a name collision if a specification adds a new dom property to elements or documents which has the same name as your function or variable, and a browser implements it.
x-ms-acceleratorkey - HTML: Hypertext Markup Language
the x-ms-acceleratorkey attribute accessibly declares that an accelerator key has been assigned to an element: the element is activated via javascript when the key(s) are pressed on a keyboard.
...you must provide javascript event handlers, like onkeypress, onkeydown, or onkeyup, to listen for your declared accelerator keys and activate the element accordingly.
HTTP headers - HTTP
WebHTTPHeaders
security cross-origin-embedder-policy (coep) allows a server to declare an embedder policy for a given document.
... nel defines a mechanism that enables developers to declare a network error reporting policy.
Loops and iteration - JavaScript
this expression can also declare variables.
...the for statement declares the variable i and initializes it to 0.
Public class fields - JavaScript
public static fields are declared using the static keyword.
...use the get and set syntax to declare a public instance getter or setter.
ReferenceError: "x" is not defined - JavaScript
this variable needs to be declared, or you need to make sure it is available in your current script or scope.
... examples variable not declared foo.substring(1); // referenceerror: foo is not defined the "foo" variable isn't defined anywhere.
JavaScript error reference - JavaScript
denied to access property "x"internalerror: too much recursionrangeerror: argument is not a valid code pointrangeerror: invalid array lengthrangeerror: invalid daterangeerror: precision is out of rangerangeerror: radix must be an integerrangeerror: repeat count must be less than infinityrangeerror: repeat count must be non-negativereferenceerror: "x" is not definedreferenceerror: assignment to undeclared variable "x"referenceerror: can't access lexical declaration "x" before initializationreferenceerror: deprecated caller or arguments usagereferenceerror: invalid assignment left-hand sidereferenceerror: reference to undefined property "x"syntaxerror: "0"-prefixed octal literals and octal escape seq.
...ble property "x"typeerror: cannot use "in" operator to search for "x" in "y"typeerror: cyclic object valuetypeerror: invalid "instanceof" operand "x"typeerror: invalid array.prototype.sort argumenttypeerror: invalid argumentstypeerror: invalid assignment to const "x"typeerror: property "x" is non-configurable and can't be deletedtypeerror: setting getter-only property "x"typeerror: variable "x" redeclares argumenturierror: malformed uri sequencewarning: 08/09 is not a legal ecma-262 octal constantwarning: -file- is being assigned a //# sourcemappingurl, but already has onewarning: date.prototype.tolocaleformat is deprecatedwarning: javascript 1.6's for-each-in loops are deprecatedwarning: string.x is deprecated; use string.prototype.x insteadwarning: expression closures are deprecatedwarning: unr...
Arrow function expressions - JavaScript
strict mode should prevent creating global variables when assigning to an undeclared identifier in a function.
...at f2 (<anonymous>:1:29) at <anonymous>:1:1 f2 @ vm51712:1 (anonymous) @ vm51800:1 > f3 = x => (z1 = x + 1) x => (z1 = x + 1) > z1 vm51891:1 uncaught referenceerror: z1 is not defined at <anonymous>:1:1 (anonymous) @ vm51891:1 > f3(10) 11 > z1 11 f2 illustrates that when explicitly setting the arrow function to apply strict mode, it does throw an error when attempting to assign an undeclared variable.
Default parameters - JavaScript
this means that functions and variables declared in the function body cannot be referred to from default value parameter initializers; attempting to do so throws a run-time referenceerror.
... it also means that variables declared inside the function body using var will mask parameters of the same name, instead of the usual behavior of duplicate var declarations having no effect.
The arguments object - JavaScript
iteral is shorter than above but allocates an empty array var args = [].slice.call(arguments); as you can do with any array-like object, you can use es2015's array.from() method or spread syntax to convert arguments to a real array: let args = array.from(arguments); // or let args = [...arguments]; the arguments object is useful for functions called with more arguments than they are formally declared to accept.
...if you instead want to count how many parameters a function is declared to accept, inspect that function's length property.
WebAssembly.Module - JavaScript
webassembly.module.exports() given a module, returns an array containing descriptions of all the declared exports.
... webassembly.module.imports() given a module, returns an array containing descriptions of all the declared imports.
WebAssembly.instantiate() - JavaScript
there must be one matching property for each declared import of the compiled module or else a webassembly.linkerror is thrown.
...there must be one matching property for each declared import of module or else a webassembly.linkerror is thrown.
delete operator - JavaScript
any property declared with var cannot be deleted from the global scope or from a function's scope.
... any property declared with let or const cannot be deleted from the scope within which they were defined.
function declaration - JavaScript
conditionally created functions functions can be conditionally declared, that is, a function statement can be nested within an if statement, however the results are inconsistent across implementations and therefore this pattern should not be used in production code.
...you can use the function before you declared it: hoisted(); // logs "foo" function hoisted() { console.log('foo'); } note that function expressions are not hoisted: nothoisted(); // typeerror: nothoisted is not a function var nothoisted = function() { console.log('bar'); }; examples using function the following code declares a function that returns the total amount of sales, when given the number of units sold of products a,...
import - JavaScript
imported modules are in strict mode whether you declare them as such or not.
...in such cases, the default import will have to be declared first.
switch - JavaScript
block-scope variables within switch statements with ecmascript 2015 (es6) support made available in most modern browsers, there will be cases where you would want to use let and const statements to declare block-scoped variables.
...ake a look at this example: const action = 'say_hello'; switch (action) { case 'say_hello': let message = 'hello'; console.log(message); break; case 'say_hi': let message = 'hi'; console.log(message); break; default: console.log('empty action received.'); break; } this example will output the error uncaught syntaxerror: identifier 'message' has already been declared which you were not probably expecting.
text-decoration - SVG: Scalable Vector Graphics
the fill and stroke of the text decoration are given by the fill and stroke of the text at the point where the text decoration is declared.
...the fill and stroke, is determined by the value of the paint-order attribute at the point where the text decoration is declared.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
36 <xsl:key> element, key, reference, xslt the <xsl:key> element declares a named key which can be used elsewhere in the stylesheet with the key( ) function.
... 52 <xsl:variable> element, reference, xslt, variable the <xsl:variable> element declares a global or local variable in a stylesheet and gives it a value.
platform/xpcom - Archive of obsolete content
initializes pending in initialize() adds our implementation of the nsirequest interface although request also implements nsisupports, there is no need to add it here, because the base class unknown declares support for nsisupports and this is accounted for when retrieving objects.
Creating annotations - Archive of obsolete content
at the top of the file import the page-mod module and declare an array for the workers: var pagemod = require('sdk/page-mod'); var selectors = []; add detachworker(): function detachworker(worker, workerarray) { var index = workerarray.indexof(worker); if(index != -1) { workerarray.splice(index, 1); } } edit toggleactivation() to notify the workers of a change in activation state: function activateselectors() { selectors.foreach( functi...
Autocomplete - Archive of obsolete content
first, declare a panel with the "autocomplete" type, like so: <panel id="popup_autocomplete" type="autocomplete" noautofocus="true" /> now set the autocompletepopup attribute of your <browser> element to the id of the panel you just declared: <browser id="my_browser" ...
Forms related code snippets - Archive of obsolete content
similar to variables declared with the let statement, constants declared with const will be block-scoped.
HTML to DOM - Archive of obsolete content
keybrowser.webnavigation.allowjavascript = false; donkeybrowser.webnavigation.allowmetaredirects = true; donkeybrowser.webnavigation.allowplugins = false; donkeybrowser.webnavigation.allowsubframes = false; donkeybrowser.addeventlistener("domcontentloaded", function (e) { donkeyfire.donkeybrowser_onpageload(e); }, true); } with that code, we obtain a reference to the iframe element we declared in the .xul file.
Rosetta - Archive of obsolete content
first, you should declare a function which will translate an input plain-text written in c to an output plain-text written in ecmascript.
Sidebar - Archive of obsolete content
for this snippet to work, you have to declare mainwindow as in the previous code block then write: mainwindow.document.getelementbyid("sidebar-splitter").hidden = true; be aware that if you change the splitter's hidden attribute, you need to reset it to a safe value when your sidebar is closed, or replaced by another sidebar.
JavaScript Daemons Management - Archive of obsolete content
daemon.js what follows is the module that declares the daemon constructor (the core of this framework).
getAttributeNS - Archive of obsolete content
on current element, conditionally on whether its prefix matches a declared namespace see also http://www.w3.org/tr/dom-level-3-cor...mespaceurialgo ...
Extension Etiquette - Archive of obsolete content
call .noconflict(true) where applicable many common libraries which create global variables provide a method called noconflict, or similar, which revert any global variables they've declared, and return the object itself.
Install Manifests - Archive of obsolete content
examples this declares a set of add-on metadata to be displayed when the application is running in the de-de locale.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
for errors about undeclared do_createinstance: #include "nscomponentmanagerutils.h" for errors about undeclared do_getservice: #include "nsservicemanagerutils.h" for errors about undeclared ns_getspecialdirectory: #include "nsdirectoryserviceutils.h" utility classes some utility classes could previously be created with ns_new* utility functions.
Multiple item extension packaging - Archive of obsolete content
the xml namespace xmlns:nc="http://home.netscape.com/nc-rdf#" must also be declared in your install.rdf as shown below.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
} } in this case you would need to declare the first run preference in your default preferences file, with a default value of false.
Using the Stylesheet Service - Archive of obsolete content
remember to declare the correct namespace if you want to apply stylesheets to xul documents.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
by default, all links to screen media css files are explicitly declared as "screen" media instead of "all" media.
Getting the page URL in NPAPI plugin - Archive of obsolete content
npidentifier identifier = npn_getstringidentifier( "location" ); // declare a local variant value.
JXON - Archive of obsolete content
similar to variables declared with the let statement, constants declared with const will be block-scoped.
Dehydra Function Reference - Archive of obsolete content
type is a type object representing the type that was declared.
Building Firefox with Rust code - Archive of obsolete content
if you need to locally patch a third-party crate, you'll need to add a [replace] section to the referencing cargo.toml to declare that the vendored source shouldn't match the upstream release.
Style System Overview - Archive of obsolete content
this style struct is always const, and should always be declared as such (evil old-style casts often used with the non-typesafe forms sometimes hide this error), since the struct may be shared with other elements.
GRE - Archive of obsolete content
to find a compatible gre, you should use the function gre_getgrepathwithproperties() (declared in xpcom/glue/standalone/nsxpcomglue.h).
JavaScript OS.Shared - Archive of obsolete content
char jschar int unsigned_int int32_t uint32_t int64_t uint64_t long bool off_t size_t ssize_t fd (unix only) negativeone_or_fd (unix only) negativeone_or_nothing (unix only) string (unix only) null_or_string (unix only) handle (windows only) maybe_handle (windows only) dword (windows only) negative_or_dword (windows only) zero_or_dword (windows only) zero_or_nothing (windows only) declareffi() intn_t() uintn_t()instances of os.shared.type convert_from_c() releasewith() attributes global object os.shared.hollowstructure in_ptr out_ptr inout_ptr ...
jspage - Archive of obsolete content
r q=[];while(o){if(o.nodetype==1&&(!m||element.match(o,m))){if(!p){return document.id(o,r); }q.push(o);}o=o[l];}return(p)?new elements(q,{ddup:false,cash:!r}):null;};var e={html:"innerhtml","class":"classname","for":"htmlfor",defaultvalue:"defaultvalue",text:(browser.engine.trident||(browser.engine.webkit&&browser.engine.version<420))?"innertext":"textcontent"}; var b=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var k=["value","type","defaultvalue","accesskey","cellpadding","cellspacing","colspan","frameborder","maxlength","readonly","rowspan","tabindex","usemap"]; b=b.associate(b);hash.extend(e,b);hash.extend(e,k.associate(k.map(string.tolowercase)));var a={before:function(m,l){if(l.parentnode){l.parentnode.insertbefore...
Modularization techniques - Archive of obsolete content
for those who like gory details, their structure is this: struct nsid { pruint32 m0; pruint16 m1, m2; pruint8 m3[8]; }; frequently you see them represented as strings, like this: {221ffe10-ae3c-11d1-b66c-00805f8a2676} to initialize an id struct you declare them like this: id = {0x221ffe10, 0xae3c, 0x11d1, {0xb6, 0x6c, 0x00, 0x80, 0x5f, 0x8a, 0x26, 0x76}}; why the b66c couplet gets broken up and grouped with the last set of bytes is probably a footnote somewhere.
Plug-n-Hack - Archive of obsolete content
pnh allows security tools to declare the functionality that they support which is suitable for invoking directly from the browser.
Space Manager Detailed Design - Archive of obsolete content
the class nsspacemanager is declared in the file nsspacemanger.h.
Space Manager High Level Design - Archive of obsolete content
the line does not intersect a damage interval, it may still be marked dirty if: it was impacted by floats before, but is not any longer it was not impacted by floats before, but is now it is impacted by floats and is a block problems / bugs found during documentation: bandrect and bandlist are public in nsspacemanager.h - should be private (compiles fine) nsspacemanager data members are declared protected, but there are no subclasses.
String Quick Reference - Archive of obsolete content
assignwithconversion() nsautostring widestring; widestring.assignwithconversion("some string"); callwidefunction(widestring); // use widestring again, but need a const prunichar* callwidewithflatstring(widestring.get()) nsautostring widestring2; widestring2.assignwithconversion("another string"); callwidefunction(widestring2); new way: use ns_literal_string or ns_named_literal_string // pre-declare the variable if you'll use it multiple times ns_named_literal_string(widestring, "some string"); callwidefunction(widestring); // use widestring again, but need a const prunichar* callwidewithflatstring(widestring.get()); // inline the string with ns_literal_string callwidefunction(ns_literal_string("another string")); converting literal strings to string objects what: converting from cons...
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
tamarin-central rev 703:2cee46be9ce0 was declared stable on 12/02/08.
Venkman Introduction - Archive of obsolete content
e enumerable property r read only property p permanent (cannot be deleted) a alias to another property a argument to a function v declared with var figure 8.
Anonymous Content - Archive of obsolete content
an element declared in a bound document using a single tag can then be constructed out of multiple child elements, and this implementation is hidden from the bound document.
Binding Implementations - Archive of obsolete content
a method with parameters specifies those parameters and their names with parameter elements declared underneath the method element.
expr - Archive of obsolete content
ArchiveMozillaXULAttributeexpr
any namespace prefixes declared on the element may be used within the expression.
Additional Navigation - Archive of obsolete content
note that this predicate uses a new namespace so it is declared on the root rdf element.
Filtering - Archive of obsolete content
we need to add the type to the two countries in the datasource, as well as ensure that the namespace is declared on the root rdf tag: <nso:country about="http://www.daml.org/2001/09/countries/iso#it" dc:title="italy"/> <nso:country about="http://www.daml.org/2001/09/countries/iso#nl" dc:title="netherlands"/> the type of these two resources, when expanded with the namespace (not shown here), will be 'http://www.daml.org/2001/09/countries/country-ont#country'.
Simple Query Syntax - Archive of obsolete content
since you can't declare variables in the simple syntax, a different way is used to grab rdf data.
Broadcasters and Observers - Archive of obsolete content
you should declare all your broadcasters inside a broadcasterset element so that they are all kept together.
Creating a Skin - Archive of obsolete content
for the best skinnability, it is best to declare appearance related style rules in the global directory rather than in individual style files.
Cross Package Overlays - Archive of obsolete content
<rdf:seq about="urn:mozilla:overlays"> <rdf:li resource="chrome://navigator/content/navigator.xul"/> </rdf:seq> this declares that we are adding a overlay window, a child of the root overlay node (urn:mozilla:overlays).
Custom Tree Views - Archive of obsolete content
the tree has a property view, which can be assigned to the view object declared above.
More Tree Features - Archive of obsolete content
essentially, a treeitem element can contain either single rows which are declared with the treerow element or a set of rows which are declared with the treechildren element.
Popup Menus - Archive of obsolete content
it does not draw on screen but instead is used as a placeholder where you would declare all of your popups.
Skinning XUL Files by Hand - Archive of obsolete content
when you declare a button in your xul to be of a particular class, you take advantage of all of the styles defined for the various states of that button.
XBL Attribute Inheritance - Archive of obsolete content
the namespace should be declared somewhere earlier, usually on the bindings element.
Using Visual Studio as your XUL IDE - Archive of obsolete content
as vs doesn't know how the chrome protocol works it can't detect where the dtd file is really located and thus will give you errors wherever you use the entities that are declared in this file.
Using multiple DTDs - Archive of obsolete content
l="&somebutton.label"> multiple dtds if you want to use multiple dtds with your xul file, you can simply list all of the dtds inside your dtd declaration: <!doctype window [ <!entity % commondtd system "chrome://myextensions/locale/common.dtd"> %commondtd; <!entity % mainwindowdtd system "chrome://myextension/locale/mainwindow.dtd"> %mainwindowdtd; ]> you can now access the entities declared in the dtds as shown above.
XML - Archive of obsolete content
all of the values for all of the attributes declared in xul are strings.
assign - Archive of obsolete content
any namespace prefixes declared on the element may be used within the expression.
preference - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] declares a preference that may be adjusted in a prefpane.
prefwindow - Archive of obsolete content
it's declared as a <field>, so you can set the value, however i don't believe it's valid to do that.) lastselected type: string set this to the id of the last selected pane.
query - Archive of obsolete content
ArchiveMozillaXULquery
any namespace prefixes declared on the element may be used within the expression.
rule - Archive of obsolete content
ArchiveMozillaXULrule
the children of the rule are used to declare the conditions in which the rule matches and the content that is generated.
script - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] much like the html script element, this is used to declare a script to be used by the xul window.
template - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used to declare a template for rule-based construction of elements.
Dialogs in XULRunner - Archive of obsolete content
the developer just declares the need for the button, the button's caption, and the access key for the button, as well as the javascript function to call if the button is pressed.
How to enable locale switching in a XULRunner application - Archive of obsolete content
populate the xul control with the available locales the available package locales are declared in the chrome manifest.
XULRunner tips - Archive of obsolete content
to restart your xulrunner-based application after any change (installation, removal, enabling, disabling) in the extensions' list: copy files fuelapplication.js and fuelapplication.manifest from browser/fuel/src for instance into your components/ directory tweak the line #include ../../../toolkit/components/exthelper/extapplication.js in your copy of fuelapplication.js as needed make sure to declare the fuel module and the two files in your components/makefile.in as in browser/fuel/src/makefile.in rebuild...
2006-10-13 - Archive of obsolete content
nsapprunner.o compile error: some_const not declared in scope compile error while compiling first build.
Adobe Flash - Archive of obsolete content
example 1 also creates a constant flashversionosxscriptable that declares (arbitrarily) that macromedia will fix flash to be scriptable in mach-o browsers (on os x) by version 12.
Building a Theme - Archive of obsolete content
'4' declares that it is installing a theme.
Scratchpad - Archive of obsolete content
any variables you declare outside of a function will be added to the global object for that tab.
Namespaces - Archive of obsolete content
you can declare the default namespace for your e4x objects by placing the statement: default xml namespace = "http://www.w3.org/1999/xhtml"; within the same scope as your e4x.
Array comprehensions - Archive of obsolete content
new variables (such as i in the example) are treated as if they had been declared using let.
Legacy generator function - Archive of obsolete content
the legacy generator function statement declares legacy generator functions with the specified parameters.
for each...in - Archive of obsolete content
syntax for each (variable in object) { statement } variable variable to iterate over property values, optionally declared with the var keyword.
Archived JavaScript Reference - Archive of obsolete content
do not use it!handler.enumerate()the handler.enumerate() method used to be a trap for for...in statements, but has been removed from the ecmascript standard in es2016 and is deprecated in browsers.legacy generator functionthe legacy generator function statement declares legacy generator functions with the specified parameters.legacy generator function expressionthe function keyword can be used to define a legacy generator function inside an expression.
JSException - Archive of obsolete content
declaration public int getwrappedexceptiontype() description getwrappedexceptiontype() returns an int that matches one of the following static ints declared by the jsexception class: exception_type_empty exception_type_void exception_type_object exception_type_function exception_type_string exception_type_number exception_type_boolean ...
Anatomy of a video game - Game development
*/ ;(function () { function main() { mygame.stopmain = window.requestanimationframe( main ); // your main loop contents } main(); // start the cycle })(); we now have a variable declared in our mygame namespace, which we call stopmain, that contains the id returned from our main loop's most recent call to requestanimationframe().
Efficient animation for web games - Game development
an easy way to do this is to declare your own refresh function that sets a flag when it calls requestanimationframe.
Build the brick field - Game development
add the following lines to your code below the variables which you have previously declared in your program.
Finishing up - Game development
let's first add a variable to store the number of lives in the same place where we declared our other variables: var lives = 3; drawing the life counter looks almost the same as drawing the score counter — add the following function to your code, below the drawscore() function: function drawlives() { ctx.font = "16px arial"; ctx.fillstyle = "#0095dd"; ctx.filltext("lives: "+lives, canvas.width-65, 20); } instead of ending the game immediately, we will decrease the num...
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
essentially, a constructor in javascript is usually declared at the instance of a class.
Function - MDN Web Docs Glossary: Definitions of Web-related terms
// declared functions can't be called immediately this way // error (https://en.wikipedia.org/wiki/immediately-invoked_function_expression) /* ​function foo() { console.log('hello foo'); }(); */ // function expressions, named or anonymous, can be called immediately (function foo() { console.log("hello foo"); }()); (function food() { console.log("hello food"); })(); (() => console.log('hello...
Global variable - MDN Web Docs Glossary: Definitions of Web-related terms
a global variable is a variable that is declared in the global scope in other words, a variable that is visible from all other scopes.
Scope - MDN Web Docs Glossary: Definitions of Web-related terms
for instance, the following is invalid: function examplefunction() { var x = "declared inside function"; // x can only be used in examplefunction console.log("inside function"); console.log(x); } console.log(x); // causes error however, the following code is valid due to the variable being declared outside the function, making it global: var x = "declared outside function"; examplefunction(); function examplefunction() { console.log("inside function"); conso...
Character encoding - MDN Web Docs Glossary: Definitions of Web-related terms
for example, in html we normally declare a character encoding of utf-8, using the following line: <meta charset="utf-8"> this ensures that you can use characters from just about any human language in your html document, and they will display reliably.
undefined - MDN Web Docs Glossary: Definitions of Web-related terms
undefined is a primitive value automatically assigned to variables that have just been declared, or to formal arguments for which there are no actual arguments.
Web fonts - Learn web development
the latter part in each case is optional, but it is useful to declare it because it allows browsers to find a font they can use faster.
How can we design for all types of users? - Learn web development
for instance, if in your css you declare this: body { font-size:16px; } … you are telling the browser that whatever happens, the font size must be 16 pixels.
Debugging HTML - Learn web development
"consider adding a lang attribute to the html start tag to declare the language of this document.": this is not an error but a warning.
Responsive images - Learn web development
in a <source> element, you can only refer to images of the type declared in type.
Making asynchronous programming easier with async and await - Learn web development
by only adding the necessary handling when the function is declared async, the javascript engine can optimize your program for you.
Functions — reusable blocks of code - Learn web development
in addition, attempting to declare the name variable a second time with the let keyword in the second.js file results in an error.
A first splash into JavaScript - Learn web development
the first line (line 2 above) declares a variable called userguess and sets its value to the current value entered inside the text field.
Basic math in JavaScript — numbers and operators - Learn web development
first of all, let's declare a couple of variables and initialize them with an integer and a float, respectively, then type the variable names back in to check that everything is in order: let myint = 5; let myfloat = 6.667; myint; myfloat; number values are typed in without quote marks — try declaring and initializing a couple more variables containing numbers before you move on.
What went wrong? Troubleshooting JavaScript - Learn web development
so loworhi has been declared and initialised, but not with any meaningful value — it has no type or value.
Multimedia: video - Learn web development
for example, given video compressions in three different formats at 10mb, 12mb, and 13mb, declare the smallest first and the largest last: <video width="400" height="300" controls="controls"> <!-- webm: 10 mb --> <source src="video.webm" type="video/webm" /> <!-- mpeg-4/h.264: 12 mb --> <source src="video.mp4" type="video/mp4" /> <!-- ogg/theora: 13 mb --> <source src="video.ogv" type="video/ogv" /> </video> the browser downloads the first format it understands.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
in todo-data.js, add the following getter underneath the existing all() getter to define what the incomplete todos actually are: get incomplete() { return this.todos.filter(todo => { return todo.iscompleted === false; }); } using array.filter(), we declare that "incomplete" todos are ones that have iscompleted equal to false.
Ember resources and troubleshooting - Learn web development
more concretely, using mut allows for template-only settings functions to be declared: <checkbox @value={{this.somedata}} @ontoggle={{fn (mut this.somedata) (not this.somedata)}} /> whereas, without mut, a component class would be needed: import component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { action } from '@ember/object'; export default class example extends component { @tracked somedata = false; @action setdata(newvalue)...
Accessibility in React - Learn web development
creating our ref import the useref() and useeffect() hooks into app.js — you'll need them both below: import react, { usestate, useref, useeffect } from "react"; then declare a new ref inside the app() function.
Creating our first Vue component - Learn web development
if you declared data as just an object, all instances of that component would share the same values.
Handling common JavaScript problems - Learn web development
are defined in the correct scope, and you are not running into conflicts between items declared in different places (see function scope and conflicts).
Chrome Worker Modules
core.declareffi(...) note that, for the moment, require() only accepts absolute uris.
A bird's-eye view of the Mozilla framework
help.js declares an nsirdfservice as a compile time constant at the beginning of the file.
Cross Process Object Wrappers
the wrapped object's properties and call its functions: // chrome script windowmm.addmessagelistener("my-e10s-extension-message", handlemessage); function handlemessage(message) { let wrapper = message.objects.clicked; console.log(wrapper.innerhtml); wrapper.innerhtml = "<h2>modified by chrome!</h2>" wrapper.setattribute("align", "center"); } auto-generated cpows add-ons that have not declared themselves multiprocess compatible are set up with a number of compatibility shims.
Performance
because declared functions are also objects.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
first, we declare a searchactive variable as false, which influences behaviour later on.
HTMLIFrameElement.findAll()
casesensitivity a string to declare whether you want the search to be case sensitive (case-sensitive) or insensitive (case-insensitive.) example the following function is taken from our browser api demo, and executes a search when a search form is submitted.
HTML parser threading
normal (non-speculative) parsing initially, dodataavailable performs character encoding sniffing on the data if an encoding wasn't declared on the enclosing protocol (http) level.
IPDL Type Serialization
types are serialized and deserialized from an ipc::message type declared in ipc_message.h.
IPC Protocol Definition Language (IPDL)
all messages for multi-process plugins and tabs in firefox are declared in the ipdl language.
JavaScript Tips
for instance the offline observer declared above is a javascript object that is registered with an xpcom object, so that the call back from xpcom executes the javascript method.
Downloads.jsm
then you should declare the new nsitransfer object during the startup of your app.
Task.jsm
implementing a method via a task, like this simple object with a greet method that has a name parameter and spawns a task to send a greeting and return its reply: let greeter = { message: "hello, name!", greet: function(name) { return task.spawn((function* () { return yield sendgreeting(this.message.replace(/name/, name)); }).bind(this); }) }; with async(), the method can be declared succinctly: let greeter = { message: "hello, name!", greet: task.async(function* (name) { return yield sendgreeting(this.message.replace(/name/, name)); }) }; while maintaining identical semantics: greeter.greet("mitchell").then((reply) => { ...
gettext
to determine which form to return, gettext uses a plural rule, which should be declared in the po file header.
Mozilla Web Developer FAQ
externally defined character entities other than the five pre-defined ones (&lt;, &gt;, &amp;, &quot; and &apos;) are only supported if the document references a public identifier for which there is a mapping in mozilla’s pseudo-dtd catalog and the document has not been declared standalone.
mozilla::MonitorAutoEnter
to use mozilla::monitorautoenter, declare and initialize it with a reference to a mozilla::monitor.
mozilla::MutexAutoLock
to use mozilla::mutexautolock, declare and initialize it with a reference to an mozilla::mutex.
mozilla::MutexAutoUnlock
to use mozilla::mutexautounlock, declare and initialize it with a reference to a locked mozilla::mutex.
JS::PerfMeasurement
perfmeasurement* js::extractperfmeasurement(jsval wrapper) if you are the c++ side of an xpcom interface, and you want to benchmark only part of your execution time but make the results available to javascript, you can declare a bare jsval argument in your .idl file and have javascript pass a perfmeasurement object that it created in that argument slot.
javascript.options.strict
example : <html> <head> <title>sample</title> </head> <body> <label id="name">enter you first name</label> <p id ="sample"></p> <script> "use strict" name1= "john" ; // this will cause and an error as variable not declared .
About NSPR
while the object is not declared as opaque, the api provides methods that allow and encourage clients to treat the addresses as polymorphic items.
NSPR Poll Method
declare two print16 variables to receive the return value and the out_flags output argument of the poll method.
Nonblocking IO In NSPR
<tt>pr_select()</tt> is deprecated, now declared in <tt>private/pprio.h</tt>.
Floating Point Number to String Conversion
the header file prdtoa.h declares these functions.
Hash Tables
the hash table library functions are declared in the header file plhash.h.
PR_CALLBACK
syntax #include <prtypes.h>type pr_callbackimplementation description functions that are implemented in an application (or shared library) that are intended to be called from another shared library (such as nspr) must be declared with the pr_callback attribute.
PR_EXTERN
the macro includes the proper specifications to declare the target extern and set up other required linkages.
PR ImportTCPSocket
although pr_importtcpsocket is a supported function, it is declared in "private/pprio.h" to stress the fact that this function depends on the internals of the nspr implementation.
4.3 Release Notes
hash_value_alert new tls cipher suites (see http://mxr.mozilla.org/security/sour...sslsocket.java): tls_rsa_with_camellia_128_cbc_sha tls_dhe_dss_with_camellia_128_cbc_sha tls_dhe_rsa_with_camellia_128_cbc_sha tls_rsa_with_camellia_256_cbc_sha tls_dhe_dss_with_camellia_256_cbc_sha tls_dhe_rsa_with_camellia_256_cbc_sha note: the following tls cipher suites are declared but are not yet implemented: tls_dh_dss_with_camellia_128_cbc_sha tls_dh_rsa_with_camellia_128_cbc_sha tls_dh_anon_with_camellia_128_cbc_sha tls_dh_dss_with_camellia_256_cbc_sha tls_dh_rsa_with_camellia_256_cbc_sha tls_dh_anon_with_camellia_256_cbc_sha tls_ecdh_anon_with_null_sha tls_ecdh_anon_with_rc4_128_sha tls_ecdh_anon_with_3des_ede_cbc_sha tls_ecdh...
NSS 3.15 release notes
it replaces function secitem_reallocitem, which is now declared as obsolete.
NSS 3.16.3 release notes
this function was already added in nss 3.16.2, however, it wasn't declared in a public header file.
NSS 3.20 release notes
please refer to the comments in the header file that declares the ssl_enableweakdheprimegroup api for additional details.
NSS 3.24 release notes
rather than declaring a plarenapool pointer and calling port_newarena/port_freearena to allocate or free an instance on the heap, declare a portcheaparenapool on the stack and use port_initcheaparena/port_destroycheaparena to initialize and destroy it.
NSS API Guidelines
secport_decl_ptr_class(classname, size) - declare a class of pointers (labelled classname) this object file needs to check.
sslfnc.html
all aspects of this table are declared in ssl.h.
NSS_3.12.3_release_notes.html
67298: sql db code uses local cache on local file system bug 468279: softoken crash importing email cert into newly upgraded db bug 468532: trusted ca trust flags not being honored in cert_verifycert bug 469583: coverity: uninitialized variable used in sec_pkcs5createalgorithmid bug 469944: when built with microsoft compilers bug 470351: crlutil build fails on windows because it calls undeclared isatty bug 471539: stop honoring digital signatures in certificates and crls based on weak hashes bug 471665: nss reports incorrect sizes for (aes) symmetric keys bug 471715: add cert to nssckbi to override rogue md5-collision ca cert bug 472291: crash in libpkix object leak tests due to null pointer dereferencing in pkix_build.c:3218.
Hacking Tips
the first comment declares the zone.
Exact Stack Rooting
however, this does not hold true for temporaries: they are undeclared, after all.
SpiderMonkey Internals
jsobj.*, jsscope.* these two pairs declare and implement the js object system.
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.
JIT Optimization Strategies
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.
JS::Rooted
bool operator==(const t &other) const description js::rooted<t> declares a local variable of type t whose value is always rooted.
JSNewResolveOp
(this flag has been replaced with the jsclass_emulates_undefined mechanism.) jsresolve_declaring obsolete since jsapi 15 the property is being declared in a var, const, or function declaration.
JS_FS
js_self_hosted_fn declares a self-hosted function.
JS_LookupProperty
jsresolve_declaring behave as though the name were being declared in a var, const, or function declaration.
SavedFrame
capturing savedframe stacks from c++ use js::capturecurrentstack declared in jsapi.h.
Using RAII classes in Mozilla
moz_decl_use_guard_object_notifier is added where private members should be declared.
Secure Development Guidelines
ck will operate on un-intialized data freeing un-initialized data example: int main(){ char *ptr; try { ptr = new char[-1]; // oom } catch(...) { delete ptr; } } freeing un-initialized data: prevention be careful when freeing data in catch blocks make sure the try block can’t throw before data is initialized initialize variables when they’re declared; for example, set pointers to null memory leaks usually occur when memory is allocated in a try block after the allocation, something throws in the try block before memory is freed in the try block the catch block does not foresee this and doesn't free the memory freeing un-initialized data example: int main(){ char *p; try { p = new char [1000]; ...
Using the Places annotation service
you can get an annotation uri for a given uri/name pair by calling: getannotationuri(auri, aname); in order for the annotation protocol to work, the annotation in question must have been declared with a mime type.
How to build an XPCOM component in JavaScript
ateqi([components.interfaces.nsihelloworld]), hello: function() { return "hello world!"; } }; var components = [helloworld]; if ("generatensgetfactory" in xpcomutils) var nsgetfactory = xpcomutils.generatensgetfactory(components); // firefox 4.0 and higher else var nsgetmodule = xpcomutils.generatensgetmodule(components); // firefox 3.x note: starting with firefox 4.0 you will need to declare your component in chrome.manifest; classdescription and contractid properties on the other hand are no longer required.
Building the WebLock UI
in this tutorial, focusing as it is on the weblock functionality (rather than the ui), we'll assume the strings we get from the ui itself are urls we actually want to write to the white list: function addthissite() { var tf = document.getelementbyid("dialog.input"); // weblock is global and declared above weblock.addsite(tf.value); } this javascript function can be called directly from the xul widget, where the input string is retrieved as the value property of the textbox element.
Creating the Component Code
the registration methods two closely related registration methods are declared below.
Making cross-thread calls using runnables
so we declare an asynchronous version of the same function: typedef void (*picallback)(const nscstring& result); // callback function void calculatepiasynchronously(int digits, picallback callback); creating a runnable nsrunnable is a helper class: it already implements threadsafe refcounting, so all you need to do is override the run() function.
Index
MozillaTechXPCOMIndex
657 nsifilespec declared in xpcom/obsolete/nsifilespec.idl 658 nsifilestreams file i/o, interfaces, interfaces:scriptable, streams, xpcom, xpcom api reference, xpcom interface reference no summary!
Components.utils
declared in the interface) method or property of an xpcom object.
Components object
declared in the interface) method or property of an xpcom object.
XPConnect wrappers
this case is where a js object was passed in via some idl-declared interface, creating an xpcwrappedjs, and is now being returned to javascript via some other interface.
NS_OVERRIDE
ns_override is declared in nscore.h, beginning with gecko 2.0.
mozIAsyncFavicons
setandfetchfaviconforpage() declares that a given page uses a favicon with the given uri and attempts to fetch and save the icon data by loading the favicon uri through a asynchronous network request.
nsIAccessibleStateChangeEvent
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean isenabled(); boolean isextrastate(); attributes attribute type description state unsigned long returns the state of accessible (see constants declared in nsiaccessiblestates).
nsIConsoleService
aflags — one of flags declared in nsiscripterror.
nsIEditor
e); void joinnodes(in nsidomnode leftnode, in nsidomnode rightnode, in nsidomnode parent); void deletenode(in nsidomnode child); void marknodedirty(in nsidomnode node); direction controller void switchtextdirection(); output methods astring outputtostring(in astring formattype, in unsigned long flags); example: // flags are declared in base/public/nsidocumentencoder.idl // outputselectiononly = 1, outputformatted = 2, // outputraw = 4, outputbodyonly = 8, // outputpreformatted = 16, outputwrap = 32, // outputformatflowed = 64, outputabsolutelinks = 258, // outputencodew3centities = 256, outputcrlinebreak = 512, // outputlflinebreak = 1024, outputnoscriptcontent = 2048, // o...
nsIFaviconService
this method declares that a given page uses a favicon with the given uri.
nsIFileSpec
declared in xpcom/obsolete/nsifilespec.idl don't use this interface.
nsIFrameScriptLoader
by default, frame scripts each have their own scope, so they can declare global variables without causing conflicts with any other frame scripts.
nsINavHistoryService
it declares that the given uri is being opened as a result of following a bookmark.
nsIScriptError
strictflag 0x4 one of the flags declared in nsiscripterror.
nsIXULTemplateBuilder
each of these declared bindings must be supplied to the query processor via its addbinding() method.
Troubleshooting XPCOM components registration
if using firefox 4 / xulrunner 2.0, make sure that your extension is unpacked and you declared the binary component in your chrome.manifest.
Frequently Asked Questions
comparing an nscomptr to a raw xpcom interface pointer declaring an nscomptr to a forward-declared class not linking to xpcom not including nscomptr.h different settings of nscap_feature_debug_ptr_types runtime errors ns_assertion "queryinterface needed" may be caused by a class that derives from a given interface, when you forgetting to also specify the interface name in the ns_impl_isupports / ns_impl_threadsafe_isupports macro.
Getting Started Guide
this is an acceptable way to declare `in/out' parameters, but prefer passing nscomptrs by reference, as below.
Reference Manual
these rules apply equally to the "assignment" that happens when copying parameters or function results that are declared to be nscomptrs.
XPCOM ABI
if an extension provides binary xpcom components, it should declare their xpcom abi in the install manifest.
wrappedJSObject
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.
Xptcall Porting Guide
the stub methods are declared in xptcall/public/xptcstubsdecl.inc.
Xptcall Porting Status
<font color="white">done</font> irix jason heirtzler <jasonh@m7.engr.sgi.com> jason has declared this done.
XUL Overlays
MozillaTechXULOverlays
the mechanism is the same, however.) any dialog that wants to overlay these buttons just declares the overlay at the top: <?xul-overlay href="chrome://global/content/dialogoverlay.xul"?> and includes an empty box with an id of okcancelbuttons in the ui.
The libmime module
method declarations we will be putting function pointers into the class object, so we declare them here.
Using C struct and pointers
using c strings with js-ctypes a pointer to char in javascript is declared as follows: var str = ctypes.pointertype(ctypes.char); now imagine you call a c function that returns a c string and you want to modify the contents of this string.
Memory Management
this is not an exhaustive list, but will help you to understand memory management and how it affects your use of js-ctypes: a function or static data declared using the declare() method will hold that library alive.
Type conversion
var buffer = ctypes.char.array(10)(); var somecfunction = library.declare("somecfunction", ctypes.default_abi, ctypes.void_t, ctypes.char.ptr); somecfunction(buffer); // here ctypes.char.array(10)() is converted to ctypes.char.ptr type implicit conversion can be tested in the following way: var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.bool } ])(); mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' boolean type target type source converted value ctypes.bool js boolean src js number (0 or 1) if src == 0: false if src == 1: t...
Working with ArrayBuffers
case 'gnu/kfreebsd': lib = ctypes.open('libc.so.0.1'); break; default: //assume unix try { lib = ctypes.open(ctypes.libraryname('c')); } catch (ex) { throw new error('i dont know where to memcpy is defined on your operating system, "' + os.constants.sys.name + '"'); lib.close(); } } try { var memcpy = lib.declare('memcpy', os.constants.sys.name.tolowercase().indexof('win') == 0 ?
ctypes.open
var lib = ctypes.open(filepath_mylib); var add_with_c = lib.declare("add", ctypes.default_abi, ctypes.int, // return type ctypes.int, // a ctypes.int // b ); var rez = add_with_c(2, 5); // rez is 7 lib.close(); references heather's paragraphs: playing around with js-ctypes on linux - credits for basis of this article github :: diegocr - fx-sapi-test - creating a native file for windows (dll) and use in a simple bootstrap add-on sta...
ArrayType
return value a ctype represents the newly declared array type.
PointerType
this can be any ctype object to declare the new type as a pointer to that type.
StructType
method overview define(fields) methods inherited from ctype ctype array([n]) string tosource() string tostring() methods define() defines a previously declared opaque type's fields.
Mozilla
all messages for multi-process plugins and tabs in firefox are declared in the ipdl language.
Debugger.Object - Firefox Developer Tools
for example, if the referent is a function declared in this way: function f(a, [b, c], {d, e:f}) { ...
Debugger.Object - Firefox Developer Tools
for example, if the referent is a function declared in this way: function f(a, [b, c], {d, e:f}) { ...
Examine and edit CSS - Firefox Developer Tools
if you enter var( into a property value and then type a dash (-), any variables you have declared in your css will then appear in an autocomplete list, which shows a color swatch so you can see exactly what color each variable choice is storing (bug 1451211).
AddressErrors - Web APIs
javascript payment request data first, we declare the variables supportedhandlers, which is compatible with paymentmethoddata, and defaultpaymentdetails, which is a paymentdetailsupdate object.
AudioTrackList.getTrackById() - Web APIs
the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource.
AudioWorkletGlobalScope - Web APIs
frame) console.log(currenttime) } // the process method is required - simply output silence, // which the outputs are already filled with process (inputs, outputs, parameters) { return true } } // the sample rate is not going to change ever, // because it's a read-only property of a baseaudiocontext // and is set only during its instantiation console.log(samplerate) // you can declare any variables and use them in your processors // for example it may be an arraybuffer with a wavetable const usefulvariable = 42 console.log(usefulvariable) registerprocessor('test-processor', testprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode — passing the name of the processor to it — and connect the node to an audio graph.
Body - Web APIs
WebAPIBody
the body mixin of the fetch api represents the body of the response/request, allowing you to declare what its content type is and how it should be handled.
CSSStyleDeclaration.getPropertyCSSValue() - Web APIs
obsolete declared as obsolete in july 2003.
Using the CSS Painting API - Web APIs
it is doable, but you would have to declare a different, fairly complex linear gradient for each different color you wanted to create.
Using the CSS Typed Object Model - Web APIs
we didn't declare a width or a height for the paragraph, both of which default to auto and therefore return a csskeywordvalue instead of a cssunitvalue.
Document.onbeforescriptexecute - Web APIs
fired when the code in a <script> element declared in an html document is about to start executing.
Document: transitionend event - Web APIs
if there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired.
Fetch API - Web APIs
WebAPIFetch API
fetch mixin body provides methods relating to the body of the response/request, allowing you to declare what its content type is and how it should be handled.
Using the Gamepad API - Web APIs
to start with, we declare some variables: the gamepadinfo paragraph that the connection info is written into, the ball that we want to move, the start variable that acts as the id for requestanimation frame, the a and b variables that act as position modifiers for moving the ball, and the shorthand variables that will be used for the requestanimationframe() and cancelanimationframe() cross browser forks.
HTMLElement: transitioncancel event - Web APIs
if there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired.
HTMLHtmlElement.version - Web APIs
this property has been declared as deprecated by the w3c technical recommendation for html 4.01 in favor of use of the dtd for obtaining version information for a document.
IDBDatabase.transaction() - Web APIs
storenames the names of object stores that are in the scope of the new transaction, declared as an array of strings.
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
here we declare keyrangevalue = idbkeyrange.upperbound("f", "w", true, true); — a range that includes everything between "f" and "w" but not including them — since both the upper and lower bounds have been declared as open (true).
IDBKeyRange.lowerBound() - Web APIs
here we declare keyrangevalue = idbkeyrange.lowerbound("f", false); — a range that includes the value "f" and everthing after it.
IDBKeyRange.lowerOpen - Web APIs
here we declare keyrangevalue = idbkeyrange.upperbound("f", "w", true, true); — a range that includes everything between "f" and "w" but not including them — since both the upper and lower bounds have been declared as open (true).
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
here we declare a keyrangevalue = idbkeyrange.only("a"); — a range that only includes the value "a".
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
here we declare keyrangevalue = idbkeyrange.upperbound("f", "w", true, true); — a range that includes everything between "f" and "w" but not including them — since both the upper and lower bounds have been declared as open (true).
IDBKeyRange.upperBound() - Web APIs
here we declare keyrangevalue = idbkeyrange.upperbound("f"); — a range that includes the value "f" and everything before it.
IDBKeyRange.upperOpen - Web APIs
here we declare keyrangevalue = idbkeyrange.upperbound("f", "w", true, true); — a range that includes everything between "f" and "w" but not including them — since both the upper and lower bounds have been declared as open (true).
MSSiteModeEvent - Web APIs
example interface mssitemodeevent extends event { buttonid: number; actionurl: string; } declare var mssitemodeevent: { prototype: mssitemodeevent; new(): mssitemodeevent; } see also microsoft api extensions ...
Using the MediaStream Recording API - Web APIs
we'll declare some variables for the record and stop buttons, and the <article> that will contain the generated audio players: const record = document.queryselector('.record'); const stop = document.queryselector('.stop'); const soundclips = document.queryselector('.sound-clips'); finally for this section, we set up the basic getusermedia structure: if (navigator.mediadevices && navigator.mediadevices.getus...
Notation - Web APIs
WebAPINotation
may declare format of an unparsed entity or formally declare the document's processing instruction targets.
OfflineAudioContext.startRendering() - Web APIs
example in this simple example, we declare both an audiocontext and an offlineaudiocontext object.
OfflineAudioContext - Web APIs
examples in this simple example, we declare both an audiocontext and an offlineaudiocontext object.
Path2D - Web APIs
WebAPIPath2D
the path2d interface of the canvas 2d api is used to declare a path that can then be used on a canvasrenderingcontext2d object.
Pointer Lock API - Web APIs
as it has recently unprefixed, you would currently declare it something like this, for example if you wanted to request pointer lock on a canvas element: canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpointerlock; canvas.requestpointerlock() if a user has exited pointer lock via the default unlock gesture, or pointer lock has not previously been entered for this document, an event generated as a...
Request - Web APIs
WebAPIRequest
bodyused read only stores a boolean that declares whether the body has been used in a response yet.
Response - Web APIs
WebAPIResponse
body.bodyused read only stores a boolean that declares whether the body has been used in a response yet.
SVGAnimatedString - Web APIs
you need to create svg attribute before doing anything else, everything should be declared inside this.
getTrackById() - Web APIs
the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource.
getTrackById - Web APIs
the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource.
Data in WebGL - Web APIs
WebAPIWebGL APIData
indbuffer( gl.array_buffer, cbuffer ); gl.bufferdata( gl.array_buffer, flatten(vertexcolors), gl.static_draw ); var vcolor = gl.getattriblocation( program, "vcolor" ); gl.vertexattribpointer( vcolor, 4, gl.float, false, 0, 0 ); gl.enablevertexattribarray( vcolor ); //glsl attribute vec4 vcolor; void main() { fcolor = vcolor; } varyings varyings are variables that are declared by the vertex shader and used to pass data from the vertex shader to the fragment shader.
Getting started with WebGL - Web APIs
the html fragment below declares a canvas that our sample will draw into.
WebGL best practices - Web APIs
(+/-2.0 max is probably not good enough for you) implicit defaults the vertex language has the following predeclared globally scoped default precision statements: precision highp float; precision highp int; precision lowp sampler2d; precision lowp samplercube; the fragment language has the following predeclared globally scoped default precision statements: precision mediump int; precision lowp sampler2d; precision lowp samplercube; in webgl 1, "highp float" support is optional in fragment shaders using ...
Using the Web Speech API - Web APIs
public declares that it is a public rule, the string in angle brackets defines the recognised name for this term (color), and the list of items that follow the equals sign are the alternative values that will be recognised and accepted as appropriate values for the term.
Window: transitionend event - Web APIs
if there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
in these cases, a recursive settimeout() pattern is preferred: (function loop(){ settimeout(function() { // your logic here loop(); }, delay); })(); in the above snippet, a named function loop() is declared and is immediately executed.
Using the group role - Accessibility
<li role="menuitem">trash</li> </ul> <ul role="group"> <li role="menuitem">custom folder 1</li> <li role="menuitem">custom folder 2</li> <li role="menuitem">custom folder 3</li> </ul> <ul role="group"> <li role="menuitem">new folder</li> </ul> </div> working examples: file directory treeview example using computed properties navigation treeview example using declared properties notes group members that are outside of the dom subtree of the group need to have explicit relationships assigned to them in order to participate in the group.
ARIA: Region role - Accessibility
svg role="region" can be declared on areas of svg along with an aria-label to allow individual sections of the svg to be described.
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
WebCSS--*
custom properties are scoped to the element(s) they are declared on, and participate in the cascade: the value of such a custom property is that from the declaration decided by the cascading algorithm.
-webkit-mask-composite - CSS: Cascading Style Sheets
mask images are composited in the opposite order that they are declared with the -webkit-mask-image property.
@font-face - CSS: Cascading Style Sheets
@font-face cannot be declared within a css selector.
any-pointer - CSS: Cascading Style Sheets
the big checkbox takes precedence because it is declared after the small one.
Handling Overflow in Multicol - CSS: Cascading Style Sheets
for example, the situation could happen when an image in a column is wider than the column-width value or the width of the column based on the number of columns declared with column-count.
Spanning and Balancing Columns - CSS: Cascading Style Sheets
filling and balancing comes into play when the amount of content does not match the amount of space provided, such as when a height is declared on the container.
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
this means you can explicitly declare the align-self property to target a single item.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
if you then declare display: flex on the parent item, these anonymous boxes do not get created and so your item remains a direct child and can become a flex item — losing any of the table display features.
Basic concepts of flexbox - CSS: Cascading Style Sheets
this is why when we just declare display: flex on the parent to create flex items, the items all move into a row and take only as much space as they need to display their contents.
OpenType font features guide - CSS: Cascading Style Sheets
this gives a lot of control, but has some disadvantages in how it impacts inheritance and — as mentioned above — if you wish to change one setting, you have to redeclare the entire string (unless you're using css custom properties to set the values).
Variable fonts guide - CSS: Cascading Style Sheets
if you have set values using font-variation-settings and want to change one of those values, you must redeclare all of them (in the same way as when you set opentype font features using font-feature-settings).
Grid template areas - CSS: Cascading Style Sheets
.wrapper { display: grid; grid-template: "hd hd hd hd hd hd hd hd hd" minmax(100px, auto) "sd sd sd main main main main main main" minmax(100px, auto) "ft ft ft ft ft ft ft ft ft" minmax(100px, auto) / 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr ; } the first value is our grid-template-areas value but we also declare the size of the row at the end of each row.
Subgrid - CSS: Cascading Style Sheets
line names can be passed from the parent into the subgrid, and the subgrid can also declare its own line names.
Consistent list indentation - CSS: Cascading Style Sheets
for example, if you declare that lists have no left margin, they move over in internet explorer, but sit stubbornly in place in gecko-based browsers.this article will help you understand the problems that can occur and how to avoid them.
Universal selectors - CSS: Cascading Style Sheets
/* selects all elements */ * { color: green; } beginning with css3, the asterisk may be used in combination with namespaces: ns|* - matches all elements in namespace ns *|* - matches all elements |* - matches all elements without any declared namespace syntax * { style properties } the asterisk is optional with simple selectors.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
for some css declarations, it is possible to declare this higher in the cascade and let css inheritance solve this problem naturally.
Visual formatting model - CSS: Cascading Style Sheets
this situation happens when, for example, you declare display: flex on a parent element, and directly inside there is a run of text not contained in another element.
column-width - CSS: Cascading Style Sheets
if the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width.
conic-gradient() - CSS: Cascading Style Sheets
conic-gradient(red 40grad, 80grad, blue 360grad); if two or more color stops are at the same location, the transition will be a hard line between the first and last colors declared at that location.
display - CSS: Cascading Style Sheets
WebCSSdisplay
some values of display are fully defined in their own individual specifications; for example the detail of what happens when display: flex is declared is defined in the css flexible box model specification.
env() - CSS: Cascading Style Sheets
WebCSSenv
the difference is that, as well as being user-agent defined rather than user-defined, environment variables are globally scoped to a document, whereas custom properties are scoped to the element(s) on which they are declared.
image() - CSS: Cascading Style Sheets
coloroptional a color, specifying a solid background color to use as a fallback if no image-src is found, supported, or declared.
left - CSS: Cascading Style Sheets
WebCSSleft
nt.</p> <div id="example_4"> <pre> position: absolute; bottom: 10px; right: 20px; </pre> <p>absolute position inside of a parent with relative position</p> </div> <div id="example_5"> <pre> position: absolute; right: 0; left: 0; top: 200px; </pre> <p>absolute position with both left and right declared</p> </div> </div> </div> css #wrap { width: 700px; margin: 0 auto; background: #5c5c5c; } pre { white-space: pre; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; } #example_1 { width: 200px; height: 200px; position: absolute; left: 20px; top: 20px; background-color: #d8f5ff; } #example_2 { width: 200px; height: 200px; position: relative...
list-style-position - CSS: Cascading Style Sheets
note that there is variance among browsers regarding behavior when a block element is placed first within a list element declared as list-style-position: inside.
min() - CSS: Cascading Style Sheets
WebCSSmin
we declare the input and label to be the lesser of 40% of the form width up to the padding or 400px wide, whichever is smaller.
EXSLT
exslt modules to use an exslt function, you need to declare the namespace the function is in, and then use the appropriate prefix when calling the function.
Constraint validation - Developer guides
intrinsic and basic constraints in html5, basic constraints are declared in two ways: by choosing the most semantically appropriate value for the type attribute of the <input> element, e.g., choosing the email type automatically creates a constraint that checks whether the value is a valid e-mail address.
Introduction to HTML5 - Developer guides
now, it is very simple: <meta charset="utf-8"> place this right after your <head>, as some browsers restart the parsing of an html document if the declared character set is different from what they had anticipated.
Index - Developer guides
WebGuideIndex
the html specification recommends the use of the utf-8 encoding (which can represent all of unicode) and regardless of the encoding used requires web content to declare what encoding was used.
Developer guides
the html specification recommends the use of the utf-8 encoding (which can represent all of unicode), and regardless of the encoding used requires web content to declare that encoding.
disabled - HTML: Hypertext Markup Language
if declared on an <optgroup>, the select is still interactive (unless otherwise disabled), but none of the items in the option group are selectable.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
if it's not a stylesheet of type text/css it is best to declare the type.
HTML attribute: required - HTML: Hypertext Markup Language
note color and range don't support required, but type color defaults to #00000, and range defaults to the midpoint between min and max -- with min and max defaulting to 0 and 100 respectively in most browsers if not declared -- so always has a value.
HTML attribute: size - HTML: Hypertext Markup Language
WebHTMLAttributessize
if no size is specified, or an invalid value is specified, the input has no size declared, and the form control will be the default width based on the user agent.
HTML attribute reference - HTML: Hypertext Markup Language
charset <meta>, <script> declares the character encoding of the page or script.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
this border is declared through css in the browser stylesheet, but you can override it to add your own focused style using button::-moz-focus-inner { }.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
additionally, avoid duplicating the alt attribute's value in a title attribute declared on the same image.
<menu> - HTML: Hypertext Markup Language
WebHTMLElementmenu
type this attribute indicates the kind of menu being declared, and can be one of two values.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
charset this attribute declares the document's character encoding.
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
declarehtml 4 onlyobsolete since html5 the presence of this boolean attribute makes this element a declaration only.
itemprop - HTML: Hypertext Markup Language
</div> properties can also be groups of name-value pairs, by putting the itemscope attribute on the element that declares the property.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in.
Content negotiation - HTTP
the default value identity is at the lowest priority (unless otherwise declared).
Feature Policy - HTTP
in a nutshell feature policy provides a mechanism to explicitly declare what functionality is used (or not used), throughout your website.
CSP: plugin-types - HTTP
instantiation of an <embed>, <object> or <applet> element will fail if: the element to load does not declare a valid mime type, the declared type does not match one of specified types in the plugin-types directive, the fetched resource does not match the declared type.
CSP: trusted-types - HTTP
this directive declares a white-list of trusted type policy names created with trustedtypes.createpolicy from trusted types api.
SameSite cookies - HTTP
the samesite attribute of the set-cookie http response header allows you to declare if your cookie should be restricted to a first-party or same-site context.
HTTP Index - HTTP
WebHTTPIndex
this directive declares a white-list of trusted type policy names created with trustedtypes.createpolicy from trusted types api.
Expressions and operators - JavaScript
x = 42; // implicitly creates window.x var y = 43; var myobj = {h: 4}; // create object with property h delete x; // returns true (can delete if created implicitly) delete y; // returns false (cannot delete if declared with var) delete math.pi; // returns false (cannot delete non-configurable properties) delete myobj.h; // returns true (can delete user-defined properties) deleting array elements since arrays are just objects, it's technically possible to delete elements from them.
JavaScript modules - JavaScript
first of all, you need to include type="module" in the <script> element, to declare this script as a module.
Working with objects - JavaScript
delete myobj.a; console.log ('a' in myobj); // output: "false" you can also use delete to delete a global variable if the var keyword was not used to declare the variable: g = 17; delete g; comparing objects in javascript, objects are a reference type.
Inheritance and the prototype chain - JavaScript
more information is available for firefox developer tools, chrome devtools, and edge devtools.) function dosomething(){} console.log( dosomething.prototype ); // it does not matter how you declare the function, a // function in javascript will always have a default // prototype property.
Memory Management - JavaScript
allocation in javascript value initialization in order to not bother the programmer with allocations, javascript will automatically allocate memory when values are initially declared.
Private class fields - JavaScript
field { static #private_static_field static basepublicstaticmethod() { this.#private_static_field = 42 return this.#private_static_field } } class subclass extends baseclasswithprivatestaticfield { } let error = null try { subclass.basepublicstaticmethod() } catch(e) { error = e} console.assert(error instanceof typeerror) private instance fields private instance fields are declared with # names (pronounced "hash names"), which are identifiers prefixed with #.
ReferenceError: can't access lexical declaration`X' before initialization - JavaScript
examples invalid cases in this case, the variable "foo" is redeclared in the block statement using let.
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
that is, a variable is declared and assigned a value |for (var i = 0 in obj)|.
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
that is, a variable is declared and assigned a value |for (var i = 0 of iterable)|.
SyntaxError: missing ; before statement - JavaScript
for example: var foo = 'tom's bar'; // syntaxerror: missing ; before statement you can use double quotes, or escape the apostrophe: var foo = "tom's bar"; var foo = 'tom\'s bar'; declaring properties with var you cannot declare properties of an object or array with a var declaration.
TypeError: "x" is (not) "y" - JavaScript
} if (typeof foo !== 'undefined') { // the same good idea, but don't use this implementation - it can bring problems // because of the confusion between truly undefined and undeclared variables.
Array.prototype.find() - JavaScript
2; while (start <= math.sqrt(element)) { if (element % start++ < 1) { return false; } } return element > 1; } console.log([4, 6, 8, 12].find(isprime)); // undefined, not found console.log([4, 5, 8, 12].find(isprime)); // 5 the following examples show that nonexistent and deleted elements are visited, and that the value passed to the callback is their value when visited: // declare array with no elements at indexes 2, 3, and 4 const array = [0,1,,,,5,6]; // shows all indexes, not just those with assigned values array.find(function(value, index) { console.log('visited index ', index, ' with value ', value); }); // shows all indexes, including deleted array.find(function(value, index) { // delete element 5 on first iteration if (index === 0) { console.log('deletin...
Error - JavaScript
es6 custom error class versions of babel prior to 7 can handle customerror class methods, but only when they are declared with object.defineproperty().
Function.prototype.bind() - JavaScript
function latebloomer() { this.petalcount = math.floor(math.random() * 12) + 1; } // declare bloom after a delay of 1 second latebloomer.prototype.bloom = function() { window.settimeout(this.declare.bind(this), 1000); }; latebloomer.prototype.declare = function() { console.log(`i am a beautiful flower with ${this.petalcount} petals!`); }; const flower = new latebloomer(); flower.bloom(); // after 1 second, calls 'flower.declare()' bound functions used as constructors warning: ...
Promise.prototype.finally() - JavaScript
the finally() method is very similar to calling .then(onfinally, onfinally) however there are a couple of differences: when creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it a finally callback will not receive any argument, since there's no reliable means of determining if the promise was fulfilled or rejected.
String.prototype.match() - JavaScript
infinity contains -infinity and +infinity in javascript.", str2 = "my grandfather is 65 years old and my grandmother is 63 years old.", str3 = "the contract was declared null and void."; str1.match("number"); // "number" is a string.
WebAssembly.Instance() constructor - JavaScript
there must be one matching property for each declared import of module or else a webassembly.linkerror is thrown.
WebAssembly.Module.exports() - JavaScript
the webassembly.module.exports() function returns an array containing descriptions of all the declared exports of the given module.
WebAssembly.Module.imports() - JavaScript
the webassembly.imports() function returns an array containing descriptions of all the declared imports of the given module.
WebAssembly.instantiateStreaming() - JavaScript
there must be one matching property for each declared import of the compiled module or else a webassembly.linkerror is thrown.
class expression - JavaScript
class expressions allow you to redefine (re-declare) classes without throwing a syntaxerror.
this - JavaScript
var obj = {a: 'custom'}; // we declare a variable and the variable is assigned to the global window as its property.
async function - JavaScript
an async function is a function declared with the async keyword.
for await...of - JavaScript
variable may be declared with const, let, or var.
for...of - JavaScript
variable may be declared with const, let, or var.
Transitioning to strict mode - JavaScript
setting a value to an undeclared variable function f(x) { 'use strict'; var a = 12; b = a + x * 35; // error!
JavaScript
closures a closure is the combination of a function and the lexical environment within which that function was declared.
Performance fundamentals - Web Performance
transitions and animations are particularly important to applications: developers can use css to declare complicated behaviour with a simple, high-level syntax.
Populating the page: how browsers work - Web Performance
since we didn't declare the size of our image, there will be a reflow once the image size is known.
Add to Home screen - Progressive web apps (PWAs)
first of all, we declare a deferredprompt variable (which we'll explain later on), get a reference to our install button, and set it to display: none initially: let deferredprompt; const addbtn = document.queryselector('.add-button'); addbtn.style.display = 'none'; we hide the button initially because the pwa will not be available for install until it follows the a2hs criteria.
contentStyleType - SVG: Scalable Vector Graphics
if other style sheet languages become more popular they might not use the style attribute, instead it could be easily declared which style language is used in the <style>'s type attribute.
SVG In HTML Introduction - SVG: Scalable Vector Graphics
this element and its children are declared to be in the svg namespace.
XML introduction - XML: Extensible Markup Language
there are five of these characters that you should know: entity character description &lt; < less than sign &gt; > greater than sign &amp; & ampersand &quot; " one double-quotation mark &apos; ' one apostrophe (or single-quotation mark) even though there are only 5 declared entities, more can be added using the document's document type definition.
<xsl:key> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementkey
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:key> element declares a named key which can be used elsewhere in the stylesheet with the key( ) function.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvariable
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:variable> element declares a global or local variable in a stylesheet and gives it a value.
An Overview - XSLT: Extensible Stylesheet Language Transformations
in essence, an xslt stylesheet is a set of rules, called templates, which declare that any node that matches this specific pattern should be manipulated in this specific way and end up in this specific position in the result tree.
WebAssembly Concepts - WebAssembly
a module declares imports and exports just like an es2015module.
Exported WebAssembly functions - WebAssembly
some other particulars to be aware of with exported webassembly functions: their length property is the number of declared arguments in the wasm function signature.