Search completed in 1.61 seconds.
PaymentMethodChangeEvent - Web APIs
the payment
methodchangeevent() constructor creates a new payment
methodchangeevent object providing details about a payment
methodchange event.
... syntax payment
methodchangeevent = new payment
methodchangeevent(type, options); parameters type a domstring which must contain the string payment
methodchange, the name of the only type of event which uses the payment
methodchangeevent interface.
... options optional an optional payment
methodchangeeventinit dictionary which may contain zero or more of the following properties:
methodname optional a domstring containing the payment
method identifier for the payment handler being used.
...And 5 more matches
PaymentRequest.onpaymentmethodchange - Web APIs
the paymentrequest event handler onpayment
methodchange is invoked when the payment
methodchange is fired, indicating that the user has changed payment
methods within a given payment handler.
... syntax paymentrequest.addeventlistener('payment
methodchange', payment
methodchangeevent => { ...
... }); paymentrequest.onpayment
methodchange = function(payment
methodchangeevent) { ...
...And 5 more matches
PaymentMethodChangeEvent - Web APIs
the payment
methodchangeevent interface of the payment request api describes the payment
methodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using apple pay).
... constructor payment
methodchangeevent() creates and returns a new payment
methodchangeevent object, optionally initialized with values taken from a given payment
methodchangeeventinit dictionary.
...
methoddetails read only secure context an object containing payment
method-specific data useful when handling a payment
method change.
...And 3 more matches
Comparing Reflect and Object methods - JavaScript
the reflect object, introduced in es2015, is a built-in object that provides
methods to interface with javascript objects.
... some of the static functions that exist on reflect also correspond to
methods available on object, which predates es2015.
... although some of the
methods appear to be similar in their behavior, there are often subtle differences between them.
...And 3 more matches
NPN_HasMethod - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary determines whether or not the specified npobject has a particular
method.
... syntax #include <npruntime.h> bool npn_has
method(npp npp, npobject *npobj, npidentifier
methodname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
... npobj the object on which to look for the
method.
...And 2 more matches
PR_GetDefaultIOMethods
gets the default i/o
methods table.
... syntax #include <prio.h> const prio
methods* pr_getdefaultio
methods(void); returns if successful, the function returns a pointer to a prio
methods structure.
... description after using pr_getdefaultio
methods to identify the default i/o
methods table, you can select elements from that table with which to build your own layer's
methods table.
...And 2 more matches
PaymentResponse.methodName - Web APIs
the
methodname read-only property of the paymentresponse interface returns a string uniquely identifying the payment handler selected by the user.
... this string may be either one of the standardized payment
method identifiers or a url used by the payment handler to process payments.
... syntax var
methodname = paymentresponse.
methodname; value a domstring uniquely identifying the payment handler being used to process the payment.
...And 2 more matches
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Methods’ - HTTP
reason reason: invalid token ‘xyz’ in cors header ‘access-control-allow-
methods’ what went wrong?
... the response to the cors request that was sent by the server includes an access-control-allow-
methods header which includes at least one invalid
method name.
... the access-control-allow-
methods header is sent by the server to let the client know what http request
methods it supports for cors requests.
...And 2 more matches
Access-Control-Allow-Methods - HTTP
the access-control-allow-
methods response header specifies the
method or
methods allowed when accessing the resource in response to a preflight request.
... header type response header forbidden header name no syntax access-control-allow-
methods: <
method>, <
method>, ...
... access-control-allow-
methods: * directives <
method> comma-delimited list of the allowed http request
methods.
...And 2 more matches
Method - MDN Web Docs Glossary: Definitions of Web-related terms
a
method is a function which is a property of an object.
... there are two kind of
methods: instance
methods which are built-in tasks performed by an object instance, or static
methods which are tasks that are called directly on an object constructor.
... note: in javascript functions themselves are objects, so, in that context, a
method is actually an object reference to a function.
... learn more learn about it
method (computer programming) in wikipedia defining a
method in javascript (comparison of the traditional syntax and the new shorthand) technical reference list of javascript built-in
methods ...
Static method - MDN Web Docs Glossary: Definitions of Web-related terms
a static
method (or static function) is a
method defined as a member of an object but is accessible directly from an api object's constructor, rather than from an object instance created via the constructor.
... in a web api, a static
method is one which is defined by an interface but can be called without instantiating an object of that type first.
...
methods called on object instances are called instance
methods.
... examples in the notifications api, the notification.requestpermission()
method is called on the actual notification constructor itself — it is a static
method: let promise = notification.requestpermission(); the notification.close()
method on the other hand, is an instance
method — it is called on an specific notification object instance to close the system notification it represents: let mynotification = new notification('this is my notification'); mynotification.close(); ...
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
this is where you want a two-dimensional layout
method: you want to control the alignment by row and column, and this is where grid comes in.
...in the future, they may well apply to other layout
methods as well.
...the positioning context will be whatever element creates a positioning context as is common to other layout
methods.
...don’t be afraid to mix it with other
methods of doing layout to get the different effects you need.
Access-Control-Request-Method - HTTP
the access-control-request-
method request header is used by browsers when issuing a preflight request, to let the server know which http
method will be used when the actual request is made.
... this header is necessary as the preflight request is always an options and doesn't use the same
method as the actual request.
... header type request header forbidden header name yes syntax access-control-request-
method: <
method> directives <
method> one of the http request
methods, for example get, post, or delete.
... examples access-control-request-
method: post specifications specification status comment fetchthe definition of 'access-control-request-
method' in that specification.
method - SVG: Scalable Vector Graphics
the
method attribute indicates the
method by which text should be rendered along the path of a <textpath> element.
... only one element is using this attribute: <textpath> textpath for <textpath>,
method indicates the
method by which text should be rendered along the path.
... specifications specification status comment scalable vector graphics (svg) 2the definition of '
method' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '
method' in that specification.
HTMLFormElement.method - Web APIs
the htmlformelement.
method property represents the http
method used to submit the <form>.
... unless explicitly specified, the default
method is 'get'.
... syntax var string = form.
method; form.
method = string; example document.forms['myform'].
method = 'post'; const formelement = document.createelement("form"); // create a form document.body.appendchild(formelement); console.log(formelement.
method); // 'get' specifications specification status comment html living standardthe definition of 'htmlformelement:
method' in that specification.
Index - Archive of obsolete content
358 tabmodalpromptshowing xul, xul
methods, xul reference no summary!
...it explains the concept of dom documents, demonstrates a few simple examples of using dom calls to perform basic manipulations on a document, and then demonstrates working with anonymous xbl content using mozilla-specific
methods.
...this
method has a number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one.
...And 157 more matches
Index
rick potts wrote a templated-based generic factory (nsfactory<t>) that simplifies the factory creation process that just requires writing a createinstance()
method.
...here is the interface, and a description of its use.</t> 10 how to pass an xpcom object to a new window needsexample, needshelp if you want to be able to call functions within an xpcom object from a xul window's code, you can do so if you pass the xpcom object as one of the arguments to the window creation
method.
...that means you can call javascript
methods from c++ and vice versa.
...And 151 more matches
WebIDL bindings
there are various helper objects and utility
methods in dom/bindings that are also all in the mozilla::dom namespace and whose headers are all exported into mozilla/dom (placed in $objdir/dist/include by the build process).
...the return type of getparentobject doesn't matter other than it must either singly-inherit from nsisupports or have a corresponding tosupports
method that can produce an nsisupports from it.
... expose whatever
methods the interface needs on mozilla::dom::myinterface.
...And 133 more matches
nsIAnnotationService
method overview void setpageannotation(in nsiuri auri, in autf8string aname, in nsivariant avalue, in long aflags, in unsigned short aexpiration); void setitemannotation(in long long aitemid, in autf8string aname, in nsivariant avalue, in long aflags, in unsigned short aexpiration); void setpageannotationstring(in nsiuri auri, in autf8string aname, in astring avalue, in long ...
...
methods setpageannotation() this
method sets an annotation for given uri, overwriting any previous annotation with the same url/name.
...for other types, only c++ consumers may use the type-specific
methods.
...And 73 more matches
nsINavBookmarksService
toolkit/components/places/nsinavbookmarksservice.idlscriptable the bookmarksservice interface provides
methods for managing bookmarked history items.
...to use this service, use: var navbookmarksservice = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice);
method overview void addobserver(in nsinavbookmarkobserver observer, in boolean ownsweak); void beginupdatebatch(); obsolete since gecko 1.9 void changebookmarkuri(in long long aitemid, in nsiuri anewuri); long long createdynamiccontainer(in long long aparentfolder, in autf8string aname, in astring acontractid, in long aindex); note: renamed from createcontainer in g...
...
methods addobserver() this
method adds a bookmark observer.
...And 51 more matches
Starting WebLock
for example, an object may be created and have its observe
method called at startup, or it may register to be notified prior to xpcom shutdown.
... the
method at the core of this interface is observe: void observe(in nsisupports asubject, in string atopic, in wstring adata); there aren't really any restrictions on what the three parameters (asubject, atopic and adata) may represent.
...when the notification is made, the nsiobserverservice broadcasts the notification from the caller of the notifyobserver() to the nsiobserver object's observe()
method.
...And 50 more matches
nsIFile
all
methods with string parameters have two forms.
...therefore, the utf-16 forms are scriptable, but the "native
methods" are not.
...
method overview void append(in astring node); void appendnative(in acstring node); native code only!
...And 49 more matches
LiveConnect Overview - Archive of obsolete content
when programming in javascript, you can use a wrapper object to access
methods and fields of the java object; calling a
method or accessing a property on the wrapper results in a call on the java object.
...the jsobject class provides an interface for invoking javascript
methods and examining javascript properties.
...as a javaobject, mystring has access to the public instance
methods of java.lang.string and its superclass, java.lang.object.
...And 48 more matches
JavaScript Daemons Management - Archive of obsolete content
this more complex version of it is nothing but a big and scalable collection of
methods for the daemon constructor.
...so the minidaemon framework will remain the recommended way for simple animations, because daemon without its collection of
methods is essentially a clone of it.
... advantages of this approch: abstraction passage of this object to javascript timers (both setinterval and settimeout) optimisation (avoiding closures) modularity the code the code of this framework is split into three files: daemon.js (the core) daemon-safe.js (an extension of the core which adds a replacement of setinterval with a recursive invocation of settimeout) daemon-
methods.js (a wide and highly scalable collection of
methods) the only independent module is daemon.js: both the daemon-safe.js module and the daemon-
methods.js module require daemon.js to work.
...And 39 more matches
Scripting Java
for example, to import the org.mozilla.javascript package you could use importpackage() as follows: $ java org.mozilla.javascript.tools.shell.main js> importpackage(packages.org.mozilla.javascript); js> context.currentcontext; org.mozilla.javascript.context@bb6ab6 occasionally, you will see examples that use the fully qualified name of the package instead of importing using the importpackage()
method.
...using a fully qualified name, the above example would look as follows: $ java org.mozilla.javascript.tools.shell.main js> jspackage = packages.org.mozilla.javascript; [javapackage org.mozilla.javascript] js> jspackage.context.currentcontext; org.mozilla.javascript.context@bb6ab6 alternatively, if you want to import just one class from a package you can do so using the importclass()
method.
...this works just as in java, with the use of the new operator: js> new java.util.date() thu jan 24 16:18:17 est 2002 if we store the new object in a javascript variable, we can then call
methods on it: js> f = new java.io.file("test.txt") test.txt js> f.exists() true js> f.getname() test.txt static
methods and fields can be accessed from the class object itself: js> java.lang.math.pi 3.141592653589793 js> java.lang.math.cos(0) 1 in javascript, unlike java, the
method by itself is an object and can be evaluated as well as being called.
...And 36 more matches
Bytecode Descriptions
the conversion can call .tostring()/.valueof()
methods and can throw.
...the conversion can call .tostring()/.valueof()
methods and can throw.
...the conversion can call .tostring()/.valueof()
methods and can throw.
...And 35 more matches
HTTP Index - HTTP
on top of these basic concepts, numerous extensions have appeared over the years, adding new functionality and new semantics by creating new http
methods or headers.
... 31 reason: did not find
method in cors header ‘access-control-allow-
methods’ cors, cors
methodnotfound, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting the http
method being used by the cors request is not included in the list of
methods specified by the response's access-control-allow-
methods header.
... this header specifies a comma-delineated list of the http
methods which may be used when using cors to access the url specified in the request; if the request is using any other
method, this error occurs.
...And 35 more matches
Introduction to XPCOM for the DOM
furthermore, a class can be de declared to be "abstract" if it declares some
methods but does not implement them entirely.
... pushing this concept to its maximum, a class can be "purely virtual" if it declares
methods without implementing any of them.
...interface to a set of
methods that manipulate an object (often represented by a class), without worrying about the details of the implementation.
...And 33 more matches
Mail composition back end
(for detailed information on the listener interfaces, see the listener interfaces section of this document) nsimsgsend the following describes the
methods of the nsimsgsend interface.
... all of these
methods are asynchronous operations.
... createandsendmessage the createandsendmessage
method will create an rfc822 message and send it all in one operation as well as providing the ability to save disk files for later use.
...And 33 more matches
Reading from Files - Archive of obsolete content
while there is only one
method to create an input stream, it provides a number of options to control exactly how reading is performed.
...this
method will open the file and return a stream.
...the newinputstream
method takes two arguments in this example.
...And 32 more matches
nsIWindowsRegKey
method overview void close(); void create(in unsigned long rootkey, in astring relpath, in unsigned long mode); nsiwindowsregkey createchild(in astring relpath, in unsigned long mode); astring getchildname(in unsigned long index); astring getvaluename(in unsigned long index); unsigned long getvaluetype(in astring name); boolean haschanged(); boo...
... constant value description root_key_classes_root 0x80000000 root_key_current_user 0x80000001 root_key_local_machine 0x80000002 access constants values for the mode parameter passed to the open() and create()
methods.
...there is no
method that is directly equivalent to regqueryvalueex or regsetvalueex.
...And 32 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
an easier
method of building a firefox/thunderbird addon for developers who are well-acquainted with ides like netbeans, eclipse, etc.
... true browser.dom.window.dump.enabled (not present in firefox 3.5+) enables use of the dump
method for debugging.
... refer to the “javascript debugging
methods” sidebar.
...And 30 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
8 ascii glossary, infrastructure ascii (american standard code for information interchange) is one of the most popular coding
method used by computers for converting letters, numbers, punctuation and control codes into digital form.
... 76 cipher suite cryptography, glossary, security a cipher suite is a combination of a key exchange algorithm, authentication
method, bulk encryption cipher, and message authentication code.
...class is a template definition of an object's properties and
methods, the "blueprint" from which other more specific instances of the object are drawn.
...And 30 more matches
XPIDL
interfaces may furthermore contain typedefs, natives,
methods, constants, or attributes.
... nsqiresult void* void** object should only be used with
methods that act like queryinterface autf8string const nsacstring& nsacstring& string full unicode set permitted (translated to utf-8) acstring const nsacstring& nsacstring& string only chars in range \u0000-\u00ff permitted astring const nsastring& nsastring& string full unicode set permitted jsval const jsval& jsval* anyt...
...interfaces are basically a collection of constants,
methods, and attributes; in mozilla, these are the primary ways in which javascript code can interact with native c++ code.
...And 30 more matches
CSSPrimitiveValue - Web APIs
an instance of this interface might be obtained from the getpropertycssvalue()
method of the cssstyledeclaration interface.
...the value can be obtained by using the getstringvalue()
method.
...the value can be obtained by using the getfloatvalue()
method.
...And 30 more matches
Object prototypes - Learn web development
in this article, we explain how prototype chains work and look at how the prototype property can be used to add
methods to existing constructors.
... objective: to understand javascript object prototypes, how prototype chains work, and how to add new
methods onto the prototype property.
... javascript is often described as a prototype-based language — to provide inheritance, objects can have a prototype object, which acts as a template object that it inherits
methods and properties from.
...And 29 more matches
Mozilla DOM Hacking Guide
when, in javascript, a client tries to access a dom object or a dom
method on a dom object, the js engine asks xpconnect to search for the relevant c++
method to call.
... for example, when we ask for |document.getelementbyid("myid");|, xpconnect will find that |document| is a property of the window object, so it will look on the interface nsidomwindow, and it will find the getdocument()
method.
...so xpconnect will then try to find a
method named getelementbyid() on the nsidomdocument interface.
...And 29 more matches
An Overview of XPCOM
in component-based programming, a component guarantees that the interfaces it provides will be immutable - that they will provide the same access to the same
methods across different versions of the component - establishing a contract with the software clients that use it.
...using a freely available public initialization
method, as the example below suggests, can cause problems.
... someclass class initialization class someclass { public: // constructor someclass(); // virtual destructor virtual ~someclass(); // init
method void init(); void dosomethinguseful(); }; for this system to work properly, the client programmer must pay close attention to whatever rules the component programmer has established.
...And 29 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
for example, rather than: if (ismozilla || isie5) you would use: if (document.getelementbyid) this would allow other browsers that support that w3c standard
method, such as opera or safari, to work without any changes.
...mozilla also does not support the netscape 4 document.layers
method and internet explorer's document.all.
... the w3c dom level 1
method gets references to all elements with the same tag name through getelementsbytagname().
...And 28 more matches
XPCOM Objects - Archive of obsolete content
the
method you call on cc["some-string"] should either be getservice or createinstance, depending on what you're asking for.
...those two
methods always receive the interface identifier as an argument.
... an interface is just a definition of a set of attributes and
methods that an object implementing it should have.
...And 25 more matches
Creating the Component Code
includes and constants in weblock1.cpp #include <stdio.h> // may be defined at the project level // in the makefile #define mozilla_strict_api #include "nsimodule.h" #include "nsifactory.h" #include "nsicomponentmanager.h" #include "nsicomponentregistrar.h" // use classes to handle iids // classes provide
methods for comparison: equals, etc.
...the variable kifactoryiid, for example, provides
methods like equals() that can be used to facilitate comparisons in the code, as in the following example from the mozilla source: using class
methods to handle identifiers if (aiid.equals(ns_get_iid(nsisupports))) { *ainstanceptr = (void*)(nsisupports*)this; ns_addref_this(); return ns_ok; } finally, sample_cid is an example of a cid that uniquely identifies the component.
...nsimodule has four
methods that must be implemented.
...And 25 more matches
Mozilla internal string guide
this allows for a
method (.get()) to access the underlying character buffer.
...common read-only
methods: .length() - the number of code units (bytes for 8-bit string classes and char16_ts for 16-bit string classes) in the string.
... common
methods that modify the string: .assign(string) - assigns a new value to the string.
...And 25 more matches
Vue conditional rendering: editing existing todos - Learn web development
<button type="submit" class="btn btn__primary"> save <span class="visually-hidden">edit for {{label}}</span> </button> </div> </form> </template> <script> export default { props: { label: { type: string, required: true }, id: { type: string, required: true } }, data() { return { newlabel: this.label }; },
methods: { onsubmit() { if (this.newlabel && this.newlabel !== this.label) { this.$emit("item-edited", this.newlabel); } }, oncancel() { this.$emit("edit-cancelled"); } } }; </script> <style scoped> .edit-label { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #0b0c0c; display: block; ...
... add isediting below your existing isdone data point: data() { return { isdone: this.done, isediting: false }; } now add your
methods inside a
methods property, right below your data() property:
methods: { deletetodo() { this.$emit('item-deleted'); }, toggletoitemeditform() { this.isediting = true; } } conditionally displaying components via v:if and v:else now we have an isediting flag that we can use to signify that the item is being edited (or not).
... getting back out of edit mode first, we need to add an itemedited()
method to our todoitem component's
methods.
...And 24 more matches
Following the Android Toasts Tutorial from a JNI Perspective
the java code example above can be done with privileged javascript from firefox for android with the following code: window.nativewindow.toast.show("hello, firefox!", "short"); converting java to jni.jsm the first step is to look at the java code and see all the different types,
methods, constructors, and fields that are being used.
... in the toast code we have the following: types - context, charsequence, int, toast, and void
methods - maketext, show fields - length_short no constructors are used.
...ed as javascript strings in jni.jsm, and the sig's of the types are as follows: java type signature boolean z byte b char c class/object lclass name in slash notation here; double d float f int i long j short s void v array of type [sig here
method format (sig of type of each argument here)sig of the return type here declaring a class/object is done in a special way.
...And 24 more matches
nsIPromptService
its
methods should be used in privileged code instead of dom window.alert, window.confirm, and other similar functions.
... note: some of these interface
methods use out and inout parameters.
...to get an instance, use: var promptservice = components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getservice(components.interfaces.nsipromptservice);
method overview void alert(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext); void alertcheck(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in wstring acheckmsg, inout boolean acheckstate); boolean confirm(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext); boolean confirmcheck(in nsidomwindow aparent, in wstrin...
...And 24 more matches
Binding Implementations - Archive of obsolete content
introduction bindings can define
methods and properties on a bound element using the implementation tag.
... a binding implementation provides a new set of
methods and properties that can be invoked directly from the bound element.
... the
methods and properties of an implementation can be defined declaratively using
method and property tags in xml, or an external implementation (e.g., a binary implementation) can be specified using the src attribute.
...And 19 more matches
nsIDOMWindowUtils
dom/interfaces/base/nsidomwindowutils.idlscriptable this interface is a dom utility interface that provides useful dom
methods and attributes.
...to get this interface, use: var domwindowutils = window.windowutils;
method overview void activatenativemenuitemat(in astring indexstring); void clearmozafterpaintevents(); pruint32 comparecanvases(in nsidomhtmlcanvaselement acanvas1, in nsidomhtmlcanvaselement acanvas2, out unsigned long amaxdifference); double computeanimationdistance(in nsidomelement element, in astring property, in astring value1, in astring value2); nsicompositionstringsynthesizer createcompositionstringsynthesizer(); obsolete since gecko 38.0 void disablenontestmouseevents(in ...
... currently, this
method doesn't support 4 or more clauses composition string.
...And 19 more matches
Add to iPhoto
this extension uses a number of
methods and data types, as well as constants, from three system frameworks.
... for the sake of organization, i chose to implement each system framework (and, mind you, i only declare the apis i actually use, not all of them) as a javascript object containing all the types and
methods that framework's api.
... the core foundation api is implemented by the corefoundation object, which consists of two
methods to initialize and shut down the library, a reference to the library, and all the types and
methods declared to support core foundation.
...And 19 more matches
Writing to Files - Archive of obsolete content
this
method has a number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one.
...the newoutputstream
method takes two arguments in this example.
...the default character set is 'utf-8' but this can be changed using an additional, yet optional, argument to the newoutputstream
method.
...And 18 more matches
Plug-in Development Overview - Gecko Plugin API Reference
write your plug-in code and implement the appropriate plug-in api
methods for basic plug-in operation.
... you'll find an overview of the plug-in api
methods in this chapter, as well as separate chapters for all of the major functional areas of the plug-in api.
... but when the plug-in is loaded from a well-known directory, a different
method must be used.
...And 18 more matches
Gecko info for Windows accessibility vendors
we have chosen a subset of readonly
methods in the dom needed for assistive technology vendors.
... ajax: asynchronous javascript and xml ajax is a
method of building interactive web applications that process user requests, user actions immediately in real time, unlike an http request, during which users must wait for a whole page to reload or for a new page to load.
... msaa support: iaccessible
methods to use msaa with gecko, you'll need the tools and docs that come with the active accessibility 2.0 sdk tools.
...And 18 more matches
Plug-in Development Overview - Plugins
write your plug-in code and implement the appropriate plug-in api
methods for basic plug-in operation.
... you'll find an overview of the plug-in api
methods in this chapter, as well as separate chapters for all of the major functional areas of the plug-in api.
... but when the plug-in is loaded from a well-known directory, a different
method must be used.
...And 18 more matches
Element - Web APIs
it only has
methods and properties common to all kinds of elements.
...
methods inherits
methods from its parents node, and its own parent, eventtarget, and implements those of parentnode, childnode, nondocumenttypechildnode, and animatable.
... element.animate() a shortcut
method to create and run an animation on an element.
...And 18 more matches
StringView - Archive of obsolete content
the aims of this library are: to create a c-like interface for strings (i.e., an array of character codes — an arraybufferview in javascript) based upon the javascript arraybuffer interface to create a highly extensible library that anyone can extend by adding
methods to the object stringview.prototype to create a collection of
methods for such string-like objects (since now: stringviews) which work strictly on arrays of numbers rather than on creating new immutable javascript strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when i...
...in the past, this had to be simulated by treating the raw data as a string and using the charcodeat()
method to read the bytes from the data buffer.
...awhole.subarray(nstartidx, nendidx) : awhole; } this.buffer = awhole.buffer; this.bufferview = awhole; this.rawdata = araw; object.freeze(this); } /* constructor's
methods */ stringview.loadutf8charcode = function (achars, nidx) { /* the iso 10646 view of utf-8 considers valid codepoints encoded by 1-6 bytes, * while the unicode view of utf-8 in 2003 has limited them to 1-4 bytes in order to * match utf-16's codepoints.
...And 17 more matches
Template and Tree Listeners - Archive of obsolete content
listening for template rebuilds the first of these is the simplest and involves two
methods, willrebuild and didrebuild.
... you would implement this object with these two
methods if you wish to be notified when the template is rebuilt using the builder's rebuild call.
...the willrebuild
method of any listeners will be called before the content is removed, and didrebuild
method will be called when the content has been regenerated.
...And 17 more matches
Inheritance in JavaScript - Learn web development
inside here you'll find the same person() constructor example that we've been using all the way through the module, with a slight difference — we've defined only the properties inside the constructor: function person(first, last, age, gender, interests) { this.name = { first, last }; this.age = age; this.gender = gender; this.interests = interests; }; the
methods are all defined on the constructor's prototype.
...i\'m ' + this.name.first + '.'); }; note: in the source code, you'll also see bio() and farewell()
methods defined.
... an updated greeting()
method, which sounds a bit more formal than the standard greeting()
method — more suitable for a teacher addressing some students at school.
...And 17 more matches
Modularization techniques - Archive of obsolete content
a pure virtual interface is simply a class where every
method is defined as pure virtual, that is: virtual int foo(int bar) = 0; pure virtual interfaces provide an easy mechanism for passing function tables between modules that may reside in separate, possibly dynamically loaded, libraries.
... interface interrogation is performed using the queryinterface()
method.
... reference counting is performed using the addref() and release()
methods.
...And 16 more matches
tabbrowser - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used for holding a set of read-only views of web documents.
...eupdown, onbookmarkgroup, onnewtab, tabmodalpromptshowing properties browsers, cangoback, cangoforward, contentdocument, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress
methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, getnotificationbox, gettabforbrowser, gettabmodalpromptbox, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloa...
...to change the url, use the loaduri
method.
...And 16 more matches
Focus management with Vue refs - Learn web development
to see the value of the ref when we click our "edit" button, add a console.log() to our toggletoitemeditform()
method, like so: toggletoitemeditform() { console.log(this.$refs.editbutton); this.isediting = true; } if you activate the "edit" button at this point, you should see an html <button> element referenced in your console.
... vue's $nexttick()
method we want to set focus on the "edit" button when a user saves or cancels their edit.
... to do that, we need to handle focus in the todoitem component’s itemedited() and editcancelled()
methods.
...And 16 more matches
Adding a new event
each event class should implement following
methods manually.
... virtual internalfooevent* asfooevent() moz_override this
method should just return this.
... this
method is used for retrieving sub class pointer avoiding to use static_cast.
...And 16 more matches
JSAPI User Guide
spidermonkey provides a few core javascript data types—numbers, strings, arrays, objects, and so on—and a few
methods, such as array.push.
...it is up to the application developer to decide what objects and
methods are exposed to scripts.
...the example below defines a very basic jsclass (named global_class) with no
methods or properties of its own.
...And 16 more matches
Finishing the Component
however, some point in the future, the nsifoo interface requires a major change, and
methods are reordered, some are added, others are removed.
...when your component runs in a version of gecko in which this interface is updated, your
method calls will be routed through a different v-table than the one the component expected, most likely resulting in a crash.
... below, the component is compiled against a version of the nsifoo interface that has three
methods.
...And 16 more matches
Using XPCOM Utilities to Make Things Easier
some differ only in whether or not a
method is called when the module is created and/or destroyed.
... these three entries constitute the required parameters for the registerfactorylocation
method we looked at in the prior chapter.
...furthermore, ns_decl_ appended with any interface name in all caps will declare all of the
methods of that interface for you.
...And 16 more matches
nsIJSON
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) note: this interface may only be used from javascript code, with the exception of the legacydecodetojsval()
method.
...to create an instance, use: var nativejson = components.classes["@mozilla.org/dom/json;1"] .createinstance(components.interfaces.nsijson);
method overview note: the idl file has portions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue.
...deprecated since gecko 2.0
methods decode() obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) decodes a json string, returning the javascript object it represents.
...And 16 more matches
nsINavHistoryService
to use this service, use: var historyservice = components.classes["@mozilla.org/browser/nav-history-service;1"] .getservice(components.interfaces.nsinavhistoryservice);
method overview astring getpagetitle(in nsiuri auri); void markpageasfollowedbookmark(in nsiuri auri); void markpageasfollowedlink(in nsiuri auri); void markpageastyped(in nsiuri auri); boolean canadduri(in nsiuri auri); long long addvisit(in nsiuri auri, in prtime atime, in nsiuri areferringuri, in long atransitiontype, in boolean aisredirect, in...
...
methods getpagetitle() this
method retrieves the original title of the page.
... markpageasfollowedbookmark() this
method is just like markpageastyped (in nsibrowserhistory, also implemented by the history service), but for bookmarks.
...And 16 more matches
nsIProtocolProxyService
netwerk/base/public/nsiprotocolproxyservice.idlscriptable this interface provides
methods to access information about various network proxies.
...to access the service use: var pps = components.classes["@mozilla.org/network/protocol-proxy-service;1"] .getservice(components.interfaces.nsiprotocolproxyservice);
method overview deprecated since gecko 18 nsiproxyinfo resolve(in nsiuri auri, in unsigned long aflags); nsicancelable asyncresolve(in nsiuri auri, in unsigned long aflags,in nsiprotocolproxycallback acallback); nsiproxyinfo newproxyinfo(in acstring atype, in autf8string ahost,in long aport, in unsigned long aflags, in unsigned long afailovertimeout, in nsiproxyinfo afailoverproxy); nsiproxyinfo getfailoverforproxy(in nsiproxyinfo aproxyinfo, in nsiuri auri, i...
...n nsresult areason); void registerfilter(in nsiprotocolproxyfilter afilter, in unsigned long aposition); void unregisterfilter(in nsiprotocolproxyfilter afilter); constants constant value description resolve_non_blocking 1<<0 this flag may be passed to the resolve
method to request that it fail instead of block the calling thread.
...And 16 more matches
nsIXULTemplateQueryProcessor
the query is expected to consist of either text or dom nodes that, when executed by a call to the generateresults()
method, will allow the generation of a list of results.
...each result will have the four variables referred to defined for it and the values may be retrieved using the result's nsixultemplateresult.getbindingfor() and nsixultemplateresult.getbindingobjectfor()
methods.
... the template builder must call initializeforbuilding() before the other
methods, except for translateref().
...And 16 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
the setinterval()
method, offered on the window and worker interfaces, repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.
...this
method is defined by the windoworworkerglobalscope mixin.
...the following ie-specific code demonstrates a
method for overcoming this limitation.
...And 16 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
note: interface definition language (idl) is a language for giving standard definitions of objects,
methods, and so forth.
...you'll note that even though the file includes an alert
method, nothing happens.
... fixme: we should advise against using such
method fixme: figure 1: dialog requesting privileges listing 3: grant privileges without manual confirmation for a specific file user_pref("capability.principal.codebase.test.granted", "universalxpconnect"); user_pref("capability.principal.codebase.test.id", "file url"); frequently used xpcom functions let’s take a look at those xpcom functions that are used especially frequently.
...And 15 more matches
MenuModification - Archive of obsolete content
modifying a menu menus have a number of
methods which may be used to add and remove items.
... adding items to a menu the appenditem
method may be used to append a new item to the end of the popup associated with a menu.
... this
method will create a new menuitem element and insert it into the popup.
...And 15 more matches
JSObject - Archive of obsolete content
the jsobject class provides a way to invoke javascript
methods and examine javascript properties.
...
method summary the netscape.javascript.jsobject class has the following
methods: call calls a javascript
method.
... the netscape.javascript.jsobject class has the following static
method: getwindow gets a jsobject for the window containing the given applet.
...And 15 more matches
Working with Svelte stores - Learn web development
a store is simply an object with a subscribe()
method that allows interested parties to be notified whenever the store value changes, and an optional set()
method that allows you to set new values for the store.
... then we call the
method alert.subscribe(), passing it a callback function as a parameter.
... the subscribe()
method also returns a clean-up function, which takes care of releasing the subscription.
...And 15 more matches
Accessing the Windows Registry Using XPCOM
the example above demonstates this using the open()
method.
... if you want to create a new key, you can use the create()
method, which takes the same parameters as open().
... both of these
methods take a root key as the first parameter.
...And 15 more matches
nsICryptoHash
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm); void initwithstring(in acstring aalgorithm); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hash algorithms these constants are used by the in...
...it()
method to indicate which hashing function to use.
... constant value description md2 1 message digest algorithm 2 md5 2 message-digest algorithm 5 sha1 3 secure hash algorithm 1 sha256 4 secure hash algorithm 256 sha384 5 secure hash algorithm 384 sha512 6 secure hash algorithm 512
methods finish() completes the hash object and produces the actual hash data.
...And 15 more matches
CanvasRenderingContext2D - Web APIs
see the interface's properties and
methods in the sidebar and below.
...this code draws a house: // set line width ctx.linewidth = 10; // wall ctx.strokerect(75, 140, 150, 110); // door ctx.fillrect(130, 190, 40, 60); // roof ctx.beginpath(); ctx.moveto(50, 140); ctx.lineto(150, 60); ctx.lineto(250, 140); ctx.closepath(); ctx.stroke(); the resulting drawing looks like this: reference drawing rectangles there are three
methods that immediately draw rectangles to the canvas.
... drawing text the following
methods draw text.
...And 15 more matches
Client-side storage - Learn web development
the storage.setitem()
method allows you to save a data item in storage — it takes two parameters: the name of the item, and its value.
... try typing this into your javascript console (change the value to your own name, if you wish!): localstorage.setitem('name','chris'); the storage.getitem()
method takes one parameter — the name of a data item you want to retrieve — and returns the item's value.
... the storage.removeitem()
method takes one parameter — the name of a data item you want to remove — and removes that item out of web storage.
...And 14 more matches
Mozilla accessibility architecture
in general, the accessibility apis use similar concepts, but use different
method, constant and interfaces names.
...they may override some
methods, such as init() and shutdown(), and add other
methods to support interfaces needed only by the given toolkit.
... for example, nsaccessiblewrap implements the
methods in iaccessible, but because it is also an nsaccessible, it only needs to call the nsiaccessible
methods in "this" to get at the information it needs.
...And 14 more matches
Displaying Places information using views
results themselves observe places changes, and if on a places change a result determines that its data specifically has changed, it notifies its view by calling an appropriate
method of nsinavhistoryresultviewer.
...like all places views, the built-in tree view implements this interface, which provides broad
methods such as getting the view's nsinavhistoryresult instance and examining the view's selection.
... finally, the built-in tree view implements several convenience
methods and properties of its own.
...And 14 more matches
Using XPCOM Components
the functionality of the cookiemanager component is available through the nsicookiemanager interface, which is comprised of the public
methods in the table below.
...when a user selects one of the cookies displayed in the list and then clicks the remove button, the remove
method in the nsicookiemanager interface is called.
... the snippet in getting the cookiemanager component in javascript shows how the remove()
method from the xpcom cookiemanager component can be called from javascript: getting the cookiemanager component in javascript // xpconnect to cookiemanager // get the cookie manager component in javascript var cmgr = components.classes["@mozilla.org/cookiemanager;1"] .getservice(); cmgr = cmgr.queryinterface(components.interfaces.nsicookiemanager); // called as part of a largerdeleteallcookies() function function finalizecookiedeletions() { for (var c=0; c<deletedcookies.length; c++) { cmgr.remove(deletedcookies[c].host, ...
...And 14 more matches
Streams - Plugins
the browser calls the plug-in
methods npp_newstream, npp_writeready, npp_write, and npp_destroystream to, respectively, create a stream, find out how much data the plug-in can handle, push data into the stream, and delete it.
... normal mode: the browser uses the npp_write
method to "push" stream data to the instance incrementally as it is available.
... random-access mode: the plug-in calls the npn_requestread
method to "pull" stream data.
...And 14 more matches
Drawing shapes with canvas - Web APIs
in upcoming pages we'll see two alternative
methods for clearrect(), and we'll also see how to change the color and stroke style of the rendered shapes.
... path
methods
methods to set different paths for objects.
...every time this
method is called, the list is reset and we can start drawing new shapes.
...And 14 more matches
Using the Payment Request API - Web APIs
the payment request api provides a browser-based
method of connecting users and their preferred payment systems and platforms to merchants that they want to pay for goods and services.
...this takes two mandatory parameters and one option parameter:
methoddata — an object containing information concerning the payment provider, such as what payment
methods are supported, etc.
... so for example, you could create a new paymentrequest instance like so: var request = new paymentrequest(buildsupportedpayment
methoddata(), buildshoppingcartdetails()); the functions invoked inside the constructor simply return the required object parameters: function buildsupportedpayment
methoddata() { // example supported payment
methods: return [{ supported
methods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard'], supportedtypes: ['debit', 'credit'] } }]; } function buildshoppingcartdetai...
...And 14 more matches
Symbol - JavaScript
the symbol() function returns a value of type symbol, has static properties that expose several members of built-in objects, has static
methods that expose the global symbol registry, and resembles a built-in object class, but is incomplete as a constructor because it does not support the syntax "new symbol()".
...to create symbols available across files and even across realms (each of which has its own global scope), use the
methods symbol.for() and symbol.keyfor() to set and retrieve symbols from the global symbol registry.
... finding symbol properties on objects the
method object.getownpropertysymbols() returns an array of symbols and lets you find symbol properties on a given object.
...And 14 more matches
this - JavaScript
es5 introduced the bind()
method to set the value of a function's this regardless of how it's called, and es2015 introduced arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical context).
...w; // true // in node: f1() === globalthis; // true in strict mode, however, if the value of this is not set when entering an execution context, it remains as undefined, as shown in the following example: function f2() { 'use strict'; // see strict mode return this; } f2() === undefined; // true in the second example, this should be undefined, because f2 was called directly and not as a
method or property of an object (e.g.
...all non-static
methods within the class are added to the prototype of this: class example { constructor() { const proto = object.getprototypeof(this); console.log(object.getownpropertynames(proto)); } first(){} second(){} static third(){} } new example(); // ['constructor', 'first', 'second'] note: static
methods are not properties of this.
...And 14 more matches
Anatomy of a video game - Game development
modern browsers strive to call
methods right as they are needed and idle (or do their other tasks) in the gaps.
...here is an example of a simple main loop: window.main = function () { window.requestanimationframe( main ); // whatever your main loop needs to do }; main(); // start the cycle note: in each of the main()
methods discussed here, we schedule a new requestanimationframe before performing our loop contents.
...it will not be attached to any object and main (or main() for
methods) will be a valid unused name in the rest of the application, free to be defined as something else.
...And 13 more matches
IPDL Tutorial
each outgoing message is a c++
method which can be called.
... each incoming message is a pure-virtual c++
method which must be implemented: class ppluginparent { public: bool sendinit(const nscstring& pluginpath) { // generated code to send an init() message } bool sendshutdown() { // generated code to send a shutdown() message } protected: /** * a subclass of ppluginparent must implement this
method to handle the ready() message.
... because protocol messages are represented as c++
methods, it's easy to forget that they are in fact asynchronous messages: by default the c++
method will return immediately, before the message has been delivered.
...And 13 more matches
Promise
once you have a reference to a promise, you can call its then()
method to execute an action when the value becomes available, or when an error occurs.
...
method overview promise then([optional] function onfulfill, [optional] function onreject); promise catch([optional] function onreject); constructor creates a new promise, initially in the pending state, and provides references to the resolving functions that can be used to change its state.
...if the associated promise has already been resolved, either to a value, a rejection, or another promise, this
method does nothing.
...And 13 more matches
Index
34 js::compileoptions jsapi reference, reference, référence(2), spidermonkey some
methods of js::owningcompileoptions and js::compileoptions return the instance itself to allow
method chain.
... 45 js::getfirstargumentastypehint jsapi reference, reference, référence(2), spidermonkey js::getfirstargumentastypehint converts first argument of @@toprimitive
method to jstype.
... 104 jsfun_bound_
method jsapi reference, obsolete, spidermonkey this macro exists only for backward compatibility with existing applications.
...And 13 more matches
nsIInputStream
inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) an input stream may be "blocking" or "non-blocking" (see the isnonblocking()
method).
...
method overview unsigned long available();deprecated since gecko 17.0 unsigned long long available(); void close(); boolean isnonblocking(); unsigned long read(in charptr abuf, in unsigned long acount); native code only!
...
methods available() determine number of bytes available in the stream.
...And 13 more matches
nsILoginManagerStorage
method overview void addlogin(in nsilogininfo alogin); unsigned long countlogins(in astring ahostname, in astring aactionurl, in astring ahttprealm); void findlogins(out unsigned long count, in astring ahostname, in astring aactionurl, in astring ahttprealm, [retval, array, size_is(count)] out nsilogininfo logins); void getalldisabledhosts([optional] out unsigned long count, [retval, array, siz...
...
methods addlogin() called by the login manager to store a new login.
... countlogins() implement this
method to return the number of logins matching the specified criteria.
...And 13 more matches
Component; nsIPrefBranch
for example, if this object is created with the root "browser.startup.", the preferences "browser.startup.page", "browser.startup.homepage", and "browser.startup.homepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various get/set
methods.
...
method overview void addobserver(in string adomain, in nsiobserver aobserver, in boolean aholdweak); void clearuserpref(in string aprefname); void deletebranch(in string astartingat); boolean getboolpref(in string aprefname, requires gecko 54 [optional] in boolean adefaultvalue); string getcharpref(in string aprefname,requires gecko 54 [optional] in string adefaultvalue); requires gecko 58 utf8tring getstringpref(in string aprefname, [optional] in utf8string adefaultvalue); void getchildlist(in string astartingat, [optional] out unsigned long acount, [array, size_is(acount), retval] out string achildarray); void getcomplexvalue(in string aprefname, in nsiidref atype, [iid_is(atype), retval] out nsqiresult avalue); ...
...
methods addobserver() adds a preference change observer.
...And 13 more matches
nsIXULTemplateBuilder
the condition syntax allows for common conditional handling; additional filtering may be applied by adding a custom filter to a rule with the builder's addrulefilter()
method.
...a matching result must have its rulematched()
method called.
... when a result no longer matches, the result's hasbeenremoved()
method must be called.
...And 13 more matches
Transformations - Web APIs
saving and restoring state before we look at the transformation
methods, let's look at two other
methods which are indispensable once you start generating ever more complex drawings.
...every time the save()
method is called, the current drawing state is pushed onto the stack.
... you can call the save()
method as many times as you like.
...And 13 more matches
Using Fetch - Web APIs
it also provides a global fetch()
method that provides an easy, logical way to fetch resources asynchronously across the network.
...to extract the json body content from the response, we use the json()
method (defined on the body mixin, which is implemented by both the request and response objects.) note: the body mixin also has similar
methods to extract other types of body content; see the body section for more.
... supplying request options the fetch()
method can optionally accept a second parameter, an init object that allows you to control a number of different settings: see fetch() for the full options available, and more details.
...And 13 more matches
PaymentRequest.show() - Web APIs
the paymentrequest interface's show()
method instructs the user agent to begin the process of showing and handling the user interface for the payment request to the user.
... for security reasons, the paymentrequest.show()
method can't just be initiated at any time.
...once one paymentrequest's show()
method has been called, any other call to show() will by rejected with an aborterror until the returned promise has been concluded, either by being fulfilled with a paymentresponse indicating the results of the payment request, or by being rejected with an error.
...And 13 more matches
A simple RTCDataChannel sample - Web APIs
establishing a connection when the user clicks the "connect" button, the connectpeers()
method is called.
... first, we call rtcpeerconnection.createoffer()
method to create an sdp (session description protocol) blob describing the connection we want to make.
... this
method accepts, optionally, an object with constraints to be met for the connection to meet your needs, such as whether the connection should support audio, video, or both.
...And 13 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
myth: msaa is too slow reality: assistive technology vendors have found ways around most of the performance problems related to out-of-process com
method calls.
... deciding which msaa features to support msaa
methods - cheat sheet for developers the iaccessible interface is used in a tree of iaccessible's, each one representing a data node, similar to a dom.
... here are the
methods supported in iaccessible - a minimal implementation would contain those marked "[important]": get_accparent: get the parent of an iaccessible.
...And 13 more matches
Adding preferences to an extension - Archive of obsolete content
after getting the preference branch for our extension, we call the nsisupports.queryinterface()
method on it to be able to use the
methods of the nsiprefbranch2 interface.
... the next step is to register a preference observer by calling the addobserver()
method to establish that whenever any events occur on the preferences, our object (this) receives notification.
... when events occur, such as a preference being altered, our observe()
method will be called automatically.
...And 12 more matches
OpenClose - Archive of obsolete content
the openpopup
method regardless of the type of popup, you may wish to open the popup programatically.
... to do this, use the popup's openpopup
method.
... this
method may be used for any type of popup, either a menupopup, a panel, or a tooltip, including ones that can be opened via other means, for instance, a popup attached via the context attribute.
...And 12 more matches
Template Builder Interface - Archive of obsolete content
rebuilding and refreshing a template the main purpose of accessing the builder for an element is to call its 'rebuild'
method.
... this
method removes any existing generated content and deletes all data in the rule network.
... then, the
method recompiles the query and the rules and regenerates the content.
...And 12 more matches
Index - Learn web development
this article doesn't attempt to document all the possible
methods.
...then it steps through one
method that can work right away for many readers.
... 51 cooperative asynchronous javascript: timeouts and intervals animation, beginner, codingscripting, guide, intervals, javascript, loops, asynchronous, requestanimationframe, setinterval, settimeout, timeouts this tutorial looks at the traditional
methods javascript has available for running code asychronously after a set time period has elapsed, or at a regular interval (e.g.
...And 12 more matches
JavaScript object basics - Learn web development
object basics an object is a collection of related data and/or functionality (which usually consists of several variables and functions — which are called properties and
methods when they are inside objects.) let's work through an example to understand what they look like.
...the last two items are functions that allow the object to do something with that data, and are referred to as the object's
methods.
... dot notation above, you accessed the object's properties and
methods using dot notation.
...And 12 more matches
Download
method overview promise start(); promise launch(); promise showcontainingdirectory(); promise cancel(); promise removepartialdata(); promise whensucceeded(); promise finalize([optional] boolean aremovepartialdata); properties attribute type description canceled read only boolean indicates that the download has been canceled.
... this property becomes true as soon as the cancel()
method is called, though the stopped property might remain false until the cancellation request has been processed.
...this can be done using the removepartialdata() or the finalize()
methods.
...And 12 more matches
nsIHttpChannel
inherits from: nsichannel last changed in gecko 1.3 to create an http channel, use nsiioservice with a http uri, for example: var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var ch = ios.newchannel("https://www.example.com/", null, null);
method overview void getoriginalresponseheader(in acstring aheader, in nsihttpheadervisitor avisitor); acstring getrequestheader(in acstring aheader); acstring getresponseheader(in acstring header); boolean isnocacheresponse(); boolean isnostoreresponse(); void redirectto(in nsiuri anewuri); void setemptyrequestheader(in acstring aheader)...
... request
method acstring set or get the http request
method (default is "get").
...however, after setting the upload data, it may be necessary to set the request
method explicitly.
...And 12 more matches
nsIWindowWatcher
method overview nsiwebbrowserchrome getchromeforwindow(in nsidomwindow awindow); nsiauthprompt getnewauthprompter(in nsidomwindow aparent); nsiprompt getnewprompter(in nsidomwindow aparent); nsidomwindow getwindowbyname(in wstring atargetname, in nsidomwindow acurrentwindow); nsisimpleenumerator getwindowenumerator(); nsidomwindow openwindow(in nsid...
...
methods getchromeforwindow() retrieve the chrome window mapped to the given dom window.
...since dom windows lack a (public) means of retrieving their corresponding chrome, this
method will do that.
...And 12 more matches
Dragging and Dropping Multiple Items - Web APIs
caution: all of the
methods and properties with a moz prefix (such as mozsetdataat() are gecko specific interfaces.
... mozilla supports the ability to drag multiple items using some additional non-standard
methods.
... these are
methods that mirror the types property as well as the getdata(), setdata() and cleardata()
methods, however, they take an additional argument that specifies the index of the item to retrieve, modify or remove.
...And 12 more matches
Using the User Timing API - Web APIs
this document shows how to create mark and measure performance entry types and how to use user timing
methods (which are extensions of the performance interface) to retrieve and remove entries from the browser's performance timeline.
... creating a performance mark the performance.mark()
method is used to create a performance mark.
... the
method takes one argument, the name of the mark, as shown in the following example.
...And 12 more matches
Classes - JavaScript
class body and
method definitions the body of a class is the part that is in curly brackets {}.
... this is where you define class members, such as
methods or constructor.
... constructor the constructor
method is a special
method for creating and initializing an object created with a class.
...And 12 more matches
Appendix D: Loading Scripts - Archive of obsolete content
flexibility: script tags provide a means to specify the character set and javascript version of the scripts to be loaded, which many other
methods do not.
... <?xml version="1.0" encoding="utf-8"?> <!doctype overlay> <overlay id="script-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript;version=1.8" src="overlay.js"/> </overlay> evalinsandbox the components.utils.evalinsandbox
method may be used to load arbitrary code into components.utils.sandbox objects.
...this is the
method used by jetpack's securable module system to load nearly all executable code.
...And 11 more matches
Custom XUL Elements with XBL - Archive of obsolete content
with xbl you can define new elements and define their properties, attributes,
methods and event handlers.
...this code gets the dom object that corresponds to the xshelloperson tag, allowing you access to its
methods and properties.
... in this case we're calling the remove
method, which we will discuss later on.
...And 11 more matches
Elements - Archive of obsolete content
a xbl binding can add anonymous content, fields, properties,
methods, and event handlers to html/xml elements.
...in the latter case all
methods and handlers will be blocked, but the anonymous content and styling will be still used.
... implementation <!entity % implementation-content "(
method|property)*"> <!element implementation %implementation-content;> <!attlist implementation id id #implied name cdata #implied implements cdata #implied > the implementation element describes the set of
methods and properties that are attached to the bound element.
...And 11 more matches
Commands - Archive of obsolete content
you can also invoke a command by calling the docommand
method either of the command element or an element attached to the command such as a button.
...the command dispatcher contains
methods for retrieving controllers for commands and for retrieving and modifying the focus.
...a controller is expected to implement four
methods, which are listed below: supportscommand (command) this
method should return true if the controller supports a command.
...And 11 more matches
Tree View Details - Archive of obsolete content
the tree will query the view for each row by calling its getlevel
method to find out the level of that row.
... in addition to the getlevel
method, there is a hasnextsibling function which, given a row, should return true if there is another row afterwards at the same level.
... the getparentindex
method is expected to return the parent row of a given row, that is, the row before it with a lower nesting value.
...And 11 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
to do so, we'll utilize some techniques for accessing dom nodes and executing
methods like focus() and select().
...now we will see how components can also expose
methods and variables.
... these frameworks, by default, basically re-run all our javascript on every change against this virtual dom, and apply different
methods to cache expensive calculations and optimize execution.
...And 11 more matches
Setting up your own test automation environment - Learn web development
in terms of what string to use inside the .forbrowser()
method for other browsers, see the browser enum reference page.
...this needs to have the forbrowser()
method chained onto it to specify what browser you want to test with this builder, and the build()
method to actually build it (see the builder class reference for detailed information on these features).
... let driver = new webdriver.builder() .forbrowser('firefox') .build(); note that it is possible to set specific configuration options for browsers to be tested, for example you can set a specific version and os to test in the forbrowser()
method: let driver = new webdriver.builder() .forbrowser('firefox', '46', 'mac') .build(); you could also set these options using an environment variable, for example: selenium_browser=firefox:46:mac let's create a new test to allow us to explore this code as we talk about it.
...And 11 more matches
Embedding Tips
get thensiwebnavigation interface on your webbrowser and call the loaduri
method with the appropriate uri and flags.
... this interface also has
methods for reloading, stopping a load and going back and forward in the history.
... implement the nsiwebprogresslistener interface and register it with the appropriate web browser object via the nsiwebbrowser::addwebbrowserlistener()
method.
...And 11 more matches
mozIStorageConnection
method overview void asyncclose([optional] in mozistoragecompletioncallback acallback); void begintransaction(); void begintransactionas(in print32 transactiontype); mozistoragestatement clone([optional] in boolean areadonly); void close(); void committransaction(); void createaggregatefunction(in autf8string afunctionname, in long anuma...
...
methods asyncclose() asynchronously closes a database connection, allowing all pending asynchronous statements to complete first.
... exceptions thrown ns_error_unexpected thrown if the
method was called on a thread other than the one that opened the connection.
...And 11 more matches
nsIBrowserHistory
to use this service, use: var browserhistory = components.classes["@mozilla.org/browser/nav-history-service;1"] .getservice(components.interfaces.nsibrowserhistory);
method overview void addpagewithdetails(in nsiuri auri, in wstring atitle, in long long alastvisited); obsolete since gecko 15.0 void markpageasfollowedlink(in nsiuri auri); obsolete since gecko 22.0 void markpageastyped(in nsiuri auri); obsolete since gecko 22.0 void registeropenpage(in nsiuri auri); obsolete since gecko 9.0 void removeallpages(); ...
...fy); void removepagesbytimeframe(in long long abegintime, in long long aendtime); void removepagesfromhost(in autf8string ahost, in boolean aentiredomain); void removevisitsbytimeframe(in long long abegintime, in long long aendtime); void unregisteropenpage(in nsiuri auri); obsolete since gecko 9.0 note: the markpageasfollowedlink and markpageastyped
methods were moved to nsinavhistoryservice in gecko 22.0 so that all markpageas*
methods can be found in one interface.
...
methods addpagewithdetails() obsolete since gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) note: this
method was removed in gecko 15.0.
...And 11 more matches
nsIThread
last changed in gecko 1.9 (firefox 3) inherits from: nsieventtarget
method overview void shutdown() boolean haspendingevents() boolean processnextevent(in boolean maywait) attributes attribute type description prthread prthread the nspr thread object corresponding to the nsithread.
...
methods shutdown() shuts down the thread.
...during the execution of this
method call, events for the current thread may continue to be processed.
...And 11 more matches
nsITreeView
inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) implementing a nsitreeview in lieu of dom
methods for tree creation can improve performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur.
...
method overview boolean candrop(in long index, in long orientation, in nsidomdatatransfer datatransfer); boolean candropbeforeafter(in long index, in boolean before); obsolete since gecko 1.8 boolean candropon(in long index); obsolete since gecko 1.8 void cyclecell(in long row, in nsitreecolumn col); void cycleheader(in nsitreecolumn col); void drop(in long row, in long orientation, in nsidomdatatransfer datatransfer); astring getcellproperties(in long row, in nsitreecolumn col, in nsisupportsarray properties obsolete since gecko 22); astring getcelltext(in long row, in nsitreecolumn col); astring getcellvalue(in long row, in nsitreecolu...
... 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.
...And 11 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
introduction this article is an overview of some powerful, fundamental dom level 1
methods and how to use them from javascript.
...the dom
methods presented here are not specific to html; they also apply to xml.
... the dom
methods presented here are part of the document object model (core) level 1 specification.
...And 11 more matches
RTCPeerConnection - Web APIs
it provides
methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it's no longer needed.
...also included is a list of any ice candidates that may already have been generated by the ice agent since the offer or answer represented by the description was first instantiated.getdefaulticeservers() the getdefaulticeservers()
method of the rtcpeerconnection interface returns an array of objects based on the rtciceserver dictionary, which indicates what, if any, ice servers the browser will use by default if none are provided to the rtcpeerconnection in its rtcconfiguration.
...angethe onsignalingstatechange event handler property of the rtcpeerconnection interface specifies a function to be called when the signalingstatechange event occurs on an rtcpeerconnection interface.ontrack the rtcpeerconnection property ontrack is an eventhandler which specifies a function to be called when the track event occurs, indicating that a track has been added to the rtcpeerconnection.
methodsalso inherits
methods from: eventtargetaddicecandidate()when a web site or app using rtcpeerconnection receives a new ice candidate from the remote peer over its signaling channel, it delivers the newly-received candidate to the browser's ice agent by calling rtcpeerconnection.addicecandidate().addstream() the obsolete rtcpeerconnection
method addstream() adds a mediastream as a local source o...
...And 11 more matches
Using readable streams - Web APIs
this is done using the readablestream.getreader()
method: // fetch the original image fetch('./tortoise.png') // retrieve its body as readablestream .then(response => response.body) .then(body => { const reader = body.getreader(); invoking this
method creates a reader and locks it to the stream — no other reader may read this stream until this reader is released, e.g.
...e reduced by one step, as response.body is synchronous and so doesn't need the promise: // fetch the original image fetch('./tortoise.png') // retrieve its body as readablestream .then(response => { const reader = response.body.getreader(); reading the stream now you’ve got your reader attached, you can read data chunks out of the stream using the readablestreamdefaultreader.read()
method.
... the first object can contain up to five members, only the first of which is required: start(controller) — a
method that is called once, immediately after the readablestream is constructed.
...And 11 more matches
Using writable streams - Web APIs
the first object can contain up to four members, all of which are optional: start(controller) — a
method that is called once, immediately after the writablestream is constructed.
... inside this
method, you should include code that sets up the stream functionality, e.g.
... write(chunk,controller) — a
method that is called repeatedly every time a new chunk is ready to be written to the underlying sink (specified in the chunk parameter).
...And 11 more matches
WritableStream.WritableStream() - Web APIs
syntax var writablestream = new writablestream(underlyingsink[, queuingstrategy]); parameters underlyingsink an object containing
methods and properties that define how the constructed stream instance will behave.
... underlyingsink can contain the following: start(controller) optional this is a
method, called immediately when the object is constructed.
... the contents of this
method are defined by the developer, and should aim to get access to the underlying sink.
...And 11 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
additionally, for http request
methods that can cause side-effects on server data (in particular, http
methods other than get, or post with certain mime types), the specification mandates that browsers "preflight" the request, soliciting supported
methods from the server with the http options request
method, and then, upon "approval" from the server, sending the actual request.
...a “simple request” is one that meets all the following conditions: one of the allowed
methods: get head post apart from the headers automatically set by the user agent (for example, connection, user-agent, or the other headers defined in the fetch spec as a “forbidden header name”), the only headers which are allowed to be manually set are those which the fetch spec defines as a “cors-safelisted request-header”, which are: accept accept-language content-langu...
... preflighted requests unlike “simple requests” (discussed above), "preflighted" requests first send an http request by the options
method to the resource on the other domain, to determine if the actual request is safe to send.
...And 11 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
overview javascript is a multi-paradigm, dynamic language with types and operators, standard built-in objects, and
methods.
...just try parsing the string "10.2abc" with each
method by yourself in the console and you'll understand the differences better.
...they have
methods as well that allow you to manipulate the string and access information about the string: 'hello'.charat(0); // "h" 'hello, world'.replace('world', 'mars'); // "hello, mars" 'hello'.touppercase(); // "hello" other types javascript distinguishes between null, which is a value that indicates a deliberate non-value (and is only accessible through the null keyword), and undefined, which is a valu...
...And 11 more matches
Functions - JavaScript
a
method is a function that is a property of an object.
... read more about objects and
methods in working with objects.
... it turns out that functions are themselves objects—and in turn, these objects have
methods.
...And 11 more matches
String - JavaScript
some of the most-used operations on strings are to check their length, to build and concatenate them using the + and += string operators, checking for the existence or location of substrings with the indexof()
method, or extracting substrings with the substring()
method.
...the first is the charat()
method: return 'cat'.charat(1) // returns "a" the other way (introduced in ecmascript 5) is to treat the string as an array-like object, where individual characters correspond to a numerical index: return 'cat'[1] // returns "a" when using bracket notation for character access, attempting to delete or assign a value to these properties will not succeed.
...in javascript, you just use the less-than and greater-than operators: let a = 'a' let b = 'b' if (a < b) { // true console.log(a + ' is less than ' + b) } else if (a > b) { console.log(a + ' is greater than ' + b) } else { console.log(a + ' and ' + b + ' are equal.') } a similar result can be achieved using the localecompare()
method inherited by string instances.
...And 11 more matches
Bookmarks - Archive of obsolete content
the places bookmarks service, provided by the nsinavbookmarksservice interface, provides
methods for creating, deleting, and manipulating bookmarks and bookmark folders.
...rvice as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder()
method.
... creating a new bookmark to create a new bookmark, use the nsinavbookmarksservice.insertbookmark()
method.
...And 10 more matches
Preferences - Archive of obsolete content
note: this article doesn't cover all available
methods for manipulating preferences; please refer to the xpcom reference pages listed in resources section for the complete list of
methods.
... the interfaces dealing with preferences are fairly well documented, so using the
methods not mentioned here should be straightforward.
...there are six
methods in nsiprefbranch that read and write preferences: getboolpref(), setboolpref(), getcharpref(), setcharpref(), getintpref(), and setintpref().
...And 10 more matches
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
the frozen string api does not have (or need) nsxpidlstring: - nsxpidlstring value; + nsstring value; ptr->getter
method(getter_copies(value)); - const prunichar *strvalue = value; + // nsstring doesn't cast directly to prunichar*, use .get()+ const prunichar *strvalue = value.get(); the frozen string api doesn't accept a length for .truncate().
...all these functions are now available via the new string api - appendutf16toutf8(srcstring, deststring); + deststring.append(ns_convertutf16toutf8(srcstring)); the signatures of the find
methods differ between the two apis.
... if you are only finding a single character, prefer the findchar
method.
...And 10 more matches
Appendix F: Monitoring DOM changes - Archive of obsolete content
most of these
methods are specific to a particular site or codebase.
... hashchange and popstate events most ajax-heavy sites update the url when they significantly change their content, either via a change to the fragment identifier (hash) or more recently via the history.pushstate
method.
...event listeners for those events are the preferred
method for detecting dom modifications when feasible.
...And 10 more matches
Observer Notifications - Archive of obsolete content
the interface has only one
method observe() which takes three parameters.
... this example code shows you what an implementation of the nsiobserver interface looks like: let testobserver = { observe : function(asubject, atopic, adata) { if (atopic == "xulschoolhello-test-topic") { window.alert("data received: " + adata); } } } in order for this observer to work, you need to use the observer service that provides
methods for you to add, remove, notify and enumerate observers.
... adding an observer to the observer service is simple, invoking the addobserver
method with three parameters.
...And 10 more matches
browser - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a xul <browser> element represents a frame which is expected to contain a view of a web document.
... it is similar to an iframe except that it holds a page history and contains additional
methods to manipulate the currently displayed page.
... get firefox most of the properties and
methods of the browser will rarely be used and can only be called from chrome urls.
...And 10 more matches
Introduction to CSS layout - Learn web development
by understanding what each
method is designed for you will be in a good place to understand which is the best layout tool for each task.
... the
methods that can change how elements are laid out in css are as follows: the display property — standard values such as block, inline or inline-block can change how elements behave in normal flow, for example making a block-level element behave like an inline element (see types of css boxes for more information).
... we also have entire layout
methods that are switched on via specific display values, for example css grid and flexbox, which alter how elements inside the element they are set on are laid out.
...And 10 more matches
Graceful asynchronous programming with Promises - Learn web development
in the first example, we'll use the fetch()
method to fetch an image from the web, the blob()
method to transform the fetch response's raw body contents into a blob object, and then display that blob inside an <img> element.
... inside your <script> element, add the following line: let promise = fetch('coffee.jpg'); this calls the fetch()
method, passing it the url of the image to fetch from the network as a parameter.
... to respond to the successful completion of the operation whenever that occurs (in this case, when a response is returned), we invoke the .then()
method of the promise object.
...And 10 more matches
Creating Sandboxed HTTP Connections
nsiuri is an xpcom representation of an uri, with useful
methods to query and manipulate the uri.
... to create an nsiuri from an string, we use the newuri
method of nsiioservice: // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); once the nsiuri has been created, a nsichannel can be generated from it using nsiioservice's newchannelfromuri
method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen
method is called.
... it takes two arguments: a listener and a context that is passed to the listener's
methods.
...And 10 more matches
Manipulating bookmarks using Places
the places bookmarks service, provided by the nsinavbookmarksservice interface, provides
methods for creating, deleting, and manipulating bookmarks and bookmark folders.
...rvice as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder()
method.
... creating a new bookmark to create a new bookmark, use the nsinavbookmarksservice.insertbookmark()
method.
...And 10 more matches
XPCOM array guide
this array is read-only, and the interface does not provide any
methods that will allow adding and removing members.
...the
methods that modify the array have been broken out into nsimutablearray.
...the
method enumerate() returns a nsisimpleenumerator which accesses all the elements in the array.
...And 10 more matches
nsIDOMChromeWindow
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void beginwindowmove(in nsidomevent mousedownevent); void getattention(); void getattentionwithcyclecount(in long acyclecount); void maximize(); void minimize(); void notifydefaultbuttonloaded(in nsidomelement defaultbutton); void restore(); void setcursor(in domstring cursor); attributes attribute type description browserdomwindow nsibrowserdomwindow the related nsibrowserdomwindow instance which provides access to yet another layer of utility functions by chrome script.
...
methods beginwindowmove() on some operating systems, we must allow the window manager to handle window dragging.
... this
method tells the window manager to start dragging the window.
...And 10 more matches
nsIDOMEvent
method overview boolean deserialize(in constipcmessageptr amsg, out voidptr aiter); violates the xpcom interface guidelines void duplicateprivatedata(); native code only!
...800000 locate 0x01000000 move 0x02000000 resize 0x04000000 forward 0x08000000 help 0x10000000 back 0x20000000 text 0x40000000 alt_mask 0x00000001 control_mask 0x00000002 shift_mask 0x00000004 meta_mask 0x00000008
methods violates the xpcom interface guidelines deserialize() boolean deserialize( in constipcmessageptr amsg, out voidptr aiter ); parameters amsg aiter return value native code only!duplicateprivatedata void duplicateprivatedata(); parameters none.
...this
method will be removed in future releases, see bug 691151.
...And 10 more matches
nsITransactionManager
inherits from: nsisupports last changed in gecko 1.7
method overview void addlistener(in nsitransactionlistener alistener); void beginbatch(); void clear(); void dotransaction(in nsitransaction atransaction); void endbatch(); nsitransactionlist getredolist(); nsitransactionlist getundolist(); nsitransaction peekredostack(); nsitransaction peekundostack(); void redotransaction(); void removelistener(in nsitransactionlistener alistener); void undotransaction(); attributes attribute type description maxtransactioncount long sets the maximum number of transaction items the transaction manager will maintain at any ti...
...this
method will prune the necessary number of transactions on the undo and redo stacks if the value specified is less than the number of items that exist on both the undo and redo stacks.
...
methods addlistener() adds a listener to the transaction manager's notification list.
...And 10 more matches
Debugger.Frame - Firefox Developer Tools
every handler
method called while the debuggee is running in a given frame is given the same frame object.
...ace whatever properties it likes on its debugger.frame instances, without worrying about interfering with other debuggers.) when the debuggee pops a stack frame (say, because a function call has returned or an exception has been thrown from it), the debugger.frame instance referring to that frame becomes inactive: its live property becomes false, and accessing its other properties or calling its
methods throws an exception.
... (note that the debuggee is not considered an “immediate caller” of handler
methods it triggers.
...And 10 more matches
console - Web APIs
for example: console.log("failed to open the specified link") this page documents the
methods available on the console object and gives a few usage examples.
...
methods console.assert() log a message and stack trace to console if the first argument is false.
...you may use string substitution and additional arguments with this
method.
...And 10 more matches
Drag Operations - Web APIs
to set a drag data item within the datatransfer, use the setdata()
method.
...to do this, call the setdata()
method multiple times with different formats.
... you can clear the data using the cleardata()
method, which takes one argument: the type of the data to remove.
...And 10 more matches
Payment processing concepts - Web APIs
the payer authenticates themselves, then authorizes payment, as required by the payment
method.
... payment
method the instrument by which payment is submitted, such as a credit card or online payment service.
... payment
method provider an organization that provides the technology needed to submit payments using a given payment
method.
...And 10 more matches
Using DTMF with WebRTC - Web APIs
hasaddtrack because some browsers have not yet implemented rtcpeerconnection.addtrack(), therefore requiring the use of the obsolete addstream()
method, we use this boolean to determine whether or not the user agent supports addtrack(); if it doesn't, we'll fall back to addstream().
...andidate = handlereceivericeevent; if (hasaddtrack) { receiverpc.ontrack = handlereceivertrackevent; } else { receiverpc.onaddstream = handlereceiveraddstreamevent; } navigator.mediadevices.getusermedia(mediaconstraints) .then(gotstream) .catch(err => log(err.message)); } after creating the rtcpeerconnection for the caller (callerpc), we look to see if it has an addtrack()
method.
...this variable will let the example operate even on browsers not yet implementing the newer addtrack()
method; we'll do so by falling back to the older addstream()
method.
...And 10 more matches
Migrating from webkitAudioContext - Web APIs
changes to the creator
methods three of the creator
methods on webkitaudiocontext have been renamed in audiocontext.
... these are simple renames that were made in order to improve the consistency of these
method names on audiocontext.
... if your code uses either of these names, like in the example below : // old
method names var gain = context.creategainnode(); var delay = context.createdelaynode(); var js = context.createjavascriptnode(1024); you can simply rename the
methods to look like this: // new
method names var gain = context.creategain(); var delay = context.createdelay(); var js = context.createscriptprocessor(1024); the semantics of these
methods remain the same in the renamed versions.
...And 10 more matches
Twitter - Archive of obsolete content
(it's easy!)
methods each
method in twitter's api maps to a
method here.
... for example, the twitter
method for tweeting, statuses/update, maps to jetpack.lib.twitter.statuses.update().
... most of twitter's
methods are supported, but not all.
...And 9 more matches
prefwindow - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a specialized window used for preference dialogs.
... you can open a preference window using a window's opendialog
method as with other dialogs.
... attributes buttonalign, buttondir, buttonorient, buttonpack, buttons, defaultbutton, lastselected, onbeforeaccept, ondialogaccept, ondialogcancel, ondialogdisclosure, ondialoghelp, onload, onunload, title, type properties buttons, currentpane, defaultbutton, lastselected, preferencepanes, type
methods acceptdialog, addpane, canceldialog, centerwindowonscreen, getbutton, opensubdialog, openwindow, showpane examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="saveoptions" label="backups"> <preferences> <preference id="pref-backup" name="myapp...
...And 9 more matches
NPN_Invoke - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary invokes a
method on the given npobject.
... syntax #include <npruntime.h> bool npn_invoke(npp npp, npobject *npobj, npidentifier
methodname, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the
method on the object.
... npobj the object on which to invoke a
method.
...And 9 more matches
Using the W3C DOM - Archive of obsolete content
instead, use the w3c dom properties and
methods (examples in the next section).
... these are supported by internet explorer too so there is no need to use msie-specific attributes and
methods.
... accessing elements with the w3c dom the basic
method for referencing elements in an html page is document.getelementbyid().
...And 9 more matches
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
a function signature (or type signature, or
method signature) defines input and output of functions or
methods.
... a signature can include: parameters and their types a return value and type exceptions that might be thrown or passed back information about the availability of the
method in an object-oriented program (such as the keywords public, static, or prototype).
...a signature in javascript can still give you some information about the
method: myobject.prototype.myfunction(value) the
method is installed on an object called myobject.
...And 9 more matches
Manipulating documents - Learn web development
using
methods available on this object you can do things like return the window's size (see window.innerwidth and window.innerheight), manipulate the document loaded into that window, store data specific to that document on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more.
...inside your script element, add the following line: const link = document.queryselector('a'); now we have the element reference stored in a variable, we can start to manipulate it using properties and
methods available to it (these are defined on interfaces like htmlanchorelement in the case of <a> element, its more general parent interface htmlelement, and node — which represents all nodes in a dom).
... there are older
methods available for grabbing element references, such as: document.getelementbyid(), which selects an element with a given id attribute value, e.g.
...And 9 more matches
Object building practice - Learn web development
the first part of the script looks like so: const canvas = document.queryselector('canvas'); const ctx = canvas.getcontext('2d'); const width = canvas.width = window.innerwidth; const height = canvas.height = window.innerheight; this script gets a reference to the <canvas> element, then calls the getcontext()
method on it to give us a context on which we can start to draw.
... this handles the properties, but what about the
methods?
... drawing the ball first add the following draw()
method to the ball()'s prototype: ball.prototype.draw = function() { ctx.beginpath(); ctx.fillstyle = this.color; ctx.arc(this.x, this.y, this.size, 0, 2 * math.pi); ctx.fill(); } using this function, we can tell the ball to draw itself onto the screen, by calling a series of members of the 2d canvas context we defined earlier (ctx).
...And 9 more matches
Browser API
api extensions: the api includes several new
methods and events to manipulate and listen for changes to the embedded content's state, interited by the htmliframeelement interface.
... browser api interfaces to support the requirement of a browser <iframe>, the htmliframeelement dom interface has been extended with new
methods that give the <iframe> some super powers.
... navigation
methods the following navigation
methods allow navigation through the browsing history of the <iframe>.
...And 9 more matches
HTTP Cache
//github.com/realityripple/uxp/blob/master/netwerk/cache2/nsicachestorageservice.idl "@mozilla.org/netwerk/cache-storage-service;1" provides
methods accessing “storage” objects – see nsicachestorage below – giving further access to cache entries – see nsicacheentry more below – per specific url.
... currently we have 3 types of storages, all the access
methods return an nsicachestorage object: memory-only (memorycachestorage): stores data only in a memory cache, data in this storage are never put to disk disk (diskcachestorage): stores data on disk, but for existing entries also looks into the memory-only storage; when instructed via a special argument also primarily looks into application caches application cache (appcachestorage): when a consumer has a specific nsiapplicationcache (i.e.
... a particular app cache version in a group) in hands, this storage will provide read and write access to entries in that application cache; when the app cache is not specified, this storage will operate over all existing app caches the service also provides
methods to clear the whole disk and memory cache content or purge any intermediate memory structures: clear – after it returns, all entries are no longer accessible through the cache apis; the
method is fast to execute and non-blocking in any way; the actual erase happens in background purgefrommemory – removes (schedules to remove) any intermediate cache data held in memory for faster access (more about the intermediate cache below) nsiloadcontextinfo distinguishes the scope of the st...
...And 9 more matches
Extending a Protocol
to make this tutorial less abstract (more fun!), we are going to implement a js
method called echo() on the navigator interface.
... the
method will take one argument, a domstring, which we will pass to the parent process.
... implementing the navigator.echo() in your favorite editor, open dom/webidl/navigator.webidl at the end of the file, add: partial interface navigator { [throws] promise<domstring> echo(domstring astring); }; now we need to implement the echo()
method in c++, so open up ./dom/base/navigator.h and let's add the
method definition, so under public:: already_addrefed<promise> echo(const nsastring& astring, errorresult& arv); we use nsastring& as the domstring comes in from js as utf-16.
...And 9 more matches
DeferredTask.jsm
firefox 28 note interface was changed in firefox 28, and old
methods were removed.
...
method overview bool ispending();obsolete since gecko 28 void start();obsolete since gecko 28 void flush();obsolete since gecko 28 void cancel();obsolete since gecko 28 void arm(); void disarm(); promise finalize(); attributes isarmed boolean indicates whether the task is currently requested to start again later, rega...
...
methods ispending obsolete since gecko 28 check the current task state.
...And 9 more matches
imgIContainer
it also provides
methods for drawing images onto thebes contexts.
...as a service: var imgicontainer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.imgicontainer);
method overview void addrestoredata([array, size_is(acount), const] in char data, in unsigned long acount); native code only!
... obsolete since gecko 2.0 void setframeblend
method(in unsigned long framenumber, in print32 ablend
method); obsolete since gecko 2.0 void setframedisposal
method(in unsigned long framenumber, in print32 adisposal
method); obsolete since gecko 2.0 void setframehasnoalpha(in unsigned long framenumber); obsolete since gecko 2.0 void setframetimeout(in unsigned long framenumber, in print32 atimeout); obsolete since gecko 2...
...And 9 more matches
nsICacheEntryDescriptor
inherits from: nsicacheentryinfo last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void close(); void doom(); void doomandfailpendingrequests(in nsresult status); string getmetadataelement(in string key); void markvalid(); nsiinputstream openinputstream(in unsigned long offset); nsioutputstream openoutputstream(in unsigned long offset); void setdatasize(in unsigned long size); void setexpirationtime(in pruint32 expirationtime); void setmetadataelement(in string key, in string value); void visitmetadata(in nsicachemetadatavisitor visitor); attributes attribute type description accessgranted nscacheaccessmode get t...
...
methods close() this
method explicitly closes the descriptor (optional).
...doom() this
method dooms the cache entry this descriptor references in order to slate it for removal.
...And 9 more matches
nsINavBookmarkObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18)
method overview void onbeforeitemremoved(in long long aitemid, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onendupdatebatch(); void onfolderadded(in print64 folder, in print64 parent, in print32 index); obsolete since gecko 1.9 void onfolderchanged(in print64 folder, in acstring property); obsolete since gecko 1.9 void onfoldermoved(in print64 folde...
... void onitemvisited(in long long aitemid, in long long avisitid, in prtime atime, in unsigned long atransitiontype, in nsiuri auri, in long long aparentid, in acstring aguid, in acstring aparentguid); void onseparatoradded(in print64 parent, in print32 index); obsolete since gecko 1.9 void onseparatorremoved(in print64 parent, in print32 index); obsolete since gecko 1.9
methods onbeforeitemremoved() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note: this
method was removed in gecko 21.0 as part of bug 826409.
... this
method notifies this observer that an item is about to be removed.
...And 9 more matches
nsINavHistoryResultViewObserver
toolkit/components/places/public/nsinavhistoryservice.idlscriptable this interface is used by clients of the history results to define domain-specific handling of specific nsitreeview
methods that the history result doesn't implement.
... inherits from: nsisupports last changed in gecko 1.9.0
method overview boolean candrop(in long index, in long orientation); void ondrop(in long row, in long orientation); void ontoggleopenstate(in long index); void oncycleheader(in nsitreecolumn column); void oncyclecell(in long row, in nsitreecolumn column); void onselectionchanged(); void onperformaction(in wstring action); void onperformactiononrow(in wstring action, in long row); void onperformactiononcell(in wstring action, in long row, in nsitreecolumn column); constants constant value description drop_before -1 the drag operation wishes to insert the dragged item before the indicated row.
...
methods candrop() implement this
method to report whether or not a drop is permitted onto the specified location.
...And 9 more matches
nsIXPCScriptable
for example, callers must guarantee that they set the *_retval of the various
methods that return a boolean to pr_true before making the call.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports
method overview void precreate(in nsisupports nativeobj, in jscontextptr cx, in jsobjectptr globalobj, out jsobjectptr parentobj); void create(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); void postcreate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool addproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool delproperty(in nsixpconnectwrappednative wrapper, in js...
... constants constant value description want_precreate 1 << 0 want_create 1 << 1 want_postcreate 1 << 2 want_addproperty 1 << 3 want_delproperty 1 << 4 want_getproperty 1 << 5 want_setproperty 1 << 6 want_enumerate 1 << 7 want_newenumerate 1 << 8 indicates that the object wants to have its newenumerate
method called.
...And 9 more matches
AudioWorkletProcessor.process - Web APIs
the process()
method of an audioworkletprocessor-derived class implements the audio processing algorithm for the audio processor worklet.
... although the
method is not a part of the audioworkletprocessor interface, any implementation of audioworkletprocessor must provide a process()
method.
... the
method is called synchronously from the audio rendering thread, once for each block of audio (also known as a rendering quantum) being directed through the processor's corresponding audioworkletnode.
...And 9 more matches
DirectoryEntrySync - Web APIs
it includes
methods for creating, reading, looking up, and recursively removing files in a directory.
... example the getfile()
method returns a fileentrysync, which represents a file in the file system.
... var fileentry = fs.root.getfile('seekrits.txt', {create: true}); the getdirectory()
method returns a directoryentrysync, which represents a file in the file system.
...And 9 more matches
EventTarget.addEventListener() - Web APIs
the eventtarget
method addeventlistener() sets up a function that will be called whenever the specified event is delivered to the target.
... return value undefined usage notes the event listener callback the event listener can be specified as either a callback function or an object that implements eventlistener, whose handleevent()
method serves as the callback function.
... the callback function itself has the same parameters and return value as the handleevent()
method; that is, the callback accepts a single parameter: an object based on event describing the event that has occurred, and it returns nothing.
...And 9 more matches
Performance API - Web APIs
methods the performance interface has two
methods.
... the now()
method returns a domhighrestimestamp whose value that depends on the navigation start and scope.
... the tojson()
method returns a serialization of the performance object, for those attributes that can be serialized.
...And 9 more matches
Rendering and the WebXR frame animation callback - Web APIs
before you can render the virtual environment, you need to establish a webxr session by creating an xrsession using the navigator.xr.requestsession()
method; you also need to associate the session with a framebuffer and perform other setup tasks.
...this is done by calling the xrsession
method requestanimationframe().
...nsform(viewerstartposition, viewerstartorientation)); animationframerequestid = xrsession.requestanimationframe(mydrawframe); } } after getting a reference space for the immersive world, this creates an offset reference space representing the position and orientation of the viewer by creating an xrrigidtransform representing that position and orientation, then calling the xrreferencespace
method getoffsetreferencespace().
...And 9 more matches
Window.open() - Web APIs
the window interface's open()
method loads the specified resource into the new or existing browsing context (window, <iframe> or tab) with the specified name.
...the returned reference can be used to access properties and
methods of the new window as long as it complies with same-origin policy security requirements.
... description the open()
method creates a new secondary browser window, similar to choosing new window from the file menu.
...And 9 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
the settimeout()
method of the windoworworkerglobalscope mixin (and successor to window.settimeout()) sets a timer which executes a function or specified piece of code once the timer expires.
...example: settimeout(function(arg1){}.bind(undefined, 10), 1000); the "this" problem when you pass a
method to settimeout() (or any other function, for that matter), it will be invoked with a this value that may differ from your expectation.
... see the following example: myarray = ['zero', 'one', 'two']; myarray.my
method = function (sproperty) { alert(arguments.length > 0 ?
...And 9 more matches
Index - HTTP
9 access-control-allow-
methods cors, http, reference, header the access-control-allow-
methods response header specifies the
method or
methods allowed when accessing the resource in response to a preflight request.
... 12 access-control-max-age cors, http, reference, header the access-control-max-age response header indicates how long the results of a preflight request (that is the information contained in the access-control-allow-
methods and access-control-allow-headers headers) can be cached.
... 14 access-control-request-
method cors, http, reference, header the access-control-request-
method request header is used when issuing a preflight request to let the server know which http
method will be used when the actual request is made.
...And 9 more matches
Public class fields - JavaScript
syntax class classwithinstancefield { instancefield = 'instance field' } class classwithstaticfield { static staticfield = 'static field' } class classwithpublicinstance
method { public
method() { return 'hello world' } } examples public static fields public static fields are useful when you want a field to exist only once per class, not on every class instance you create.
... class classwithstaticfield { static basestaticfield = 'base static field' static anotherbasestaticfield = this.basestaticfield static basestatic
method() { return 'base static
method output' } } class subclasswithstaticfield extends classwithstaticfield { static substaticfield = super.basestatic
method() } console.log(classwithstaticfield.anotherbasestaticfield) // expected output: "base static field" console.log(subclasswithstaticfield.substaticfield) // expected output: "base static
method output" public instance fields public instance ...
...just as in public instance
methods, if you're in a subclass you can access the superclass prototype using super.
...And 9 more matches
ui/sidebar - Archive of obsolete content
once you've done that, you can show the sidebar by calling the sidebar's show()
method.
... you can hide the sidebar by calling its hide()
method.
...from firefox 33 onwards you can pass a browserwindow into these
methods, and they will then operate on the specified window.
...And 8 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
r.server2.username", env_user); //smtp lockpref("mail.identity.id1.smtpserver", "smtp1"); lockpref("mail.identity.id1.stationery_folder", "imap://" + env_user + "@imap-int.int-evry.fr/templates"); lockpref("mail.identity.id1.tmpl_folder_picker_mode", "0"); lockpref("mail.identity.id1.valid", true); //smtp general lockpref("mail.smtp.defaultserver", "smtp1"); lockpref("mail.smtpserver.smtp1.auth_
method", 0); lockpref("mail.smtpserver.smtp1.hostname", "smtp-int.int-evry.fr"); lockpref("mail.smtpserver.smtp1.port", 25); lockpref("mail.smtpserver.smtp1.try_ssl", 0); lockpref("mail.smtpserver.smtp1.username", ""); lockpref("mail.smtpservers", "smtp1"); lockpref("mail.startup.enabledmailcheckonce", true); lockpref("mailnews.quotingprefs.version", 1); lockpref("mailnews.ui.threadpane.version", 5); /...
...gs defaultpref("mail.server.server1.hostname", "myimap.server.com" ); defaultpref("mail.server.server1.name", userinfo.mail ); defaultpref("mail.server.server1.port", 993 ); defaultpref("mail.server.server1.sockettype", 3 ); defaultpref("mail.server.server1.type", "imap" ); defaultpref("mail.server.server1.username", userinfo.mail ); // smtp server settings defaultpref("mail.smtpserver.smtp1.auth
method", 3 ); defaultpref("mail.smtpserver.smtp1.description", "my company name" ); defaultpref("mail.smtpserver.smtp1.hostname", "mysmtp.server.com" ); defaultpref("mail.smtpserver.smtp1.port", 465 ); defaultpref("mail.smtpserver.smtp1.try_ssl", 3 ); defaultpref("mail.smtpserver.smtp1.username", userinfo.mail ); // glue it all together defaultpref("mail.account.account1.identities", "id1" ); defaultpr...
... my tests were on windows vista, and i noticed at least one difference, it is that paths changed; now the profile is in (for my procacci user sample): c:\users\procacci\appdata\roaming\thunderbird\profiles\v6we4uku.default start in debug mode in comand line interface: debug with displayerror() here's the result, i used the displayerror()
method ( not the best way :-( see bug 206294 ) to show environment and ldap variables in order to check that it worked fine.
...And 8 more matches
Dynamically modifying XUL-based user interface - Archive of obsolete content
it explains the concept of dom documents, demonstrates a few simple examples of using dom calls to perform basic manipulations on a document, and then demonstrates working with anonymous xbl content using mozilla-specific
methods.
...the most well known dom
method is probably document.getelementbyid(), which returns an element, given its id.
... you may also have used other calls, such as element.setattribute(), or, if you wrote an extension, the addeventlistener()
method.
...And 8 more matches
Document Object Model - Archive of obsolete content
the dom structure may be examined and modified using various
methods provided for this purpose.
...although there is only ever one document associated with a window at a time, you may load additional documents using various
methods.
...you can refer to the properties and
methods of the global object without having to qualify them with an object.
...And 8 more matches
Object-oriented JavaScript for beginners - Learn web development
notice that it has all the features you'd expect in a function, although it doesn't return anything or explicitly create an object — it basically just defines properties and
methods.
... notice also the this keyword being used here as well — it is basically saying that whenever one of these object instances is created, the object's name property will be equal to the name value passed to the constructor call, and the greeting()
method will use the name value passed to the constructor call too.
...you can now see that we have two new objects on the page, each of which is stored under a different namespace — when you access their properties and
methods, you have to start calls with person1 or person2; the functionality contained within is neatly packaged away so it won't clash with other functionality.
...And 8 more matches
Using the Browser API
api extensions: the api includes several new
methods and events to manipulate and listen for changes to the embedded content's state, interited by the htmliframeelement interface.
... on in the code we implement two simple event listeners to move the browser back and forward in history when the relevant buttons are pressed: back.addeventlistener('touchend',function() { browser.goback(); }); fwd.addeventlistener('touchend',function() { browser.goforward(); }); the functions can be handled using the browser api htmliframeelement.goback() and htmliframeelement.goforward()
methods.
... note that promise versions of browser api dom request
methods also exist, so you can use async promise style syntax if you so wish.
...And 8 more matches
CustomizableUI.jsm
areas are registered using the registerarea
method and unregistered using the unregisterarea
method.
...not all event handler
methods need to be defined.
...
method overview void addlistener(alistener); void removelistener(alistener); void registerarea(aareaid, aproperties); void registertoolbarnode(atoolbar, aexistingchildren); void registermenupanel(apanel); void unregisterarea(aareaid, adestroyplacements); void addwidgettoarea(awidgetid, aareaid, [optional] aposition); void removewid...
...And 8 more matches
NetUtil.jsm
to use these utilities, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/netutil.jsm"); once you've imported the module, you can then use its
methods.
...
method overview nsiasyncstreamcopier asynccopy(nsiinputstream asource, nsioutputstream asink, [optional] acallback) void asyncfetch(asource, acallback) nsichannel newchannel(awhattoload, [optional] aorigincharset, [optional] nsiuri abaseuri) nsiuri newuri(atarget, [optional] aorigincharset, [optional] nsiuri abaseuri) string readinputstreamtostring(ainputstream, acount, aoptions) attributes attribute type description ioservice nsiioservice returns a reference to nsiioservice.
...
methods asynccopy() the asynccopy()
method performs a simple asynchronous copy of data from a source input stream to a destination output stream.
...And 8 more matches
Tutorial: Embedding Rhino
exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects counter example counter's constructors class name dynamic properties defining javascript "
methods" adding counter to runscript runscript: a simple embedding about the simplest embedding of rhino possible is the runscript example.
...the tostring
method converts any javascript value to a string.
...we'll go through it
method by
method below.
...And 8 more matches
JS_InitClass
all instances of the new class will inherit these
methods via the prototype chain.
... (this is the javascript equivalent of public, non-static
methods in c++ or java.) static_ps jspropertyspec * either null or a pointer to the first element of an array of jspropertyspecs, terminated by the null jspropertyspec.
...(this is the javascript equivalent of public static
methods in c++ or java.) description js_initclass initializes a jsclass and (optionally) makes it visible to javascript code.
...And 8 more matches
XPCOM Stream Guide
there are two ways of getting the input stream: by calling the channel's .open()
method for a synchronous read, or by calling the channel's .asyncopen()
method with an nsistreamlistener object.
... you can get an nsichannel object from the io service's newchannel(spec, charset, baseuri)
method or its .newchannelfromuri(uri)
method.
...if everything goes well, calling the stream's .finish()
method overwrites the original file with the new file.
...And 8 more matches
nsXPIDLCString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies
method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... 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 stripchars stripwhitespace 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(const char equalsliteral(char lowercaseequa...
...
methods constructors void nsxpidlcstring() - source void nsxpidlcstring(const nsxpidlcstring&) - source parameters nsxpidlcstring& str operator const char* char* operator const char*() const - source operator[] char operator[](print32) const - source parameters print32 i char operator[](pruint32) const - source parameters pruint32 i operator= nsxpidlcstring& opera...
...And 8 more matches
nsXPIDLString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies
method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... 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 stripchars stripwhitespace 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(const char equalsliteral(char lowercaseequalsascii...
...
methods constructors void nsxpidlstring() - source void nsxpidlstring(const nsxpidlstring&) - source parameters nsxpidlstring& str operator const prunichar* prunichar* operator const prunichar*() const - source operator[] prunichar operator[](print32) const - source parameters print32 i prunichar operator[](pruint32) const - source parameters pruint32 i operator= ...
...And 8 more matches
nsIComponentRegistrar
xpcom/components/nsicomponentregistrar.idlscriptable this interface provides
methods to access and modify the xpcom component registry.
... inherits from: nsisupports last changed in gecko 1.0
method overview void autoregister(in nsifile aspec); void autounregister(in nsifile aspec); string cidtocontractid(in nscidref aclass); nscidptr contractidtocid(in string acontractid); nsisimpleenumerator enumeratecids(); nsisimpleenumerator enumeratecontractids(); boolean iscidregistered(in nscidref aclass); boolean iscontractidregistered(in string acontractid); void registerfactory(in nscidref aclass, in string aclassname, in string acontractid, in nsifactory afactory); void registerfactorylocation(in nscidref aclass, in string aclassname, in string acontractid, in nsifile afile, in string aloaderstr, in string atype); void unregisterfactory(in nscidref aclass, in nsifactory afactory); void unregisterfactoryloc...
...ation(in nscidref aclass, in nsifile afile);
methods autoregister() register a component (.manifest) file or all component files in a directory.
...And 8 more matches
nsILivemarkService
to use this service, use: var livemarkservice = components.classes["@mozilla.org/browser/livemark-service;2"] .getservice(components.interfaces.nsilivemarkservice);
method overview long long createlivemark(in long long folder, in astring name, in nsiuri siteuri, in nsiuri feeduri, in long index); long long createlivemarkfolderonly(in long long folder, in astring name, in nsiuri siteuri, in nsiuri feeduri, in long index); nsiuri getfeeduri(in long long container); long long getlivemarkidforfeeduri(in nsiuri afeeduri); ...
...nsiuri getsiteuri(in long long container); boolean islivemark(in long long folder); void reloadalllivemarks(); void reloadlivemarkfolder(in long long folderid); void setfeeduri(in long long container, in nsiuri feeduri); void setsiteuri(in long long container, in nsiuri siteuri); void start(); void stopupdatelivemarks();
methods createlivemark() creates a new livemark.
... createlivemarkfolderonly() this
method also creates a new livemark but use this
method during startup to avoid http traffic.
...And 8 more matches
nsIWindowMediator
implemented by: @mozilla.org/appshell/window-mediator;1 as a service: var windowmediator = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator);
method overview void addlistener(in nsiwindowmediatorlistener alistener); boolean calculatezposition(in nsixulwindow inwindow, in unsigned long inposition, in nsiwidget inbelow, out unsigned long outposition, out nsiwidget outbelow); native code only!
...
methods addlistener() register a listener for window status changes.
...note this
method is advisory only: it changes nothing either in windowmediator's internal state or with the window.
...And 8 more matches
Storage
closing a connection to close a connection on which only synchronous transactions were performed, use the mozistorageconnection.close()
method.
... if you performed any asynchronous transactions, you should instead use the mozistorageconnection.asyncclose()
method.
... binding one set of parameters if you only have one row to insert, or are using the synchronous api you'll need to use this
method.
...And 8 more matches
Debugger.Object - Firefox Developer Tools
debugger.object a debugger.object instance represents an object in the debuggee, providing reflection-oriented
methods to inspect and modify its referent.
... the referent’s properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through
methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent’s getters and setters.
... function properties of the debugger.object prototype the functions described below may only be called with a this value referring to a debugger.object instance; they may not be used as
methods of other kinds of objects.
...And 8 more matches
Applying styles and colors - Web APIs
colors up until now we have only seen
methods of the drawing context.
...we use the arc()
method to draw circles instead of squares.
...<br> <form onsubmit="return draw();"> <label>miter limit</label> <input type="number" size="3" id="miterlimit"/> <input type="submit" value="redraw"/> </form> </td> </tr> </table> document.getelementbyid('miterlimit').value = document.getelementbyid('canvas').getcontext('2d').miterlimit; draw(); screenshotlive sample using line dashes the setlinedash
method and the linedashoffset property specify the dash pattern for lines.
...And 8 more matches
Using images - Web APIs
using images from the same page we can obtain a reference to images on the same page as the canvas by using one of: the document.images collection the document.getelementsbytagname()
method if you know the id of the specific image you wish to use, you can use document.getelementbyid() to retrieve that specific image using images from other domains using the crossorigin attribute of an <img> element (reflected by the htmlimageelement.crossorigin property), you can request permission to load an image from another domain for use in your call to drawimage().
... using other canvas elements just as with normal images, we access other canvas elements using either the document.getelementsbytagname() or document.getelementbyid()
method.
... some disadvantages of this
method are that your image is not cached, and for larger images the encoded url can become quite long.
...And 8 more matches
Introduction to the DOM - Web APIs
for example, the standard dom specifies that the getelementsbytagname
method in the code below must return a list of all the <p> elements in the document: const paragraphs = document.getelementsbytagname("p"); // paragraphs[0] is the first <p> element // paragraphs[1] is the second <p> element, etc.
... alert(paragraphs[0].nodename); all of the properties,
methods, and events available for manipulating and creating web pages are organized into objects (for example, the document object that represents the document itself, the table object that implements the special htmltableelement dom interface for accessing html tables, and so forth).
...your dom programming may be something as simple as the following, which displays an alert message by using the alert() function from the window object, or it may use more sophisticated dom
methods to actually create new content, as in the longer example below.
...And 8 more matches
HTMLInputElement - Web APIs
the htmlinputelement interface provides special properties and
methods for manipulating the options, layout, and presentation of <input> elements.
... form
method string: returns / sets the element's form
method attribute, containing the http
method that the browser uses to submit the form.
... this overrides the
method attribute of the parent form.
...And 8 more matches
HTMLMediaElement - Web APIs
the htmlmediaelement interface adds to htmlelement the properties and
methods needed to support basic media-related capabilities that are common to audio and video.
...
methods this interface also inherits
methods from its ancestors htmlelement, element, node, and eventtarget.
...a separate copy of the data is returned each time the
method is called.
...And 8 more matches
The HTML DOM API - Web APIs
each node is based on the node interface, which provides properties for getting information about the node as well as
methods for creating, deleting, and organizing nodes within the dom.
... in order to expand upon the functionality of the core htmlelement interface to provide the features needed by a specific element, the htmlelement class is subclassed to add the needed properties and
methods.
...htmlcanvaselement augments the htmlelement type by adding properties such as height and
methods like getcontext() to provide canvas-specific features.
...And 8 more matches
Starting up and shutting down a WebXR session - Web APIs
to find out if a given mode is supported, simply call the xrsystem
method issessionsupported().
...to obtain an xrsession, you call your xrsystem's requestsession()
method, which returns a promise that resolves with an xrsession if it's able to establish one successfully.
... customizing the session in addition to the display mode, the requestsession()
method can take an optional object with initialization parameters to customize the session.
...And 8 more matches
Constraint validation - Developer guides
the constraint validation is done in the following ways: by a call to the checkvalidity() or reportvalidity()
method of a form-associated dom interface, (htmlinputelement, htmlselectelement, htmlbuttonelement, htmloutputelement or htmltextareaelement), which evaluates the constraints only on this element, allowing a script to get this information.
... the checkvalidity()
method returns a boolean indicating whether the element's value passes its constraints.
... (this is typically done by the user-agent when determining which of the css pseudo-classes, :valid or :invalid, applies.) in contrast, the reportvalidity()
method reports any constraint failures to the user.
...And 8 more matches
<input type="image"> - HTML: Hypertext Markup Language
supported common attributes alt, src, width, height, formaction, formenctype, form
method, formnovalidate, formtarget idl attributes none.
...
methods none.
... additional attributes in addition to the attributes shared by all <input> elements, image button inputs support the following attributes: attribute description alt alternate string to display when the image can't be shown formaction the url to which to submit the data formenctype the encoding
method to use when submitting the form data form
method the http
method to use when submitting the form formnovalidate a boolean which, if present, indicates that the form shouldn't be validated before submission formtarget a string indicating a browsing context from where to load the results of submitting the form height the height, in css pixels, at which...
...And 8 more matches
Details of the object model - JavaScript
a class defines all of the properties that characterize a certain set of objects (considering
methods and fields in java, or members in c++, to be properties).
...in that definition you can specify special
methods, called constructors, to create instances of the class.
... a constructor
method can specify initial values for the instance's properties and perform other processing appropriate at creation time.
...And 8 more matches
Indexed collections - JavaScript
however, you can use the predefined array object and its
methods to work with arrays in your applications.
... the array object has
methods for manipulating arrays in various ways, such as joining, reversing, and sorting them.
... in es2015, you can use the array.of static
method to create arrays with single element.
...And 8 more matches
Regular expressions - JavaScript
these patterns are used with the exec() and test()
methods of regexp, and with the match(), matchall(), replace(), replaceall(), search(), and split()
methods of string.
... using regular expressions in javascript regular expressions are used with the regexp
methods test() and exec() and with the string
methods match(), replace(), search(), and split().
... these
methods are explained in detail in the javascript reference.
...And 8 more matches
Inheritance and the prototype chain - JavaScript
inheriting "
methods" javascript does not have "
methods" in the form that class-based languages define them.
...an inherited function acts just as any other property, including property shadowing as shown above (in this case, a form of
method overriding).
...// o ---> object.prototype ---> null var b = ['yo', 'whadup', '?']; // arrays inherit from array.prototype // (which has
methods indexof, foreach, etc.) // the prototype chain looks like: // b ---> array.prototype ---> object.prototype ---> null function f() { return 2; } // functions inherit from function.prototype // (which has
methods call, bind, etc.) // f ---> function.prototype ---> object.prototype ---> null with a constructor a "constructor" in javascript is "just" a function that happens to be called with ...
...And 8 more matches
Date - JavaScript
note: it's important to keep in mind that while the time value at the heart of a date object is utc, the basic
methods to fetch the date and time or its components all work in the local (i.e.
... date format and time zone conversions there are a number of
methods available to obtain a date in various formats, as well as to perform time zone conversions.
... in addition to
methods to read and alter individual components of the local date and time (such as getday() and sethours()), there are also versions of the same
methods that read and manipulate the date and time using utc (such as getutcday() and setutchours()).
...And 8 more matches
context-menu - Archive of obsolete content
({ label: "edit image", context: cm.selectorcontext("img"), contentscript: 'self.on("click", function (node, data) {' + ' self.postmessage(node.src);' + '});', onmessage: function (imgsrc) { openimageeditor(imgsrc); } }); updating a menu item's label each menu item must be created with a label, but you can change its label later using a couple of
methods.
... the simplest
method is to set the menu item's label property.
...in these cases you can use the second
method.
...And 7 more matches
ui/button/toggle - Archive of obsolete content
you can generate click and change events programmatically with the button's click()
method.
... attaching panels to buttons you can attach panels to buttons by passing the button as the position option to the panel's show()
method or the panel's constructor: var { togglebutton } = require('sdk/ui/button/toggle'); var panels = require("sdk/panel"); var self = require("sdk/self"); var button = togglebutton({ id: "my-button", label: "my button", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onchange: handlechange }); var panel = panels.panel({ contenturl: self.data.url("panel.html"), onhide: handlehide }); function handlechange(state) { if (state.checked) { panel.show({ position: button }); } } function handlehide() { button.state('window', {checked: false}); } disabling buttons you can disable a butto...
... label = "my default" w1 t1 > displays "my default" t2 > displays "my default" w2 t3 > displays "my t3 label" t4 > displays "my w2 label" setting the properties on the button instance sets the button's global state: button.label = "my new label"; you can set state to be specific to a window or tab using the button's state()
method.
...And 7 more matches
Connecting to Remote Content - Archive of obsolete content
if the response is an xml document, the responsexml property will hold an xmldocument object that can be manipulated using dom
methods.
... the open
method takes two required parameters: the http request
method and the url to send the request.
... the http request
method can be "get", "post" or "put".
...And 7 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
the most technically sound
method of achieving this, and the only acceptable way of changing preferences such that they are automatically restored on add-on uninstall, is to make such changes in the default preference branch, as explained below.
...the following example bootstrap.js file illustrates the
method: const { classes: cc, interfaces: ci, utils: cu, results: cr } = components; // import the services module.
...while the former is the simpler
method, it does not support complex descriptions containing suggestion urls or separate keyword search urls.
...And 7 more matches
MMgc - Archive of obsolete content
there are a few
methods that you may need to call directly, such as alloc and free.
... gc::alloc, gc::free the alloc and free
methods are garbage-collected analogs for malloc and free.
...void gcobject::
method() { gc* gc = mmgc::gc::getgc(this); ...
...And 7 more matches
JavaScript Client API - Archive of obsolete content
in this case, it is highly recommended to use the utils.makeguid() helper to generate new guids: let newguid = utils.makeguid(); your store object must implement the following
methods: itemexists(id) createrecord(id, collection) changeitemid(oldid, newid) getallids() wipe() create(record) update(record) remove(record) you may also find it useful to override other
methods of the base implementation, for example applyincomingbatch if the underlying storage for your data supports batch operations.
... createrecord the createrecord( id, collection )
method gets called by the engine to request a new record for an item with a given guid.
...this is the
method that the engine will call the first time it syncs, in order to get a complete inventory of what data there is that will need to be uploaded to the server.
...And 7 more matches
listbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used to create a list of items where one or more of the items may be selected.
...there are numerous
methods which allow the items in the listbox to be retrieved and modified.
... attributes disabled, disablekeynavigation, preference, rows, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value
methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <lis...
...And 7 more matches
NPN_InvokeDefault - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary invokes the default
method, if one exists, on the given npobject.
... syntax #include <npruntime.h> bool npn_invokedefault(npp npp, npobject *npobj, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the default
method on the object.
... npobj the object on which to invoke the default
method.
...And 7 more matches
Using workers in extensions - Archive of obsolete content
so we need to move the refreshinformation()
method from the stockwatcher2.js file into a separate file that will host the worker thread.
... if there is no data field, the refreshinformation()
method is called to fetch the latest information about the stock and pass it back to the main thread.
... the refreshinformation()
method is fairly similar to the previous versions, with two notable exceptions: if the ticker symbol has not been set yet, an exception is thrown (lines 4-6).
...And 7 more matches
Archived JavaScript Reference - Archive of obsolete content
do not use it!array.observe()the array.observe()
method was used for asynchronously observing changes to arrays, similar to object.observe() for objects.
...you can use the more general proxy object instead.array.unobserve()the array.unobserve()
method was used to remove observers set by array.observe(), but has been deprecated and removed from browsers.
... you can use the more general proxy object instead.arraybuffer.transfer()the static arraybuffer.transfer()
method returns a new arraybuffer whose contents have been taken from the oldbuffer's data and then is either truncated or zero-extended by newbytelength.
...And 7 more matches
JavaArray - Archive of obsolete content
created by any java
method which returns an array.
... in addition, you can create a javaarray with an arbitrary data type using the newinstance
method of the array class: public static object newinstance(class componenttype, int length) throws negativearraysizeexception description the javaarray object is an instance of a java array that is created in or passed to javascript.
... in javascript 1.4 and later, the
methods of java.lang.object are inherited by javaarray.
...And 7 more matches
Writing JavaScript for XHTML - Archive of obsolete content
even the plain old alert()
method is gone.
... solution: use or convert to lower case for
methods like getelementsbytagname(), passing the name in lower case will work in both html and xhtml.
...this
method does not exist in xmldocuments anymore.
...And 7 more matches
HTML parser threading
that
method call doesn't yet cause anything to be parsed, though.
...the nsistreamlistener
methods (onstartrequest, ondataavailable and onstoprequest) are called on the main thread.
...passing data to the parser thread nshtml5streamparser gets some of its
methods called on the main thread and some called on the parser thread.
...And 7 more matches
Downloads.jsm
to use it, you first need to import the code module into your javascript 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 description public work on downloads that were not started from a private browsing window.
...example (using task.jsm): try { yield downloads.fetch(sourceuri, targetfile); } catch (ex if ex instanceof downloads.error && ex.becausetargetfailed) { console.log("unable to write to the target file, ignoring the error."); }
methods createdownload() creates a new download object.
... this download
method does not provide user interface or the ability to cancel or restart the download programmatically.
...And 7 more matches
SpiderMonkey 31
migrating to spidermonkey 31 the first change most embedders will notice is that spidermonkey must now be initialized before it can be used, using the newly-repurposed js_init
method.
... after this
method is called, normal jsapi operations are permitted.
... when all jsapi operation has completed, the corresponding js_shutdown
method (currently non-mandatory, but highly recommended as it may become mandatory in the future) uninitializes spidermonkey, cleaning up memory and allocations performed by js_init.
...And 7 more matches
NS_ConvertASCIItoUTF16
class declaration
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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 ...
...
methods constructors void ns_convertasciitoutf16(const char*) - source parameters char* acstring void ns_convertasciitoutf16(const char*, pruint32) - source parameters char* acstring pruint32 alength void ns_convertasciitoutf16(const nsacstring_internal&) - source parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source parameters nsauto...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
NS_ConvertUTF16toUTF8
class declaration a helper class that converts a utf-16 string to utf-8
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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 lowercaseeq...
...
methods constructors void ns_convertutf16toutf8(const prunichar*) - source a helper class that converts a utf-16 string to utf-8 parameters prunichar* astring void ns_convertutf16toutf8(const prunichar*, pruint32) - source parameters prunichar* astring pruint32 alength void ns_convertutf16toutf8(const nsastring_internal&) - source parameters nsastring_internal& astring operator= ...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
NS_ConvertUTF8toUTF16
class declaration
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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 ...
...
methods constructors void ns_convertutf8toutf16(const char*) - source parameters char* acstring void ns_convertutf8toutf16(const char*, pruint32) - source parameters char* acstring pruint32 alength void ns_convertutf8toutf16(const nsacstring_internal&) - source parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source parameters nsautostr...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
NS_LossyConvertUTF16toASCII
class declaration a helper class that converts a utf-16 string to ascii in a lossy manner
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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 lowercaseequalsasc...
...
methods constructors void ns_lossyconvertutf16toascii(const prunichar*) - source a helper class that converts a utf-16 string to ascii in a lossy manner parameters prunichar* astring void ns_lossyconvertutf16toascii(const prunichar*, pruint32) - source parameters prunichar* astring pruint32 alength void ns_lossyconvertutf16toascii(const nsastring_internal&) - source parameters nsastri...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsAdoptingCString
method overview constructors operator= operator const char* operator[] get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data ...
...
methods constructors void nsadoptingcstring() - source void nsadoptingcstring(char*, pruint32) - source parameters char* str pruint32 length void nsadoptingcstring(const nsadoptingcstring&) - source parameters nsadoptingcstring& str operator= nsadoptingcstring& operator=(const nsadoptingcstring&) - source parameters nsadoptingcstring& str nsxpidlcstring& operator=(const nsxp...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsAdoptingString
method overview constructors operator= operator const prunichar* operator[] get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length...
...
methods constructors void nsadoptingstring() - source void nsadoptingstring(prunichar*, pruint32) - source parameters prunichar* str pruint32 length void nsadoptingstring(const nsadoptingstring&) - source parameters nsadoptingstring& str operator= nsadoptingstring& operator=(const nsadoptingstring&) - source parameters nsadoptingstring& str nsxpidlstring& operator=(const nsx...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsAutoString
names: nsautostring for wide characters nscautostring for narrow characters
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin...
...
methods constructors void nsautostring() - source constructors void nsautostring(prunichar) - source parameters prunichar c void nsautostring(const prunichar*, pruint32) - source parameters prunichar* data pruint32 length void nsautostring(const nsautostring&) - source parameters nsautostring& str void nsautostring(const nsastring_internal&) - source parameters nsastring_int...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 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 stripchars stripwhitespace replacechar replacesubstring ...
...
methods constructors void nscautostring() - source constructors void nscautostring(char) - source parameters char c void nscautostring(const char*, pruint32) - source parameters char* data pruint32 length void nscautostring(const nscautostring&) - source parameters nscautostring& str void nscautostring(const nsacstring_internal&) - source parameter...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsCString
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading begi...
...
methods constructors void nscstring() - source constructors void nscstring(char) - source parameters char c void nscstring(const char*, pruint32) - source parameters char* data pruint32 length void nscstring(const nscstring&) - source parameters nscstring& str void nscstring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple void nscstring(const nsacst...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsDependentCString
method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appen...
...
methods constructors nsdependentcstring(const char*, const char*) - source parameters char* start a pointer to the start of the string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsDependentString
method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint app...
...
methods constructors void nsdependentstring(const prunichar*, const prunichar*) - source constructors parameters prunichar* start prunichar* end void nsdependentstring(const prunichar*, pruint32) - source parameters prunichar* data pruint32 length void nsdependentstring(const prunichar*) - source parameters prunichar* data void nsdependentstring(const nsastring_internal&) - source ...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsFixedCString
class declaration
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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...
...
methods constructors void nsfixedcstring(char*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters char* data pruint32 storagesize void nsfixedcstring(char*, pruint32, pruin...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsFixedString
class declaration
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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 ...
...
methods constructors void nsfixedstring(prunichar*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters prunichar* data pruint32 storagesize void nsfixedstring(prunichar*, pruint32, pruin...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsPromiseFlatCString
class declaration
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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...
...
methods constructors void nspromiseflatcstring(const nsacstring_internal&) - source parameters nsacstring_internal& str void nspromiseflatcstring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase print32 aoffset print32 acount print32 find(const char*, prbool, print32, print32) const - source parameters char* astring prbool aignorecase print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsPromiseFlatString
class declaration
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace 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 ...
...
methods constructors void nspromiseflatstring(const nsastring_internal&) - source parameters nsastring_internal& str void nspromiseflatstring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& ope...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
nsString
method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting ...
...
methods constructors void nsstring() - source constructors void nsstring(prunichar) - source parameters prunichar c void nsstring(const prunichar*, pruint32) - source parameters prunichar* data pruint32 length void nsstring(const nsstring&) - source parameters nsstring& str void nsstring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple void nsstring(co...
...ecase print32 aoffset print32 acount print32 find(const nsaflatstring&, print32, print32) const - source parameters nsaflatstring& astring print32 aoffset print32 acount print32 find(const prunichar*, print32, print32) const - source parameters prunichar* astring print32 aoffset print32 acount rfind print32 rfind(const nscstring&, prbool, print32, print32) const - source this
methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 7 more matches
mozIStorageService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see mozistorageconnection
method overview nsifile backupdatabasefile(in nsifile adbfile, in astring abackupfilename, [optional] in nsifile abackupparentdirectory); mozistorageconnection opendatabase(in nsifile adatabasefile); mozistorageconnection openspecialdatabase(in string astoragekey); mozistorageconnection openunshareddatabase(in nsifile adatabasefile);
methods ...
...backupdatabasefile() this
method makes a backup of the specified file.
... the database should not be open, or you should ensure that no database activity is happening when you call this
method.
...And 7 more matches
nsIAccessibleText
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)
method overview void addselection(in long startoffset, in long endoffset); nsiaccessible getattributerange(in long offset, out long rangestartoffset, out long rangeendoffset); obsolete since gecko 1.9.1 wchar getcharacteratoffset(in long offset); void getcharacterextents(in long offset, out long x, out long y, out long width, out long height, in unsigned long coordtype); long getoffsetatpoint(in long x, in long y, in unsigned long coordtype); void getrangeextents(in long startoffset, in long endoffset, out long x, out long y, out long width, out long height, in unsigned long coord...
... constant value description coord_type_screen 0 coord_type_window 1
methods addselection() void addselection( in long startoffset, in long endoffset ); parameters startoffset endoffset getattributerange() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) get the accessible and start/end offsets around the given offset.
... getselectionbounds() void getselectionbounds( in long selectionnum, out long startoffset, out long endoffset ); parameters selectionnum startoffset endoffset gettext() string
methods may need to return multibyte-encoded strings, since some locales can not be encoded using 16-bit chars.
...And 7 more matches
panel - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a panel is a used as a temporary floating popup window that may contain any type of content.
...a panel may also be opened via a script using the openpopup
method.
... the panel is closed when the user clicks outside the panel, presses escape or when the panel's hidepopup
method is called.
...And 6 more matches
NPAPI plugin reference - Archive of obsolete content
browser-side plug-in api this chapter describes
methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
... the names of all of these
methods begin with npn_ to indicate that they are implemented by the browser and called by the plug-in.
... npapi plug-in side api this chapter describes
methods in the plug-in api that are available from the plug-in object; these allow plug-ins to interact with the browser.
...And 6 more matches
Adobe Flash - Archive of obsolete content
it can also access javascript
methods from within the plugin.
... this article explains how javascript can be used to access
methods from within the flash plugin, as well as how a feature called fscommands can be used to access javascript functions from within the flash animation.
...the description string is broken into an array of constituent strings based on an invocation of the match
method with a regular expression that assumes that the string format will be in the format flash major rminor where major can be a major revision such as "5" or "6" and minor is the subsidiary version number.
...And 6 more matches
Browser Feature Detection - Archive of obsolete content
among the
methods of browser detection, many people recommend using the existence of specific properties or
methods in a browser's dom to detect the browser type and whether it supports a given operation.
... this test takes that idea to the extreme and tests a large number of properties and
methods to determine the level of support a browser has for particular standards and reports a rating as the percentage of names the browser defines.
... it is clear from these test results that netscape 7.0x and mozilla firefox have the greatest dom support although internet explorer, safari, and opera have sufficient dom css 1 and dom level 1 & 2 document property and
method support to enable cross browser web development.
...And 6 more matches
Reference - Archive of obsolete content
if it's not in a standard, and that sun doc is corrent, then it should probably go in the window object
methods.
... --jonnyq i've already added those
methods in the
methods listing, but i haven't defined them yet.
... unfortunately there is not an [easy]
method to download content/packages of content off of devmo for 'local' browsing/viewing/printing, yet.
...And 6 more matches
Bounding volume collision detection with THREE.js - Game development
once instantiated, they have
methods available to do intersection tests against other volumes.
...box3 / sphere both box3 and sphere have a containspoint
method to do this test.
...box3 the box3.intersectsbox
method is available for performing this test.
...And 6 more matches
2D maze game with device orientation - Game development
var game = new phaser.game(320, 480, phaser.canvas, 'game'); the line above will initialize the phaser instance — the arguments are the width of the canvas, height of the canvas, rendering
method (we're using canvas, but there are also webgl and auto options available) and the optional id of the dom container we want to put the canvas in.
...without the framework, to add the canvas element to the page, you would have to write something like this inside the <body> tag: <canvas id='game' width='320' height='480'></canvas> the important thing to remember is that the framework is setting up helpful
methods to speed up a lot of things like image manipulation or assets management, which would be a lot harder to do manually.
... note: you can read the building monster wants candy article for the in-depth introduction to the basic phaser-specific functions and
methods.
...And 6 more matches
Responsive design - Learn web development
flexible layout before responsive design a number of approaches were developed to try to solve the downsides of the liquid or fixed-width
methods of building websites.
... in 2004 cameron adams wrote a post entitled resolution dependent layout, describing a
method of creating a design that could adapt to different screen resolutions.
...modern css layout
methods are inherently responsive, and we have new things built into the web platform to make designing responsive sites easier.
...And 6 more matches
Arrays - Learn web development
some useful array
methods in this section we'll look at some rather useful array-related
methods that allow us to split strings into array items and vice versa, and add new items into arrays.
...to do this, we can use the split()
method.
... note: okay, this is technically a string
method, not an array
method, but we've put it in with arrays as it goes well here.
...And 6 more matches
Adding features to our bouncing balls demo - Learn web development
the ball draw(), update(), and collisiondetect()
method definitions should be able to stay exactly the same as they were before.
... defining evilcircle()'s
methods evilcircle() should have four
methods, as described below.
... draw() this
method has the same purpose as ball()'s draw()
method: it draws the object instance on the canvas.
...And 6 more matches
Using Vue computed properties - Learn web development
these work similarly to
methods, but only re-run when one of their dependencies changes.
...computed properties work similarly to
methods, but only re-run when one of their dependencies changes.
... to create a computed property, we need to add a computed property to our component object, much like the
methods property we've used previously.
...And 6 more matches
mach
the decorators are: @commandprovider this is a class decorator that tells mach that this class contains
methods that implement mach commands.
... @command this is a
method decorator that tells mach that this
method implements a mach command.
... @commandargument this is a
method decorator that tells mach about an argument to a mach command.
...And 6 more matches
Error codes returned by Mozilla APIs
these components usually provide an initialization
method, often called init, which must be called before other
methods are used.
... ns_error_not_implemented (0x80004001) this error is caused by
methods which are not implemented.
... ns_error_illegal_value (0x80070057) an argument supplied to a
method was not valid, for instance a null value was supplied as an argument which does not allow null values, or a value was out of range.
...And 6 more matches
OS.File for the main thread
this example also shows the resolve value of open (an instance of os.file, this is a file, so you can do any of the
methods on it found here), write (a number indicating bytes written), and close (undefined, meaning there is no resolve value).
...', valopen); var txttoappend = 'append some text \n'; var txtencoded = new textencoder().encode(txttoappend); valopen.write(txtencoded).then(valwrite => { console.log('valwrite:', valwrite); valopen.close().then(valclose => { console.log('valclose:', valclose); console.log('successfully appended'); }); }); }); global object os.file
method overview promise<file> open(in string path, [optional] in object mode, [optional] in object options); promise<object> openunique(in string path, [optional] in object options); promise<void> copy(in string sourcepath, in string destpath, [optional] in object options); promise<bool> exists(in string path); promise<string> getcurrentdirectory(); ...
...path, in date|number accessdate, in date|number modificationdate); promise<void> setpermissions(in string path, in object options ); promise<file.info> stat(in string path, [optional] in object options); promise<void> unixsymlink(in string targetpath, in string createpath); promise<void> writeatomic(in string path, in arrayview data, in object options);
methods os.file.open() use
method os.file.open() to open a file.
...And 6 more matches
JSAPI reference
these functions may call javascript
methods.
... js_get
method obsolete since jsapi 23 js_get
methodbyid obsolete since jsapi 23 a spidermonkey extension allows a native function to return an lvalue—that is, a reference to a property of an object: js_setcallreturnvalue2 obsolete since javascript 1.8.5 id a jsid is an identifier for a property or
method of an object.
...y 38 js::propertyspecnameequalsid added in spidermonkey 38 js::propertyspecnametopermanentid added in spidermonkey 38 js_getreservedslot js_setreservedslot struct jsextendedclass obsolete since javascript 1.8.5 struct jsobjectops obsolete since javascript 1.8.5 struct jsxmlobjectops obsolete since javascript 1.8.5 struct jsproperty obsolete since jsapi 16 adding native properties and
methods to classes: jsnative struct jsfunctionspec js_fs added in spidermonkey 1.8 js_fn added in spidermonkey 1.8 js_sym_fn added in spidermonkey 38 js_fninfo added in spidermonkey 17 js_self_hosted_fn added in spidermonkey 31 js_self_hosted_sym_fn added in spidermonkey 38 js_sym_fnspec added in spidermonkey 38 js_fnspec added in spidermonkey 31 js_fs_end added in spidermonkey 1.8 struct ...
...And 6 more matches
Language bindings
more specifically, an xpcom language binding: enables access to xpcom objects from that language (where access means reading/writing/creating xpcom objects as well as calling
methods on them).
...the scriptable
methods on the nsicomponentmanager interface can be called directly on this object.components.resultscomponents.results is a read-only object whose properties are the names listed as the first parameters of the macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.components.returncodecomponents.stackcomponents.stack is a read only pr...
... components.utils.getglobalforobjectthis
method is used to determine the global object with which an object is associated.
...And 6 more matches
mozIStorageStatement
method overview void initialize(in mozistorageconnection adbconnection, in autf8string asqlstatement); obsolete since gecko 1.9.1 void finalize(); mozistoragestatement clone(); autf8string getparametername(in unsigned long aparamindex); unsigned long getparameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8string...
...
methods initialize() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: this
method has been removed for gecko 1.9.1.
...this
method exists back to gecko 1.8.0.
...And 6 more matches
nsIChannelEventSink
these
methods are called before onstartrequest.
... note: prior to gecko 2.0, redirect handling was synchronous, using the onchannelredirect()
method.
... starting in gecko 2.0, that
method no longer exists, and instead the asynconchannelredirect()
method is called; this uses a callback to handle redirects asynchronously.
...And 6 more matches
nsIIOService
inherits from: nsisupports last changed in gecko 1.2 this interface duplicates many of the nsiprotocolhandler
methods in a protocol handler independent way (for example newuri() inspects the scheme in order to delegate creation of the new uri to the appropriate protocol handler).
... implemented by @mozilla.org/network/io-service;1 as a service: var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice);
method overview boolean allowport(in long aport, in string ascheme); acstring extractscheme(in autf8string urlstring); unsigned long getprotocolflags(in string ascheme); nsiprotocolhandler getprotocolhandler(in string ascheme); nsichannel newchannel(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); obsolete since gecko 48 nsichannel newchannel2(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri, in nsidomnode aloadingnode, in nsiprincipal aloadingp...
...
methods allowport() checks if a port number is banned.
...And 6 more matches
nsIMsgMessageService
inherits from: nsisupports
method overview void copymessage(in string asrcuri, in nsistreamlistener acopylistener, in boolean amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); [noscript] void copymessages(in nsmsgkeyarrayptr keys, in nsimsgfolder srcfolder, in nsistreamlistener acopylistener, in boolean amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); void displaymessage(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiu...
... aurllistener, in boolean aconvertdata, in string aadditionalheader); nsiuri streamheaders(in string amessageuri, in nsistreamlistener aconsumer, in nsiurllistener aurllistener [optional] in boolean alocalonly); boolean ismsginmemcache(in nsiuri aurl, in nsimsgfolder afolder, out nsicacheentrydescriptor acacheentry); nsimsgdbhdr messageuritomsghdr(in string uri);
methods copymessage() pass in the uri for the message you want to have copied.
...you always can use streammessage to get the eml string representation of the message and then write it using file i/o
methods.
...And 6 more matches
nsIThreadObserver
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports
method overview void afterprocessnextevent(in nsithreadinternal thread, in unsigned long recursiondepth); void ondispatchedevent(in nsithreadinternal thread); void onprocessnextevent(in nsithreadinternal thread, in boolean maywait, in unsigned long recursiondepth);
methods afterprocessnextevent() called by the nsithread
method nsithread.processnextevent() after an event is processed.
... this
method is only called on the target thread.
... note: it is valid to change the thread's observer during a call to this
method.
...And 6 more matches
nsITransaction
inherits from: nsisupports last changed in gecko 1.7
method overview void dotransaction(); boolean merge(in nsitransaction atransaction); void redotransaction(); void undotransaction(); attributes attribute type description istransient boolean the transaction's transient state.
... this attribute is checked by the transaction manager after the transaction's execute()
method is called.
... if the transient state is false, a reference to the transaction is held by the transaction manager so that the transactions' undotransaction() and redotransaction()
methods can be called.
...And 6 more matches
Xptcall Porting Guide
overview xptcall is a library that supports both invoking
methods on arbitrary xpcom objects and implementing classes whose objects can impersonate any xpcom interface.
...the invoke functionality requires the implementation of the following on each platform (from xptcall/public/xptcall.h): xptc_public_api(nsresult) ns_invokebyindex(nsisupports* that, pruint32
methodindex, pruint32 paramcount, nsxptcvariant* params); calling code is expected to supply an array of nsxptcvariant structs.
...the platform specific code then builds a call frame and invokes the
method indicated by the index
methodindex on the xpcom interface that.
...And 6 more matches
Working with data
you can always get a pointer to the c value using the cdata object's address()
method.
... you can work around this by serializing these values using the tostring()
method and comparing using the resulting string.
... converting c strings to javascript the cdata object provides the readstring()
method, which reads bytes from the specified string and returns a new javascript string object representing that string.
...And 6 more matches
Debugger.Script - Firefox Developer Tools
the debugger interface constructs debugger.script objects as scripts of debuggee code are uncovered by the debugger: via the onnewscript handler
method; via debugger.frame’s script properties; via the functionscript
method of debugger.object instances; and so on.
... debugger.script objects for webassembly are uncovered via onnewscript when a new webassembly module is instantiated and via the findscripts
method on debugger instances.
...many properties and
methods below throw.
...And 6 more matches
AudioNode - Web APIs
creating an audionode there are two ways to create an audionode: via the constuctor and via the factory
method.
... // constructor const analysernode = new analysernode(audioctx, { fftsize: 2048, maxdecibels: -25, mindecibels: -60, smoothingtimeconstant: 0.5, }); // factory
method const analysernode = audioctx.createanalyser(); analysernode.fftsize = 2048; analysernode.maxdecibels = -25; analysernode.mindecibels = -60; analysernode.smoothingtimeconstant = 0.5; you are free to use either constructors or factory
methods, or mix both, however there are advantages to using the constructors: all parameters can be set during construction time and don't need to be set individually.
...while the actual processing is done internally by the browser and cannot be altered, you could write a wrapper around an audio node to provide custom properties and
methods.
...And 6 more matches
CSS Typed Object Model API - Web APIs
cssstylevalue.parse(property, csstext) the parse()
method of the cssstylevalue interface allows a cssnumericvalue to be constructed from a css string.
... cssstylevalue.parseall() the parseall()
method of the cssstylevalue interface sets all occurences of a specific css property to the specified valueand returns an array of cssstylevalue objects, each containing one of the supplied values.
... stylepropertymap.set()
method of stylepropertymap interface that changes the css declaration with the given property to the value given.
...And 6 more matches
Examples of web and XML development using the DOM - Web APIs
however, stopevent also calls an event object
method, event.stoppropagation, which keeps the event from bubbling any further up into the dom.
...but the stopevent
method has stopped propagation, and so after the data in the table is updated, the event phase is effectively ended, and an alert box is displayed to confirm this.
...n load() { elem = document.getelementbyid("tbl1"); elem.addeventlistener("click", stopevent, false); } </script> </head> <body onload="load();"> <table id="t-daddy" onclick="alert('hi');"> <tr id="tbl1"> <td id="c1">one</td> </tr> <tr> <td id="c2">two</td> </tr> </table> </body> </html> example 6: getcomputedstyle this example demonstrates how the window.getcomputedstyle
method can be used to get the styles of an element that are not set using the style attribute or with javascript (e.g., elt.style.backgroundcolor="rgb(173, 216, 230)").
...And 6 more matches
Using files from web applications - Web APIs
x.tofixed(3) + " " + amultiples[nmultiple] + " (" + nbytes + " bytes)"; } // end of optional code document.getelementbyid("filenum").innerhtml = nfiles; document.getelementbyid("filesize").innerhtml = soutput; } document.getelementbyid("uploadinput").addeventlistener("change", updatesize, false); </script> </body> </html> using hidden file input elements using the click()
method you can hide the admittedly ugly file <input> element and present your own interface for opening the file picker and displaying which file or files the user has selected.
... you can do this by styling the input element with display:none and calling the click()
method on the <input> element.
... using a label element to trigger a hidden file input element to allow opening the file picker without using javascript (the click()
method), a <label> element can be used.
...And 6 more matches
FileHandle API - Web APIs
the filehandle.open()
method provides such an object which can be readonly or readwrite.
... writing there are three possible writing operations on a locked file: write : it's an arbitrary writing
method which starts writing in the file at the lockedfile.location byte.
...the lockedfile interface provides a readastext
method and a readasarraybuffer
method.
...And 6 more matches
HTML Drag and Drop API - Web APIs
datatransfer objects also have
methods to add or remove items to the drag's data.
...the datatransferitem object also has
methods to get the drag item's data.
...the list object has
methods to add a drag item to the list, remove a drag item from the list, and clear the list of all drag items.
...And 6 more matches
IDBObjectStoreSync - Web APIs
method overview any add (in any value, in optional any key) raises (idbdatabaseexception); idbindexsync createindex (in domstring name, in domstring storename, in domstring keypath, in optional boolean unique); any get (in any key) raises (idbdatabaseexception); idbcursorsync opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (id...
...
methods add() stores the given value into this object store, optionally with the specified key.
... any add( in any value, in optional any key ) raises (idbdatabaseexception); parameters returns exceptions this
method can raise a idbdatabaseexception with the following codes: value the value to store into the index.
...And 6 more matches
LocalFileSystem - Web APIs
the
methods are implemented by window and worker objects.
... basic concepts this section includes a few key concepts for the
methods.
... you can call the
method more than once if you want to create two file systems: one that's temporary and one that's persistent.
...And 6 more matches
PaymentRequest.PaymentRequest() - Web APIs
syntax var paymentrequest = new paymentrequest(
methoddata, details, [options]); parameters
methoddata contains an array of identifiers for the payment
methods the merchant web site accepts and any associated payment
method specific data.
... each item in the array contains the following fields: supported
methods for early implementations of the spec, this was a sequence of identifiers for payment
methods that the merchant website accepts.
... starting with more recent browsers, this parameter is more generic than credit cards, it is a single domstring, and the meaning of the data parameter changes with the supported
methods.
...And 6 more matches
User Timing API - Web APIs
this document provides an overview of the mark and measure performance event types including the four user timing
methods that extend the performance interface.
... for more details and example code regarding these two performance event types and the
methods, see using the user timing api.
... creating a performance mark the performance.mark()
method is used to create a performance mark.
...And 6 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
rtcpeerconnection and rtp each rtcpeerconnection has
methods which provide access to the list of rtp transports that service the peer connection.
...these are returned by the rtcpeerconnection.gettransceivers()
method, and each mid and transceiver share a one-to-one relationship, with the mid being unique for each rtcpeerconnection.
...this enormously simplifies and makes far more readable the code dealing with the promises returned by webrtc
methods.
...And 6 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
as much as possible, standard cinematographic techniques are used, since the viewer has likely grown up watching films using those techniques, and has subconscious expectations that a film or animation will follow those
methods.
... there are two techniques in 3d graphics that can create similar though not identical results, and whose
methods apply more easily in different situations.
...using the glmatrix library we've used previously, this can be performed using the rotatey()
method on the mat4 class, which represents a standard 4x4 matrix.
...And 6 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
there is only one way to create an xrpose, and that's using the getpose()
method on an animation frame as given using an xrframe object.
... this means that most frequently, you'll be using poses within your frame rendering code, which is executed as a callback from the xrframe
method requestanimationframe().
... the only way to obtain a pose that adapts positional information from one space to another is through the xrframe object received by your frame rendering callback function specified when you called the xrsession
method requestanimationframe().
...And 6 more matches
CSS Box Alignment - CSS: Cascading Style Sheets
the module aims to create a consistent
method of alignment across all of css.
... note: the documentation for each layout
method will detail how box alignment is applied there.
... older alignment
methods css traditionally had very limited alignment capabilities.
...And 6 more matches
Getting Started - Developer guides
then, mozilla, safari, and other browsers followed, implementing an xmlhttprequest object that supported the
methods and properties of microsoft's original activex object.
...}; next, after declaring what happens when you receive the response, you need to actually make the request, by calling the open() and send()
methods of the http request object, like this: httprequest.open('get', 'http://www.example.org/some.file', true); httprequest.send(); the first parameter of the call to open() is the http request
method – get, post, head, or another
method supported by your server.
... keep the
method all-capitals as per the http standard, otherwise some browsers (like firefox) might not process the request.
...And 6 more matches
Cross-browser audio basics - Developer guides
manipulating the audio element with javascript in addition to being able to specify various attributes in html, the <audio> element comes complete with several properties and
methods that you can manipulate via javascript.
...ocument.createelement('audio'); if (myaudio.canplaytype('audio/mpeg')) { myaudio.setattribute('src','audiofile.mp3'); } if (myaudio.canplaytype('audio/ogg')) { myaudio.setattribute('src','audiofile.ogg'); } alert('play'); myaudio.play(); alert('stop'); myaudio.pause(); alert('play from 5 seconds in'); myaudio.currenttime = 5; myaudio.play(); let's explore the available properties and
methods in more detail.
... play the play()
method is used to tell the audio to play.
...And 6 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
required for accessibility autocomplete all hint for form autofill feature autofocus all automatically focus the form control when the page is loaded capture file media capture input
method in file upload controls checked radio, checkbox whether the command or control is checked dirname text, search name of form field to use for sending the element's directionality in form submission disabled all whether the form control is disabled form all associates the control with a form element formaction image, submit ...
...url to use for form submission formenctype image, submit form data set encoding type to use for form submission form
method image, submit http
method to use for form submission formnovalidate image, submit bypass form control validation for form submission formtarget image, submit browsing context for form submission height image same as height attribute for <img>; vertical dimension list almost all value of the id attribute of the <datalist> of autocomplete options max numeric types maximum value maxlength password, search, tel, text, url maximum length (number of characters) of value min numeric types minimum value minlength password, search, tel, te...
... <form action="page.html"
method="post"> <label>fruit: <input type="text" name="fruit" dirname="fruit.dir" value="cherry"></label> <input type="submit"/> </form> <!-- page.html?fruit=cherry&fruit.dir=ltr --> when the form above is submitted, the input cause both the name / value pair of fruit=cherry and the dirname / direction pair of fruit.dir=ltr to be sent.
...And 6 more matches
HTTP response status codes - HTTP
the meaning of the success depends on the http
method: get: the resource has been fetched and is transmitted in the message body.
... 307 temporary redirect the server sends this response to direct the client to get the requested resource at another uri with same
method that was used in the prior request.
... this has the same semantics as the 302 found http response code, with the exception that the user agent must not change the http
method used: if a post was used in the first request, a post must be used in the second request.
...And 6 more matches
Closures - JavaScript
this has obvious parallels to object-oriented programming, where objects allow you to associate data (the object's properties) with one or more
methods.
... consequently, you can use a closure anywhere that you might normally use an object with only a single
method.
... emulating private
methods with closures languages such as java allow you to declare
methods as private, meaning that they can be called only by other
methods in the same class.
...And 6 more matches
Iterators and generators - JavaScript
specifically, an iterator is any object which implements the iterator protocol by having a next()
method that returns an object with two properties: value the next value in the iteration sequence.
...when a value is consumed by calling the generator's next
method, the generator function executes until it encounters the yield keyword.
... in order to be iterable, an object must implement the @@iterator
method.
...And 6 more matches
Meta programming - JavaScript
traps the
methods that provide property access.
... handler / trap interceptions invariants handler.getprototypeof() object.getprototypeof() reflect.getprototypeof() __proto__ object.prototype.isprototypeof() instanceof getprototypeof
method must return an object or null.
... if target is not extensible, object.getprototypeof(proxy)
method must return the same value as object.getprototypeof(target).
...And 6 more matches
Private class fields - JavaScript
syntax class classwithprivatefield { #privatefield } class classwithprivate
method { #private
method() { return 'hello world' } } class classwithprivatestaticfield { static #private_static_field } examples private static fields private fields are accessible on the class constructor from inside the class declaration itself.
... the limitation of static variables being called by only static
methods still holds.
... class classwithprivatestaticfield { static #private_static_field static publicstatic
method() { classwithprivatestaticfield.#private_static_field = 42 return classwithprivatestaticfield.#private_static_field } } console.assert(classwithprivatestaticfield.publicstatic
method() === 42) private static fields are added to the class constructor at class evaluation time.
...And 6 more matches
static - JavaScript
the static keyword defines a static
method for a class.
... static
methods aren't called on instances of the class.
... syntax static
methodname() { ...
...And 6 more matches
Array.prototype.every() - JavaScript
the every()
method tests whether all elements in the array pass the test implemented by the provided function.
... description the every
method executes the provided callback function once for each element present in the array until it finds the one where callback returns a falsy value.
... if such an element is found, the every
method immediately returns false.
...And 6 more matches
Array.prototype.push() - JavaScript
the push()
method adds one or more elements to the end of an array and returns the new length of the array.
... return value the new length property of the object upon which the
method was called.
... description the push
method appends values to an array.
...And 6 more matches
Function.prototype.apply() - JavaScript
the apply()
method calls a function with a given this value, and arguments provided as an array (or an array-like object).
... note that this may not be the actual value seen by the
method: if the
method is a function in non-strict mode code, null and undefined will be replaced with the global object, and primitive values will be boxed.
...with apply, you can write a
method once, and then inherit it in another object, without having to rewrite the
method for the new object.
...And 6 more matches
Object.create() - JavaScript
the object.create()
method creates a new object, using an existing object as the prototype of the newly created object.
... var obj = object.create({ a: 1, b: 2 }); > console.log(object.entries(obj)); // shows "[]" some non-solutions a good solution for the missing object-
methods is not immediately apparent.
... adding the missing object-
method directly from the standard-object does not work: ocn = object.create( null ); // create "null" object (same as before) ocn.tostring = object.tostring; // since new object lacks
method then try assigning it directly from standard-object > ocn.tostring // shows "tostring() { [native code] }" -- missing
method seems to be there now > ocn.tostring == object.tostring // shows "true" --
method seems to be same as the standard object-
method > ocn.tostring() // error: function.prototype.tostring requires that 'this' be a function adding the missing object-
method directly to new object's "prototype" does not work either, since the new object does not have a real prototype (which is really the cause of all these problems) and one cannot be directly added: ocn = ...
...And 6 more matches
Object.defineProperty() - JavaScript
the static
method object.defineproperty() defines a new property directly on an object, or modifies an existing property on an object, and returns the object.
... description this
method allows a precise addition to or modification of a property on an object.
... normal property addition through assignment creates properties which show up during property enumeration (for...in loop or object.keys
method), whose values may be changed, and which may be deleted.
...And 6 more matches
String.prototype.substring() - JavaScript
the substring()
method returns the part of the string between the start and end indexes, or to the end of the string.
...g.substring(1, 0)) // displays 'mozill' console.log(anystring.substring(0, 6)) // displays 'lla' console.log(anystring.substring(4)) console.log(anystring.substring(4, 7)) console.log(anystring.substring(7, 4)) // displays 'mozilla' console.log(anystring.substring(0, 7)) console.log(anystring.substring(0, 10)) using substring() with length property the following example uses the substring()
method and length property to extract the last characters of a particular string.
... this
method may be easier to remember, given that you don't need to know the starting and ending indices as you would in the above examples.
...And 6 more matches
Iteration protocols - JavaScript
in order to be iterable, an object must implement the @@iterator
method, meaning that the object (or one of the objects up its prototype chain) must have a property with a @@iterator key which is available via constant symbol.iterator: property value [symbol.iterator] a zero-argument function that returns an object, conforming to the iterator protocol.
... whenever an object needs to be iterated (such as at the beginning of a for...of loop), its @@iterator
method is called with no arguments, and the returned iterator is used to obtain the values to be iterated.
... note that when this zero-argument function is called, it is invoked as a
method on the iterable object.
...And 6 more matches
Property accessors - JavaScript
it's typical when speaking of an object's properties to make a distinction between properties and
methods.
... however, the property/
method distinction is little more than a convention.
... a
method is simply a property that can be called (for example, if it has a reference to a function instance as its value).
...And 6 more matches
Codecs used by WebRTC - Web media technologies
other requirements for the purposes of supporting switching between portrait and landscape orientations, there are two
methods that can be used.
...in rfc 3389, a
method for providing an appropriate filler to use during silences.
...the most efficient way is to use the static
method rtcrtpsender.getcapabilities() (or the equivalent rtcrtpreceiver.getcapabilities() for a receiver), specifying the type of media as the input parameter.
...And 6 more matches
Promises - Archive of obsolete content
notifyuser(xhr.responsetext); }); downloading remote files nearly all previous
methods of downloading remote files have been superseded by the much simpler downloads.jsm module.
... iconurl, version, loadgroup)); }, getinstallforfile: function getinstallforfile(url, mimetype) { return new promise(accept => this.addonmanager.getinstallforfile(url, accept, mimetype)); }, getallinstalls: function getallinstalls() { return new promise(accept => this.addonmanager.getallinstalls(accept)); }, _replace
method: function replace
method(
method, callback) { object.defineproperty(this,
method, { enumerable: true, configurable: true, value: key => { return new promise(accept => this.addonmanager[
method](key, addon => accept(callback(addon)))); } }); }, }; for (let
method ...
...of ["getaddonbyid", "getaddonbysyncguid"]) aom._replace
method(
method, addon => aom.addon(addon)); for (let
method of ["getalladdons", "getaddonsbyids", "getaddonsbytypes", "getaddonswithoperationsbytypes"]) aom._replace
method(
method, addons => addons.map(aom.addon)); aom._replace
method("getinstallsbytypes", installs => installs); components.utils.import("resource://gre/modules/addonmanager.jsm", aom); example usage: task.spawn(function* () { // get an extension instance, and its data directory.
...And 5 more matches
Basics - Archive of obsolete content
methods info()this
method does stuff.
... log(stringstring)this
method writes a notification message to the console.
... stringthe message to add to the consolestring console.log("hello world!"); arn()this
method does stuff.
...And 5 more matches
Space Manager Detailed Design - Archive of obsolete content
*/ void clearregions(); /** *
methods for dealing with the propagation of float damage during * reflow.
... void* operator new(size_t asize); void operator delete(void* aptr, size_t asize); a static
method is used to shutdown the space manager recycling.
... this
method deletes all of the space mangers in the recycler,and prevents further recycling.
...And 5 more matches
execute - Archive of obsolete content
method of install object syntax int execute ( string xpisourcepath [, boolean blocking]); int execute ( string xpisourcepath, string args [, boolean blocking]); parameters the execute
method has the following parameters: xpisourcepath the pathname of the file to extract and execute.
...the blocking parameter is not available as part of this
method in versions of netscape before 6.1/mozilla 0.9.3.
... description the execute
method extracts the named file from the xpi file to a temporary file name.
...And 5 more matches
richlistbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content.
... attributes disabled, disablekeynavigation, preference, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value
methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richl...
... suppressonselect type: boolean if this attribute is not specified, a select event is fired whenever an item is selected, either by the user or by calling one of the select
methods.
...And 5 more matches
toolbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container which typically contains a row of buttons.
... the chromeclass-toolbar class may be used to create a toolbar where its visibility depends on the toolbar flag when opening the window with the window interface's open()
method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name.
... if the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.">window.open()
method.
...And 5 more matches
Old Proxy API - Archive of obsolete content
proxy factory the object or
method that creates intercessive proxies.
... traps the
methods that provide property access.
... fundamental traps emulated javascript code handler
method description object.getownpropertydescriptor(proxy, name) getownpropertydescriptor: function(name) -> propertydescriptor | undefined should return a valid property descriptor object, or undefined to indicate that no property with name exists in the emulated object.
...And 5 more matches
RDF in Mozilla FAQ - Archive of obsolete content
datasources may be loaded via the rdf service using the getdatasource()
method.
... you can either create an rdf/xml datasource using the rdf service's getdatasource()
method: // get the rdf service var rdf = components .classes["@mozilla.org/rdf/rdf-service;1"] .getservice(components.interfaces.nsirdfservice); // ...and from it, get the datasource.
... you can force an rdf/xml datasource (or any datasource that supports nsirdfremotedatasource) to reload using the refresh()
method of nsirdfremotedatasource.
...And 5 more matches
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
this class will contain native
methods callable from javascript.
... this class should also inherit from nsiclassinfo and implement its
methods to be able to request all necessary privileges from the mozilla security manager (see example 2).
... how to call plugin native
methods the following html code will do the job:</p> this should be changed, we shouldn't advocate embed <embed type="application/plugin-mimetype"> <script language="javascript"> var embed = document.embeds[0]; embed.native
method(); </script> how to build and install having the built mozilla tree is probably not necessary, but building the plugin with a scriptable instance interface will require mozilla headers and the xpcom compatible idl compiler -- xpidl.exe.
...And 5 more matches
CSS layout - Learn web development
at the end of the lessons is an assessment to help you check your understanding of layout
methods, by laying out a webpage.
... flexbox flexbox is a one-dimensional layout
method for laying out items in rows or columns.
... multiple-column layout the multiple-column layout specification gives you a
method of laying content out in columns, as you might see in a newspaper.
...And 5 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
previous overview: asynchronous next this tutorial looks at the traditional
methods javascript has available for running code asychronously after a set time period has elapsed, or at a regular interval (e.g.
...interestingly enough, this means that you can use either
method to clear a settimeout() or setinterval().
... the
method takes as an argument a callback to be invoked before the repaint.
...And 5 more matches
Fetching data from the server - Learn web development
add the following below your previous lines inside your updatedisplay() function: let request = new xmlhttprequest(); next, you need to use the open()
method to specify what http request
method to use to request the resource from the network, and what its url is.
... we'll just use the get
method here and set the url as our url variable.
... request.onload = function() { poemdisplay.textcontent = request.response; }; the above is all set up for the xhr request — it won't actually run until we tell it to, which is done using the send()
method.
...And 5 more matches
JavaScript Tips
var uniquename = { _privatemember: 3, publicmember: "a string", init: function() { this.dosomething(this.anothermember); }, dosomething: function(aparam) { alert(aparam); } }; xpconnect don't use object
methods and properties more than you have to.
... don't call
methods that you don't have to.
... don't query interfaces unless you need to access
methods and properties of that interface.
...And 5 more matches
Addon
instances can be created using the many getaddon
methods on the addonmanager object.
... the interface can represent many different kinds of add-ons and as such, some of the
methods and properties are considered "required" and others "optional," which means that the optional
methods or property may not exist on addon instances for some types of add-ons.
... api consumers should take care to verify the existence of these
methods or properties before relying on them.
...And 5 more matches
AddonManager
the majority of the
methods are asynchronous meaning that results are delivered through callbacks passed to the
method.
... the callbacks will be called just once but that may be before or after the
method returns.
...to do so many
methods of the addonmanager take the add-on types as parameters.
...And 5 more matches
JNI.jsm
unlike c from js-ctypes, defining constants is not a manual magic number
method in jni, it is declared the same way we define functions, except in jni they are called fields.
...
method overview cdata getforthread(); cdata loadclass(cdata ajenv, string aclassfullyqualifiedname, [optional] object adeclares); cdata newstring(cdata ajenv, string astr); string readstring(cdata ajenv, cdata ajavastring); void unloadclasses();
methods getforthread() blah blah cdata getforthread(); parameters this function does not take any arguments.
...a required object that contains up to five fields of key names: constructors, fields, static_fields,
methods, and static_
methods.
...And 5 more matches
Deferred
a deferred object is returned by the obsolete promise.defer()
method to provide a new promise along with
methods to change its state.
...for example, the equivalent of var deferred = promise.defer(); dosomething(function cb(good) { if (good) deferred.resolve(); else deferred.reject(); }); return deferred.promise; would be return new promise(function(resolve, reject) { dosomething(function cb(good) { if (good) resolve(); else reject(); }); });
method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise read only promise a newly created promise, initially in the pending state.
...
methods resolve() fulfills the associated promise with the specified value, or propagates the state of an existing promise.
...And 5 more matches
XPCOMUtils.jsm
to use this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/xpcomutils.jsm"); using xpcomutils exposing a javascript class as a component using these utility
methods requires four key steps: import xpcomutils.jsm, as explained previously.
... constructor the constructor is a simple
method that handles any required initialization tasks.
... notice that the queryinterface()
method implemented by the component simply calls the generateqi()
method provided by the xpcomutils code module.
...And 5 more matches
Memory reporting
methods ...
... size_t mystring::sizeofexcludingthis(mozilla::mallocsizeof amallocsizeof) const { return amallocsizeof(mbuffer); } size_t mystring::sizeofincludingthis(mozilla::mallocsizeof amallocsizeof) const { return amallocsizeof(this) + sizeofexcludingthis(amallocsizeof); } (note that sizeofexcludingthis and sizeofincludingthis aren't overrides of
methods on a global base class that is common to all reporters.
...that said, note that for some classes these
methods may be virtual.) mfbt/memoryreporting.h defines mozilla::mallocsizeof as follows: typedef size_t (*mallocsizeof)(const void* p); functions with this signature measure the size of p by asking the heap allocator how big it is (via moz_malloc_usable_size).
...And 5 more matches
JS::CallArgs
(3nd argument of jsnative)
methods
methods of js::callargs
method description bool requireatleast(jscontext *cx, const char *fnname, unsigned required) returns true if there are at least required arguments passed in.
...
methods inherited from js::callargsbase
method description unsigned length() const returns the number of arguments..
...
methods inherited from js::detail::callreceiverbase
method description jsobject &callee() const returns the function being called, as an object.
...And 5 more matches
JS::Value
the different representations are visible using the separate int32/double
methods but do not affect observable semantics (ignoring performance).
...(note that both -0 and +0 are allowed, and the latter may sometimes be stored using the int32_t representation.) js::value further provides these
methods combining various aspects of the above
methods: js::objectornullvalue(jsobject*) returns an object value corresponding to the given non-null pointer, or a null value if the pointer is null.
... js::value is not inherently type-safe it is an error to call any accessor
method on a value of a non-matching type: val.toint32() must only be called if val.isint32(), val.tostring() must only be called if val.isstring(), and so on.
...And 5 more matches
JSClass
a c/c++ program can use a jsclass with the js_initclass and js_newobject apis to create objects that have custom
methods and properties implemented in c/c++.
... enumerate jsenumerateop
method for enumerating object properties.
... checkaccess jscheckaccessop optional
method for access checks.
...And 5 more matches
nsIClipboard
inherits from: nsisupports last changed in gecko 30.0 (firefox 30.0 / thunderbird 30.0 / seamonkey 2.27)
method overview void emptyclipboard(in long awhichclipboard); void forcedatatoclipboard(in long awhichclipboard); obsolete since gecko 1.8 void getdata(in nsitransferable atransferable, in long awhichclipboard); boolean hasdatamatchingflavors([array, size_is(alength)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsse...
...
methods emptyclipboard() this
method empties the clipboard and notifies the clipboard owner.
... forcedatatoclipboard() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) some platforms support deferred notification for putting data on the clipboard this
method forces the data onto the clipboard in its various formats this may be used if the application going away.
...And 5 more matches
nsIEditor
« xpcom api reference editor/nsieditor.idlscriptable provides
methods and attributes used when editing page content.
... 66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15)
method overview [noscript] void init(in nsidomdocument doc, in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags); void setattributeorequivalent(in nsidomelement element, in astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes); selected content removal void deleteselection(in short action, in short stripwrappers); document info a...
...nd file
methods void resetmodificationcount(); long getmodificationcount(); void incrementmodificationcount(in long amodcount); void incrementmodificationcount(in long amodcount); transaction
methods void dotransaction(in nsitransaction txn); void enableundo(in boolean enable); void undo(in unsigned long count); void canundo(out boolean isenabled, out boolean canundo); void redo(in unsigned long count); void canredo(out boolean isenabled, out boolean canredo); void begintransaction(); void endtransaction(); void beginplaceholdertransaction(in nsiatom name); void endplaceholdertransaction(); boolean shouldtxnsetselection(); void setshouldtxnsetse...
...And 5 more matches
nsIEffectiveTLDService
the
methods below implement the public suffix algorithm in full, including the implicit "*" rule.
...
method overview acstring getbasedomain(in nsiuri auri, [optional] in pruint32 aadditionalparts); acstring getbasedomainfromhost(in autf8string ahost, [optional] in pruint32 aadditionalparts); acstring getpublicsuffix(in nsiuri auri); acstring getpublicsuffixfromhost(in autf8string ahost);
methods getbasedomain() returns the base domain of a uri; that is, the...
...only use this
method if this is not the case.
...And 5 more matches
nsILoginManager
to create an instance, use: var loginmanager = components.classes["@mozilla.org/login-manager;1"] .getservice(components.interfaces.nsiloginmanager);
method overview void addlogin(in nsilogininfo alogin); nsiautocompleteresult autocompletesearch(in astring asearchstring, in nsiautocompleteresult apreviousresult, in nsidomhtmlinputelement aelement); unsigned long countlogins(in astring ahostname, in astring aactionurl, in astring ahttprealm); boolean fillform(in nsidomhtmlformelement aform); void findlogi...
...g ahost); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled);
methods addlogin() stores a new login in the login manager.
... note: this
method is provided for use only by the formfillcontroller, which calls it directly.
...And 5 more matches
nsIScriptableIO
for example: io.getfile("profile", "cookies.txt"); from an xpcom component, however, you will need to get a reference as with other components: var scriptableio = components.classes["@mozilla.org/io/scriptable-io;1"] .getservice(); scriptableio.getfile("profile", "cookies.txt");
method overview nsifile getfile(in astring alocation, in astring afilename); nsifile getfilewithpath(in astring afilepath); nsisupports newinputstream(in nsivariant abase, in astring amode, [optional] in astring acharset, [optional] in astring areplacechar, [optional] in unsigned long abuffersize); nsisupports newoutputstream(in nsivariant a...
...base, in astring amode, [optional] in astring acharset, [optional] in astring areplacechar, [optional] in unsigned long abuffersize, [optional] in unsigned long apermissions); nsiuri newuri(in nsivariant auri);
methods getfile() retrieves a reference to a file or directory on disk.
... the file does not have to exist already; this
method simply creates the file reference which may then be passed to the newinputstream() or newoutputstream()
method to open the file for reading or writing.
...And 5 more matches
nsISupports proxies
about xpcom proxies a proxy, in this context, is a stub object which enables a
method of any class which is derived from nsisupports and has a typelib to be called on any in-process thread.
...it has two entry points: ns_i
method getproxyforobject(nsieventqueue *destqueue, const nsiid & iid, nsisupports *object, print32 proxytype, void * *result); ns_i
method getproxy(nsieventqueue *destqueue, const nsiid & cid, nsisupports *aouter, const nsiid & ii...
... proxy_sync acts just like a function call in that it blocks the calling thread until the the
method is invoked on the destination thread.
...And 5 more matches
nsITransactionListener
inherits from: nsisupports last changed in gecko 1.7
method overview void didbeginbatch(in nsitransactionmanager amanager, in nsresult aresult); void diddo(in nsitransactionmanager amanager, in nsitransaction atransaction, in nsresult adoresult); void didendbatch(in nsitransactionmanager amanager, in nsresult aresult); void didmerge(in nsitransactionmanager amanager, in nsitransaction atoptransaction, in nsitransaction atransactiontomerge, in boolean adidmerge, in nsresult amergeresult); void didredo(in nsitransactionmanager amanager, in nsitransaction atransaction, in nsresult aredoresult); void didundo(in nsitransactionmanager amanager, in nsit...
... in nsitransaction atransaction); boolean willendbatch(in nsitransactionmanager amanager); boolean willmerge(in nsitransactionmanager amanager, in nsitransaction atoptransaction, in nsitransaction atransactiontomerge); boolean willredo(in nsitransactionmanager amanager, in nsitransaction atransaction); boolean willundo(in nsitransactionmanager amanager, in nsitransaction atransaction);
methods didbeginbatch() called after a nsitransactionmanager begins a batch.
...diddo() called after a nsitransactionmanager calls the nsitransaction.dotransaction()
method of a transaction.
...And 5 more matches
nsIZipWriter
to create an instance, use: var zipwriter = components.classes["@mozilla.org/zipwriter;1"] .createinstance(components.interfaces.nsizipwriter);
method overview void addentrychannel(in autf8string azipentry, in prtime amodtime, in print32 acompression, in nsichannel achannel, in boolean aqueue); void addentrydirectory(in autf8string azipentry, in prtime amodtime, in boolean aqueue); void addentryfile(in autf8string azipentry, in print32 acompression, in nsifile afile, in boolean aqueue); void addentrystream(i...
... compression_fastest 1 use the fastest compression
method when adding the file to the archive.
... compression_default 6 use the default compression
method when adding the file to the archive.
...And 5 more matches
XPCOM
rick potts wrote a templated-based generic factory (nsfactory<t>) that simplifies the factory creation process that just requires writing a createinstance()
method.
...that means you can call javascript
methods from c++ and vice versa.
... for more information on the workings of xpcom look elsewhere.how to pass an xpcom object to a new windowif you want to be able to call functions within an xpcom object from a xul window's code, you can do so if you pass the xpcom object as one of the arguments to the window creation
method.interfacing with the xpcom cycle collectorthis is a quick overview of the cycle collector introduced into xpcom for firefox 3, including a description of the steps involved in modifying an existing c++ class to participate in xpcom cycle collection.
...And 5 more matches
Working with ArrayBuffers
pixelbuffer.tostring(); // "ctypes.uint8_t.ptr(ctypes.uint64("0x352e0000"))" var imgwidth = 400; var imgheight = 400; var myimgdat = new imagedata(imgwidth, imgheight);
method 1: passing arraytype cdata to uint8clampedarray.prototype.set one
method is to get into a js-ctypes array, and then set it into the imagedata, as illustrated by the following code example.
...
method 2: manually handled another strategy is to handle it manually, as illustrated by the following code example: var casted = ctypes.cast(pixelbuffer.address(), ctypes.uint8_t.array(myimgdata.data.length).ptr).contents; // myimgdat.data.length is imgwidth * imgheight *4 because per pixel there is r, g, b, a numbers /**
method a **/ for (var nindex = 0; nindex < casted.length; nindex = nindex + 4) ...
...{ // casted.length is same as myimgdat.data.length var r = casted[nindex]; var g = casted[nindex + 1]; var b = casted[nindex + 2]; var a = casted[nindex + 3]; myimgdat.data[nindex] = r; myimgdat.data[nindex + 1] = g; myimgdat.data[nindex + 2] = b; myimgdat.data[nindex + 3] = a; } /***** or do the below which uses the .set
method *****/ /**
method b **/ var normalarr = []; for (var nindex = 0; nindex < cast.length; nindex = nindex + 4) { // casted.length is same as myimgdat.data.length var r = casted[nindex]; var g = casted[nindex + 1]; var b = casted[nindex + 2]; var a = casted[nindex + 3]; normalarr.push(r); normalarr.push(g); normalarr.push(b); normalarr.push(a); } myimgdat.data.set(normalarr); the preceding example, howeve...
...And 5 more matches
Version, UI, and Status Information - Plugins
to accomplish this, the plug-in calls the npn_status
method to display your message on the status line.
...you should use a different
method to display messages that the user needs to see, such as error messages.
... the plug-in calls the npn_useragent
method to retrieve the contents of the user_agent field.
...And 5 more matches
Using the CSS Typed Object Model - Web APIs
the css typed om makes css manipulation more logical and performant by providing object features (rather than cssom string manipulation), providing access to types,
methods, and an object model for css values.
...<dd> for each for (const [prop, val] of defaultcomputedstyles) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(prop)); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode(val)); styleslist.appendchild(cssvalue); } the computedstylemap()
method returns a stylepropertymapreadonly object containing the size property, which indicates how many properties are in the map.
... .get()
method / custom properties let's update our example to only retrieve a few properties and values.
...And 5 more matches
Manipulating video using canvas - Web APIs
the javascript code the javascript code in processor.js consists of three
methods.
... initializing the chroma-key player the doload()
method is called when the xhtml document initially loads.
... this
method's job is to prepare the variables needed by the chroma-key processing code, and to set up an event listener so we can detect when the user starts playing the video.
...And 5 more matches
Pixel manipulation with canvas - Web APIs
st colorindices = getcolorindicesforcoord(xcoord, ycoord, canvaswidth); const [redindex, greenindex, blueindex, alphaindex] = colorindices; you may also access the size of the pixel array in bytes by reading the uint8clampedarray.length attribute: var numbytes = imagedata.data.length; creating an imagedata object to create a new, blank imagedata object, you should use the createimagedata()
method.
... there are two versions of the createimagedata()
method: var myimagedata = ctx.createimagedata(width, height); this creates a new imagedata object with the specified dimensions.
... var myimagedata = ctx.createimagedata(anotherimagedata); getting the pixel data for a context to obtain an imagedata object containing a copy of the pixel data for a canvas context, you can use the getimagedata()
method: var myimagedata = ctx.getimagedata(left, top, width, height); this
method returns an imagedata object representing the pixel data for the area of the canvas whose corners are represented by the points (left,top), (left+width, top), (left, top+height), and (left+width, top+height).
...And 5 more matches
Document - Web APIs
t x="266" y="1" width="80" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">document</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} the document interface describes the common properties and
methods for any kind of document.
...
methods this interface also inherits from the node and eventtarget interfaces.
... extension for html documents the document interface for html documents inherit from the htmldocument interface or, since html5, is extended for such documents: document.clear() in majority of modern browsers, including recent versions of firefox and internet explorer, this
method does nothing.
...And 5 more matches
Introduction to the File and Directory Entries API - Web APIs
in contrast, the synchronous api does not use callbacks because the api
methods return values.
... global
methods of the asynchronous and synchronous apis.
... the asynchronous api has the following global
methods: requestfilesystem() and resolvelocalfilesystemurl().
...And 5 more matches
HTMLInputElement.stepUp() - Web APIs
the htmlinputelement.stepup()
method increments the value of a numeric type of <input> element by the value of the step attribute, or the default step value if the step attribute is not explicitly set.
... the
method, when invoked, increments the value by (step * n), where n defaults to 1 if not specified, and step defaults to the default value for step if not specified.
...0 second (15 minute) increments: <input type="time" min="09:00" step="900"> datetime-local 1 (day) same day of the week: <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 0.1 increments <input type="number" min="0" step="0.1" max="10"> range 1 increments by 2: <input type="range" min="0" step="2" max="10"> the
method, when invoked, changes the form control's value by the value given in the step attribute, multiplied by the parameter, within the constraints set on the form control.
...And 5 more matches
Working with the History API - Web APIs
html5 introduced the pushstate() and replacestate()
methods for add and modifying history entries, respectively.
... these
methods work in conjunction with the onpopstate event.
... example of pushstate()
method suppose http://mozilla.org/foo.html executes the following javascript: 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.
...And 5 more matches
IDBIndexSync - Web APIs
method overview any add (in any value, in optional any key) raises (idbdatabaseexception); any get (in any key) raises (idbdatabaseexception); any getobject (in any key) raises (idbdatabaseexception); void opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); void openobjectcursor (in optional idbkeyrange range,...
...
methods add() stores the given value into this index, optionally with the specified key.
... any add( in any value, in optional any key ) raises (idbdatabaseexception); parameters returns exceptions this
method can raise a idbdatabaseexception with the following code: value the value to store into the index.
...And 5 more matches
IDBTransactionSync - Web APIs
method overview void abort() raises (idbdatabaseexception); void commit() raises (idbdatabaseexception); idbobjectstoresync objectstore(in domstring name) raises (idbdatabaseexception); attributes attribute type description db idbdatabasesync the database connection that this transaction is associated with.
...
methods abort() call this
method to signal a need to cancel the effects of the operations performed by this transaction.
... when this
method is called, the browser ignores all the changes performed to the objects of this database since this transaction was created.
...And 5 more matches
Capabilities, constraints, and settings - Web APIs
once the script 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.
... finally, the track's applyconstraints()
method is called to configure the api as desired by specifying the values or ranges of values it wishes to use for any of the constrainable properties about which it has a preference.
... the track's getconstraints()
method returns the set of constraints passed into the most recent call to applyconstraints().
...And 5 more matches
Node - Web APIs
methods in addition to the properties below, node inherits
methods from its parent, eventtarget.
... obsolete
methods node.getuserdata() allows a user to get some domuserdata from the node.
... living standard added the following
methods: getrootnode() dom4the definition of 'node' in that specification.
...And 5 more matches
Using Performance Timeline - Web APIs
performance extensions performance timeline extends the performance object with three
methods that provide different mechanisms to get a set of performance records (metrics), depending on the specified filter criteria.
... the following example show the usage of these
methods getentries(), getentriesbyname() and getentriesbytype().
...performance.mark not supported"); return; } // create some performance entries via the mark() and measure()
methods performance.mark("begin"); do_work(50000); performance.mark("end"); do_work(50000); performance.measure("measure1", "begin", "end"); // use getentries() to iterate all entries var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("all entry[" + i + "]"); print_perf_entry(p[i]); } // use getentries(name, entrytype) to get specific entries p = per...
...And 5 more matches
Pointer Lock API - Web APIs
the pointer lock api (formerly called mouse lock api) provides input
methods based on the movement of the mouse over time (i.e., deltas), not just the absolute position of the mouse cursor in the viewport.
...
method/properties overview this section provides a brief description of each property and
method related to the pointer lock specification.
... requestpointerlock() the pointer lock api, similar to the fullscreen api, extends dom elements by adding a new
method, requestpointerlock().
...And 5 more matches
ReadableStream.ReadableStream() - Web APIs
syntax var readablestream = new readablestream(underlyingsource[, queuingstrategy]); parameters underlyingsource an object containing
methods and properties that define how the constructed stream instance will behave.
... underlyingsource can contain the following: start(controller) this is a
method, called immediately when the object is constructed.
... the contents of this
method are defined by the developer, and should aim to get access to the stream source, and do anything else required to set up the stream fuctionality.
...And 5 more matches
Inputs and input sources - Web APIs
the information for each input source includes which hand it's held in (if applicable), what targeting
method it uses, xrspaces that can be used to draw the targeting ray and to find the targeted object or location as well as to draw objects in the user's hands, and profile strings specifying the preferred way to represent the controller in the user's viewing area as well as how the input operates.
...this gaze input
method is fairly simple, and doesn't need any special controls, as it will be based on the facing direction reported by the headset or whatever device is used to determine what direction the viewer's face is pointing in.
... you can easily obtain the target ray corresponding to the targetrayspace from within the drawing handler for a given frame using xrframe's getpose()
method.
...And 5 more matches
Window - Web APIs
that said, even in a tabbed browser, some properties and
methods still apply to the overall window that contains the tab, such as resizeto() and innerheight.
...
methods this interface inherits
methods from the eventtarget interface and implements
methods from windoworworkerglobalscope and eventtarget.
... window.stop() this
method stops window loading.
...And 5 more matches
WorkerGlobalScope - Web APIs
it is a regular performance object, except that only a subset of its property and
methods are available to workers.
...
methods this interface inherits
methods from the eventtarget interface and windoworworkerglobalscope and windoweventhandlers mixins.
... standard
methods workerglobalscope.importscripts() imports one or more scripts into the worker's scope.
...And 5 more matches
XMLHttpRequest.sendAsBinary() - Web APIs
the obsolete xmlhttprequest
method sendasbinary() is a variant of the send()
method that sends binary data.
... the send()
method now supports binary data and should now be used instead.
... this
method makes it possible to read and upload any type of file and to stringify the raw data.
...And 5 more matches
<input type="submit"> - HTML: Hypertext Markup Language
<input type="submit" value="send request"> value a domstring used as the button's label events click supported common attributes type and value idl attributes value
methods none value an <input type="submit"> element's value attribute contains a domstring which is displayed as the button's label.
...t"> additional attributes in addition to the attributes shared by all <input> elements, submit button inputs support the following attributes: attribute description formaction the url to which to submit the form's data; overrides the form's action attribute, if any formenctype a string specifying the encoding type to use for the form data form
method the http
method (get or post) to use when submitting the form.
... formenctype a string that identifies the encoding
method to use when submitting the form data to the server.
...And 5 more matches
Equality comparisons and sameness - JavaScript
toprimitive(a) attempts to convert its object argument to a primitive value, by attempting to invoke varying sequences of a.tostring and a.valueof
methods on a.
... same-value equality is provided by the object.is
method.
...even if your requirements involve having comparisons between two nan values evaluate to true, generally it is easier to special-case the nan checks (using the isnan
method available from previous versions of ecmascript) than it is to work out how surrounding computations might affect the sign of any zeros you encounter in your comparison.
...And 5 more matches
Array.prototype.map() - JavaScript
the map()
method creates a new array populated with the results of calling a provided function on every element in the calling array.
...let lenvalue be the result of calling the get internal //
method of o with the argument "length".
...let kpresent be the result of calling the hasproperty internal //
method of o with argument pk.
...And 5 more matches
Array - JavaScript
description arrays are list-like objects whose prototype has
methods to perform traversal and mutation operations.
...element', 'this is the second element', 'this is the last element'] console.log(arr[0]) // logs 'this is the first element' console.log(arr[1]) // logs 'this is the second element' console.log(arr[arr.length - 1]) // logs 'this is the last element' array elements are object properties in the same way that tostring is a property (to be specific, however, tostring() is a
method).
... several of the built-in array
methods (e.g., join(), slice(), indexof(), etc.) take into account the value of an array's length property when they're called.
...And 5 more matches
Function.prototype.bind() - JavaScript
the bind()
method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.
...the arguments to the internal
method are a this value and a list containing the arguments passed to the function by a call expression.
... when a bound function is called, it calls internal
method [[call]] on [[boundtargetfunction]], with following arguments call(boundthis, ...args).
...And 5 more matches
Function.name - JavaScript
(function() {}).name; // "" (() => {}).name; // "" inferred function names variables and
methods can infer the name of an anonymous function from its syntactic position (new in ecmascript 2015).
... let f = function() {}; let object = { some
method: function() {} }; console.log(f.name); // "f" console.log(object.some
method.name); // "some
method" you can define a function with a name in a function expression: let object = { some
method: function object_some
method() {} }; console.log(object.some
method.name); // logs "object_some
method" try { object_some
method } catch(e) { console.log(e); } // referenceerror: object_some
method is not defined the name property is read-only and cannot be changed by the assigment operator: example below contradicts with what is said at the beginning of this section and doesn't work as described.
... let object = { // anonymous some
method: function() {} }; object.some
method.name = 'other
method'; console.log(object.some
method.name); // some
method to change it, use object.defineproperty().
...And 5 more matches
Object.prototype.toString() - JavaScript
the tostring()
method returns a string representing the object.
... description every object has a tostring()
method that is automatically called when the object is to be represented as a text value or when an object is referred to in a manner in which a string is expected.
... by default, the tostring()
method is inherited by every object descended from object.
...And 5 more matches
Web Components
register your new custom element using the customelementregistry.define()
method, passing it the element name to be defined, the class or function in which its functionality is specified, and optionally, what element it inherits from.
... if required, attach a shadow dom to the custom element using element.attachshadow()
method.
... add child elements, event listeners, etc., to the shadow dom using regular dom
methods.
...And 5 more matches
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
creating an xsltprocessor to start, you need to create an xsltprocessor object: var processor = new xsltprocessor(); specifying the stylesheet before you can use it, you must import a stylesheet with the xsltprocessor.importstylesheet()
method.
... transforming the document you can use the xsltprocessor.transformtodocument() or xsltprocessor.transformtofragment()
methods to transform a document using the imported xslt stylesheet.
... transformtodocument xsltprocessor.transformtodocument() takes one argument, the source node to transform, and returns a new document with the results of the transformation: var newdocument = processor.transformtodocument(domtobetransformed); the resultant object depends on the output
method of the stylesheet: html - htmldocument xml - xmldocument text - xmldocument with a single root element <transformiix:result> with the text as a child transformtofragment you can also use xsltprocessor.transformtofragment() which will return a documentfragment node.
...And 5 more matches
Classes and Inheritance - Archive of obsolete content
we will show how to make inheritance work correctly with respect to constructors, prototypes, and the instanceof operator, and how to override
methods in subclasses.
...the
method draw is defined on instances of shape, so we definitely want it to be defined on instances of circle.
... circle.prototype = object.create(shape.prototype); now when javascript looks for the
method draw on an instance of circle, it first looks for it on the object itself.
...And 4 more matches
page-mod - Archive of obsolete content
if you supply the scripts as separate files in the "data" directory, you specify them using with a url, typically constructed using the url()
method of the self module's data object: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("my-script.js") }); var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: [data.url("jquery-1.7.min.js"), ...
... to stop a page-mod from making any more modifications, call its destroy()
method.
... using the attach
method of the tab object, you can attach a set of content scripts to a particular tab.
...And 4 more matches
panel - Archive of obsolete content
if you want to close an existing panel without opening a new one, you can call the hide() or the destroy()
method.
...to do this, save the html in your add-on's data directory and load it using the data.url()
method exported by the self module, like this: var mypanel = require("sdk/panel").panel({ contenturl: require("sdk/self").data.url("myfile.html") }); mypanel.show(); from firefox 34, you can use "./myfile.html" as an alias for self.data.url("myfile.html").
...you can position the panel by passing a position to the panel's constructor or to its show()
method.
...And 4 more matches
ui/button/action - Archive of obsolete content
you can generate click events programmatically with the button's click()
method.
... you can set state to be specific to a window or tab using the button's state()
method.
... destroying buttons when you've finished with a button, destroy it by calling its destroy()
method.
...And 4 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
xul display
methods xul is used almost exclusively in mozilla applications like firefox and thunderbird, and extensions for them, but other web browsers based on firefox or the gecko engine, and even web-based content also used xul.
... for example, there is the mozilla amazon browser, which helps with shopping at amazon, and the presentation
method in xul, a tool for writing and displaying presentations to try out the code samples in this chapter, save them as text files with .xul extensions and drag and drop them into the firefox browser window.
... fixme: explain how setting this option and use next listings if we want to run firefox displaying none of its gui and only the contents of a certain xul file, we can launch firefox and set the option: -chrome file_url.xul another way, as shown in listing 1, is to use the window.opendialog()
method, which can be used only within a xul window.
...And 4 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
there won't be any problems if various add-ons override the same function (using this
method).
... note: it is not safe to remove such an override again, as this
method constitutes in a single-linked function chain.
...again, this is a problem with the "string-patch"
method, too.
...And 4 more matches
Creating a Microsummary - Archive of obsolete content
specifying the output type since the xslt transform sheet will generate a text microsummary, we should indicate this with the xslt <output> element: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output
method="text"/> </transform> </template> </generator> using a simple xslt <template> the xslt processor transforms documents by comparing each xslt <template> element in the transform sheet to a set of nodes in the document.
...icrosummary for the spread firefox page, we only need to use a single <template> element that matches the root node of the document and is processed once: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output
method="text"/> <template match="/"> </template> </transform> </template> </generator> including the download count to include the download count in the output of the xslt transform sheet, we need to add an xslt <value-of> element to the template whose select attribute contains an xpath expression that points to the node containing the count.
... add a <value-of> element to the xslt <template> element whose select attribute contains that xpath expression: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output
method="text"/> <template match="/"> <value-of select="id('download-count')"/> </template> </transform> </template> </generator> adding text to include the label fx downloads in the microsummary, we need to add an xslt <text> element to the xslt <template> element whose content is the text we want to add.
...And 4 more matches
addDirectory - Archive of obsolete content
method of install object syntax public int adddirectory ( string xpisourcepath); public int adddirectory ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int adddirectory ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); parameters t...
...he adddirectory
method has the following parameters: registryname the pathname in the client version registry for the root directory of the files that are to be installed.this parameter can be an absolute pathname (beginning with a /) or a relative pathname, (not beginning with a slash).
...a relative pathname is appended to the registry name of the package as specified by the package parameter to the initinstall
method.this parameter can also be null, in which case the xpisourcepath parameter is used as a relative pathname.note that the registry pathname is not the location of the software on the computer; it is the location of information about the software inside the client version registry.
...And 4 more matches
addFile - Archive of obsolete content
method of install object syntax public int addfile ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string xpisourcepath); public int addfile ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int addfile ( string registryname, string version, string...
... xpisourcepath, object localdirspec, string relativelocalpath); parameters the addfile
method has the following parameters: registryname the pathname in the client version registry about the file.
...typically, absolute pathnames are only used for shared components, or components that come from another vendor, such as /microsoft/shared/msvcrt40.dll.typically, relative pathnames are relative to the main pathname specified in the initinstall
method.
...And 4 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
note also that when you call
methods on the install--as you do so often in installation scripts (getfolder, initinstall, addfile, and performinstall are all examples of common install object
methods)--the install object is implicit; like the window object in regular web page scripts, the install object does not need to be prefixed to the
method.
...the initinstall()
method on the install object creates a new installation for the specified software and version.
... in the browser.xpi installation, this function appears at line 20: var err = initinstall("netscape seamonkey", "browser", "6.0.0.2000110807"); if you call a
method on the install object before initinstall(), you will get an error.
...And 4 more matches
PopupEvents - Archive of obsolete content
this will occur regardless of how the popup is opened, either from user interaction or from a script calling the openpopup or openpopupatscreen
methods.
...<panel id="time-panel" onpopupshowing="this.lastchild.value = (new date()).tolocaleformat('%t')"> <label value="time:"/> <label id="time"/> </panel> <toolbarbutton label="show time" popup="time-panel"/> you can prevent a menu or popup from appearing by calling the preventdefault
method of the event from within a popupshowing listener.
...the preventdefault
method will stop this from happening and the popup will not be opened.
...And 4 more matches
Tree Widget Changes - Archive of obsolete content
the tree and view
methods no longer take ids as arguments when columns are used.
... the nsitreeboxobject.getpagecount()
method has been renamed to make it clearer what it does.
... the invalidateprimarycell(row)
method has been removed, instead use nsitreeboxobject.invalidatecell() like this invalidatecell(row, tree.columns.getprimarycolumn()).
...And 4 more matches
XBL Example - Archive of obsolete content
to set the page, a
method 'setpage' is called which will be defined later.
... setpage
method now let's define the 'setpage'
method.
... <
method name="setpage"> <parameter name="newidx"/> <body> <![cdata[ var thedeck=document.getanonymousnodes(this)[0].childnodes[0]; var totalpages=this.childnodes.length; if (newidx<0) return 0; if (newidx>=totalpages) return totalpages; thedeck.setattribute("selectedindex",newidx); document.getanonymousnodes(this)[0].childnodes[1].childnodes[1] .setattribute("value",(newidx+1)+" of "+totalpages); return newidx; ]]> </body> </
method> this function is called setpage and takes one parameter newidx.
...And 4 more matches
wizard - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used to construct a step-by-step wizard found in some applications to guide users through a task.
... attributes firstpage, lastpage, pagestep, title, windowtype properties canadvance, canrewind, currentpage, onfirstpage, onlastpage, pagecount, pageindex, pagestep, title, wizardpages
methods advance, cancel, extra1, extra2, getbutton, getpagebyid, goto, rewind examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function checkcode(){ document.getelementbyid('thewizard').canadvance = (document.getel...
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagna...
...And 4 more matches
calICalendarView - Archive of obsolete content
because of this close association between
methods and attributes on the one hand, and content on the other, calicalendarview implementations are particularly well suited to xbl.
...this explains the need for the fairly large list off attributes and
methods that must be implemented, so that outside code can be able to gain a decent picture of the current state of those nodes.
... it should be noted, however, that the
methods and attributes implemented by a calicalendarview need not behave in any predictable fashion.
...And 4 more matches
nsIContentPolicy - Archive of obsolete content
method overview short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra, in nsiprincipal arequestprincipal); short shouldprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in n...
... type_xbl 9 indicates an xbl binding request, triggered either by -moz-binding css property or the document.addbinding()
method.
... type_fetch 20 indicates a load initiated by the globalfetch.fetch()
method, which is available as a global in both window and worker contexts.
...And 4 more matches
Processing XML with E4X - Archive of obsolete content
} working with xml objects xml objects provide a number of
methods for inspecting and updating their contents.
...operator accesses all children no matter how deeply nested: alert(person..*.length()); // 11 the length()
method here returns 11 because both elements and text nodes are included in the resulting xmllist.
... objects representing xml elements provide a number of useful
methods, some of which are illustrated below: todo: add all of the
methods to the javascript reference, link from here alert(person.name.text()) // bob smith var xml = person.name.toxmlstring(); // a string containing xml var personcopy = person.copy(); // a deep copy of the xml object var child = person.child(1); // the second child node; in this case the <likes> element working with xmllists in addition to the xml object, e4x introduces an xmllist object.
...And 4 more matches
JavaObject - Archive of obsolete content
created by any java
method which returns an object type.
...
methods inherits public
methods from the java class of which it is an instance.
... the javaobject also inherits
methods from java.lang.object and any other superclass.
...And 4 more matches
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
an http
method is idempotent if an identical request can be made once or several times in a row with the same effect while leaving the server in the same state.
... in other words, an idempotent
method should not have any side-effects (except for keeping statistics).
... implemented correctly, the get, head, put, and delete
method are idempotent, but not the post
method.
...And 4 more matches
Supporting older browsers - Learn web development
previous overview: css layout next in this module, we recommend using flexbox and grid as the main layout
methods for your designs.
... however, there will be visitors to your site who use older browsers, or browsers which do not support the
methods you have used.
... creating fallbacks in css css specifications contain information that explains what the browser does when two layout
methods are applied to the same item.
...And 4 more matches
Client-side form validation - Learn web development
the constraint validation api most browsers support the constraint validation api, which consists of a set of
methods and properties available on the following form element dom interfaces: htmlbuttonelement (represents a <button> element) htmlfieldsetelement (represents a <fieldset> element) htmlinputelement (represents an <input> element) htmloutputelement (represents an <output> element) htmlselectelement (represents a <select> element) htmltextareaelement (represents a <textarea> element) the const...
... the constraint validation api also makes the following
methods available on the above elements.
...if the element is invalid, this
method also fires an invalid event on the element.
...And 4 more matches
Your first form - Learn web development
the <form> element all forms start with a <form> element, like this: <form action="/my-handling-form-page"
method="post"> </form> this element formally defines a form.
...all of its attributes are optional, but it's standard practice to always set at least the action and
method attributes: the action attribute defines the location (url) where the form's collected data should be sent when it is submitted.
... the
method attribute defines which http
method to send the data with (usually get or post).
...And 4 more matches
Drawing graphics - Learn web development
this is done using the htmlcanvaselement.getcontext()
method, which for basic usage takes a single string as a parameter representing the type of context you want to retrieve.
...add the following lines at the bottom of your javascript: ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); here we are setting a fill color using the canvas' fillstyle property (this takes color values just like css properties do), then drawing a rectangle that covers the entire area of the canvas with thefillrect
method (the first two parameters are the coordinates of the rectangle's top left hand corner; the last two are the width and height you want the rectangle drawn at — we told you those width and height variables would be useful)!
... we'll be using some common
methods and properties across all of the below sections: beginpath() — start drawing a path at the point where the pen currently is on the canvas.
...And 4 more matches
Introduction to web APIs - Learn web development
when calling a
method from a library, the developer is in control.
... they are based on objects your code interacts with apis using one or more javascript objects, which serve as containers for the data the api uses (contained in object properties), and the functionality the api makes available (contained in object
methods).
...the most obvious ones are: audiocontext, which represents an audio graph that can be used to manipulate audio playing inside the browser, and has a number of
methods and properties available to manipulate that audio.
...And 4 more matches
Third-party APIs - Learn web development
for example: let map = l.mapquest.map('map', { center: [53.480759, -2.242631], layers: l.mapquest.tilelayer('map'), zoom: 12 }); here we are creating a variable to store the map information in, then creating a new map using the mapquest.map()
method, which takes as its parameters the id of a <div> element you want to display the map in ('map'), and an options object containing the details of the particular map we want to display.
... in this case we specify the coordinates of the center of the map, a map layer of type map to show (created using the mapquest.tilelayer()
method), and the default zoom level.
...you can expand the controls available using the map.addcontrol()
method; add this to your code, inside the window.onload handler: map.addcontrol(l.mapquest.control()); the mapquest.control()
method just creates a simple full-featured control set, and it is placed in the top-right hand corner by default.
...And 4 more matches
A first splash into JavaScript - Learn web development
this is a
method that takes two input values (called arguments) — the type of event we are listening out for (in this case click) as a string, and the code we want to run when the event occurs (in this case the checkguess() function).
...now let's look at the loop in our number guessing game — the following can be found inside the resetgame() function: const resetparas = document.queryselectorall('.resultparas p'); for (let i = 0 ; i < resetparas.length ; i++) { resetparas[i].textcontent = ''; } this code creates a variable containing a list of all the paragraphs inside <div class="resultparas"> using the queryselectorall()
method, then it loops through each one, removing the text content of each.
...add the following line just below the let resetbutton; line near the top of your javascript, then save your file: guessfield.focus(); this line uses the focus()
method to automatically put the text cursor into the <input> text field as soon as the page loads, meaning that the user can start typing their first guess right away, without having to click the form field first.
...And 4 more matches
Eclipse CDT
to quickly find the definition of an enum, class,
method, etc.
... to see the callers of a
method (and their callers, etc.), select the
method and use the context menu to select "open call hierarchy".
... to see the overrides of a virtual
method, select that
method's name in an editor window and select "open type hierarchy" or, "quick type hierarchy" from the context menu.
...And 4 more matches
Interfacing with the Add-on Repository
starting a request to start a search of the repository, you can use either of the following
methods: searchaddons() queries the add-on repository for add-ons matching given search criteria.
...the callback object needs to implement the searchcallback interface, providing the
methods that get called when a search either fails or completes successfully.
... handling failed requests the callback object must have a searchfailed()
method; this gets called when a repository search fails to execute.
...And 4 more matches
JS_ShutDown
this
method should be called after all other jsapi data has been properly cleaned up: every jsruntime created with js_newruntime must have been destroyed with js_destroyruntime, every jscontext created with js_newcontext must have been destroyed with js_destroycontext, and so on.
... calling this
method before all other resources have been destroyed has undefined behavior.
... failure to call this
method, at present, has no adverse effects other than leaking memory.
...And 4 more matches
Places Developer Guide
bookmarks the toolkit bookmarks service is nsinavbookmarksservice: var bookmarks = cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); this service provides
methods for adding, editing and deleting items in the bookmarks collection.
...// create a bookmark observer var observer = { onbeginupdatebatch: function() { // this
method is notified when a batch of changes are about to occur.
... note: the
method importhtmlfromfiletofolder()
method was removed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11).
...And 4 more matches
Interfacing with the XPCOM cycle collector
the traverse and unlink
methods on the helper object are not magic; they are programmer-supplied and must be correct, or else the collector will fail.
...or your class may have a complicated ownership structure, such that the simple ns_impl_cycle_collection_n macros are insufficient; in this case you might need to implement the traverse and unlink
methods of your helper class manually.
... manually implementing the traverse and unlink
methods each field that may contain cycle collected objects needs to be passed to the cycle collector, so it can detect cycles that pass through those fields.
...And 4 more matches
IAccessibleHyperlink
iaccessibleaction.nactions() is one greater than the maximum value for the indices used with the
methods of this interface.
...none of the iaccessibleaction
methods would be implemented on the first level hyperlink objects.
... the second level hyperlink objects would implement the iaccessibleaction
methods.
...And 4 more matches
nsIAppShellService
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/appshell/appshellservice;1 as a service: var appshellservice = components.classes["@mozilla.org/appshell/appshellservice;1"] .getservice(components.interfaces.nsiappshellservice);
method overview void closetoplevelwindow(in nsixulwindow awindow); obsolete since gecko 1.8 void createhiddenwindow(in nsiappshell aappshell); native code only!
...obsolete since gecko 1.8
methods closetoplevelwindow() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) close a window.
... createtoplevelwindow() this
method creates a window, which will be initially invisible.
...And 4 more matches
nsIBrowserSearchService
to access this service, use: var browsersearchservice = components.classes["@mozilla.org/browser/search-service;1"] .getservice(components.interfaces.nsibrowsersearchservice); attempting to use any
method or attribute of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization.
...
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 description, in astring
method, in astring url); void getdefaultengines([optional] out unsigned long enginecount, [retval, array, size_is(engin...
...
methods addengine() adds a new search engine from the file at the supplied uri, optionally asking the user for confirmation first.
...And 4 more matches
nsIComponentManager
xpcom/components/nsicomponentmanager.idlscriptable this interface provides
methods to access factory objects and instantiate instances of classes.
... 66 introduced gecko 0.7 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
method overview void addbootstrappedmanifestlocation(in nsilocalfile alocation); void createinstance(in nscidref aclass, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void createinstancebycontractid(in string acontractid, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void getclassobject(in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void getclassobjectbycontractid(in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void removebootstrappe...
...dmanifestlocation(in nsilocalfile alocation);
methods addbootstrappedmanifestlocation() loads a "bootstrapped" chrome.manifest file from the specified directory or xpi file.
...And 4 more matches
nsIContentPrefService2
domain parameters many
methods of this interface accept a "domain" parameter.
...private-browsing context parameters many
methods also accept a "context" parameter.
... this parameter relates to private browsing and determines the kind of storage that a
method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions.
...And 4 more matches
nsIContentViewer
to create an instance, use: var contentviewer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsicontentviewer);
method overview void clearhistoryentry(); void close(in nsishentry historyentry); void destroy(); [noscript,notxpcom,nostdcall] nsiviewptr findcontainerview(); void getbounds(in nsintrectref abounds); native code only!
... sticky boolean
methods clearhistoryentry() clears the current history entry.
... note: if this container is the root of a view manager hierarchy (that is, this
method returns null), and mparentwidget is also null, then this document should not even be displayed.
...And 4 more matches
nsIDOMNSHTMLDocument
dom/interfaces/html/nsidomnshtmldocument.idlscriptable this interface defines
methods and properties supported by gecko on the document object that are not part of dom level 2.
... inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3)
method overview void captureevents(in long eventflags); void clear(); boolean execcommand(in domstring commandid, in boolean doshowui, in domstring value); boolean execcommandshowhelp(in domstring commandid); obsolete since gecko 14.0 domstring getselection(); nsidomdocument open(in acstring acontenttype, in boolean areplace); boolean querycommandenabled(in domstring commandid); boolean querycommandindeterm(in domstring commandid); boolean querycommandstate(in domstring commandid); boolean querycommandsupported(in domstring commandid); domstring querycommandtext(in domstring commandid); obsolet...
...obsolete since gecko 6.0
methods captureevents() provided for compatibility with netscape 4.x, but does not actually do anything.
...And 4 more matches
nsIEventTarget
events may be sent to this target from any thread by calling the dispatch
method.
... 1.0 66 introduced gecko 1.6 inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview void dispatch(in nsirunnable event, in unsigned long flags); boolean isoncurrentthread(); void postevent(in pleventptr aevent); native code only!
... dispatch_sync 1 this flag specifies the synchronous mode of event dispatch, in which the dispatch()
method does not return until the event has been processed.
...And 4 more matches
nsIFocusManager
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) implemented by: @mozilla.org/focus-manager;1 as a service: var focusmanager = components.classes["@mozilla.org/focus-manager;1"] .getservice(components.interfaces.nsifocusmanager);
method overview void clearfocus(in nsidomwindow awindow); void contentremoved(in nsidocument adocument, in nsicontent aelement); native code only!
... nsidomelement getfocusedelementforwindow(in nsidomwindow awindow, in prbool adeep, out nsidomwindow afocusedwindow); pruint32 getlastfocus
method(in nsidomwindow window); void movecarettofocus(in nsidomwindow awindow); void elementisfocusable(in nsidomelement aelement, in unsigned long aflags); nsidomelement movefocus(in nsidomwindow awindow, in nsidomelement astartelement, in unsigned long atype, in unsigned long aflags); void setfocus(in nsidomelement aelement, in unsigned long aflags); void windowhidden(in nsidomwindow awindow); native code only!
...
methods clearfocus() clears the focused element within awindow.
...And 4 more matches
nsIMicrosummaryService
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides
methods for managing installed microsummaries, and the bookmarks they apply to.
...s from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) implemented by: @mozilla.org/microsummary/service;1 as a service: var microsummaryservice = components.classes["@mozilla.org/microsummary/service;1"] .getservice(components.interfaces.nsimicrosummaryservice);
method overview void addgenerator(in nsiuri generatoruri); nsimicrosummary createmicrosummary(in nsiuri pageuri, in nsiuri generatoruri); nsisimpleenumerator getbookmarks(); nsimicrosummarygenerator getgenerator(in nsiuri generatoruri); nsimicrosummaryset getmicrosummaries(in nsiuri pageuri, in long long bookmarkid); nsimicrosummary getmicrosummary...
... nsimicrosummarygenerator installgenerator(in nsidomdocument xmldefinition); boolean ismicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); nsimicrosummary refreshmicrosummary(in long long bookmarkid); void removemicrosummary(in long long bookmarkid); void setmicrosummary(in long long bookmarkid, in nsimicrosummary microsummary);
methods addgenerator() install the microsummary generator from the resource at the supplied uri.
...And 4 more matches
nsINavHistoryResultViewer
note: most
methods in this interface were renamed in gecko 1.9.2, and others have slightly different parameter lists.
...
method overview void containerclosed(in nsinavhistorycontainerresultnode acontainernode); void containeropened(in nsinavhistorycontainerresultnode acontainernode); void invalidatecontainer(in nsinavhistorycontainerresultnode acontainernode); void nodeannotationchanged(in nsinavhistoryresultnode anode, in autf8string aannoname); void nodedateaddedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodelastaddedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodehistorydetailschanged(in nsinavhistoryresultnode anode, in prtime anewvisitdate, in unsigned long anewaccesscount); void nodeiconchanged(in nsinavhistoryresultnode anode); void nodekeywordchanged(in nsinavhistoryr...
...
methods containerclosed() called when a container node's state changes from closed to opened.
...And 4 more matches
nsIPlacesImportExportService
toolkit/components/places/nsiplacesimportexportservice.idlscriptable provides
methods for exporting places data.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) in the past, this interface also offered
methods for importing places data, but those
methods are now part of the bookmarkhtmlutils.jsm javascript code module.
... implemented by: @mozilla.org/import-export-service;1 as a service: var placesimportexportservice = components.classes["@mozilla.org/import-export-service;1"] .getservice(components.interfaces.nsiplacesimportexportservice);
method overview void backupbookmarksfile(); void exporthtmltofile(in nsilocalfile afile); void importhtmlfromfile(in nsilocalfile afile, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromfiletofolder(in nsilocalfile afile, in print64 afolder, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromuri(in nsiuri auri, in boolean aisinitialimport); obsolete sin...
...And 4 more matches
nsIProcess
to create an instance, use: var process = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess);
method overview void init(in nsifile executable); void initwithpid(in unsigned long pid); obsolete since gecko 1.9.2 void kill(); void run(in boolean blocking, [array, size_is(count)] in string args, in unsigned long count); void runasync([array, size_is(count)] in string args, in unsigned long count, [optional] in nsiobserver observer, [optional] in boolean...
...
methods init() initializes the nsiprocess with the specified executable file.
... gecko 1.9.1 note this
method is no longer implemented as of gecko 1.9.1, and is removed entirely in gecko 1.9.2.
...And 4 more matches
nsIScriptableInputStream
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview unsigned long available(); void close(); void init(in nsiinputstream ainputstream); string read(in unsigned long acount); acstring readbytes(in unsigned long acount);
methods available() return the number of bytes currently available in the stream.
... note: this
method should not be used to determine the total size of a stream, even if the stream corresponds to a local file.
... moreover, since a stream may make available more than 2^32 bytes of data, this
method is incapable of expressing the entire size of the underlying data source.
...And 4 more matches
nsISecurityCheckedComponent
caps/idl/nsisecuritycheckedcomponent.idlscriptable provides
methods that let an xpcom component define custom rules for accessing it from potentially unprivileged code.
... this includes creating instances of arbitrary xpcom objects and calling
methods and setting properties on them.
...
method overview string cancall
method(in nsiidptr iid, in wstring
methodname); string cancreatewrapper(in nsiidptr iid); string cangetproperty(in nsiidptr iid, in wstring propertyname); string cansetproperty(in nsiidptr iid, in wstring propertyname);
methods cancall
method() returns a capability string indicating what permissions are required to call the specified
method on the given interface...
...And 4 more matches
nsISelectionController
inherits from: nsiselectiondisplay last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void characterextendforbackspace(); native code only!
...if not set, posts a request which is processed at some point after the
method returns.
...
methods native code only!characterextendforbackspace will extend the selection one character cell backward in the document.
...And 4 more matches
nsITimer
nsitimer instances must be initialized by calling one of the initialization
methods.
... you may also re-initialize (using one of the initialization
methods) an existing instance to avoid the overhead of destroying and creating a timer.
...
method overview void cancel(); void init(in nsiobserver aobserver, in unsigned long adelay, in unsigned long atype); void initwithcallback(in nsitimercallback acallback, in unsigned long adelay, in unsigned long atype); void initwithfunccallback(in nstimercallbackfunc acallback, in voidptr aclosure, in unsigned long adelay, in unsigned long atype); native code only!
...And 4 more matches
nsIXULTemplateResult
the value for a particular variable may be retrieved using the getbindingfor() and getbindingobjectfor()
methods.
...
method overview astring getbindingfor(in nsiatom avar); nsisupports getbindingobjectfor(in nsiatom avar); void hasbeenremoved(); void rulematched(in nsisupports aquery, in nsidomnode arulenode); attributes attribute type description id astring id of the result.
...
methods getbindingfor() get the string representation of the value of a variable for this result.
...And 4 more matches
Setting HTTP request headers
the nsihttpchannel interface has a number of properties and
methods, but the
method that is of interest to us is setrequestheader.
... this
method allows us to set an http request header.
...(this variable could have been named anything though.) the setrequestheader
method takes 3 parameters.
...And 4 more matches
Weak reference
to do that, it will call a
method on the observer, so it needs a pointer.
... { // ...but to use my weak reference, i'll need a (short-lived) owning reference nscomptr<nsifoo> tempfooptr = do_queryreferent(weakptr); if ( tempfooptr ) tempfooptr->somefoo
method(...); // else, the `real' object has gone away } in a real world example, however, you are more likely to be holding a weak reference in a member variable.
... why can't i just directly call my interfaces
methods on the weak reference?
...And 4 more matches
Using Objective-C from js-ctypes
objc_msgsend function, receives the instance which receives the message, the selector, and variable argument list for the message, returning the returned value from the
method.
... id nsspeechsynthesizer = (id)objc_getclass("nsspeechsynthesizer"); id tmp = objc_msgsend(nsspeechsynthesizer, alloc); selector for a
method with arguments in this case, [nsspeechsynthesizer initwithvoice:] takes one argument; the selector name with a trailing colon.
... sel initwithvoice = sel_registername("initwithvoice:"); if a
method takes two or more arguments, the selector name becomes a concatenation of each name.
...And 4 more matches
Declaring types
the ctypes object offers a number of constructor
methods that let you declare types.
... every type is represented by a ctype object, which, in turn, provides a constructor
method you can call to define values of those types.
...this
method accepts as input the name of the structure and an array of field descriptors, each describing one field in the structure.
...And 4 more matches
Network request list - Firefox Developer Tools
method: the http request
method used.
... status-code:304
method shows resources that have were requested via the specific http request
method.
...
method:post domain shows resources coming from a specifc domain.
...And 4 more matches
Web Console remoting - Firefox Developer Tools
this object provides
methods that abstract away protocol packets, things like startlisteners(), stoplisteners(), etc.
...when navigation stops the following packet is sent: { "from": tabactor, "type": "tabnavigated", "state": "stop", "url": newurl, "title": newtitle, "nativeconsoleapi": true|false } getcachedmessages(types, onresponse) the webconsoleclient.getcachedmessages(types, onresponse)
method sends the following packet to the server: { "to": "conn0.console9", "type": "getcachedmessages", "messagetypes": [ "pageerror", "consoleapi" ] } the getcachedmessages packet allows one to retrieve the cached messages from before the web console was open.
... send http requests starting with firefox 25 you can send an http request using the console actor: { "to": "conn0.console9", "type": "sendhttprequest", "request": { "url": "http://localhost", "
method": "get", "headers": [ { name: "header-name", value: "header value", }, // ...
...And 4 more matches
Attr - Web APIs
in most dom
methods, you will directly retrieve the attribute as a string (e.g., element.getattribute()), but certain functions (e.g., element.getattributenode()) or means of iterating return attr types.
...oke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">attr</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: starting in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4), a number of deprecated properties and
methods output warning messages to the console.
...see deprecated properties and
methods for a complete list.
...And 4 more matches
AudioListener - Web APIs
methods audiolistener.setorientation() sets the orientation of the listener.
... note: although these
methods are deprecated they are currently the only way to set the orientation and position in firefox, internet explorer and safari.
... in a previous version of the specification, the dopplerfactor and speedofsound properties and the setposition()
method could be used to control the doppler effect applied to audiobuffersourcenodes connected downstream — these would be pitched up and down according to the relative speed of the pannernode and the audiolistener.
...And 4 more matches
AudioWorkletProcessor - Web APIs
methods the audioworkletprocessor interface does not define any
methods of its own.
... however, you must provide a process()
method, which is called in order to process the audio stream.
...although not defined on the interface, the deriving class must have the process
method.
...And 4 more matches
Beacon API - Web APIs
beacon requests use the http post
method and requests typically do not require a response.
... global context the beacon api's navigator.sendbeacon()
method is used to send a beacon of data to the server in the global browsing context.
... the
method takes two arguments, the url and the data to send in the request.
...And 4 more matches
CSSStyleSheet.insertRule() - Web APIs
the cssstylesheet.insertrule()
method inserts a new css rule into the current style sheet, with some restrictions.
... note: although insertrule() is exclusively a
method of cssstylesheet, it actually inserts the rule into cssstylesheet.cssrules — its internal cssrulelist.
... if index > cssrulelist.length, the
method aborts with an indexsizeerror.
...And 4 more matches
CanvasRenderingContext2D.rect() - Web APIs
the canvasrenderingcontext2d.rect()
method of the canvas 2d api adds a rectangle to the current path.
... like other
methods that modify the current path, this
method does not directly render anything.
... to draw the rectangle onto a canvas, you can use the fill() or stroke()
methods.
...And 4 more matches
FileSystemDirectoryEntry - Web APIs
it provides
methods which make it possible to access and manipulate the files in a directory, as well as to access the entries within the directory.
...
methods this interface inherits
methods from its parent interface, filesystementry.
... getdirectory() returns a filesystemdirectoryentry object representing a directory located at a given path, relative to the directory on which the
method is called.
...And 4 more matches
Using FormData Objects - Web APIs
the transmitted data is in the same format that the form's submit()
method would use to send the data if the form's encoding type were set to multipart/form-data.
... creating a formdata object from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append()
method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...the number assigned to the field "accountnum" is immediately converted into a string by the formdata.append()
method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string).
...And 4 more matches
HTMLAudioElement - Web APIs
the htmlaudioelement interface provides access to the properties of <audio> elements, as well as
methods to manipulate them.
... it's based on, and inherits properties and
methods from, the htmlmediaelement interface.
...
methods inherits
methods from its parent, htmlmediaelement, and from htmlelement.
...And 4 more matches
HTMLFormElement - Web APIs
htmlformelement.
method a domstring reflecting the value of the form's
method html attribute, indicating the http
method used to submit the form.
...
methods this interface also inherits
methods from its parent, htmlelement.
... deprecated
methods htmlformelement.requestautocomplete() triggers a native browser interface to assist the user in completing the fields which have an autofill field name value that is not off or on.
...And 4 more matches
LocalFileSystemSync - Web APIs
the
methods are implemented by worker objects.
...the global
methods in the window object requestfilesystemsync() and resolvelocalfilesystemsyncurl()
methods are exposed to the worker's global scope.
...
method overview filesystemsync requestfilesystemsync (in unsigned short type, in long long size) raises fileexception; entrysync resolvelocalfilesystemsyncurl (in domstring url) raises fileexception; constants constant value description temporary 0 transient storage that can be be removed by the browser at its discretion.
...And 4 more matches
Navigator.sendBeacon() - Web APIs
the navigator.sendbeacon()
method asynchronously sends a small amount of data over http to a web server.
... return values the sendbeacon()
method returns true if the user agent successfully queued the data for transfer.
... description this
method is for analytics and diagnostics that send data to a server before the document is unloaded, where sending the data any sooner may miss some possible data collection.
...And 4 more matches
NodeFilter.acceptNode() - Web APIs
the nodefilter.acceptnode()
method returns an unsigned short that will be used to tell if a given node must be accepted or not by the nodeiterator or treewalker iteration algorithm.
... this
method is expected to be written by the user of a nodefilter.
... possible return values are: constant description nodefilter.filter_accept value returned by the nodefilter.acceptnode()
method when a node should be accepted.
...And 4 more matches
PaymentResponse.retry() - Web APIs
the paymentresponse interface's retry()
method makes it possible to ask the user to retry a payment after an error occurs during processing.
... payment
method optional any payment
method specific errors which may have occurred.
...for example, if the user chose to pay by credit card using the basic-card payment
method, this is a basiccarderrors object.
...And 4 more matches
PaymentResponse - Web APIs
the paymentresponse interface of the payment request api is returned after a user selects a payment
method and approves a payment request.
... properties paymentresponse.details read only secure context returns a json-serializable object that provides a payment
method specific message used by the merchant to process the transaction and determine successful fund transfer.
... the contents of the object depend on the payment
method being used; for example, if the basic card payment
method is used, this object must conform to the structure defined in the basiccardresponse dictionary.
...And 4 more matches
Performance - Web APIs
methods the performance interface doesn't inherit any
methods.
... recommendation defines tojson()
method.
... recommendation defines now()
method.
...And 4 more matches
Using the Performance API - Web APIs
additionally, there must be a way to create a timestamp for a specific point in time; this is done with the now()
method.
...the base interface for these standards is the performance interface and its
methods and properties are extended by different standards.
...other web performance guides (listed in the see also section) describe how to use additional
methods and properties of the performance interface.
...And 4 more matches
Performance Timeline - Web APIs
performance extensions the performance timeline api extends the performance interface with three
methods that provide different mechanisms to get a set of performance records (metrics), depending on the specified filter criteria.
... the
methods are: getentries() returns all recorded performance entries or, optionally, the entries based on the specified name, performance type and/or the initiatortype (such as an html element).
...(some performance entry types have no concept of duration and this value is set to '0' for such types.) this interface includes a tojson()
method that returns the serialization of the performanceentry object.
...And 4 more matches
SVGGradientElement - Web APIs
h="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svggradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_spread
method_unknown 0 the type is not one of predefined types.
... svg_spread
method_pad 1 corresponds to value pad.
... svg_spread
method_reflect 2 corresponds to value reflect.
...And 4 more matches
SVGSVGElement - Web APIs
the svgsvgelement interface provides access to the properties of <svg> elements, as well as
methods to manipulate them.
... this interface contains also various miscellaneous commonly-used utility
methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices.
...
methods this interface also inherits
methods from its parent, svggraphicselement and also implements the ones from svgzoomandpan, svgfittoviewbox, and windoweventhandlers.
...And 4 more matches
Using the Screen Capture API - Web APIs
in this article, we will examine how to use the screen capture api and its getdisplaymedia()
method to capture part or all of a screen for streaming, recording, or sharing during a webrtc conference session.
...isplaymediaoptions = { video: { cursor: "always" }, audio: false }; // set event listeners for the start and stop buttons startelem.addeventlistener("click", function(evt) { startcapture(); }, false); stopelem.addeventlistener("click", function(evt) { stopcapture(); }, false); logging content to make logging of errors and other issues easy, this example overrides certain console
methods to output their messages to the <pre> block whose id is log.
... starting display capture the startcapture()
method, below, starts the capture of a mediastream whose contents are taken from a user-selected area of the screen.
...And 4 more matches
WebGL model view projection - Web APIs
(this.webglprogram); // save the attribute and uniform locations this.positionlocation = gl.getattriblocation(this.webglprogram, 'position'); this.colorlocation = gl.getuniformlocation(this.webglprogram, 'color'); // tell webgl to test the depth when drawing, so if a square is behind // another square it won't be drawn gl.enable(gl.depth_test); } webglbox draw now we'll create a
method to draw a box on the screen.
... homogeneous coordinates the main line of the previous clip space vertex shader contained this code: gl_position = vec4(position, 1.0); the position variable was defined in the draw()
method and passed in as an attribute to the shader.
... the following code sample defines a
method on the cubedemo object that will create the model matrix.
...And 4 more matches
Using the Web Animations API - Web APIs
bring the pieces together now it’s time to bring them both together with the element.animate()
method: document.getelementbyid("alice").animate( alicetumbling, alicetiming ) and boom: the animation starts playing (see the finished version on codepen).
... the animate()
method can be called on any dom element that could be animated with css.
...the web animations api provides several useful
methods for controlling playback.
...And 4 more matches
Canvas code snippets - Archive of obsolete content
function getpixelcolour(canvas, x, y) { var cx = canvas.getcontext('2d'); var pixel = cx.getimagedata(x, y, 1, 1); return { r: pixel.data[0], g: pixel.data[1], b: pixel.data[2], a: pixel.data[3] }; } chaining
methods this class provides jquery-style chained access to 2d context
methods and properties.
... function canvas2dcontext(canvas) { if (typeof canvas === 'string') { canvas = document.getelementbyid(canvas); } if (!(this instanceof canvas2dcontext)) { return new canvas2dcontext(canvas); } this.context = this.ctx = canvas.getcontext('2d'); if (!canvas2dcontext.prototype.arc) { canvas2dcontext.setup.call(this, this.ctx); } } canvas2dcontext.setup = function() { var
methods = ['arc', 'arcto', 'beginpath', 'beziercurveto', 'clearrect', 'clip', 'closepath', 'drawimage', 'fill', 'fillrect', 'filltext', 'lineto', 'moveto', 'quadraticcurveto', 'rect', 'restore', 'rotate', 'save', 'scale', 'settransform', 'stroke', 'strokerect', 'stroketext', 'transform', 'translate']; var getter
methods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', /...
...r child objects 'createimagedata', 'createlineargradient', 'createradialgradient', 'getimagedata', 'putimagedata' ]; var props = ['canvas', 'fillstyle', 'font', 'globalalpha', 'globalcompositeoperation', 'linecap', 'linejoin', 'linewidth', 'miterlimit', 'shadowoffsetx', 'shadowoffsety', 'shadowblur', 'shadowcolor', 'strokestyle', 'textalign', 'textbaseline']; for (let m of
methods) { let
method = m; canvas2dcontext.prototype[
method] = function() { this.ctx[
method].apply(this.ctx, arguments); return this; }; } for (let m of getter
methods) { let
method = m; canvas2dcontext.prototype[
method] = function() { return this.ctx[
method].apply(this.ctx, arguments); }; } for (let p of props) { let prop = p; canvas2dcontext.p...
...And 3 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
building dom trees in most cases, dom trees should be built exclusively with dom creation
methods.
... the following
methods will all safely create a dom tree without risk of remote execution.
...el', {for:'mycheck'}, 'here is text of label, click this text will check the box' ] ] ] ]; document.body.appendchild(jsontodom(json, document, {})); jquery templating for extensions which already use jquery, it is possible to use its builtin dom building functions for templating, though care must be taken when passing non-static strings to
methods such as .append() and .html().
...And 3 more matches
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
this library provides the interfaces necessary to bootstrap mozilla and call xpcom
methods.
... to start embedding, we use the
methods provided by the mozilla singleton class.
... if your code cannot find the gre and keeps throwing filenotfoundexceptions during the getgrepathwithproperties(...) call, check whether you already registered the gre on your system: gre registration the initembedding
method kicks off the embedding process, allowing the java application to work with xpcom and mozilla.
...And 3 more matches
Clipboard Test - Archive of obsolete content
<style></style> <style>.description{ display: block; font-size: 13pt; color: #444; font-style: italic; margin-bottom: 7px; } .
method>.returns{display: none;} .
method>.name>.param:not(:last-child):after{content: ","; padding-right: .5em; } .
method>.name>.param:not(:last-child):after{content: ","; padding-right: .5em; } .
method>.name>.param>.name:after{content: " as "; font-weight: normal; } .
method>.params{display: block; color:#555;} .
method>.params>.param{display: block; margin-bottom:5px;} .
method>.params>.param>.name{font-weight:bold; margin-right:.5em; min-width:80px; display:inline-block;} .
method>.params>.param>.description{display:inline-block; width:300px; vertical-align:top;margin-right:30px} .
method>.params>.param>.type{display:inline-block; width:100px; vertical-align:top;font-weight:...
...bold;} .
method>.params>.param>.type:before{content: "type "; color: #888; font-weight:normal;} .
method>.params>.param>.default{display:inline-block; width:100px; vertical-align:top;font-weight:bold;} .
method>.params>.param>.default:before{content: "default "; color: #888;font-weight:normal;} ]]></style> clipboard jetpack's clipboard support api provides a standardized way for features to access the clipboard.
...jetpack.future.import("clipboard");
methods set(contentstringflavorstring)writes data from jetpack to the clipboard.
...And 3 more matches
Menu - Archive of obsolete content
methods add(items) clear() contexton(node) hide() insertbefore(newitems, target) item(target) popupon(node) remove(target) replace(target, newitems) reset() set(items) show(anchornode) add(items...
...this
method and set() are the recommended
methods of adding items to a menu.
...this
method and add() are the recommended
methods of adding items to a menu.
...And 3 more matches
jspage - Archive of obsolete content
object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=object.reset(b);break;case"array":a[c]=$unlink(a[c]); break;}return a;};new native({name:"class",initialize:class}).extend({instantiate:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a; },wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new error('the
method "'+b+'" cannot be called.'); }var e=this.caller,f=this._current;this.caller=f;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=f;this.caller=e;return d;}.extend({_owner:a,_origin:c,_name:b}); }});class.implement({implement:function(a,d){if($type(a)=="object"){for(var e in a){this.implement(e,a[e]);}return this;}var f=class.mutators[a];if(f){d=f.call(this,d); if(d==null){...
...a]=class.wrap(this,a,d);break;case"object":var b=c[a]; if($type(b)=="object"){$mixin(b,d);}else{c[a]=$unlink(d);}break;case"array":c[a]=$unlink(d);break;default:c[a]=d;}return this;}});class.mutators={extends:function(a){this.parent=a; this.prototype=class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c){throw new error('the
method "'+b+'" has no parent.'); }return c.apply(this,arguments);}.protect());},implements:function(a){$splat(a).each(function(b){if(b instanceof function){b=class.instantiate(b);}this.implement(b); },this);}};var chain=new class({$chain:[],chain:function(){this.$chain.extend(array.flatten(arguments));return this;},callchain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments)...
...2,10*--b)*math.cos(20*b*math.pi*(a[0]||1)/3);}});["quad","cubic","quart","quint"].each(function(b,a){fx.transitions[b]=new fx.transition(function(c){return math.pow(c,[a+2]); });});var request=new class({implements:[chain,events,options],options:{url:"",data:"",headers:{"x-requested-with":"xmlhttprequest",accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,
method:"post",link:"ignore",issuccess:null,emulation:true,urlencoded:true,encoding:"utf-8",evalscripts:false,evalresponse:false,nocache:false},initialize:function(a){this.xhr=new browser.request(); this.setoptions(a);this.options.issuccess=this.options.issuccess||this.issuccess;this.headers=new hash(this.options.headers);},onstatechange:function(){if(this.xhr.readystate!=4||!this.running){return; }this.
...And 3 more matches
Monitoring downloads - Archive of obsolete content
the download manager instance is cached into a member variable in the downloadlogger object for reuse later, and its addlistener()
method is called to start listening for download status updates.
... note: the mozistorageconnection
method close() is being added to firefox 3 alpha 8; in prior versions of firefox, there is no way to explicitly close the database.
... handling download state changes once the code above is run, our ondownloadstatechange()
method is called whenever a download's state changes.
...And 3 more matches
Safely loading URIs - Archive of obsolete content
to solve this problem, gecko provides
methods that allow the caller to check whether it's safe to load a particular uri.
... these
methods are exposed on the nsiscriptsecuritymanager interface and are called checkloaduri, checkloaduriwithprincipal, and checkloaduristr.
... all three
methods take three arguments: the first argument identifies the source of the uri, the second argument is the uri that one plans to load, and the third argument is a set of flags that can be used to impose additional restrictions on the uris that may be loaded.
...And 3 more matches
DOM Interfaces - Archive of obsolete content
the nsidomdocumentxbl interface the nsidomdocumentxbl interface contains
methods for manipulating xbl bindings.
... idl definition interface nsidomdocumentxbl { nodelist getanonymousnodes(in element elt); element getanonymouselementbyattribute(in element elt, in domstring attrname, in domstring attrvalue); element getbindingparent(in node node); void loadbindingdocument(in domstring documenturl); };
methods getanonymousnodes the getanonymousnodes
method retrieves the anonymous children of the specified element.
... getanonymouselementbyattribute the getanonymouselementbyattribute
methods retrieves an anonymous descendant with a specified attribute value.
...And 3 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
initializing installation with plugin identifier all xpinstall installations are initiated with the initinstall
method of the install object.
...the initinstall
method is polymorphic, but here is a recommended invocation mechanism: initinstall("my plugin software", "@myplugin.com/myplugin,version=2.5", "2.5.0.0"); in the code snippet above, the initinstall
method is invoked with three parameters: a string for the name of the application a string signifying the plugin identifier associated with the plugin.
...from javascript, you can call xpinstall's execute
method of the install object to execute the binary.
...And 3 more matches
Positioning - Archive of obsolete content
first, the position can be specified when using the popup's openpopup
method.
... when opening a popup via a script using the openpopup
method, the second argument may be used to specify the position instead of using the position attribute.
...the section on the openpopup
method provides an example of this.
...And 3 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is created by setting the type attribute of the textbox to autocomplete.
...ller, crop, disableautocomplete, disablekeynavigation, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, label, maxlength, maxrows, minresultsforpopup, open, popup, popupopen, searchcount, searchparam, selectionend, selectionstart, showcommentcolumn, showimagecolumn,size, tabindex, tabscrolling, textlength, textvalue, timeout, type, value
methods getsearchat, onsearchcomplete, ontextentered, ontextreverted, select, setselectionrange examples <textbox type="autocomplete" autocompletesearch="history"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdat...
...And 3 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
you can also add
methods that can be called.
... that way, all you need is to get a reference to the element (using document.getelementbyid or a similar function) and then get or set the additional properties and call the
methods on it.
...
methods are functions which may be executed.
...And 3 more matches
More Event Handlers - Archive of obsolete content
to manually stop event propagation, call the event object's stoppropagation
method, as in the following example.
...the stoppropagation
method has been called in the box's listener, so the button's listener never gets called.
...the default action can be prevented with the event object's preventdefault
method, as in the example below.
...And 3 more matches
Updating Commands - Archive of obsolete content
invoking commands if a command has an oncommand attribute, you can invoke it just by using the docommand
method of the command or an element which links to it.
...then, it checks to see whether the command is enabled, and then executes the command using the docommand
method of the controller.
...if you include the script 'chrome://global/content/globaloverlay.js' in a xul file, you can call the godocommand
method which executes the command passed as the argument.
...And 3 more matches
Using the Editor from XUL - Archive of obsolete content
now we set up the editorshell by calling its init()
method, telling it what type of editor we want (text or html), pointing it at the webshellwindow to use, and telling it the content node that it lives on: editorshell.init(); editorshell.seteditortype(editortype); editorshell.webshellwindow = window; editorshell.contentwindow = window._content; the webshellwindow (a settable attribute on nsieditorshell) points to the top-level window element, from...
...one thing to note about editor initialization is that we pass into the editor's init()
method an nsicontent* that corresponds to the root of the content tree that the editor is allowed to work with.
...in both cases, the editorcanclose()
method is the javascript is called, which causes the nseditorshell to display a dialog asking the user if they want to save the document, throw away their changes, or cancel.
...And 3 more matches
menulist - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element that can be used for drop-down choice lists.
... attributes accesskey, crop, disableautoselect, disabled, editable, focused, image, label, oncommand, open, preference, readonly, sizetopopup, tabindex, value properties accessibletype, crop, description, disableautoselect, disabled, editable, editor, image, inputfield, itemcount, label, menuboxobject, menupopup, open, selectedindex, selecteditem, tabindex, value
methods appenditem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option 4" value="4"/> </menupopup> </menulist> attributes accesskey type: character this ...
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserda...
...And 3 more matches
menupopup - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container used to display the contents of a popup menu.
... attributes ignorekeys, left, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, top properties accessibletype, anchornode, popupboxobject, position, state, triggernode
methods hidepopup, moveto, openpopup, openpopupatscreen, setconsumerollupevent, showpopup, sizeto examples the following example shows how a menupopup may be attached to a menulist.
... left type: integer overrides the horizontal position of the popup specified by the showpopup
method.
...And 3 more matches
tree - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container which can be used to hold a tabular or hierarchical set of rows of elements.
...to get the actual number of rows in the element, use the getrowcount
method.
...(all trees have seltype="multiple" by default.) to reliably change or determine a selection, instead use the nsitreeselection interface
methods available via tree.view.selection.
...And 3 more matches
NPClass - Archive of obsolete content
syntax struct npclass { uint32_t structversion; npallocatefunctionptr allocate; npdeallocatefunctionptr deallocate; npinvalidatefunctionptr invalidate; nphas
methodfunctionptr has
method; npinvokefunctionptr invoke; npinvokedefaultfunctionptr invokedefault; nphaspropertyfunctionptr hasproperty; npgetpropertyfunctionptr getproperty; npsetpropertyfunctionptr setproperty; npremovepropertyfunctionptr removeproperty; npenumerationfunctionptr enumerate; npconstructfunctionptr construct; }; warning: don't call these routines directly.
... has
method called by npn_has
method() to determine whether or not a specified
method exists on a given npobject.
... returns true if the
method exists, otherwise returns false.
...And 3 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
if (document.all) { // ie4 height = document.body.offsetheight; } else if (document.layers) { // nn4 height = window.innerheight; } else { // other height = 0; } with the introduction of the w3c dom, the standard
method document.getelementbyid became available in internet explorer 5 and later in netscape 6 (gecko).
... use non-script based detection
methods where possible older browsers have many limitations which result in their ignoring more advanced features.
... html provides several
methods of detecting support for various features such as support for scripting and frames.
...And 3 more matches
XForms Custom Controls - Archive of obsolete content
to give you an idea of what we are talking about, it could look something like this: <content> <xf:input xbl:inherits="ref=ref1" anonid="ref1"/> <xf:input xbl:inherits="ref=ref2" anonid="ref2"/> </content> <implementation> <
method name="refresh"> <body> // here we should refresh custom control.
... </body> </
method> <constructor> // we should redirect calls of input's 'refresh'
method to custom control 'refresh'
method.
...for example, when the control needs to be updated according to the rules of xforms, the refresh
method will be called by the processor.
...And 3 more matches
Silly story generator - Learn web development
there is a particular string
method that will help you here — in each case, make the call to the
method equal to newstory, so each time it is called, newstory is made equal to itself, but with substitutions made.
...as a further hint, the
method in question only replaces the first instance of the substring it finds, so you might need to make one of the calls twice.
... inside the first if block, add another string replacement
method call to replace the name 'bob' found in the newstory string with the name variable.
...And 3 more matches
Working with JSON - Learn web development
this is not a big issue — javascript provides a global json object that has
methods available for converting between the two.
... other notes json is purely a data format — it contains only properties, no
methods.
...add the following below your last line: let request = new xmlhttprequest(); now we need to open the request using the open()
method.
...And 3 more matches
Test your skills: Object-oriented JavaScript - Learn web development
we want you to: add a new
method to the shape class's prototype, calcperimeter(), which calculates its perimeter (the length of the shape's outer edge) and logs the result to the console.
... call your calcperimeter()
method on the instance, to see whether it logs the calculation result to the browser devtools' console as expected.
... oojs 2 next up we want you to take the shape class you saw in task #1 (including the calcperimeter()
method) and recreate it using es class syntax instead.
...And 3 more matches
Multiprocess on Windows
when an incoming rpc invokes a
method on an interceptor, the interceptor dispatches a callback that allows us to do whatever we want with that request.
... our callback implementation forwards the
method call to the main thread in order to invoke the
method on the wrapped object.
... arraydata contains seven fields: iid miid; ulong m
methodindex; ulong marrayparamindex; vartype marrayparamtype; iid marrayparamiid; ulong mlengthparamindex; flag mflag; miid is the uuid of the interface owning the function.
...And 3 more matches
AddonInstall
instances can be created using the getinstallforfile() or getinstallforurl()
methods on the addonmanager.
... once you have an instance the install()
method is used to start automatic download and installation.
... this can be canceled at any time with the cancel()
method.
...And 3 more matches
Assert.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://testing-common/assert.jsm"); the assert class offers
methods for performing common logical assertions.
...
method overview undefined ok(value, message); undefined equal(actual, expected, message); undefined notequal(actual, expected, message); undefined deepequal(actual, expected, message); undefined notdeepequal(actual, expected, message); undefined strictequal(actual, expected, message); undefined notstrictequal(actual, expected, message); undefined throws(block, expected, message); promise rejects(promise, expected, message); undefined greater(lhs, rhs, message); undefined greaterorequal(lhs, rhs, message); undefined less(lhs, rhs, message); undefined lessorequal(lhs, rhs, message); undefined setreporter(reporterfunc); undefined report(failed, actual, expected, ...
... ok, equal, notequal, deepequal, notdeepequal, strictequal, notstrictequal, throws, setreporter, report
methods ok() pure assertion tests whether a value is truthy, as determined by !!guard.
...And 3 more matches
DownloadTarget
method overview promise refresh() properties attribute type description exists read only boolean indicates whether or not the target file exists.
... this is a dynamic property, which is updated when the download is completed or when the download.refresh()
method is called.
... this is a dynamic property, which is updated when the download finishes or whenever the download.refresh()
method is called.
...And 3 more matches
Promise.jsm
to observe the state of a promise, its then
method must be used.
... this
method registers callback functions that are called as soon as the promise is either fulfilled or rejected.
... the
method returns a new promise that, in turn, is fulfilled or rejected depending on the state of the original promise and on the behavior of the callbacks.
...And 3 more matches
Deferred
a deferred object is returned by the promiseutils.defer()
method to provide a new promise along with
methods to change its state.
...
method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise read only promise a newly created promise, initially in the pending state.
...
methods resolve() fulfills the associated promise with the specified value, or propagates the state of an existing promise.
...And 3 more matches
PromiseWorker.jsm
next, the promiseworker.js file should be brought in with the require()
method.
...let worker = new promiseworker.abstractworker() worker.dispatch = function(
method, args = []) { // dispatch a call to
method `
method` with args `args` return self[
method](...args); }; worker.postmessage = function(...args) { // post a message to the main thread self.postmessage(...args); }; worker.close = function() { // close the worker self.close(); }; worker.log = function(...args) { // log (or discard) messages (optional) dump('worker: ' + args.join(' ') + '\n'); }; // connect it to message por...
...self.addeventlistener('message', msg => worker.handlemessage(msg)); abstractworker is a base class for the worker, and it's designed to be used by derived class, which provides above four
methods (dispatch, postmessage, close, and log).
...And 3 more matches
source-editor.jsm
method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, fun...
... lastfind object an object describing the result of the last find operation performed using the find(), findnext(), or findprevious()
method.
... editor mode constants these constants are used to set the syntax highlighting mode for the editor by calling its setmode()
method, or in the configuration object when first initializing the editor using its init()
method.
...And 3 more matches
GC Rooting Guide
js::rootedstring js::rooted<jsscript*> js::rootedscript js::rooted<jsid> js::rootedid for example, instead of this: jsobject* localobj = js_getobjectofsomesort(cx); you would write this: js::rootedobject localobj(cx, js_getobjectofsomesort(cx)); spidermonkey makes it easy to remember to use js::rooted<t> types instead of a raw pointer because all of the api
methods that may gc take a js::handle<t>, as described below, and js::rooted<t> autoconverts to js::handle<t> but a bare pointer does not.
...js::mutablehandle<t> is exactly like a js::handle<t> except that it adds a .set(t &t)
method and must be created from a js::rooted<t> explicitly.
...ass js::value[] autoarrayrooter js::vector<js::value> autovaluevector js::vector<jsid> autoidvector js::vector<jsobject*> autoobjectvector js::vector<jsscript*> autoscriptvector if your case is not covered by one of these, it is possible to write your own by deriving from js::customautorooter and overriding the virtual trace()
method.
...And 3 more matches
Exact Stack Rooting
the
method you should use to keep the gc up-to-date with this information will vary depending on where the gcpointer is being stored.
... there is also a static constructor
method frommarkedlocation() that creates a handle from an arbitrary location.
...if we have a
method taking handle<value>*, then out->setobject(foo) will not work as expected.
...And 3 more matches
JSAutoByteString
methods
method description void initbytes(char *bytes) take ownership of the given byte array.
...you should call this before calling encode*
methods or initbytes
method if a string is already owned, otherwise the string will never be freed.
...you can call some
methods to take ownership of other string.
...And 3 more matches
Parser API
it is also available since firefox 7; it can be imported into the global object via: components.utils.import("resource://gre/modules/reflect.jsm") or into a specified object via: components.utils.import("resource://gre/modules/reflect.jsm", obj) built-in objects whether in spidermonkey shell or firefox (after importing), the global singleton object reflect currently contains just the parse
method.
... properties of the reflect object the reflect object currently consists of a single
method.
...the expected callback
methods are described under builder objects.
...And 3 more matches
Building the WebLock UI
a boolean wlocked variable can do this: // initialize the wlocked variable as unlocked var wlocked = 0; then the functions that get called from the interface and call through to the lock and unlock
methods of the weblock component must also adjust this variable accordingly: function wlock() { // check to see if locking is on or off weblock.lock(); wlocked = 1; } function wunlock() { // check to see if locking is on or off weblock.unlock(); wlocked = 0; } an important preliminary of these functions is that the weblock component be made available to the javascript in the form of the ...
...as you can see, weblock is initialized as a global javascript variable, available in the scope of these functions and others: var weblock = components.classes["@dougt/weblock"] .getservice() .queryinterface(components.interfaces.iweblock); in addition to this basic setup, you must also write javascript that uses the addsite
method to add new sites to the white list.
... the url that the addsite
method expects is a string, so we can pass a string directly in from the user interface, or we can do a check on the string and verify that it's a valid url.
...And 3 more matches
IAccessibleText
when a
method doesn't implement this
method it must return s_false.
...
method overview hresult addselection([in] long startoffset, [in] long endoffset ); [propget] hresult attributes([in] long offset, [out] long startoffset, [out] long endoffset, [out] bstr textattributes ); [propget] hresult caretoffset([out] long offset ); [propget] hresult characterextents([in] long offset, [in] enum ia2coordinatetype coordtype, [out] long x, [out] long y, [out] long width, [ou...
...rytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); [propget] hresult textatoffset([in] long offset, [in] enum ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); [propget] hresult textbeforeoffset([in] long offset, [in] enum ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text );
methods addselection() adds a text() selection().
...And 3 more matches
mozIStorageStatementWrapper
when you call the mozistorageconnection interface's createstatement()
method, you get a mozistoragestatement which has just direct bindings to sqlite.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports
method overview void initialize(in mozistoragestatement astatement); void reset(); boolean step(); void execute(); attributes attribute type description statement mozistoragestatement the statement that is wrapped.
...
methods initialize() this
method initializes this wrapper with astatement.
...And 3 more matches
nsIAppShell
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void create(inout int argc, inout string argv); obsolete since gecko 1.9 void dispatchnativeevent(in prbool arealevent, in voidptr aevent); obsolete since gecko 1.9 void exit(); void favorperformancehint(in boolean favorperfoverstarvation, in unsigned long starvationdelay); void getnativeevent(in prboolref arealevent, in voidptrref aevent); obsolete since gecko 1.9 void listentoeventqueue(in nsieventqueue aqueue, in prbool alisten); obsolete since gecko 1.9 void resumenative(); void run()...
...
methods create() obsolete since gecko 1.9 (firefox 3) creates an application shell.
... resumenative() resumes the use of additional platform-specific
methods to run() gecko events on the main application thread.
...And 3 more matches
nsIAuthModule
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void getnexttoken([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void init(in string aservicename, in unsigned long aserviceflags, in wstring adomain, in wstring ausername, in wstring apassword); void unwrap([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void wrap([const] in voidptr aintoken, in unsigned long aintokenlength, in boolean confidential, out voidptr aouttoken, out unsign...
...
methods getnexttoken() this
method is called to get the next token in a sequence of authentication steps.
... init() this
method is called to initialize an auth module.
...And 3 more matches
nsIAuthPromptCallback
netwerk/base/public/nsiauthpromptcallback.idlscriptable interface for callback
methods for the asynchronous nsiauthprompt2
method.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) callers must call exactly one
method if nsiauthprompt2.asyncpromptauth() returns successfully.
... they must not call any
method on this interface before nsiauthprompt2.asyncpromptauth() returns.
...And 3 more matches
nsICacheService
method overview nsicachesession createsession(in string clientid, in nscachestoragepolicy storagepolicy, in boolean streambased); acstring createtemporaryclientid(in nscachestoragepolicy storagepolicy); obsolete since gecko 1.9.2 void evictentries(in nscachestoragepolicy storagepolicy); void init(); obsolete since gecko 1.8 void shutdown(); obsolete since...
...
methods createsession() this
method creates a cache session.
... this
method creates and returns a unique, temporary cache client id.
...And 3 more matches
nsICryptoHMAC
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm, in nsikeyobject akeyobject); void reset(); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hashing algorithms.
... these values are to be used by the init()
method to indicate which hashing function to use.
... constant value description md2 1 message digest algorithm 2 md5 2 message-digest algorithm 5 sha1 3 secure hash algorithm 1 sha256 4 secure hash algorithm 256 sha384 5 secure hash algorithm 384 sha512 6 secure hash algorithm 512
methods finish() completes this hmac object and produces the actual hmac diegest data.
...And 3 more matches
nsIDOMMozNetworkStatsManager
you can test for the presence of the service as follows, for example: if ("moznetworkstats" in navigator) { /* networkstats is available */ } else { alert("i'm sorry, but networkstats services are not supported."); }
method overview nsidomdomrequest getsamples(in nsisupports network, in jsval start, in jsval end, [optional] in jsval options /* networkstatsgetoptions */); nsidomdomrequest addalarm(in nsisupports network, in long threshold, [opti...
... constants constant type description wifi long constant for wifi, set to 0 mobile long constant for mobile, set to 1
methods getsamples() asynchronously queries network interface statistics.
...to know in advance which kind of origin is available, the moznetworkstatsmanager.getavailablenetworks
method returns an array of interfaces.
...And 3 more matches
nsIDOMOfflineResourceList
it includes
methods for adding resources to and removing resources from the cache, as well as for enumerating the dynamically managed resource list.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports
method overview void mozadd(in domstring uri); boolean mozhasitem(in domstring uri); domstring mozitem(in unsigned long index); void mozremove(in domstring uri); void swapcache(); void update(); attributes attribute type description mozitems nsidomofflineresourcelist the list of dynamically-managed entries in the offline resource list.
...
methods mozadd() adds an item to the dynamically managed entries.
...And 3 more matches
nsIEditorSpellCheck
to create an instance, use: var editorspellcheck = components.classes["@mozilla.org/editor/editorspellchecker;1"] .createinstance(components.interfaces.nsieditorspellcheck);
method overview void addwordtodictionary(in wstring word); boolean canspellcheck(); void checkcurrentdictionary(); boolean checkcurrentword(in wstring suggestedword); boolean checkcurrentwordnosuggest(in wstring suggestedword); astring getcurrentdictionary(); void getdictionarylist([array, size_is(count)] out wstring dictionarylist, out p...
...mdictionary(in wstring word); void replaceword(in wstring misspelledword, in wstring replaceword, in boolean alloccurrences); void savedefaultdictionary(); obsolete since gecko 9.0 void setcurrentdictionary(in astring dictionary); void setfilter(in nsitextservicesfilter filter); void uninitspellchecker(); void updatecurrentdictionary();
methods addwordtodictionary() adds the specified word to the current personal dictionary.
... note: this
method was removed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6).
...And 3 more matches
nsIFrameLoader
method overview void activateframeevent(in astring atype, in boolean capture); void activateremoteframe(); void destroy(); void loadframe(); void loaduri(in nsiuri auri); void sendcrossprocesskeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); void sendcrossprocessm...
...
methods activateframeevent() activates event forwarding from client (remote frame) to parent.
...this
method figures out what to load from the owner content in the frame loader.
...And 3 more matches
nsINavHistoryQueryOptions
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10)
method overview nsinavhistoryqueryoptions clone(); attributes attribute type description applyoptionstocontainers boolean if true, the query options are only applied to the containers.
... note that this has no effect on folder links, which are place: uris returned by nsinavbookmarkservice's getfolderuri
method.
... sortingmode short the sorting annotation to use; see sorting
methods for possible values.
...And 3 more matches
nsIPrefService
inherits from: nsisupports last changed in gecko 1.7
method overview nsiprefbranch getbranch(in string aprefroot); nsiprefbranch getdefaultbranch(in string aprefroot); void readuserprefs(in nsifile afile); void resetprefs(); void resetuserprefs(); void savepreffile(in nsifile afile);
methods getbranch() call to get a preferences "branch" which accesses user preference data.
... using a set
method on this object will always create or set a user preference value.
... when using a get
method a user set value will be returned if one exists, otherwise a default value will be returned.
...And 3 more matches
nsISelectionPrivate
method overview void addselectionlistener(in nsiselectionlistener newlistener); void endbatchchanges(); void getcachedframeoffset(in nsiframe aframe, in print32 inoffset, in nspointref apoint); native code only!
... constants constant value description endofprecedingline 0 startofnextline 1 tableselection_none 0 tableselection_cell 1 tableselection_row 2 tableselection_column 3 tableselection_table 4 tableselection_allcells 5
methods addselectionlistener() void addselectionlistener( in nsiselectionlistener newlistener ); parameters newlistener endbatchchanges() will resume user interface updates after a previous call to startbatchchanges().
... this
method became obsolete in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9).
...And 3 more matches
nsIServerSocket
to create an instance, use: var serversocket = components.classes["@mozilla.org/network/server-socket;1"] .createinstance(components.interfaces.nsiserversocket);
method overview void init(in long aport, in boolean aloopbackonly, in long abacklog); void initwithaddress([const] in prnetaddrptr aaddr, in long abacklog);native code only!
...
methods asynclisten() this
method puts the server socket in the listening state.
...the listener's onsocketaccepted()
method will be called on the same thread that called asynclisten() (the calling thread must have an nsieventtarget).
...And 3 more matches
nsISessionStore
method overview void deletetabvalue(in nsidomnode atab, in astring akey); void deletewindowvalue(in nsidomwindow awindow, in astring akey); nsidomnode duplicatetab(in nsidomwindow awindow, in nsidomnode atab); nsidomnode forgetclosedtab(in nsidomwindow awindow, in unsigned long aindex); nsidomnode forgetclosedwindow(in unsigned long aindex); astr...
...
methods deletetabvalue() deletes a value from a specified tab.
... exceptions thrown this
method throws a ns_error_illegal_value exception if the key doesn't exist.
...And 3 more matches
nsITaggingService
toolkit/components/places/public/nsitaggingservice.idlscriptable provides
methods to tag/untag a uri, to retrieve uris for a given tag, and to retrieve all tags for a uri.
...to use this service, use: var taggingsvc = components.classes["@mozilla.org/browser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice);
method overview void taguri(in nsiuri auri, in nsivariant atags); void untaguri(in nsiuri auri, in nsivariant atags); nsivariant geturisfortag(in astring atag); nsivariant gettagsforuri(in nsiuri auri, [optional] out unsigned long length, [retval, array, size_is(length)] out wstring atags); attributes attribute t...
... tagcontainericonspec autf8string retrieves the url spec for the tag container icon
methods taguri() this
method tags a uri with the given set of tags.
...And 3 more matches
nsITextInputProcessor
nsidomwindowutils has provided the
methods which dispatched keyboard events and composition events almost directly.
...for solving that issue,
methods of this interface have been designed for performing a key operation or representing a change of composition state.
...
method overview void appendclausetopendingcomposition(in unsigned long alength, in unsigned long aattribute); boolean begininputtransaction(in nsidomwindow awindow, in nsitextinputprocessorcallback acallback); boolean begininputtransactionfortests(in nsidomwindow awindow, [optional] in nsitextinputprocessorcallback acallback); void cancelcomposition([optional] in nsi...
...And 3 more matches
nsITreeBoxObject
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports to get the treeboxobject for a tree: let boxobject = tree.boxobject; boxobject.queryinterface("components.interfaces.nsitreeboxobject"); or simply: let boxobject = tree.treeboxobject;
method overview long getfirstvisiblerow(); long getlastvisiblerow(); long getpagelength(); void ensurerowisvisible(in long index); void ensurecellisvisible(in long row, in nsitreecolumn col); void scrolltorow(in long index); void scrollbylines(in long numlines); void scrollbypages(in long numpages); void scrolltocell(in lon...
...
methods getfirstvisiblerow() get the index of the first visible row.
...this
method prevents scrolling off the end of the tree.
...And 3 more matches
nsIWebProgressListener
method overview void onlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, [optional] in unsigned long aflags); void onprogresschange(in nsiwebprogress awebprogress, in nsirequest arequest, in long acurselfprogress, in long amaxselfprogress, in long acurtotalprogress, in long amaxtotalprogress); void onsecuritychange(in nsiwebprogress a...
... state security flags these flags describe the security state reported by a call to the onsecuritychange()
method.
... security strength flags these flags describe the security strength and accompany state_is_secure in a call to the onsecuritychange()
method.
...And 3 more matches
Working with windows in chrome code
its parameters are similar to window.open; in fact, window.open's implementation calls nsiwindowwatcher's
methods.
...the return value of window.open (and similar
methods) is a window object (usually chromewindow) – the same type as the window variable.
...two of its
methods are often used to obtain information about currently open windows: getmostrecentwindow and getenumerator.
...And 3 more matches
Initialization and Destruction - Plugins
« previousnext » this chapter describes the
methods that provide the basic processes of initialization, instance creation and destruction, and shutdown.
... this chapter ends with initialize and shutdown example, which includes the np_initialize and np_shutdown
methods.
...for an example that shows the use of both the np_initialize and np_shutdown
methods, see initialize and shutdown example.
...And 3 more matches
URLs - Plugins
this section describes the
methods and procedures used for getting the url and displaying the page.
... for http urls, the browser resolves npn_geturl as the http server
method get, which requests url objects.
... the npn_geturlnotify
method acts like npn_geturl.
...And 3 more matches
Gecko Plugin API Reference - Plugins
an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version finding out if a feature exists reloading a plug-in plug-in side plug-in api this chapter describes
methods in the plug-in api that are available from the plug-in object.
... the names of all of these
methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser.
... npp_destroy npp_destroystream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_newstream npp_print npp_setvalue npp_setwindow np_shutdown npp_streamasfile npp_urlnotify npp_write npp_writeready browser side plug-in api this chapter describes
methods in the plug-in api that are available from the browser.
...And 3 more matches
AddressErrors - Web APIs
javascript payment request data first, we declare the variables supportedhandlers, which is compatible with payment
methoddata, and defaultpaymentdetails, which is a paymentdetailsupdate object.
... let supportedhandlers = [ { supported
methods: "basic-card", data: { supportednetworks: ["visa", "mastercard", "amex", "discover"], supportedtypes: ["credit", "debit"] } } ]; let defaultpaymentdetails = { total: {label: 'donation', amount: {currency: 'usd', value: '65.00'}}, displayitems: [ { label: 'original donation amount', amount: {currency: 'usd', value: '65.00'} } ], shippingoptions: [ { id: 'standard', label: 'standard shipping', amount: {currency: 'usd', value: '0.00'}, selected: true } ] }; supportedhandlers describes the supported payment handlers and the details for those.
... process the payment the main payment processing code is found in the process()
method, up next.
...And 3 more matches
CSS - Web APIs
the css interface holds useful css-related
methods.
... no objects with this interface are implemented: it contains only static
methods and is therefore a utilitarian interface.
...
methods the css interface is a utility interface and no object of this type can be created: only static
methods are defined on it.
...And 3 more matches
CustomEvent - Web APIs
event.istrusted read only indicates whether or not the event was initiated by the browser (after a user click, for instance) or by a script (using an event creation
method, like event.initevent).
...(a boolean indicating whether the given event will bubble across through the shadow root into the standard dom.)
methods customevent.initcustomevent() initializes a customevent object.
... if the event has already being dispatched, this
method does nothing.
...And 3 more matches
DOMImplementation - Web APIs
the domimplementation interface represents an object providing
methods which are not dependent on any particular document.
...
methods no inherited
method.
... living standard removed the getfeature()
method.
...And 3 more matches
DataTransfer.clearData() - Web APIs
the datatransfer.cleardata()
method removes the drag operation's drag data for the given type.
... if data for the given type does not exist, this
method does nothing.
... if this
method is called with no arguments or the format is an empty string, the data of all types will be removed.
...And 3 more matches
Locating DOM elements using selectors - Web APIs
the selectors api provides
methods that make it quick and easy to retrieve element nodes from the dom by matching against a set of selectors.
... the nodeselector interface this specification adds two new
methods to any objects implementing the document, documentfragment, or element interfaces: queryselector() returns the first matching element node within the node's subtree.
...this is different from other dom querying
methods that return live node lists.
...And 3 more matches
Event.initEvent() - Web APIs
the event.initevent()
method is used to initialize the value of an event created using document.createevent().
... events initialized in this way must have been created with the document.createevent()
method.
... this
method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
...And 3 more matches
Event - Web APIs
it can also be triggered programmatically, such as by calling the htmlelement.click()
method of an element, or by defining the event, then sending it to a specified target using eventtarget.dispatchevent().
...event itself contains the properties and
methods which are common to all events.
... event.istrusted read only indicates whether or not the event was initiated by the browser (after a user click, for instance) or by a script (using an event creation
method, like event.initevent).
...And 3 more matches
FileReaderSync - Web APIs
methods filereadersync.readasarraybuffer() this
method converts a specified blob or a file into an arraybuffer representing the input data as a binary string.
... filereadersync.readasbinarystring() this
method converts a specified blob or a file into a domstring representing the input data as a binary string.
... this
method is deprecated, consider using readasarraybuffer() instead.
...And 3 more matches
FileSystemDirectoryEntry.getDirectory() - Web APIs
the filesystemdirectoryentry interface's
method getdirectory() returns a filesystemdirectoryentry object corresponding to a directory contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax filesystemdirectoryentry.getdirectory([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring representing an absolute path or a path relative to the directory on which the
method is called, describing which directory entry to return.
... successcallback optional a
method to be called once the filesystemdirectoryentry has been created.
...And 3 more matches
FileSystemDirectoryEntry.getFile() - Web APIs
} the filesystemdirectoryentry interface's
method getfile() returns a filesystemfileentry object corresponding to a file contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax filesystemdirectoryentry.getfile([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring specifying the path, relative to the directory on which the
method is called, describing which file's entry to return.
... successcallback optional a
method to be called once the filesystemfileentry has been created.
...And 3 more matches
HTMLButtonElement - Web APIs
the htmlbuttonelement interface provides properties and
methods (beyond the regular htmlelement interface it also has available to it by inheritance) for manipulating <button> elements.
... htmlbuttonelement.form
method is a domstring reflecting the http
method that the browser uses to submit the form.
... if specified, this attribute overrides the
method attribute of the <form> element that owns this element.
...And 3 more matches
HTMLMediaElement.seekToNextFrame() - Web APIs
the htmlmediaelement.seektonextframe()
method asynchronously advances the the current play position to the next frame in the media.
... this non-standard
method is part of an experimentation process around support for non-real-time access to media for tasks including filtering, editing, and so forth.
... you should not use this
method in production code, because its implementation may change—or be removed outright—without notice.
...And 3 more matches
HTMLTextAreaElement - Web APIs
the htmltextareaelement interface provides special properties and
methods for manipulating the layout and presentation of <textarea> elements.
...
methods blur() removes focus from the control; keystrokes will subsequently go nowhere.
... reportvalidity() this
method reports the problems with the constraints on the element, if any, to the user.
...And 3 more matches
Recommended Drag Types - Web APIs
caution: all
methods and properties in this document with a moz prefix, such as mozsetdataat(), will only work with gecko-based browsers.
... because a file is not a string, you must use the mozsetdataat()
method to assign the data.
... similarly, when retrieving the data, you must use the mozgetdataat()
method.
...And 3 more matches
History - Web APIs
methods the history interface doesn't inherit any
methods.
... back() this asynchronous
method goes to the previous page in session history, the same action as when the user clicks the browser's back button.
... calling this
method to go back beyond the first page in the session history has no effect and doesn't raise an exception.
...And 3 more matches
IDBDatabaseSync - Web APIs
method overview idbobjectstoresync createobjectstore (in domstring name, in domstring keypath, in optional boolean autoincrement) raises (idbdatabaseexception); idbobjectstoresync openobjectstore (in domstring name, in optional unsigned short mode) raises (idbdatabaseexception); void removeobjectstore (in domstring storename) raises (idbdatabaseexception); void setversion (in doms...
...
methods createobjectstore() creates and returns a new object store with the given name in the connected database.
... exceptions this
method can raise an idbdatabaseexception with the following code: constraint_err if an object store with the same name (based on case-sensitive comparison) already exists in the connected database.
...And 3 more matches
compareVersion - Web APIs
method of installtrigger object syntax int compareversion ( string registryname, installversion version); int compareversion ( string registryname, string version); int compareversion ( string registryname, int major, int minor, int release, int build); parameters the compareversion
method has the following parameters: registryname the pathname in the client versio...
... returns if the versions are the same or if software installation is not enabled, this
method returns 0.
... if the version of registryname is smaller (earlier) than version, this
method returns a negative number.
...And 3 more matches
Using the Media Capabilities API - Web APIs
in short, this api replaces—and improves upon—the mediasource
method istypesupported() or the htmlmediaelement
method canplaytype().
...you can, therefore, test for the presence of the api like so: if ("mediacapabilities" in navigator) { // mediacapabilities is available } else { // mediacapabilities is not available } taking video as an example, to obtain information about video decoding abilities, you create a video decoding configuration which you pass as a parameter to mediacapabilities.decodinginfo()
method.
... creating a video decoding configuration the mediacapabilities.decodinginfo()
method takes as a parameter a media decoding configuration.
...And 3 more matches
NodeFilter - Web APIs
it is the user who is expected to write one, tailoring the acceptnode()
method to its needs, and using it with some treewalker or nodeiterator objects.
...
methods this interface doesn't inherit any
methods.
... this
method is expected to be written by the user of a nodefilter.
...And 3 more matches
PaymentRequest.canMakePayment() - Web APIs
the paymentrequest
method canmakepayment() determines whether or not the request is configured in a way that is compatible with at least one payment
method supported by the user agent.
... you can call this before calling show() to provide a streamlined user experience when the user's browser can't handle any of the payment
methods you accept.
... for instance, you might call canmakepayment() to determine if the browser will let the user pay using payment request api, and if it won't, you could fall back to another payment
method, or offer a list of
methods that aren't handled by payment request api (or even provide instructions for paying by mail or by phone).
...And 3 more matches
Using the Permissions API - Web APIs
the only supported
method right now is permissions.query(), which queries permission status.
...this object will eventually include
methods for querying, requesting, and revoking permissions, although currently it only contains permissions.query(); see below.
...ocation.getcurrentposition(revealposition,positiondenied,geosettings); } else if (result.state == 'denied') { report(result.state); geobtn.style.display = 'inline'; } result.onchange = function() { report(result.state); } }); } function report(state) { console.log('permission ' + state); } handlepermission(); permission descriptors the permissions.query()
method takes a permissiondescriptor dictionary as a parameter — this contains the name of the api you are interested in.
...And 3 more matches
Range - Web APIs
a range can be created by using the document.createrange()
method.
... range objects can also be retrieved by using the getrangeat()
method of the selection object or the caretrangefrompoint()
method of the document object.
...
methods there are no inherited
methods.
...And 3 more matches
SVGTextPathElement - Web APIs
textpathelement" target="_top"><rect x="-169" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-79" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextpathelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants
method types name value description textpath_
methodtype_unknown 0 the type is not one of predefined types.
... textpath_
methodtype_align 1 corresponds to the value align.
... textpath_
methodtype_stretch 2 corresponds to the value stretch.
...And 3 more matches
Selection - Web APIs
methods selection.addrange() a range object that will be added to the selection.
... notes string representation of a selection calling the selection.tostring()
method returns the text contained within the selection, e.g.: var selobj = window.getselection(); window.alert(selobj); note that using a selection object as the argument to window.alert will call the object's tostring
method.
... behavior of selection api in terms of editing host focus changes the selection api has a common behavior (i.e., shared between browsers) that governs how focus behavior changes for editing hosts after certain
methods are called.
...And 3 more matches
Using Service Workers - Web APIs
ight expect, but the rest of the code is a little different: let body = document.queryselector('body'); let myimage = new image(); imgload('mylittlevader.jpg').then((response) => { var imageurl = window.url.createobjecturl(response); myimage.src = imageurl; body.appendchild(myimage); }, (error) => { console.log(error); }); on to the end of the function call, we chain the promise then()
method, which contains two functions — the first one is executed when the promise successfully resolves, and the second is called when the promise is rejected.
... in the resolved case, we display the image inside myimage and append it to the body (its argument is the request.response contained inside the promise’s resolve
method); in the rejected case we return an error to the console.
...pp.js', './sw-test/image-list.js', './sw-test/star-wars-logo.jpg', './sw-test/gallery/', './sw-test/gallery/bountyhunters.jpg', './sw-test/gallery/mylittlevader.jpg', './sw-test/gallery/snowtroopers.jpg' ]); }) ); }); here we add an install event listener to the service worker (hence self), and then chain a extendableevent.waituntil()
method onto the event — this ensures that the service worker will not install until the code inside waituntil() has successfully occurred.
...And 3 more matches
Service Worker API - Web APIs
registration a service worker is first registered using the serviceworkercontainer.register()
method.
...you can modify the response to these requests in any way you want, using the fetchevent.respondwith
method.
... note: because oninstall/onactivate could take a while to complete, the service worker spec provides a waituntil
method, once this is called oninstall or onactivate, it passes a promise.
...And 3 more matches
TextRange - Web APIs
methods textrange.collapse() move the caret to the beginning or end of the current range.
... textrange.querycommandenabled() returns a boolean indicating whether the specified command can be executed successfully with the execcommand
method in the current state of the given document.
... document.selection property returns a non-standard selection object, and the selection.createrange()
method creates a textrange object consistent with the currently selection.
...And 3 more matches
WebGL2RenderingContext - Web APIs
some
methods of the webgl 1 context can accept additional values when used in a webgl 2 context.
... uniforms and attributes webgl2renderingcontext.uniform[1234][uif][v]()
methods specifying values of uniform variables.
... webgl2renderingcontext.uniformmatrix[234]x[234]fv()
methods specifying matrix values for uniform variables.
...And 3 more matches
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
the webglrenderingcontext.uniform[1234][fi][v]()
methods of the webgl api specify values of uniform variables.
...they retain the values assigned to them by a call to this
method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
...possible types: a floating point number for floating point values (
methods with "f").
...And 3 more matches
Sending and Receiving Binary Data - Web APIs
sending binary data the send
method of the xmlhttprequest has been extended to enable easy transmission of binary data by accepting an arraybuffer, blob, or file object.
... the following example creates a text file on-the-fly and uses the post
method to send the "file" to the server.
... firefox-specific examples this example transmits binary content asynchronously, using the post
method, and firefox's non-standard sendasbinary().
...And 3 more matches
XMLHttpRequest.send() - Web APIs
the xmlhttprequest
method send() sends the request to the server.
... if the request is asynchronous (which is the default), this
method returns as soon as the request is sent and the result is delivered using events.
... if the request is synchronous, this
method doesn't return until the response has arrived.
...And 3 more matches
XRReferenceSpace - Web APIs
methods in addition to the
methods inherited from its parent interface, xrspace (there are none at this time), xrreferencespace inherits
methods from eventtarget.
... xrreferencespace also provides the following
methods.
... getoffsetreferencespace() creates and returns a new reference space object as the same type as the one on which you call the
method (so, either xrreferencespace or xrboundedreferencespace).
...And 3 more matches
XRSession - Web APIs
the webxr device api's xrsession interface represents an ongoing xr session, providing
methods and properties used to interact with and control the session.
... to open a webxr session, use the xrsystem interface's requestsession()
method.
... with xrsession
methods, you can poll the viewer's position and orientation (the xrviewerpose), gather information about the user's environment, and present imagery to the user.
...And 3 more matches
msWriteProfilerMark - Web APIs
the mswriteprofilermark
method writes a profiling event.
... this proprietary
method is specific to internet explorer and microsoft edge.
...if this
method succeeds, it returns s_ok.
...And 3 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
this.r = obj.r; this.g = obj.g; this.b = obj.b; this.a = obj.a; this.hue = obj.hue; this.saturation = obj.saturation; this.value = obj.value; this.format = '' + obj.format; this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv') this.format = 'hsv'; if (format === 'hsl') this.format = 'hsl'; }; /*==========
methods to set color properties ==========*/ color.prototype.isvalidrgbvalue = function isvalidrgbvalue(value) { return (typeof(value) === 'number' && isnan(value) === false && value >= 0 && value <= 255); }; color.prototype.setrgba = function setrgba(red, green, blue, alpha) { if (this.isvalidrgbvalue(red) === false || this.isvalidrgbvalue(green) === false || this.isvalidrgbvalue(blue...
...valid !== true) return; if (value[0] === '#') value = value.slice(1, value.length); if (value.length === 3) value = value.replace(/([0-9a-f])([0-9a-f])([0-9a-f])/i,'$1$1$2$2$3$3'); this.r = parseint(value.substr(0, 2), 16); this.g = parseint(value.substr(2, 2), 16); this.b = parseint(value.substr(4, 2), 16); this.alpha = 1; this.rgbtohsv(); }; /*========== conversion
methods ==========*/ color.prototype.converttohsl = function converttohsl() { if (this.format === 'hsl') return; this.setformat('hsl'); this.rgbtohsl(); }; color.prototype.converttohsv = function converttohsv() { if (this.format === 'hsv') return; this.setformat('hsv'); this.rgbtohsv(); }; /*========== update
methods ==========*/ color.prototype.updatergb = function updater...
...lta) { if (cmax === red ) { hue = ((green - blue) / delta); } if (cmax === green ) { hue = 2 + (blue - red) / delta; } if (cmax === blue ) { hue = 4 + (red - green) / delta; } if (cmax) saturation = delta / x; } this.hue = 60 * hue | 0; if (this.hue < 0) this.hue += 360; this.saturation = (saturation * 100) | 0; this.lightness = (lightness * 100) | 0; }; /*========== get
methods ==========*/ color.prototype.gethexa = function gethexa() { var r = this.r.tostring(16); var g = this.g.tostring(16); var b = this.b.tostring(16); if (this.r < 16) r = '0' + r; if (this.g < 16) g = '0' + g; if (this.b < 16) b = '0' + b; var value = '#' + r + g + b; return value.touppercase(); }; color.prototype.getrgba = function getrgba() { var rgb = '(' + this.r + ', ' ...
...And 3 more matches
ime-mode - CSS: Cascading Style Sheets
the ime-mode css property controls the state of the input
method editor (ime) for text fields.
... values auto no change is made to the current input
method editor state.
... active the input
method editor is initially active; text entry is performed through it unless the user specifically dismisses it.
...And 3 more matches
<input type="radio"> - HTML: Hypertext Markup Language
events change and input supported common attributes checked and value idl attributes checked and value
methods select() value the value attribute is a domstring containing the radio button's value.
... for example, if your form needs to ask the user for their preferred contact
method, you might create three radio buttons, each with the name property set to contact but one with the value email, one with the value phone, and one with the value mail.
... the resulting html looks like this: <form> <p>please select your preferred contact
method:</p> <div> <input type="radio" id="contactchoice1" name="contact" value="email"> <label for="contactchoice1">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> here you see the three radio buttons, each with the name set to contact and each with a unique value that uniquely identifies that individual radio button wi...
...And 3 more matches
If-None-Match - HTTP
for get and head
methods, the server will send back the requested resource, with a 200 status, only if it doesn't have an etag matching the given ones.
... for other
methods, the request will be processed only if the eventually existing resource's etag doesn't match any of the values listed.
... when the condition fails for get and head
methods, then the server must return http status code 304 (not modified).
...And 3 more matches
Grammar and types - JavaScript
for example: '37' - 7 // 30 '37' + 7 // "377" converting strings to numbers in the case that a value representing a number is in memory as a string, there are
methods for conversion.
... parseint('101', 2) // 5 an alternative
method of retrieving a number from a string is with the + (unary plus) operator: '1.1' + '1.1' // '1.11.1' (+'1.1') + (+'1.1') // 2.2 // note: the parentheses are added for clarity, not required.
... enhanced object literals in es2015, object literals are extended to support setting the prototype at construction, shorthand for foo: foo assignments, defining
methods, making super calls, and computing property names with expressions.
...And 3 more matches
Introduction - JavaScript
functions can be properties of objects, executing as loosely typed
methods.
...you do not have to declare all variables, classes, and
methods.
... you do not have to be concerned with whether
methods are public, private, or protected, and you do not have to implement interfaces.
...And 3 more matches
constructor - JavaScript
the constructor
method is a special
method of a class for creating and initializing an object of that class.
...} description a constructor enables you to provide any custom initialization that must be done before any other
methods can be called on an instantiated object.
... console.log(error.printcustomermessage()); } else { console.log('unknown error', error); throw error; } } there can be only one special
method with the name "constructor" in a class.
...And 3 more matches
Warning: Date.prototype.toLocaleFormat is deprecated - JavaScript
the javascript warning "date.prototype.tolocaleformat is deprecated; consider using intl.datetimeformat instead" occurs when the non-standard date.prototype.tolocaleformat
method is used.
... the non-standard date.prototype.tolocaleformat
method is deprecated and shouldn't be used anymore.
... examples deprecated syntax the date.prototype.tolocaleformat
method is deprecated and will be removed (no cross-browser support, available in firefox only).
...And 3 more matches
event/target - Archive of obsolete content
adding listeners eventtarget interface defines on
method, that can be used to register event listeners on them for the given event type: target.on('message', function onmessage(message) { // note: `this` pseudo variable is an event `target` unless // intentionally overridden via `.bind()`.
...eventtarget interface defines convenience
method for adding one shot event listeners via
method once.
...}); removing listeners eventtarget interface defines api for unregistering event listeners, via removelistener
method: target.removelistener('message', onmessage); emitting events eventtarget interface intentionally does not define an api for emitting events.
...And 2 more matches
Downloading Files - Archive of obsolete content
the following
methods of downloading files may not work as expected after firefox 26, and should no longer be used.
... downloading files to download a file, create an instance of nsiwebbrowserpersist and call its nsiwebbrowserpersist.saveuri()
method, passing it a url to download and an nsifile instance representing the local file name/path.
...if you want to open a login prompt, you can use the default prompt by calling the window watcher's getnewauthprompter()
method.
...And 2 more matches
JS XPCOM - Archive of obsolete content
an interface is simply a list of constants and
methods that can be called on the object, an example is nsifile.
... creating an instance of a component the preferred
method of creating xpcom instances is via the components.constructor helper.
...g/file/local;1", "nsifile", "initwithpath"); var file = new nsfile(filepath); they can also be created and initialized manually: var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsifile); file.initwithpath(filepath); this creates a new instance of the object with contract id @mozilla.org/file/local;1 and allows you to call
methods from the nsifile interface on it.
...And 2 more matches
View Source for XUL Applications - Archive of obsolete content
method overview gviewsourceutils exposes several
methods, but the only one you should be using directly is the viewsource
method.
... the rest of those
methods should be considered private, and might become inaccessible in the future.
... void viewsource(aobject);
methods viewsource opens a viewer to the source code for some document or uri.
...And 2 more matches
Inline options - Archive of obsolete content
locating the options file there are two ways to let the add-on manager find your options file:
method 1 name the file options.xul and put it in the extension's root folder (alongside install.rdf).
... this
method does not require you to create a chrome.manifest and set it's path.
... this
method does not require you to specify optionstype in install.rdf.
...And 2 more matches
Intercepting Page Loads - Archive of obsolete content
the subject argument on the observe
method is the nsihttpchannel object that corresponds to the http channel being opened or already opened, depending on the topic.
...remember that your observe
method will be called for every http request made by firefox, usually several dozen per page visit.
... there are a couple of things left to do: implementing the progress listener
methods, and figuring out what notify_all is about.
...And 2 more matches
Updating addons broken by private browsing changes - Archive of obsolete content
idls nsitransferable: see using the clipboard for information about the new init
method.
... nsidownload now has retry, cancel, remove, pause, and resume
methods which should be used instead of deprecated similarly-named nsidownloadmanager
methods.
... nsidownload's getdownload
method is deprecated; use the asynchronous getdownloadbyguid
method instead.
...And 2 more matches
Notes on HTML Reflow - Archive of obsolete content
this is passed as an argument to the reflow
method of the root frame in the frame hierarchy.
...to request (or schedule ) an incremental reflow (e.g., in response to a change in the content model), a reflow command object is created and passed to the presentation shell via the nsipresshell::appendreflowcommand
method.
...a reflow state object is created with a reflow reason of incremental, the reflow command is stored in the state, and the reflow
method of the root frame is invoked.
...And 2 more matches
JavaScript crypto - Archive of obsolete content
you can then register event handlers for these events with the document.addeventlistener()
method.
... generating keys and issuing user certificates there are several crypto object
methods used in generating keys for certificates: generatecrmfrequest(), importusercertificates().
... overview of the new cert issuing process user fills out enrollment form user action initiates script script calls key generation
method (generatecrmfrequest) signing and encryption keys are generated encryption private key is wrapped with public key of key recovery authority (kra) (passed in in the form of a certificate as part of the script, and checked against a pre-installed certificate copy in the local certificate database) the public keys, wrapped encryption private key, and text string from the script (possibly containi...
...And 2 more matches
Anonymous Content - Archive of obsolete content
the anonymous content is accessible only through special
methods like getanonymousnodes and getanonymouselementbyattribute.
... the scope of an element can be determined using the getbindingparent
method on the documentxbl interface.
...this
method returns the bound element in the enclosing scope that is responsible for the anonymous node.
...And 2 more matches
compareTo - Archive of obsolete content
method of installversion object syntax compareto ( installversion version); compareto ( string version); compareto ( int major, int minor, int release, int build); parameters the compareto
method has the following parameters: maj the major version number.
... returns if the versions are the same, this
method returns 0.
... if this version object represents a smaller (earlier) version than that represented by the version parameter, this
method returns a negative number.
...And 2 more matches
getWinProfile - Archive of obsolete content
method of install object syntax winprofile getwinprofile ( object folder, string file); parameters the getwinprofile
method has the following parameters: folder an object representing a directory.
... you create this object by passing a string representing the directory to the getfolder
method.
...description the getwinprofile
method creates an object for manipulating the contents of a windows .ini file.
...And 2 more matches
initInstall - Archive of obsolete content
method of install object syntax int initinstall ( string displayname, string package, installversion version, int flags); int initinstall ( string displayname, string package, string version, int flags); int initinstall ( string displayname, string package, string version); int initinstall ( string displayname, string package, installversion version); parameters the initinstall
method has the following parameters: displayname a string that contains the name of the software being installed.
...this distinction is important when you add components with the addfile
method.
...description the initinstall
method initializes the installation of the specified software.
...And 2 more matches
patch - Archive of obsolete content
method of install object syntax int patch ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); parameters the patch
method has the following parameters: registryname the pathname in the client version registry for the component that is to be patched.this parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
... typically, relative pathnames are relative to the main pathname specified in the initinstall
method.
...for variants or this
method without a version argument the value from initinstall will be used.
...And 2 more matches
setPackageFolder - Archive of obsolete content
method of install object syntax void setpackagefolder ( object folder); parameters the setpackagefolder
method has the following parameter: folder an object representing a directory.
... you create this object by passing a string representing the directory to the getfolder or getcomponentfolder
method.
...description the setpackagefolder
method to set the default package folder that is saved with the root node.
...And 2 more matches
getValue - Archive of obsolete content
getvalue netscape 6 and mozilla do not currently support this
method.
...
method of winreg object syntax winregvalue getvalue ( string subkey, string valname); parameters the getvalue
method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...description the getvalue
method retrieves the value of an arbitraty key.
...And 2 more matches
setValue - Archive of obsolete content
setvalue netscape 6 and mozilla do not currently support this
method.
...
method of winreg object syntax string setvalue ( string subkey, string valname, winregvalue value); parameters the setvalue
method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...description the setvalue
method sets the value of an arbitrary key.
...And 2 more matches
findbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] in gecko 1.9, the findbar widget moved into toolkit, so it's available to any xul application, as well as extensions.
... attributes browserid, findnextaccesskey, findpreviousaccesskey, highlightaccesskey, matchcaseaccesskey properties browser, findmode
methods close, onfindagaincommand, open, startfind, togglehighlight example <browser type="content-primary" flex="1" id="content" src="about:blank"/> <findbar id="findtoolbar" browserid="content"/> attributes browserid type: string the id of the browser element to which the findbar is attached.
... possible values are: find_normal (0): normal find find_typeahead (1): typeahead find find_links (2): link find
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature...
...And 2 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is created by setting the type attribute of a textbox to autocomplete.
...the sessions can be set using the searchsessions attribute or by calling the addsession
method.
...cecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, issearching, iswaiting, label, maxlength, maxrows, minresultsforpopup, nomatch, open, popup, popupopen, resultspopup, searchcount, searchparam, searchsessions, selectionend, selectionstart, sessioncount, showcommentcolumn, showpopup, size, tabindex, tabscrolling, textlength, textvalue, timeout, type, useraction, value
methods addsession, clearresults, getdefaultsession, getresultat, getresultcount, getresultvalueat, getsession, getsessionbyname, getsessionresultat, getsessionstatusat, getsessionvalueat, removesession, select, setselectionrange, syncsessions examples (example needed) attributes accesskey type: character this should be set to a character that is used as a shortcut key.
...And 2 more matches
Custom Tree Views - Archive of obsolete content
the tree will call
methods of the view to get the information that it needs to display.
...three
methods that you should implement are listed below.
... getcelltext( row , column ) this
method should return the text contents at the specified row and column.
...And 2 more matches
XULBrowserWindow - Archive of obsolete content
the xulbrowserwindow object provides
methods and properties that let the browser update the user interface of the enclosing xul window.
...see the linked interfaces for the definition of the implemented
methods.
...
method overview boolean hidechromeforlocation(in string alocation); attributes attribute type description incontentwhitelist string[] an array of url strings for which chrome is automatically hidden.
...And 2 more matches
menu - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element, much like a button, that is placed on a menubar.
... attributes acceltext, accesskey, allowevents, command, crop, disabled, image, label, menuactive, open, sizetopopup, tabindex, value properties accessibletype, accesskey, command, control, crop, disabled, image, itemcount, label, labelelement, menupopup, open, parentcontainer, selected, tabindex, value
methods appenditem, getindexofitem, getitematindex, insertitemat, removeitemat style classes menu-iconic example <menubar id="sample-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menuitem label="new"/> <menuitem label="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="exit"/> </menupopup> </menu> <menu id="edi...
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserda...
...And 2 more matches
notification - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] the notification is used to display an informative message.
... attributes image, label, priority, persistence, type, value properties accessibletype, control, image, label, priority, persistence, type, value
methods close examples <notification label="this is a warning"/> attributes image type: uri the uri of the image to appear on the element.
... persistence type: integer the persistence may be set to a non-zero value so that the notificationbox's removetransientnotifications
method does not remove them.
...And 2 more matches
preferences - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] overview <preferences> is a container for <preference> elements.
... note: it's not clear which of the following
methods and properties are public.
...s 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, ,, tooltip, tooltiptext, top, width
methods void firechangedevent(in domelement preference); creates and dispatches a changed (non-bubbling) event to the specified preference element.
...And 2 more matches
prefpane - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single preference panel in a prefwindow.
... attributes helpuri, image, label, onpaneload, selected, src properties image, label, preferenceelements, preferences, selected, src examples
methods preferenceforelement <prefpane id="panegeneral" label="general" src="chrome://path/to/paneoverlay.xul"/> or <prefpane id="panegeneral" label="general" onpaneload="ongeneralpaneload(event);"> <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> ...
...to change the selected pane, use the prefwindow's showpane
method.
...And 2 more matches
radiogroup - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a group of radio buttons.
... attributes disabled, focused, preference, tabindex, value properties accessibletype, disabled, focuseditem, itemcount, selectedindex, selecteditem, tabindex, value
methods appenditem, checkadjacentelement, getindexofitem, getitematindex, insertitemat, removeitemat examples <radiogroup> <radio id="orange" label="red"/> <radio id="violet" label="green" selected="true"/> <radio id="yellow" label="blue"/> </radiogroup> attributes disabled type: boolean indicates whether the element is disabled or not.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserda...
...And 2 more matches
tabs - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a row of tabs.
... attributes closebutton, disableclose, disabled, onclosetab, onnewtab, onselect, setfocus, selectedindex, tabbox, tabindex, tooltiptextnew, value, properties accessibletype, disabled, itemcount, selectedindex, selecteditem, tabindex, value,
methods advanceselectedtab, appenditem, getindexofitem, getitematindex, insertitemat, removeitemat examples (example needed) attributes closebutton obsolete since gecko 1.9.2 type: boolean if this attribute is set to true, the tabs row will have a "new tab" button and "close" button on the ends.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserda...
...And 2 more matches
textbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an input field where the user can enter text.
..., size, spellcheck, tabindex, timeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex, textlength, timeout, type, value, valuenumber, wraparound
methods decrease, increase, reset, select, setselectionrange style classes plain examples <vbox> <label control="your-name" value="enter your name:"/> <textbox id="your-name" value="john"/> </vbox> attributes cols type: integer for multiline textboxes, the number of columns to display.
...to get the actual number of rows in the element, use the getrowcount
method.
...And 2 more matches
New in JavaScript 1.3 - Archive of obsolete content
--> new features in javascript 1.3 new globals nan infinity undefined new
methods isfinite() function.prototype.call() function.prototype.apply() date.utc() date.prototype.getfullyear() date.prototype.setfullyear() date.prototype.getmilliseconds() date.prototype.setmilliseconds() date.prototype.getutcfullyear() date.prototype.getutcmonth() date.prototype.getutcdate() date.prototype.getutchours() date.prototype.getutcminutes() date.prototype.getutcseconds() da...
... changed functionality in javascript 1.3 changes to date to conform with ecma-262 new constructor date(year, month, day, [,hours [, minutes [, seconds [, milliseconds ]]]]) additional
method parameters: setmonth(month[, date]) sethours(hours[, min[, sec[, ms]]]) setminutes(min[, sec[, ms]]) setseconds(sec[, ms]) the length of an array (property length) is now an unsigned, 32-bit integer.
... array.prototype.push(): in javascript 1.2, the push
method returned the last element added to an array.
...And 2 more matches
Object.prototype.unwatch() - Archive of obsolete content
these two
methods were implemented only in firefox prior to version 58, they're deprecated and removed in firefox 58+.
... the unwatch()
method removes a watchpoint set with the watch()
method.
... description the javascript debugger has functionality similar to that provided by this
method, as well as other debugging options.
...And 2 more matches
Object.prototype.watch() - Archive of obsolete content
these two
methods were implemented only in firefox prior to version 58, they're deprecated and removed in firefox 58+.
... the watch()
method watches for a property to be assigned a value and runs a function when that occurs.
... to remove a watchpoint, use the unwatch()
method.
...And 2 more matches
handler.enumerate() - Archive of obsolete content
the handler.enumerate()
method used to be a trap for for...in statements, but has been removed from the ecmascript standard in es2016 and is deprecated in browsers.
... syntax var p = new proxy(target, { enumerate(target) { } }); parameters the following parameter is passed to the enumerate
method.
... description the handler.enumerate
method is a trap for for...in statements.
...And 2 more matches
JSException - Archive of obsolete content
method summary the netscape.javascript.jsexception class has the following
methods: getwrappedexception instance
method getwrappedexception.
... getwrappedexceptiontype instance
method getwrappedexceptiontype returns the int mapping of the type of the wrappedexception object.
...the getwrappedexception
method was not available.
...And 2 more matches
Windows Media in Netscape - Archive of obsolete content
while the progid cannot be used to create a windows media player object that exposes all its properties and
methods, it is useful for rapid detections.
...unlike using the progid as an argument, using wmplayer.ocx.7 as an argument to both these apis creates a fully usable reference to the windows media player 7 or 9 control, with all the
methods and properties exposed to javascript.
... scripting the windows media player control the number of
methods and properties that are exposed by the windows media player, including the events that the player throws for handling by scripts in the web page containing the control, are covered in detail by the windows media player sdk.
...And 2 more matches
Create the Canvas and draw on it - Game development
ctx.beginpath(); ctx.rect(20, 40, 50, 50); ctx.fillstyle = "#ff0000"; ctx.fill(); ctx.closepath(); all the instructions are between the beginpath() and closepath()
methods.
...the fillstyle property stores a color that will be used by the fill()
method to paint the square, in our case, red.
...try adding this to the bottom of your javascript, saving and refreshing: ctx.beginpath(); ctx.arc(240, 160, 20, 0, math.pi*2, false); ctx.fillstyle = "green"; ctx.fill(); ctx.closepath(); as you can see we're using the beginpath() and closepath()
methods again.
...And 2 more matches
Animations and tweens - Game development
the spritesheet()
method's two extra paremeters determine the width and height of each single frame in the given spritesheet file, indicating to the program how to chop it up to get the individual frames.
... loading the animation next up, go into your create() function, find the line that loads the ball sprite, and below it put the call to animations.add() seen below: ball = game.add.sprite(50, 250, 'ball'); ball.animations.add('wobble', [0,1,0,2,0,1,0,2,0], 24); to add an animation to the object we use the animations.add()
method, which contains the following parameters the name we chose for the animation an array defining the order in which to display the frames during the animation.
... applying the animation when the ball hits the paddle in the arcade.collide()
method call that handles the collision between the ball and the paddle (the first line inside update(), see below) we can add an extra parameter that specifies a function to be executed every time the collision happens, in the same fashion as the ballhitbrick() function.
...And 2 more matches
Mixin - MDN Web Docs Glossary: Definitions of Web-related terms
a mixin is a class or interface in which some or all of its
methods and/or properties are unimplemented, requiring that another class or interface provide the missing implementations.
... the new class or interface then includes both the properties and
methods from the mixin as well as those it defines itself.
... all of the
methods and properties are used exactly the same regardless of whether they're implemented in the mixin or the interface or class that implements the mixin.
...And 2 more matches
Beginner's guide to media queries - Learn web development
it's always worth considering whether these layout
methods can achieve what you want without adding media queries.
...the nice thing about this
method is that grid is not looking at the viewport width, but the width it has available for this component.
...however, in practice you will find that good use of modern layout
methods, enhanced with media queries, will give the best results.
...And 2 more matches
Making asynchronous programming easier with async and await - Learn web development
instead of needing to chain a .then() block on to the end of each promise-based
method, you just need to add an await keyword before the
method call, and then assign the result to a variable.
...this line also invokes an async promise-based
method, so we use await here as well.
... async/await class
methods as a final note before we move on, you can even add async in front of class/object
methods to make them return promises, and await promises inside them.
...And 2 more matches
Video and Audio APIs - Learn web development
if it is paused, we set the data-icon attribute value on the play button to "u", which is a "paused" icon, and invoke the htmlmediaelement.play()
method to play the media.
... next, let's define stopmedia() — add the following function below playpausemedia(): function stopmedia() { media.pause(); media.currenttime = 0; play.setattribute('data-icon','p'); } there is no stop()
method on the htmlmediaelement api — the equivalent is to pause() the video, and set its currenttime property to 0.
...the classlist is a rather handy property that exists on every element — it contains a list of all the classes set on the element, as well as
methods for adding/removing classes, etc.
...And 2 more matches
Test your skills: Object basics - Learn web development
run the greeting()
method using dot notation (it will log the greeting to the browser devtools' console).
...we want you to rewrite the greeting()
method so that it logs "hello, said bertie the cymric." to the browser devtools' console, but in a way that will work across any cat object of the same structure, regardless of its name or breed.
... when you are done, write your own object called cat2, which has the same structure, exactly the same greeting()
method, but a different name, breed, and color.
...And 2 more matches
Aprender y obtener ayuda - Learn web development
different learning
methods it is interesting to consider that there are two main ways in which your brain learns things — focused and diffuse learning: focused learning is what you might more traditionally associate with academic subjects.
... note: you might favor one learning
method over the others, but realistically a hybrid approach is probably what you will end up with.
... and you'll probably come up with other
methods than the three we covered above.
...And 2 more matches
TypeScript support in Svelte - Learn web development
the variable todosstatus, which we used to programmatically access the
methods exposed by the todosstatus component, is of type todosstatus.
...it should end up looking like this: // actions.ts export function selectonfocus(node: htmlinputelement) { if (node && typeof node.select === 'function' ) { // make sure node is defined and has a select()
method const onfocus = () => node.select() // event handler node.addeventlistener('focus', onfocus) // when node gets focus call onfocus() return { destroy: () => node.removeeventlistener('focus', onfocus) // this will be executed when the node is removed from the dom } } } now update todo.svelte and newtodo.svelte where we ...
... but initial and value should be any object that could be converted to a valid json string with the json.stringify
method.
...And 2 more matches
Creating our first Vue component - Learn web development
for this component, we’ll use the object registration
method.
... {{}} is a special template syntax in vue, which lets us print the result of javascript expressions defined in our class, inside our template, including values and
methods.
...it also binds other attributes (data, which you’ve already seen, and others like
methods, computed, etc.) directly to the instance.
...And 2 more matches
Application cache implementation overview
when the update is about to actually start, the scheduling service calls nsofflinecacheupdate::begin()
method, that switches the update to checking state (+invokes onchecking event) and starts fetch of the manifest file.
... the parallel load is implemented by asynchronous recursive calls to processnexturi(), a
method searching always a single entry that is scheduled to load.
... note: the processnexturi
method early returns when state of the update is different then downloading.
...And 2 more matches
Creating JavaScript callbacks in components
the component can then call
methods on the observer interface to signal the external code when predefined events occur.
... here is a very simple example of the observer pattern: [scriptable, uuid(...)] interface stringparserobserver { void onword(string word); }; [scriptable, uuid(...)] interface stringparser { void parse(string data); void addobserver(stringparserobserver observer); }; in this example, the stringparser will call the stringparserobserver.onword
method whenever it finishes parsing a word found in the raw string data.
...remember (or discover) that addeventlistener is a
method of the nsidomeventtarget interface and is defined as such: void addeventlistener(in domstring type, in nsidomeventlistener listener, in boolean usecapture); however, it is extremely common to see developers pass a normal javascript function for the listener instead of an nsidomeventlistener implementation: function doload(event) { // do something her...
...And 2 more matches
Commenting IDL for better documentation
if an interface is used as a parameter or as the type of the value returned by a
method, please use the full name of the interface in the description of the
method.
... @param parameter description every parameter of a
method should be documented, only use the parameter name, leave out things like [in]/[out].
... @returns description if the
method returns something then this should be included.
...And 2 more matches
Add-on Manager
they must be registered through the addaddonlistener()
method.
... installing new add-ons new add-ons can be installed by using the getinstallforfile() or getinstallforurl()
methods on the addonmanager object.
...a listener can be registered either for a specific install using the addlistener()
method or for all installs using the addinstalllistener()
method.
...And 2 more matches
DownloadList
method overview promise<array<download>> getall(); promise add(download adownload); promise remove(download adownload); promise addview(object aview); promise removeview(object aview); void removefinished([optional] function afilterfn);
methods getall() retrieves a snapshot of the downloads that are currently in the list.
...to receive change notifications for downloads that are added to the list, use the addview()
method to register for ondownloadchanged notifications.
...if the download was already removed, this
method has no effect.
...And 2 more matches
PopupNotifications.jsm
to use this, you first need to import the code module into your javascript 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 description ispanelopen boolean returns true if the notification panel is currently visible, false if it is not.
...
methods locationchange() the consumer can call this
method to let the popup notification module know that the current browser's location has changed.
...And 2 more matches
WebRequest.jsm
method string the http
method to be used (get, post, etc).
...
method string the http
method to be used (get, post, etc).
...
method string the http
method to be used (get, post, etc).
...And 2 more matches
Mozilla Web Developer FAQ
you should not rely on mozilla’s document.all support on new pages.) the
method document.getelementbyid() can be used instead.
...the correct way to access an element by id is to call the document.getelementbyid()
method with the id as a string as the argument.
...when working with the dom, it is better to check for the existence of the
methods and objects you are planning on using.
...And 2 more matches
PKCS11 FAQ
certificates and keys are often looked up by the following
methods: by looking up all private keys.
...this is the same
method used for generating software keys and certificates and is used by certificate authorities like verisign and thawte.
... (red hat certificate server also uses this
method).
...And 2 more matches
Rhino JavaScript compiler
the resulting java class files can then be loaded and executed at another time, providing a convenient
method for transferring javascript, and for avoiding translation cost.
...each global function in the source file is made a
method of the generated class, overriding any
methods in the base class by the same name.
...each global function in the source file is made a
method of the generated class, implementing any
methods in the interface by the same name.
...And 2 more matches
Property cache
↓ o ----> o ----> o ----> o ^global ^x' (----> indicates proto as before; downward arrows ↓ indicate the parent relation)
method guarantee — if at time t0 the object x has shape s; and x has an own property p that is a
method property (transparently joined function); and at time t1 an object y has shape s; and no shape-regenerating gc occurred; then at time t1 y's own property p is the same
method property.
... (the existence of this property is guaranteed by the basic layout guarantee above.) (informally: two objects with the same shape have the same
method properties.) branded object guarantee — if at time t0 the object x has shape s; and x is branded (x->branded()); and x has an own property p, which is a writable, function-valued data property with the stub getter and setter and a slot; and at time t1 an object y has shape s; and no shape-regenerating gc occurred; then y is x, and at time t1 x's own property p has the same function value it had at time t0.
... (the existence of this property is guaranteed by the basic layout guarantee above.) (informally: branded objects have unique shapes, and if x is branded, changing any of x's own
methods will change its shape.) extensibility guarantee — if at time t0 an object x of shape s is extensible, and at time t1 an object y has shape s, and no shape-regenerating gc occurred, then at t1 y is extensible.
...And 2 more matches
SpiderMonkey Internals
standard library the
methods for arrays, booleans, dates, functions, numbers, and strings are implemented using the js api.
...most string
methods are customized to accept a primitive string as the this argument.
... (otherwise, spidermonkey converts primitive values to objects before invoking their
methods, per ecma 262-3 §11.2.1.) error handling spidermonkey has two interdependent error-handling systems: javascript exceptions (which are not implemented with, or even compatible with, any kind of native c/c++ exception handling) and error reporting.
...And 2 more matches
JS_DefineElement
getter jsnative or jspropertyop getproperty
method for retrieving the current property value.
... setter jsnative or jsstrictpropertyop setproperty
method for specifying a new property value.
...getter and setter identify the getproperty and setproperty
methods for the property, respectively.
...And 2 more matches
Places utilities for JavaScript
placesutils
method overview nsiuri createfixeduri(string aspec); string getformattedstring(string key, string params); string getstring(string key); boolean nodeisfolder(nsinavhistoryresultnode anode); boolean nodeisbookmark(nsinavhistoryresultnode anode); boolean nodeisseparator(nsinavhistoryresultnode anode); boolean nodeisvisit(nsinavhistoryresultno...
... placesflavors generic_view_drop_types
methods createfixeduri nsiuri createfixeduri(string aspec) takes in a spec and returns a valid uri based on it using the nsiurifixup service.
... bookmark dialog
methods to show the bookmarkproperties dialog in its various modes.
...And 2 more matches
Using the Places annotation service
most
methods in the service are duplicated with one
method labeled as a 'page annotation' taking an nsiuri and the others labeled as an 'item annotation' and taking the id of an item in the places database.
...you can use the annotations service's hasannotation
method to determine in advance if the page has the requested annotation.
... the getter functions return only the value of the annotation (with the exception of the c++ getpageannotationbinary and getitemannotationbinary
methods which return the mimetype as well).
...And 2 more matches
Generic factory
rick potts wrote a templated-based generic factory (nsfactory<t>) that simplifies the factory creation process that just requires writing a createinstance()
method.
... */ ns_i
method setconstructor(constructorprocptr constructor) = 0; }; using nsigenericfactory is simple.
... examples class nsicomponent : public nsisupports { public: ns_i
method dosomething() = 0; }; class mycomponent : public nsicomponent { public: mycomponent(); virtual ~mycomponent(); static ns_
method create(nsisupports *aouter, refnsiid aiid, void **aresult); ns_impl_isupports ns_i
method dosomething(); }; to create a factory for this class, simply write the following: nsifactory* newcomponentfactory(nsirepository* repository) { nsigenericfactory*...
...And 2 more matches
Components.lastResult
components.lastresult returns the numeric nsresult code that was the result code of the last xpcom
method called via xpconnect.
... introduction generally, components.lastresult is only useful for testing the result of xpcom
methods that can return interesting 'success' codes.
... this is because failure result codes get converted by xpconnect into exceptions that are thrown into the calling javascript
method.
...And 2 more matches
Components.utils
please keep this list in sync with the components object page
methods
method description cloneinto() create a structured clone of an object in a different javascript context.
... getcomponentsforscope() this seemingly-paradoxical api allows privileged code to explicitly give unprivileged code a reference to its own components object (whereas it's normally hidden away on a scope chain visible only to xbl
methods).
... lookup
method() looks up a native (i.e.
...And 2 more matches
mozITXTToHTMLConv
last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) inherits from nsistreamconverter implemented by @mozilla.org/txttohtmlconv;1 as a service: var ios = components.classes["@mozilla.org/txttohtmlconv;1"] .getservice(components.interfaces.mozitxttohtmlconv);
method overview unsigned long citeleveltxt(in wstring line, out unsigned long loglinestart) void findurlinplaintext(in wstring text, in long alength, in long apos, out long astartpos, out long aendpos) wstring scanhtml(in wstring text, in unsigned long whattodo) wstring scantxt(in wstring text, in unsigned long whattodo) constants conversion control attribut...
...
methods scantxt() scans the specified text, applying the requested conversions and outputting html.
... warning: don't use the kglyphsubstitution conversion type with this
method, as doing so generates html that is non-standard.
...And 2 more matches
nsIAppStartup
to use the service: var appstartup = components.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(components.interfaces.nsiappstartup);
method overview void createhiddenwindow(); boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.9.1 void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.9.1 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gec...
...obsolete since gecko 1.9.1 constants the following flags may be passed as the amode parameter to the quit()
method.
...
methods createhiddenwindow() create the hidden window.
...And 2 more matches
nsIAuthPrompt2
to create an instance, use: var authprompt2 = components.classes["@mozilla.org/login-manager/prompter;1"] .createinstance(components.interfaces.nsiauthprompt2);
method overview nsicancelable asyncpromptauth(in nsichannel achannel, in nsiauthpromptcallback acallback, in nsisupports acontext, in pruint32 level, in nsiauthinformation authinfo); boolean promptauth(in nsichannel achannel, in pruint32 level, in nsiauthinformation authinfo); constants constant value description level_none 0 the password will be ...
...
methods asyncpromptauth() asynchronously prompt the user for a username and password.
... if the user closes the dialog using a cancel button or similar, the callback's nsiauthpromptcallback.onauthcancelled()
method must be called.
...And 2 more matches
nsICacheSession
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(); nsicacheentrydescriptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener); attributes attribute type description doomentr...
...
methods asyncopencacheentry() this
method gives an asynchronous cache access.
...evictentries() this
method evicts all entries for this session's clientid according to its storagepolicy.
...And 2 more matches
nsICommandLine
method overview long findflag(in astring aflag, in boolean acasesensitive); astring getargument(in long aindex); boolean handleflag(in astring aflag, in boolean acasesensitive); astring handleflagwithparam(in astring aflag, in boolean acasesensitive); void removearguments(in long astart, in long aend); nsifile resolvefile(in astring aargument); nsiuri resolveuri(in astring aargument); ...
...
methods findflag() finds a command-line flag, returning its position on the command line.
...this is, essentially, a helper
method that combines findflag() and removearguments() into one operation.
...And 2 more matches
nsIContentPrefCallback2
dom/interfaces/base/nsicontentprefservice2.idlscriptable callback used by nsicontentprefservice2
methods 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17)
method overview void handlecompletion(in unsigned short reason); void handleerror(in nsresult error); void handleresult(in nsicontentpref pref); constants constant value description complete_ok 0 complete_error 1
methods handlecompletion() called when the
method finishes.
... this will be called exactly once for each
method invocation, and afterward no other callback
methods will be called.
... void handlecompletion( in unsigned short reason ); parameters reason one of the complete_* values indicating the manner in which the
method completed.
...And 2 more matches
nsICookiePermission
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports
method overview nscookieaccess canaccess(in nsiuri auri, in nsichannel achannel); boolean cansetcookie(in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout print64 aexpiry); nsiuri getoriginatinguri(in nsichannel achannel); void setaccess(in nsiuri auri, in nscookieaccess aaccess); constants constant value description access_default 0 nscookieaccess's access default value access_allow 1 nscookieaccess's access allow value access_deny 2 nscookieaccess's access deny value access_session 8 additi...
...onal values for nscookieaccess, which are not directly used by any
methods on this interface, but are nevertheless convenient to define here.
...
methods canaccess() tests whether or not the given uri/channel may access the cookie database, either to set or get cookies.
...And 2 more matches
nsICookieService
netwerk/cookie/public/nsicookieservice.idlscriptable provides
methods for setting and getting cookies in the context of a page load.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see nsicookiemanager and nsicookiemanager2 for
methods to manipulate the cookie database directly.
...
method overview string getcookiestring(in nsiuri auri, in nsichannel achannel); string getcookiestringfromhttp(in nsiuri auri, in nsiuri afirsturi, in nsichannel achannel); void setcookiestring(in nsiuri auri, in nsiprompt aprompt, in string acookie, in nsichannel achannel); void setcookiestringfromhttp(in nsiuri auri, in nsiuri afirsturi, in nsiprompt aprompt, in st...
...And 2 more matches
nsIDocShell
method overview void addsessionstorage(in nsiprincipal principal, in nsidomstorage storage); void addstate(in nsivariant adata, in domstring atitle, in domstring aurl, in boolean areplace); void beginrestore(in nsicontentviewer viewer, in boolean top); void createaboutblankcontentviewer(in nsiprincipal aprincipal); void createloadinfo(out nsidocshellloadi...
... kcharsetfrompreviousloading
methods addsessionstorage() add a webapps session storage object to the docshell.
...this
method will post an event to complete the simulated load after returning to the event loop.
...And 2 more matches
nsIDownloadProgressListener
as the states of downloads change, the
methods described here are called by the download manager so your code can take whatever steps it needs to.
...rather, the developer must create an object with the
methods provided below to implement it.
...
method overview void ondownloadstatechange(in short astate, in nsidownload adownload); void onlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, in nsidownload adownload); obsolete since gecko 1.9.1 void onprogresschange(in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress, in nsidownload adownload); void onsecuritychange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate, in nsidownload adownload); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astateflags, in nsresult astatus, in nsidownload adownload); ...
...And 2 more matches
nsIINIParserWriter
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) this interface provides
methods that allow writing to ini-format configuration files.
... once the writer object is created, you can use the setstring()
method to set the value of a property within a given section; the section is created if it hasn't been yet.
... when you're done and ready to write the ini file to disk, call the writefile()
method.
...And 2 more matches
nsILocalFile
xpcom/io/nsilocalfile.idlscriptable this interface adds
methods to nsifile that are particular to a file that is accessible via the local file system.
...to create an instance, use: var localfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile);
method overview void appendrelativenativepath(in acstring relativefilepath); native code only!
...
methods native code only!
...And 2 more matches
nsIMicrosummary
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface defines attributes and
methods for dealing with microsummaries generated by an nsimicrosummarygenerator.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3)
method overview void addobserver(in nsimicrosummaryobserver observer); boolean equals(in nsimicrosummary aother); void removeobserver(in nsimicrosummaryobserver observer); void update(); attributes attribute type description content astring the content of the microsummary.
...
methods addobserver() add a microsummary observer to this microsummary.
...And 2 more matches
nsINavHistoryObserver
method overview void onbeforedeleteuri(in nsiuri auri, in acstring aguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onclearhistory(); void ondeleteuri(in nsiuri auri, in acstring aguid); void ondeletevisits(in nsiuri auri, in prtime avisittime, in acstring aguid); void onendupdatebatch(); void onpagechanged(in nsiuri auri,...
...
methods onbeforedeleteuri() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note: this
method was removed in gecko 21.0 as part of bug 826409.
... onpageexpired() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: this
method was removed in gecko 2.0.
...And 2 more matches
nsINavHistoryQuery
this is important because, if the user has their profile on a networked drive, query latency can be non-negligible
method overview nsinavhistoryquery clone(); void getfolders([optional ]out unsigned long count, [retval,array,size_is(count)] out long long folders); void gettransitions([optional] out unsigned long count, [retval,array,size_is(count)] out unsigned long transitions); void setfolders([const,array, size_is(foldercount)] in long long folders, in unsigned long foldercount); void settransitions...
...to search for items that are tagged with any given tags instead of all, multiple queries may be passed to the nsinavhistoryservice
method nsinavhistoryservice.executequeries().
...
methods getfolders() this
method retrieves all the folders with the folder count.
...And 2 more matches
nsIParentalControlsService
to create an instance, use: var parentalcontrolsservice = components.classes["@mozilla.org/parental-controls-service;1"] .createinstance(components.interfaces.nsiparentalcontrolsservice);
method overview void log(in short aentrytype, in boolean aflag, in nsiuri asource, [optional] in nsifile atarget); boolean requesturioverride(in nsiuri atarget, [optional] in nsiinterfacerequestor awindowcontext); boolean requesturioverrides(in nsiarray atargets, [optional] in nsiinterfacerequestor awindowcontext); attributes attribute type description ...
...if this is true, applications should log relevant events using log()
method.
...
methods log() logs an application specific parental controls event.
...And 2 more matches
nsIPermissionManager
last changed in gecko 16 (firefox 16 / thunderbird 16 / seamonkey 2.13) inherits from: nsisupports
method overview void add(in nsiuri uri, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime); void addfromprincipal(in nsiprincipal principal, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime); void remove(in autf8string host, in string type); void removefromprincipal(in nsiprincipal ...
...
methods add() add permission information and permission type for a given uri.
...it is internally calling add()
method using the nsiuri from the principal.
...And 2 more matches
nsIServiceManager
inherits from: nsisupports last changed in gecko 1.0
method overview void getservice(in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void getservicebycontractid(in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); boolean isserviceinstantiated(in nscidref aclass, in nsiidref aiid); boolean isserviceinstantiatedbycontractid(in string acontractid, in nsiidref aiid);
methods getservice() this
method returns a reference to a particular xpcom servi...
... getservicebycontractid() this
method returns a reference to a particular xpcom service given the contractid of the service.
... isserviceinstantiated() this
method tests whether or not a xpcom service, identified by classid, has been instantiated.
...And 2 more matches
nsISound
to use this interface, use: var sound = components.classes["@mozilla.org/sound;1"] .createinstance(components.interfaces.nsisound);
method overview void beep(); void init(); void play(in nsiurl aurl); void playeventsound(in unsigned long aeventid); void playsystemsound(in astring soundalias); constants sound event constants constant value description event_new_mail_received 0 the system rece...
...
methods beep() plays a beep sound.
...other
methods will call init if they need to.
...And 2 more matches
nsIStreamConverter
you can supply data directly to the converter by calling it's nsistreamlistener.ondataavailable()
method.
... it will then convert that data from type x to your desired output type and return converted data to you via the nsistreamlistener you passed in by calling its nsistreamlistener.ondataavailable()
method.
...stream converter contractid format (the stream converter root key is defined in this file): @mozilla.org/streamconv;1?from=from_mime_type&to=to_mime_type
method overview void asyncconvertdata(in string afromtype, in string atotype, in nsistreamlistener alistener, in nsisupports actxt); nsiinputstream convert(in nsiinputstream afromstream, in string afromtype, in string atotype, in nsisupports actxt);
methods asyncconvertdata() asynchronous version: converts data arriving via the converter's nsistreamlistener.ondataavailable() meth...
...And 2 more matches
nsIStreamListener
nsirequestobserver contains two
methods.
... so, in all the three
methods - ondataavailable(), nsirequestobserver.onstartrequest() and nsirequestobserver.onstoprequest() have to be implemented.
...
method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoffset, in unsigned long acount);
methods ondataavailable() this
method is called when the next chunk of data for the ongoing request may be read without blocking the calling thread.
...And 2 more matches
nsITaskbarPreviewController
its
methods and properties are used by the nsitaskbarpreview interface.
...depending on whether the controller is connected to an nsitaskbartabpreview or nsitaskbarwindowpreview, only certain
methods and attributes need to be implemented.
...
method overview boolean drawpreview(in nsidomcanvasrenderingcontext2d ctx); boolean drawthumbnail(in nsidomcanvasrenderingcontext2d ctx, in unsigned long width, in unsigned long height); boolean onactivate(); void onclick(in nsitaskbarpreviewbutton button); void onclose(); attributes attribute type description height unsigned long the height in pixels of the preview image.
...And 2 more matches
nsITaskbarWindowPreview
if the enablecustomdrawing attribute is true, the controller you implement will start receiving calls to its nsitaskbarpreviewcontroller.drawpreview() and nsitaskbarpreviewcontroller.drawthumbnail()
methods, as well as reads of its width, height, and thumbnailaccessratio attributes.
... note: this interface will never invoke the controller's nsitaskbarpreviewcontroller.onclose() or nsitaskbarpreviewcontroller.onactivate()
methods, since handling them may conflict with other internal gecko state management.
...user clicks on the toolbar buttons are reported to your nsitaskbarpreviewcontroller implementation's nsitaskbarpreviewcontroller.onclick()
method.
...And 2 more matches
nsIThreadPool
method overview void shutdown(); attributes attribute type description idlethreadlimit unsigned long get/set the maximum number of idle threads that are kept alive.
... the thread pool takes ownership of the listener and releases it when the shutdown()
method is called.
...
methods shutdown() shuts down the thread pool.
...And 2 more matches
nsIURL
netwerk/base/public/nsiurl.idlscriptable this interface provides convenience
methods that further break down the path portion of nsiuri.
...ory/filebasename.fileextension;param \ \ / \ ----------------------- \ | / \ filename / ---------------------------- | filepath you can get a nsiurl from an nsiuri, using the queryinterface()
method: var myuri = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice) .newuri("http://developer.mozilla.org", null, null); try { var myurl = myuri.queryinterface(components.interfaces.nsiurl); } catch(e) { // the uri is not an url } or using instanceof: if (myuri instanceof components.interfaces.nsiurl...
...) { // your code here }
method overview autf8string getcommonbasespec(in nsiuri auritocompare); autf8string getrelativespec(in nsiuri auritocompare); attributes attribute type description directory autf8string directory portion of a url.
...And 2 more matches
nsIVariant
we mark the interface [scriptable] so that js can use
methods that refer to this interface.
... but we mark all the
methods and attributes [noscript] since any nsivariant object will be automatically converted to a js type anyway.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview acstring getasacstring(); native code only!
...And 2 more matches
nsIXmlRpcClient
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports
method overview void init(in string serverurl); void setauthentication(in string username, in string password); void clearauthentication(in string username, in string password); void setencoding(in string encoding); void setencoding(in unsigned long type, out nsiidref uuid, out nsqiresult result); void asynccall (in nsixmlrpcclientlistener listener, in nsisupports ctxt, in string
methodname, in nsisupports arguments, in pruint32 count); attributes attribute type description serverurl readonly nsiur...
... constants constant type description int unsigned long nsisupportsprint32 boolean unsigned long nsisupportsprbool string unsigned long nsisupportscstring double unsigned long nsisupportsdouble datetime unsigned long nsisupportsprtime array readonly unsigned long nsisupportsarray struct readonly unsigned long nsisupportsdictionary
methods init() set server url.
... call this before using this object void getdata ( in string serverurl ) ; parameters serverurl url of server side object on which
methods should be called setauthentication() set authentication info if needed.
...And 2 more matches
Using the clipboard
this
method only works to put strings on the clipboard.
... for other types of data, such as urls or images, you will need to use a more complex
method.
...for reading from the clipboard you can call the init
method of the transferable with null as nsiloadcontext, but you have to call it.
...And 2 more matches
Working with Multiple Versions of Interfaces
getwindowhandle is the tenth
method declared in the nsiaccessibledocument.h that firefox 2 was built with, but actually the eighth
method in the sdk that i used to build my extension (and hence xpcom component).
... since these classes don't use vtables this means i'm probably, no i can be more positive, definitely calling the wrong
method.
... if i were a betting man, i'd hedge a bet on getaccessibleinparentchain, that being the tenth
method in the interface declaration in the new sdk.
...And 2 more matches
Working with out parameters
when working with xpcom components, you might come across
method declarations like the following one: [scriptable, uuid(8b5314bc-db01-11d2-96ce-0060b0fb9956)] interface nsitransferable : nsisupports { ...
...} the gettransferdata
method takes three parameters, aflavor, adata, and adatalen, and returns nothing.
... adata and adatalen are marked as out, meaning that they act as "return values" for this
method, and are changed during the
method call.
...And 2 more matches
Mail event system
if the object just needs to be notified about one folder, it should call that folder's addlistener
method.
...
methods each event type has a two
methods associated with it: notify*<event> - in the nsifolder interface, and nsimsgmailsession interface.
... future plans the notification system has two duplicate
methods which could be implemented with onitemevent/notifyitemevent: folderloaded , and deleteormovemessagescompleted .
...And 2 more matches
CData
method overview
methods available on all cdata objects cdata address() string tosource() string tostring() properties properties of all cdata objects property type description constructor ctype the data type of the cdata object, as a ctype.
...
methods available on all cdata objects address() returns a cdata object of the pointer type ctypes.pointertype(dataobject.constructor) whose value points to the c object referred to by the object.
...
methods available on string objects these
methods must be called on objects that are arrays or pointers to 8-bit or 16-bit character or integer types, terminated by a null character.
...And 2 more matches
Memory - Plugins
the
methods that handle memory belong to the browser group of
methods.
... the npn_memalloc
method has the following syntax: void *npn_memalloc (uint32 size); the size parameter is an unsigned long integer that represents the amount of memory, in bytes, to allocate in the browser's memory space.
... the npn_memfree
method deallocates a block of memory that was allocated using npn_memalloc only.
...And 2 more matches
Scripting plugins - Plugins
the threading model for this api is such that all calls through this api are synchronous and calls from a plugin to
methods in this api must come from the thread on which the plugin was initiated, and likewise all calls to
methods in this api by the browser are guaranteed to come from the same thread.
...that means that a script from an origin other than the origin of the page that loaded the plugin is not able to access
methods and properties on the plugin.
...calling npn_getvalue() with either of those new enumerations will return an npobject representing the browser object, and from there, the functions in this api can be used to get and set properties, and to call
methods on those browser objects.
...And 2 more matches
Blob.stream() - Web APIs
the blob interface's stream()
method returns a readablestream which upon reading returns the data contained within the blob.
... usage notes with stream() and the returned readablestream, you gain several interesting capabilities: call getreader() on the returned stream to get an object to use to read the data from the blob using
methods such as the readablestreamdefaultreader interface's read()
method.
... call the returned stream's pipeto()
method to pipe the blob's data to a writable stream.
...And 2 more matches
Using the CSS Painting API - Web APIs
css.paintworklet.addmodule('nameofpaintworkletfile.js'); this can be done using the paint worklet's addmodule()
method in a <script> within the main html or in an external javascript file linked to from the document.
...to be able to access properties, we include the static inputproperties()
method, which provides live access to css properties, including regular properties and custom properties, and returns an array of property names.
... } /* use this function to retrieve any custom properties (or regular properties, such as 'height') defined for the element, return them in the specified array */ static get inputproperties() { return ['--boxcolor', '--widthsubtractor']; } paint(ctx, size, props) { /* ctx -> drawing context size -> paintsize: width and height props -> properties: get()
method */ ctx.fillstyle = props.get('--boxcolor'); ctx.fillrect(0, size.height/3, size.width*0.4 - props.get('--widthsubtractor'), size.height*0.6); } }); we used the inputproperties()
method in the registerpaint() class to get the values of two custom properties set on an element that has boxbg applied to it and then used those within our paint() function.
...And 2 more matches
CanvasRenderingContext2D.arcTo() - Web APIs
the canvasrenderingcontext2d.arcto()
method of the canvas 2d api adds a circular arc to the current sub-path, using the given control points and radius.
... this
method is commonly used for making rounded corners.
...this is one of the
method's most common uses.
...And 2 more matches
CanvasRenderingContext2D.closePath() - Web APIs
the canvasrenderingcontext2d.closepath()
method of the canvas 2d api attempts to add a straight line from the current point to the start of the current sub-path.
... this
method doesn't draw anything to the canvas directly.
... you can render the path using the stroke() or fill()
methods.
...And 2 more matches
CanvasRenderingContext2D.lineTo() - Web APIs
the canvasrenderingcontext2d
method lineto(), part of the canvas 2d api, adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
... like other
methods that modify the current path, this
method does not directly render anything.
... to draw the path onto a canvas, you can use the fill() or stroke()
methods.
...And 2 more matches
CanvasRenderingContext2D.resetTransform() - Web APIs
the canvasrenderingcontext2d.resettransform()
method of the canvas 2d api resets the current transform to the identity matrix.
... syntax void ctx.resettransform(); examples resetting the matrix this example draws a rotated rectangle after modifying the matrix, and then resets the matrix using the resettransform()
method.
... html <canvas id="canvas"></canvas> javascript the rotate()
method rotates the transformation matrix by 45°.
...And 2 more matches
Advanced animations - Web APIs
to draw the ball, we will create a ball object which contains properties and a draw()
method to paint it on the canvas.
...; var ctx = canvas.getcontext('2d'); var ball = { x: 100, y: 100, radius: 25, color: 'blue', draw: function() { ctx.beginpath(); ctx.arc(this.x, this.y, this.radius, 0, math.pi * 2, true); ctx.closepath(); ctx.fillstyle = this.color; ctx.fill(); } }; ball.draw(); nothing special here, the ball is actually a simple circle and gets drawn with the help of the arc()
method.
...to do so, we add the following checks to the draw
method: if (ball.y + ball.vy > canvas.height || ball.y + ball.vy < 0) { ball.vy = -ball.vy; } if (ball.x + ball.vx > canvas.width || ball.x + ball.vx < 0) { ball.vx = -ball.vx; } first demo let's see how it looks in action so far.
...And 2 more matches
CharacterData - Web APIs
methods inherits
methods from its parent, node, and implements the childnode and nondocumenttypechildnode interface.
... characterdata.appenddata() appends the given domstring to the characterdata.data string; when this
method returns, data contains the concatenated domstring.
... characterdata.deletedata() removes the specified amount of characters, starting at the specified offset, from the characterdata.data string; when this
method returns, data contains the shortened domstring.
...And 2 more matches
MouseEvent - Web APIs
though the mouseevent.initmouseevent()
method is kept for backward compatibility, creating of a mouseevent object should be done using the mouseevent() constructor.
... mouseevent.y read only alias for mouseevent.clienty constants mouseevent.webkit_force_at_mouse_down read only minimum force necessary for a normal click mouseevent.webkit_force_at_force_mouse_down read only minimum force necessary for a force click
methods this interface also inherits
methods of its parents, uievent and event.
...if the event has already being dispatched, this
method does nothing.
...And 2 more matches
Using the Notifications API - Web APIs
getting permission if permission to display notifications hasn't been granted yet, the application needs to use the notification.requestpermission()
method to request this from the user.
... in its simplest form, we just include the following: notification.requestpermission().then(function(result) { console.log(result); }); this uses the promise-based version of the
method.
...we did this using the following: function checknotificationpromise() { try { notification.requestpermission().then(); } catch(e) { return false; } return true; } we basically try to see if the .then()
method is available on requestpermission().
...And 2 more matches
PaymentRequest: merchantvalidation event - Web APIs
it uses the fetch() to send a request to its own server with an argument of the payment
method's validation url, obtained from the event's validationurl property.
... the merchant server should access the validation url in accordance with the payment
method documention.
... const merchantserverurl = window.location.origin + '/validate?url=' + encodeuricomponent(event.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(response => response.text()); }, false); }; const response = await request.show(); how merchant server handles the validation depends on the server implementation and payment
method documentation.
...And 2 more matches
Payment Request API - Web APIs
payment
methodchangeevent represents the user changing payment instrument (e.g., switching from a credit card to debit card).
... paymentresponse an object returned after the user selects a payment
method and approves a payment request.
... related dictionaries for the basic card specification basiccardchangedetails an object providing redacted address information that is provided as the
methoddetails on the payment
methodchange event sent to the paymentrequest when the user changes payment information.
...And 2 more matches
PerformanceEntry.toJSON() - Web APIs
the tojson()
method is a serializer; it returns a json representation of the performance entry object.
... example the following example shows the use of the tojson()
method.
...performance.mark not supported"); return; } // create some performance entries via the mark()
method performance.mark("begin"); do_work(50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var
methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; if (supported) log("..." + propert...
...And 2 more matches
ReadableStream.pipeThrough() - Web APIs
the pipethrough()
method of the readablestream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
...the
method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
...the
method will return a promise rejected with the source’s error, or with any error that occurs during aborting the destination.
...And 2 more matches
ReadableStream.pipeTo() - Web APIs
the pipeto()
method of the readablestream interface pipes the current readablestream to a given writablestream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
...the
method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
...the
method will return a promise rejected with the source’s error, or with any error that occurs during aborting the destination.
...And 2 more matches
Request - Web APIs
request.
method read only contains the request's
method (get, post, etc.) request.mode read only contains the mode of the request (e.g., cors, no-cors, same-origin, navigate.) request.redirect read only contains the mode for how redirects are handled.
...
methods request.clone() creates a copy of the current request object.
... request implements body, so it also has the following
methods available to it: body.arraybuffer() returns a promise that resolves with an arraybuffer representation of the request body.
...And 2 more matches
SVGPathElement - Web APIs
"65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-29" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgpathelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: in svg 2 the getpathsegatlength() and createsvgpathseg*
methods were removed and the pathlength property and the gettotallength() and getpointatlength()
methods were moved to svggeometryelement.
...
methods this interface also inherits
methods from its parent, svggeometryelement.
... note: in svg 2 this
method was moved to the svggeometryelement interface, from which this interface inherits it.
...And 2 more matches
Storage API - Web APIs
one of the most likely
methods—one which the specification specifically encourages, in fact—would be to consider the popularity and/or usage levels of individual sites to determine what their quotas should be.
... data persistence and clearing if the site or app has the "persistent-storage" feature permission, it can use the storagemanager.persist()
method to request that its box be made persistent.
... de-duplication, compression, and other
methods to reduce the physical size of the stored data may be used.
...And 2 more matches
SubtleCrypto.wrapKey() - Web APIs
the wrapkey()
method of the subtlecrypto interface "wraps" a key.
... let salt; /* get some key material to use as input to the derivekey
method.
... let salt; let iv; /* get some key material to use as input to the derivekey
method.
...And 2 more matches
UIEvent.initUIEvent() - Web APIs
the uievent.inituievent()
method initializes a ui event once it's been created.
... events initialized in this way must have been created with the document.createevent()
method.
... this
method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
...And 2 more matches
Geometry and reference spaces in WebXR - Web APIs
the primary reference space types the viewer reference space corresponds to the viewer's position in space; it's used by the xrviewerpose returned by the xrframe
method getviewerpose().
... establishing the reference space the topmost space—the one obtained by calling the xrsession
method requestreferencespace()—describes the coordinate system used for the overall world space.
...create an xrrigidtransform object representing the new position and orientation of the player's avatar, then create a new reference space to represent the avatar's point of view at the new position using the xrreferencespace
method getoffsetreferencespace().
...And 2 more matches
Example and tutorial: Simple synth keyboard - Web APIs
= audiocontext.createoscillator(); osc.connect(mastergainnode); let type = wavepicker.options[wavepicker.selectedindex].value; if (type == "custom") { osc.setperiodicwave(customwaveform); } else { osc.type = type; } osc.frequency.value = freq; osc.start(); return osc; } playtone() begins by creating a new oscillatornode by calling the audiocontext.createoscillator()
method.
... we then connect it to the master gain node by calling the new oscillator's oscillatornode.connect()
method;, which tells the oscillator where to send its output to.
...then, at last, the oscillator is started up so that it begins to produce sound by calling the oscillator's inherited audioscheduledsourcenode.start()
method.
...And 2 more matches
Web Authentication API - Web APIs
this resolves significant security problems related to phishing, data breaches, and attacks against sms texts or other second-factor authentication
methods while at the same time significantly increasing ease of use (since users don't have to manage dozens of increasingly complicated passwords).
...similar to the other forms of the credential management api, the web authentication api has two basic
methods that correspond to register and login: navigator.credentials.create() - when used with the publickey option, creates new credentials, either for registering a new account or for associating a new asymmetric key pair credentials with an existing account.
... in order to understand how the create() and get()
methods fit into the bigger picture, it is important to understand that they sit between two components that are outside the browser: server - the web authentication api is intended to register new credentials on a server (also referred to as a service or a relying party) and later use those same credentials on that same server to authenticate a user.
...And 2 more matches
String.prototype.includes() - JavaScript
the includes()
method determines whether one string may be found within another string, returning true or false as appropriate.
... description this
method lets you determine whether or not a string includes another string.
... case-sensitivity the includes()
method is case sensitive.
...And 2 more matches
String.prototype.indexOf() - JavaScript
the indexof()
method returns the index within the calling string object of the first occurrence of the specified value, starting the search at fromindex.
... note: for the array
method, see array.prototype.indexof().
...'blue whale'.indexof('blute') // returns -1 'blue whale'.indexof('whale', 0) // returns 5 'blue whale'.indexof('whale', 5) // returns 5 'blue whale'.indexof('whale', 7) // returns -1 'blue whale'.indexof('') // returns 0 'blue whale'.indexof('', 9) // returns 9 'blue whale'.indexof('', 10) // returns 10 'blue whale'.indexof('', 11) // returns 10 the indexof()
method is case sensitive.
...And 2 more matches
TypedArray - JavaScript
on the following pages you will find common properties and
methods that can be used with any typed array containing elements of any type.
... the buffer address is saved as an internal property of the instance and all the
methods of %typedarray%.prototype, i.e.
... object when called with an object argument, a new typed array is created as if by the typedarray.from()
method.
...And 2 more matches
Object initializer - JavaScript
// shorthand property names (es2015) let a = 'foo', b = 42, c = {}; let o = {a, b, c} // shorthand
method names (es2015) let o = { property(parameters) {} } // computed property names (es2015) let prop = 'foo' let o = { [prop]: 'hey', ['b' + 'ar']: 'there' } description an object initializer is an expression that describes the initialization of an object.
... a function value (see "
methods" above) can not be assigned to a value in json.
... function havees2015duplicatepropertysemantics() { 'use strict'; try { ({prop: 1, prop: 2}); // no error thrown, duplicate property names allowed in strict mode return true; } catch(e) { // error thrown, duplicates prohibited in strict mode return false; } }
method definitions a property of an object can also refer to a function or a getter or setter
method.
...And 2 more matches
Optional chaining (?.) - JavaScript
undefined : temp.second); optional chaining with function calls you can use optional chaining when attempting to call a
method which may not exist.
... this can be helpful, for example, when using an api in which a
method might be unavailable, either due to the age of the implementation or because of a feature which isn't available on the user's device.
... using optional chaining with function calls causes the expression to automatically return undefined instead of throwing an exception if the
method isn't found: let result = someinterface.custom
method?.(); note: if there is a property with such a name and which is not a function, using ?.
...And 2 more matches
yield - JavaScript
rv optional retrieves the optional value passed to the generator's next()
method to resume its execution.
... the yield keyword causes the call to the generator's next()
method to return an iteratorresult object with two properties: value and done.
... once paused on a yield expression, the generator's code execution remains paused until the generator's next()
method is called.
...And 2 more matches
requiredFeatures - SVG: Scalable Vector Graphics
to detect availability of an svg feature from script, there is the (also deprecated) domimplementation.hasfeature()
method.
...these same feature strings apply to the hasfeature
method call that is part of the svg dom's support for the domimplementation interface.
...11/feature#pattern http://www.w3.org/tr/svg11/feature#clip http://www.w3.org/tr/svg11/feature#mask http://www.w3.org/tr/svg11/feature#filter http://www.w3.org/tr/svg11/feature#xlinkattribute http://www.w3.org/tr/svg11/feature#font http://www.w3.org/tr/svg11/feature#extensibility http://www.w3.org/tr/svg11/feature#svgdom-static the browser supports all of the dom interfaces and
methods that correspond to the language features for http://www.w3.org/tr/svg11/feature#svg-static.
...And 2 more matches
SVG documentation index - SVG: Scalable Vector Graphics
140
method experimental, needsexample, svg, svg attribute the
method attribute indicates the
method by which text should be rendered along the path of a <textpath> element.
... 172 refx needsbrowsercompatibility, needsexample the refx attribute indicates the
method by which text should be rendered along the path of a <textpath> element.
... 191 spread
method svg, svg attribute the spread
method attribute determines how a shape is filled beyond the defined edges of a gradient.
...And 2 more matches
Scripting - SVG: Scalable Vector Graphics
one can override default browser behaviors with the evt.preventdefault( )
method, add eventlisteners to objects with the syntax element.addeventlistener(event, function, usecapture), and set element properties with syntax svgelement.style.setproperty("fill-opacity", "0.0", "").
...the evt.preventdefault()
method lets you do this.
... using eventlisteners with objects the
methods addeventlistener() and removeeventlistener() are very useful when writing interactive svg.
...And 2 more matches
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
to function correctly in netscape, this element, with the
method attribute, must be used.
... as of 7.0,
method="text" works as expected.
... syntax <xsl:output
method="xml" | "html" | "text" version=string encoding=string omit-xml-declaration="yes" | "no" standalone="yes" | "no" doctype-public=string doctype-system=string cdata-section-elements=list-of-names indent="yes" | "no" media-type=string /> required attributes none.
...And 2 more matches
Working with Events - Archive of obsolete content
adding listeners you can add a listener to an event emitter by calling its on(type, listener)
method.
...then in the constructor you can assign a listener function to this property as an alternative to calling the object's on()
method.
...the listener loads https://developer.mozilla.org/: require("sdk/ui/button/action").actionbutton({ id: "visit-mozilla", label: "visit mozilla", icon: "./icon-16.png", onclick: function() { require("sdk/tabs").open("https://developer.mozilla.org/"); } }); this is exactly equivalent to constructing the button and then calling the button's on()
method: var button = require("sdk/ui/button/action").actionbutton({ id: "visit-mozilla", label: "visit mozilla", icon: "./icon-16.png" }); button.on("click", function() { require("sdk/tabs").open("https://developer.mozilla.org/"); }); removing event listeners event listeners can be removed by calling removelistener(type, listener), supplying the type of event and the listener to remove.
... the listener must have been previously been added using one of the
methods described above.
page-worker - Archive of obsolete content
to do this, save the file in your add-on's data directory and create the url using the data.url()
method of the self module: pageworker = require("sdk/page-worker").page({ contentscript: "console.log(document.body.innerhtml);", contenturl: require("sdk/self").data.url("myfile.html") }); from firefox 34, you can use "./myfile.html" as an alias for self.data.url("myfile.html").
...you construct the url using the data.url()
method of the self module.
... the page worker is loaded as soon as the page object is created and stays loaded until its destroy
method is called or the add-on is unloaded.
...
methods destroy() unloads the page worker.
widget - Archive of obsolete content
just save the file in your add-on's data directory, and reference it using the data.url()
method of the self module: var data = require("sdk/self").data; require("sdk/widget").widget({ id: "my-widget", label: "my widget", contenturl: data.url("my-content.html") }); this widget contains an entire web page: require("sdk/widget").widget({ id: "hello-display", label: "my hello widget", content: "hello!", width: 50 }); widgets are quite small by default, so this example used th...
...
methods destroy() removes the widget from the add-on bar.
... this class has all the same
methods, attributes and events as the widget class except for the getview
method and the attach event.
..."secured" : "unsafe"; } tabs.on('ready', updatewidgetstate); tabs.on('activate', updatewidgetstate);
methods destroy() removes the widget view from the add-on bar.
platform/xpcom - Archive of obsolete content
r with its contract id: var { factory } = require('sdk/platform/xpcom'); var { cc, ci } = require('chrome'); var contractid = '@me.org/request' // create and register the factory var factory = factory({ contract: contractid, component: request }); now xpcom users can access our implementation in the normal way: var request = cc[contractid].createinstance(ci.nsirequest); request.resume();
methods queryinterface(interface) this
method is called automatically by xpcom, so usually you don't need to call it yourself.
...
methods createinstance(outer, iid) creates an instance of the component associated with this factory.
...the
methods of this interface will be callable on the returned object.
... lockfactory() this
method is required by the nsifactory interface, but as in most implementations it does nothing interesting.
Bootstrapped extensions - Archive of obsolete content
oldversion string the previously installed version, if the reason is addon_upgrade or addon_downgrade, and the
method is install or startup.
... newversion string the version to be installed, if the reason is addon_upgrade or addon_downgrade, and the
method is shutdown or uninstall.
... note: an add-on may be upgraded/downgraded at application startup, in this case the startup
method reason is app_startup, and the oldversion property is not set.
... also be aware that in some circumstances an add-on upgrade/downgrade may occur without the uninstall
method being called.
File I/O - Archive of obsolete content
an exception is thrown only when
methods that require the file to exist are called, e.g., isdirectory(), moveto(), and so on.
...you can tell files from folders by calling nsifile.isdirectory() and nsifile.isfile()
methods on each entry.
... createinstance(components.interfaces.nsifileoutputstream); stream.init(afile, 0x04 | 0x08 | 0x20, 0600, 0); // readwrite, create, truncate stream.write(pngbinary, pngbinary.length); if (stream instanceof components.interfaces.nsisafeoutputstream) { stream.finish(); } else { stream.close(); } more there are more
methods and properties on nsifile and nsilocalfile interfaces; please refer to their documentation for more details.
... those
methods/properties are mostly self-explanatory, so we haven't included examples of using them here.
Post data to window - Archive of obsolete content
preprocessing post data the apostdata argument of the (global) loaduri(), opendialog(), and (tab)browser.loaduriwithflags()
methods expects the post data in the form of an nsiinputstream (because they eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinputstream.
... most of the time, post data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before passing the data to one of the
methods.
... here is an example: var datastring = "name1=data1&name2=data2"; // post
method requests must wrap the encoded text in a mime // stream const cc = components.classes; const ci = components.interfaces; var stringstream = cc["@mozilla.org/io/string-input-stream;1"].
... posting data to the current tab there is a convenience
method in global scope (in firefox, chrome://browser/content/browser.js): loaduri(auri, areferrer, apostdata, aallowthirdpartyfixup); posting data to a new window window.opendialog('chrome://browser/content', '_blank', 'all,dialog=no', auri, aflags, areferrer, apostdata); ...
Common Pitfalls - Archive of obsolete content
how to create a uri object in almost all cases, when creating a uri object you want to use the newuri
method on the nsiioservice interface, like so: javascript: try { var ioserv = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uriobj = ioserv.newuri(uristring, uricharset, baseuri); } catch (e) { // may want to catch ns_error_malformed_uri for some applications } c++: nsresult rv; nscomptr<nsiioservice> ioserv...
...the one exception to all of the above, that is the one case in which creating a specific uri class via createinstance is acceptable, is when one is implementing a protocol handler's newuri
method.
... in that case you may not be able to use the i/o service because that service calls the newuri
method on the appropriate protocol handler, which may be your own handler.
...those
methods should be removed.
Hiding browser chrome - Archive of obsolete content
this can be accomplished by augmenting the behavior of the xulbrowserwindow object's hidechromeforlocation()
method.
... note: don't simply replace the hidechromeforlocation()
method; this will likely hurt the functionality of firefox itself as well as other extensions.
...var prevfunc = xulbrowserwindow.hidechromeforlocation; xulbrowserwindow.hidechromeforlocation = function(alocation) { return (/* your test goes here */) || prevfunc.apply(xulbrowserwindow, [alocation]); } this works by saving a reference to the current implementation of the hidechromeforlocation()
method, then replacing it with a new
method that calls through to the previous implementation.
... by chaining multiple implementations of the
method together in this way, everyone that wants to hide chrome can do so when appropriate.
Adding Events and Commands - Archive of obsolete content
another way to attach event handlers, just like html, is to place the handler in the xul code: <overlay id="xulschoolhello-browser-overlay" onload="xulschoolchrome.browseroverlay.init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> we prefer the first
method because it keeps a better separation of content and behavior.
... also, note that the addeventlistener
method receives the event name without the "on" prefix, while element attributes do have the prefix.
...the advantage of using the event argument is that the
method is not dependent of the specific button, so it can also be used for other elements.
...the addeventlistener
method allows you to control the phase where you want to handle an event, with the last argument of the function.
JavaScript Object Management - Archive of obsolete content
for instance, you could replace a
method in any object in the firefox chrome, so that it behaves differently than how it normally does.
...this is all necessary due to a javascript feature (quirk would be a better word for it) called
method binding.
... use "_" at the beginning of private attributes and
methods in js objects.
... */ 〈modulenamespace〉.user = function(aname, aurl) { this._name = aname; this._url = aurl; }; /** * user class
methods.
Using microformats - Archive of obsolete content
to use the api, you need to first load the object: components.utils.import("resource://gre/modules/microformats.js"); once you've loaded the microformats api, you can manage microformats using the
methods listed here; for information about parsing microformats, see parsing microformats in javascript.
...
methods add() adds a new microformat to the microformat module.
... note: you can simply call debug() on a microformat object: microformatobject.debug() instead of using this
method if you prefer.
... note: this
method doesnot return true if the node is a child of a microformat.
generateCRMFRequest() - Archive of obsolete content
crmfobject = crypto.generatecrmfrequest("requesteddn", "regtoken", "authenticator", "escrowauthoritycert", "crmf generation done code", keysize1, "keyparams1", "keygenalg1", ..., keysizen, "keyparamsn", "keygenalgn"); this
method will generate a sequence of crmf requests that has n requests.
...after the "escrowauthoritycert" parameter, the
method takes some javascript code that is invoked when the crmf request is ready.
...(this will have digitalsignature and nonrepudiation set for keyusage.) "dh-ex" "ec-ex" "ec-dual-use" "ec-sign" "ec-sign-nonrepudiation" "ec-nonrepudiation" the generatecrmfrequest()
method will cause the user to be presented with a key generation dialog.
...the
method generatecrmfrequest() will return an instance of a crmf request object.
Simple Storage - Archive of obsolete content
don't abuse these
methods, since they cause firefox -- all of firefox -- to drop what it's doing to make a trip to the disk.
...the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("storage.simple");
methods sync()as described above, the jetpack.storage.simple object is automatically written to disk, but a feature may force flush by calling jetpack.storage.simple.sync().
... don't abuse this
method.
...don't abuse this
method.
Clipboard - Archive of obsolete content
jetpack.future.import("clipboard");
methods set(contentstringflavorstring) stringwrites data from jetpack to the clipboard.
... this is the recommended
method of copying data to the clipboard.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the
method to set the clipboard.
...string here's an example of how to use the
method to get the data on the clipboard.
Clipboard - Archive of obsolete content
jetpack.future.import("clipboard");
methods set(contentstringflavorstring)writes data from jetpack to the clipboard.
... this is the recommended
method of copying data to the clipboard.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the
method to set the clipboard.
...string here's an example of how to use the
method to get the data on the clipboard.
Simple Storage - Archive of obsolete content
don't abuse these
methods, since they cause firefox -- all of firefox -- to drop what it's doing to make a trip to the disk.
...the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("storage.simple");
methods sync()as described above, the jetpack.storage.simple object is automatically written to disk, but a feature may force flush by calling jetpack.storage.simple.sync().
... don't abuse this
method.
...don't abuse this
method.
Clipboard - Archive of obsolete content
jetpack.future.import("clipboard");
methods set(contentstringflavorstring) stringwrites data from jetpack to the clipboard.
... this is the recommended
method of copying data to the clipboard.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the
method to set the clipboard.
...string here's an example of how to use the
method to get the data on the clipboard.
RDF Datasource How-To - Archive of obsolete content
if you take this approach, you won't be able to selectively implement
methods of the nsirdfdatasource interface; instead, all of the
methods will be "forwarded" to the in-memory datasource.
...if you choose this route, you'll need to implement each of the nsirdfdatastore
methods "by hand".
... [more info on what each
method needs to do here] rdf commands [describe what commands are, and why you'd implement them.] registering the datasource component a datasource is an xpcom component.
...registering an rdf datasource is fairly simple: in the dll's nsregisterself()
method, you simply call the component manager's registercomponent()
method: extern "c" pr_implement(nsresult) nsregisterself(nsisupports* aservicemanager, const char* apath) { nsresult rv; ...
open - Archive of obsolete content
syntax open(mode,type) parameters mode a comma-delimited list describing the
method to use to open the file, described in detail here.
... description this
method opens the file, preparing its resources for use by subsequent
methods to examine or modify the file.
... certain
methods of file, such as read and write should not be used when the file is not open.
... other
methods, such as remove may not be used when the file is open.
Binding Attachment and Detachment - Archive of obsolete content
note: some older papers mentioned dom
methods document.addbinding and document.removebinding; these were subsequently discarded as redundant and not implemented.
...scripts 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 scripts that reference the bound element.
...
methods and properties with getters/setters are no longer accessible from the binding, although properties with raw values remain.
dirCreate - Archive of obsolete content
method of file object syntax int dircreate( filespecobject dirtocreate ); parameters the dircreate
method has the following parameters: dirtocreate a filespecobject representing the pathname of the directory to create.
...description the input parameter is a filespecobject that you have already created with the install object's getfolder
method.
... the following simple example demonstrates the use of the dircreate
method.
... note that the getfolder
method does not require that the folder or directory you specify exist in order for the object reference to be a valid one.
confirm - Archive of obsolete content
method of install object syntax int confirm( string atext ); int confirm( string atext, string adialogtitle, number abuttonflags, string abutton0title, string abutton1title, string abutton2title, string acheckmsg, object acheckstate ); parameters the second, extended confirm()
method is supported starting with gecko 1.8.
...previous gecko versions only support the first, one-parameter
method and will throw an error on occuring the extended form.
...notes the preferred
method for detecting support for custom dialog boxes is querying the existence of the button constants.
...if ("button_pos_0" in install) { // use extended confirm()
method } else { // use classic confirm()
method } ...
deleteRegisteredFile - Archive of obsolete content
deleteregisteredfile (netscape 6 and mozilla do not currently support this
method.) deletes the specified file and removes its entry from the client version registry.
...
method of install object syntax int deleteregisteredfile (string registryname); parameters the deleteregisteredfile
method has the following parameter: registryname the pathname in the client version registry for the file that is to be deleted.
...description the deleteregisteredfile
method deletes the specified file and removes the file's entry from the client version registry.
...this
method is used to delete files that cannot be removed by the uninstall
method or to remove files that are no longer necessary or whose names have changed.
getLastError - Archive of obsolete content
method of install object syntax int getlasterror (); parameters none.
...description use getlasterror
method to obtain the most recent nonzero error code since initinstall or reseterror were called.
... this
method allows you to defer checking for error codes each time you call addfile or adddirectory until the last addfile or adddirectory call.
... the getlasterror
method does not return errors from
methods that return objects, such as getfolder.
getWinRegistry - Archive of obsolete content
method of install syntax winreg getwinregistry(); parameters none.
...description use the getwinregistry
method to create an object for manipulating the contents of the windows registry.
... once you have this object, you can call its
methods to retrieve or change the registry's content.
...this
method returns null on unix and macintosh platforms.
setValueNumber - Archive of obsolete content
method of winreg object syntax int setvaluenumber ( string subkey, string valname, number value ); parameters the
method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... description the setvaluenumber
method sets the value of a key when that value is a number.
... use this
method if the value you want to set is a number.
... if the value is not a number, use the setvalue or setvaluestring
methods instead.
setValueString - Archive of obsolete content
method of winreg object syntax int setvaluestring ( string subkey, string valname, string value); parameters the
method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...description the setvaluestring
method sets the value of a key when that value is a string.
... use this
method if the value you want to set is a string.
... if the value is not a string, use the setvalue
method instead.
WinReg Object - Archive of obsolete content
instead, you construct an instance of this object by calling the getwinregistry
method of the install object.
...to use a different root key, use the setrootkey
method.
...to manipulate such values, use the getvaluestring and setvaluestring
methods.
... to manipulate other values, use the getvalue and setvalue
methods.
onpopuphidden - Archive of obsolete content
example: <menupopup id="top" onpopuphidden="console.log('the onpopuphidden
method of id=top was called.');"> <menuitem label="item 1"/> <menuitem label="item 2"/> <menu id="submenu1" label="submenu 1"> <menupopup id="submenu1-popup"> <menuitem label="submenu1 item 1"/> <menuitem label="submenu1 item 2"/> </menupopup> </menu> <menu id="submenu2" label="submenu 1"> <menupopup id="submenu2-popup"> <menuitem label="submenu2 item 1"/> <menuitem label="submenu2 i...
...tem 2"/> </menupopup> </menu> <menupopup/> with the above structure, the onpopuphidden
method of <menupopup id="top"> will be called every time either <menupopup id="submenu1-popup"> or <menupopup id="submenu2-popup"> are hidden.
... this results in the
method repeatedly called as the user runs the mouse up and down the menu opening the sub-menus.
... you can test for the current popup actually being hidden with: <menupopup id="top" onpopuphidden="if(this.state != 'open'){console.log('the onpopuphidden
method of id=top was called.');};" > ...
Working With Directories - Archive of obsolete content
this
method returns true if a file object returned by nsiscriptableio.getfile() refers to a directory, and false otherwise.
... there is also a corresponding nsifile.isfile()
method to check if an object refers to a file.
... in both cases, the
method fails if the file or directory does not exist, so you should check first using nsifile.exists().
...for directories, the first argument to this
method should be the constant directory_type (which has a value of 1).
Moving, Copying and Deleting Files - Archive of obsolete content
there are several
methods of the nsifile object which may be used to move and copy files on disk.
...this
method takes two arguments, the first is the destination directory in which to copy the file to, and the second argument is the new name of the file, if you wish to rename it in its new location.
...this
method is used to navigate into subdirectories.
...this
method takes one boolean argument which indicates whether to delete recursively or not.
MoveResize - Archive of obsolete content
moving and resizing a popup menus and popups have
methods which may be used to move and resize them.
... moving a popup once a popup is open, it can be moved using the popup's moveto
method.
...this
method will change the left and top attributes to match the supplied arguments, so if these attributes are persisted the values will be restored when the window is displayed again.
... a popup can be resized manually using the popup's sizeto
method.
Panels - Archive of obsolete content
opening a panel with script the panel, like all popups, has an openpopup
method which may be used to open the popup using a script.
... for example, the following would open a panel underneath a button: panel.openpopup(button, "after_start", 0, 0, false, false); likewise, the openpopupatscreen
method will open a panel at a specific screen position.
... for more details about both
methods, see opening and closing popups.
...this function retrieves the popup and calls the hidepopup
method.
Install Scripts - Archive of obsolete content
that means that you can call the
methods of the window object with the qualifier before it, which means that window.open() can simply be written open().
... the simple
method assigns an install directory and installs all files into it.
... the second
method allows you to assign a destination on a per-file (or directory) basis.
... the first
method is described below.
More Wizards - Archive of obsolete content
then, to navigate to a page, use one of two
methods: set the next attribute on each page to the page id of the next page to go to.
... call the wizard's goto()
method.
...you might call this
method in the onpageadvanced or onwizardnext handlers.
...note that the goto()
method, because it causes a page change, will fire the events again, so you'll have to make sure you handle that case.
XPCOM Interfaces - Archive of obsolete content
mozilla provides such a
method which involves using xpcom (cross-platform component object model).
...the table below shows some of the properties and
methods of the nsilocalfile interface.
... initwithpath this
method is used to initialize the path and filename for the nsilocalfile.
...we can call the
method initwithpath() to indicate which file we mean.
arrowscrollbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a box which provides scroll arrows along its edges for scrolling through the contents of the box.
... attributes clicktoscroll, disabled, smoothscroll, tabindex properties disabled, scrollboxobject, scrollincrement, smoothscroll, tabindex
methods ensureelementisvisible, scrollbyindex, scrollbypixels examples <arrowscrollbox orient="vertical" flex="1"> <button label="red"/> <button label="blue"/> <button label="green"/> <button label="yellow"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="ma...
...
methods ensureelementisvisible( element ) return type: no return value if the specified element is not currently visible to the user, the displayed items are scrolled so that it is.
... inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattr...
preference - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] declares a preference that may be adjusted in a prefpane.
... attributes disabled, instantapply, inverted, name, onchange, readonly, tabindex, type properties defaultvalue, disabled, hasuservalue, inverted, locked, name, preferences, readonly, tabindex, type, value, valuefrompreferences
methods reset examples <preferences> <preference id="pref_id" name="preference.name" type="int"/> </preferences> see preferences system for a complete example.
...
methods reset() return type: no return value resets the preference to its default value.
... inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattr...
stringbundle - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element which can be used to load localized resources from property files.
... the "src" attribute accepts only absolute chrome:// urls (see bugs 133698, 26291) attributes src properties applocale , src, stringbundle, strings
methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings.
...
methods getformattedstring( key, strarray ) return type: string looks up the format string for the given key name in the string bundle and returns a formatted copy where each occurrence of %s (uppercase) is replaced by each successive element in the supplied array.
... 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(...
toolbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container for toolbars.
... properties accessible, customtoolbarcount, externaltoolbars, palette, toolbarset
methods appendcustomtoolbar, collapsetoolbar, expandtoolbar examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="toolbox example" width="300"> <toolbox> <toolbar> <toolbarbutton label="back"/> <toolbarbutton label="forward"/> <toolba...
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserda...
...the
method returns the dom element for the created toolbar.
tooltip - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used for the tooltip popups.
... attributes crop, default, label, noautohide, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, page, position properties accessibletype, label, popupboxobject, position, state
methods hidepopup, moveto, openpopup, openpopupatscreen, showpopup, sizeto examples <tooltip id="moretip" orient="vertical" style="background-color: #33dd00;"> <label value="click here to see more information"/> <label value="really!" style="color: red;"/> </tooltip> <vbox> <button label="simple" tooltiptext="a simple popup"/> <button label="more" tooltip="moretip"/> </vbox> attributes ...
... example: <menupopup id="top" onpopuphidden="console.log('the onpopuphidden
method of id=top was called.');"> <menuitem label="item 1"/> <menuitem label="item 2"/> <menu id="submenu1" label="submenu 1"> <menupopup id="submenu1-popup"> <menuitem label="submenu1 item 1"/> <menuitem label="submenu1 item 2"/> </menupopup> </menu> <menu id="submenu2" label="submenu 1"> <menupopup id="submenu2-popup"> <me...
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdat...
NPN_Enumerate - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary gets the names of the properties and
methods of the specified npobject.
... npobj the object of which the properties and
methods are to be retrieved.
... identifiers a pointer to receive a pointer to the start of an array of string identifiers of the names of the properties and
methods of npobj.
... returns true if the names of the properties and
methods were successfully retrieved, otherwise false.
Sunbird Theme Tutorial - Archive of obsolete content
you might be able to apply the same
method to other mozilla applications by changing some of the details.
...there are two
methods: a simple
method, and the normal
method.
... simple packaging note: if you use this simple
method to package your theme, then it can take up much more disk space than it really needs.
... you might prefer to use this
method only while you are developing your theme, and to use the normal
method for public releases.
Date.prototype.toLocaleFormat() - Archive of obsolete content
the non-standard tolocaleformat()
method converts a date to a string using the specified formatting.
... description the tolocaleformat()
method provides greater software control over the formatting of the generated date and/or time.
... extension and xulrunner developers should know that just loading the format string from a .dtd or .properties file using a chrome://somedomain/locale/somefile.ext uri should be avoided, as the .dtd/.properties file and the tolocaleformat()
method does not not necessarily use the same locale, which could result in odd looking or even ambiguous or unreadable dates.
...you might consider using some of the more general tolocale*
methods of the date object or doing your own custom localization of the date to be displayed using some of the get*
methods of the date object instead of using this
method.
ECMAScript 5 support in Mozilla - Archive of obsolete content
supported features added in javascript 1.8.5 (gecko 2, firefox 4 and later) firefox 4 has full ecmascript 5 support including the object.*
methods and strict mode.
... added in javascript 1.8.1 (gecko 1.9.1, firefox 3.5) native json support object.getprototypeof()
method.
... string.trim()
method, which trims whitespace from both ends of the string.
... added in javascript 1.6 (gecko 1.8, firefox 1.5) new array
methods offering several improved
methods for manipulating arrays -- have been part of javascript since javascript 1.6.
LiveConnect - Archive of obsolete content
liveconnect provides javascript with the ability to call
methods of java classes and vice-versa using the existing java infrastructure.
... liveconnect reference the java classes used for liveconnect, along with their constructors and
methods.
... liveconnect use by applets is enabled via the use of the "mayscript" attribute in applet tags on an html page, following which the applet may refer to classes in the netscape.javascript package to access javascript objects, and scripts may directly call applet
methods (using the syntax document.applets.name.
methodname()).
... old liveconnect documents, broken links: java
method overloading and liveconnect 3 the technique that liveconnect uses to invoke overloaded java
methods from javascript.
JavaClass - Archive of obsolete content
you can pass a javaclass object to a java
method which requires an argument of type java.lang.class.
... backward compatibility javascript 1.3 and earlier you must create a wrapper around an instance of java.lang.class before you pass it as a parameter to a java
method -- javaclass objects are not automatically converted to instances of java.lang.class.
...
methods the
methods of a javaclass object are the static
methods of the java class.
... example in the following example, the javaclass object java.lang.string is passed as an argument to the newinstance
method which creates an array: var cars = java.lang.reflect.array.newinstance(java.lang.string, 15); see also javaarray, javaobject, javapackage, packages ...
Packages - Archive of obsolete content
you can automatically access it without using a constructor or calling a
method.
... description the packages object lets you access the public
methods and fields of an arbitrary java class from within javascript.
...use standard java dot notation to access the classes,
methods, and fields in these packages.
...the setsize, settitle, and setvisible
methods are all available to javascript as public
methods of java.awt.dialog.
Implementation Status - Archive of obsolete content
etinstancedocument() supported 4.8.2 rebuild() supported 4.8.3 recalculate() supported 4.8.4 revalidate() supported 4.8.5 refresh() supported 4.9 feature string for the hasfeature
method call supported 5.
...xforms submission model section title status notes bugs 11.1 submission partial from 1.1 we do not yet support @mode, @indent, @replace='text', @separator, @serialize, @target, header or
method child elements 11.2 xforms-submit partial we currently limit (for security reasons) submission only back to the server that served the document.
... 330557; 11.3 xforms-submit-serialize supported 11.4 xforms-submit-done supported 11.5 xforms-submit-error supported 11.6.1 resource supported 11.7.1
method unsupported 11.8 header unsupported 11.8.1 name unsupported 11.8.2 value unsupported 11.9 submission options supported 11.9.1 the get submission
method supported ...
... 11.9.2 the post, multipart-post, form-data-post, and urlencoded-post submission
methods supported 11.9.3 the put submission
method supported 11.9.4 the delete submission
method unsupported 11.9.5 serialization as application/xml supported 11.9.6 serialization as multipart/related partial 330557; 11.9.7 serialization as multipart/form-data supported 11.9.8 serialization as application/x-www-form-urlencoded supported 11.10 replacing data with the submission response ...
The Business Benefits of Web Standards - Archive of obsolete content
web standards gives us tools, and
methodologies for dealing with this paradox and making the wider contribution of making our content universally accessible to people in different social, medical and economic circumstances.
... happier staff good developers - both agency and inhouse - simply do not want to work using outdated
methodologies and platforms with uncertain standards, with all the consequent uncertainty in quality.
... the content - markup - style; model also lends itself very neatly to linear
methods of production.
... sites which are built using web standards
methodologies, processes and practises perform far better for every single metric.
Organizing your CSS - Learn web development
consistency can be applied in all sorts of ways, such as using the same naming conventions for classes, choosing one
method of describing color, or maintaining consistent formatting (for example will you use tabs or spaces to indent your code?
... css
methodologies instead of needing to come up with your own rules for writing css, you may benefit from adopting one of the approaches already designed by the community and tested across many projects.
... these
methodologies are essentially css coding guides that take a very structured approach to writing and organising css.
... however, you do gain a lot of structure by adopting one and, as many of these systems are very widely used, other developers are more likely to understand the approach you are using and be able to write their css in the same way, rather than having to work out your own personal
methodology from scratch.
Floats - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to learn how to create floated features on webpages, and to use the clear property and other
methods of clearing floats.
...gin: 0 auto; font: .9em/1.2 arial, helvetica, sans-serif } .wrapper { background-color: rgb(79,185,227); padding: 10px; color: #fff; } .box { float: left; margin: 15px; width: 150px; height: 150px; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } .wrapper::after { content: ""; clear: both; display: block; } using overflow an alternative
method is to set the overflow property of the wrapper to a value other than visible.
...see the article on legacy layout
methods for information on how they used to be used, which may be useful if you find yourself working on older projects.
... previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout
methods supporting older browsers fundamental layout comprehension assessment ...
Choosing the right approach - Learn web development
further information introducing asynchronous javascript, in particular async callbacks settimeout() settimeout() is a
method that allows you to run a function after an arbitrary amount of time has passed.
... further information cooperative asynchronous javascript: timeouts and intervals, in particular settimeout() settimeout() reference setinterval() setinterval() is a
method that allows you to run a function repeatedly with a set interval of time between each execution.
... further information cooperative asynchronous javascript: timeouts and intervals, in particular setinterval() setinterval() reference requestanimationframe() requestanimationframe() is a
method that allows you to run a function repeatedly, and efficiently, at the best framerate available given the current browser/system.
...> { // depending on what type of file is being fetched, use the relevant function to decode its contents if(type === 'blob') { return response.blob(); } else if(type === 'text') { return response.text(); } }) .catch(e => { console.log(`there has been a problem with your fetch operation for resource "${url}": ` + e.message); }); } // call the fetchanddecode()
method to fetch the images and the text, and store their promises in variables let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', 'text'); // use promise.all() to run code only when all three function calls have resolved promise.all([coffee, tea, description]).then(values => { console.log(values); // st...
Functions — reusable blocks of code - Learn web development
functions versus
methods programmers call functions that are part of objects
methods.
...for now, we just wanted to clear up any possible confusion of
method versus function — you are likely to meet both terms as you look at the available related resources across the web.
... the built-in code we've made use of so far come in both forms: functions and
methods.
... you can check the full list of the built-in functions, as well as the built-in objects and their corresponding
methods here.
Basic math in JavaScript — numbers and operators - Learn web development
useful number
methods the number object, an instance of which represents all standard numbers you'll use in your javascript, has a number of useful
methods available on it for you to manipulate numbers.
... for example, to round your number to a fixed number of decimal places, use the tofixed()
method.
... note: you may sometimes see exponents expressed using the older math.pow()
method, which works in a very similar way.
...troubleshooting javascript storing the information you need — variables basic math in javascript — numbers and operators handling text — strings in javascript useful string
methods arrays assessment: silly story generator ...
Package management basics - Learn web development
the package manager will provide a
method to install new dependencies (also referred to as "packages"), manage where packages are stored on your file system, and offer capabilities for you to publish your own packages.
...the date-fns package’s formatdistancetonow()
method is useful for this (there's other packages that do the same thing too).
...it differs in that it uses a different
method for downloading and storing the packages on your computer, aiming to reduce the overall disk space required.
... in addition, the npm (and yarn) commands are clever in that they will search for command line tools that are locally installed to the project before trying to find them through conventional
methods (where your computer will normally store and allow software to be found).
Listening to events on all tabs
adding a listener to listen to progress events on all tabs, call the browser's addtabsprogresslistener()
method: gbrowser.addtabsprogresslistener(myprogresslistener); myprogresslistener is an object that implements the callbacks used to provide notifications of progress events.
... removing a listener to remove a previously installed progress listener, call removetabsprogresslistener(): gbrowser.removetabsprogresslistener(myprogresslistener); implementing a listener the listener object itself has five
methods it can implement to handle various events: onlocationchange called when the uri of the document displayed in the tab changes.
...this
method will be called on security transitions (eg http -> https, https -> http, foo -> https) and after document load completion.
...if any registered progress listener returns false from this
method then the attempt to refresh will be blocked.
Experimental features in Firefox
nightly 74 no developer edition 74 no beta 74 no release 74 no preference name dom.input_events.beforeinput.enabled htmlmediaelement
method: setsinkid() htmlmediaelement.setsinkid() allows you to set the sink id of an audio output device on an htmlmediaelement, thereby changing where the audio is being output.
... nightly 66 no developer edition 66 no beta 66 no release 66 no preference name dom.media.autoplay.autoplay-policy-api geometryutils
methods: convertpointfromnode(), convertrectfromnode(), and convertquadfromnode() the geometryutils
methods convertpointfromnode(), convertrectfromnode(), and convertquadfromnode() map the given point, rectangle, or quadruple from the node on which they're called to another node.
... nightly 31 yes developer edition 31 no beta 31 no release 31 no preference name layout.css.getboxquads.enabled geometryutils
method: getboxquads() the geometryutils
method getboxquads() returns the css boxes for a node relative to any other node or viewport.
... nightly 71 yes developer edition 71 no beta 71 no release 71 no preference name dom.media.mediasession.enabled asynchronous sourcebuffer add and remove this adds the promise-based
methods appendbufferasync() and removeasync() for adding and removing media source buffers to the sourcebuffer interface.
mozbrowsershowmodalprompt
the mozbrowsershowmodalprompt event is fired when the content of a browser <iframe> calls the window.alert(), window.confirm(), or window.prompt()
methods.
... message a domstring representing the value passed to the window.alert(), window.confirm(), or window.prompt()
methods within the browser <iframe>'s content.
... returnvalue a domstring representing the return value for the window.prompt()
methods.
... initialvalue a string representing the initial value for the window.prompt()
methods.
Introduction to Layout in Mozilla
creates a content sink, which is linked to the parser and the document creates a documentviewerimpl object, which is returned as nsicontentviewer back to the docshell documentviewerimpl creates pres context and pres shell content model construction content arrives from network via nsistreamlistener::ondataavailable parser tokenizes & processes content; invokes
methods on nsicontentsink with parser node objects some buffering and fixup occurs here opencontainer, closecontainer, addleaf content sink creates and attaches content nodes using nsicontent interface content sink maintains stack of “live” elements more buffering and fixup occurs here insertchildat, appendchildto, removechildat frame constructio...
... w, h) for frames, views, and widgets given w & h constraints of “root frame” compute (x, y, w, h) for all children constraints propagated “down” via nshtmlreflowstate desired size returned “up” via nshtmlreflowmetrics basic pattern parent frame initializes child reflow state (available w, h); places child frame (x, y); invokes child’s reflow
method child frame computes desired (w, h), returns via reflow metrics parent frame sizes child frame and view based on child’s metrics n.b.
...(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, nsipressshell::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” incremental ...
...ry 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” parser and content sink do some buffering content sink has “notification limits” efficiency vs.
Dict.jsm
method overview 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 ...
... return value a newly created dictionary object implementing the
methods described in this article.
...
methods copy() returns a shallow copy of the dictionary; that is, a copy of the dictionary including the items immediately included within the dictionary; however, any objects referenced by those top-level objects are not copied.
... return value a new dictionary object containing the same top-level items as the original dictionary on which the copy()
method was called.
DownloadSummary
method overview promise bindtolist(downloadlist alist); promise addview(object aview); promise removeview(object aview); properties attribute type description allhavestopped read only boolean indicates whether all the downloads are currently stopped.
...
methods bindtolist() this
method may be called once to bind this object to a downloadlist.
... note: this
method is already called internally by the downloads.getsummary() function.
...the following
methods may be defined: onsummarychanged: optional called after any property of the summary has changed.
Localization and Plurals
this module provides a couple
methods for localizing to the browser's current locale as well as getting
methods to localize to a desired plural rule.
... components.utils.import("resource://gre/modules/pluralform.jsm");
methods: get these
methods make use of the browser's current locale specified by chrome://global/locale/intl.properties's pluralrule value.
... /** * get the correct plural form of a word based on the number * * @param anum * the number to decide which plural form to use * @param awords * a semi-colon (;) separated string of words to pick the plural form * @return the appropriate plural form of the word */ string pluralform get(int anum, string awords) here is an example of using this
method: // load pluralform and for this example, assume english components.utils.import("resource://gre/modules/pluralform.jsm"); // pluralform.get expects a semi-colon separated list of words let downloads = "download;downloads"; // pretend this number came from somewhere else let num = 10; // display the correct plural form for 10 downloads: "you have 10 downloads.") print("you have " + num + " " + pluralform.get(num, download...
...let title = pluralform.get(numdownloads, getstr("downloadstitlefiles")); // put in the correct number of downloads print(title.replace("#1", numdownloads)); // get the correct plural form of seconds let timeleft = 55; let seconds = pluralform.get(timeleft, getstr("seconds")); // print the localized string for "55 seconds" print(getstr("timepair").replace("#1", timeleft).replace("#2", seconds));
method: makegetter if you're writing an extension, you'll want to use makegetter instead of pluralform.get() or pluralform.numforms().
Mozilla Style System Documentation
these three types of style contexts correspond to the three ways of creating a style context: nsiprescontext::resolvestylecontextfor, nsiprescontext::resolvepseudostylecontextfor, and.nsiprescontext::resolvestylecontextfornonelement there is also a fourth
method, nsiprescontext::probepseudostylecontextfor, which creates a style context only if there are style rules that match the pseudo-element.
...these
methods may all return an existing style context rather than a new one (see stylesetimpl::getcontext), if there is a current style context with the same parent, that matches the same rules (a check that is easy because of the ruletree), and is for the same pseudo-element (or not for a pseudo-element, or a "non-element").
... getting style data from a style context to get style data from a style context, use the getstyledata
method to fill in a pointer to a style struct.
... the fundamental way to get a style struct from a style context looks like this: const nsstyledisplay *display = ns_static_cast(const nsstyledisplay*, sc->getstyledata(estylestruct_display)); there is also a (non-virtual)
method on nsiframe to get the style data from a frame's style context (saving the refcounting needed to get the style context): const nsstyledisplay *display; frame->getstyledata(estylestruct_display, (const nsstylestruct*&)display); however, there are similar typesafe global function templates that (should) compile to the same thing but use the type of the template parameter to pass the correct nsst...
A brief guide to Mozilla preferences
a preference is read from a file, and can call up to four
methods: pref(), user_pref(), sticky_pref() and lockpref().
...programmatic changes to preferences can be made using the preferences.jsm module from js code, or the mozilla::preferences static class
methods from c++ code.
...this
method has the advantage of resetting preferences back to administrator defaults at every start-up.
...this
method is considered user-hostile.
About NSPR
additionally, nspr provides synchronization
methods more suited for use by java.
...it was originally intended to export synchronous i/o
methods only, relying on threads to provide the concurrency needed for complex applications.
... that
method of operation is preferred though it is possible to configure the network i/o channels as non-blocking in the traditional sense.
...while the object is not declared as opaque, the api provides
methods that allow and encourage clients to treat the addresses as polymorphic items.
Index
implemented extensions the extensions defined for crl provide
methods for associating additional attributes with crls of theirs entries.
... -m
method type sets
method type for the test type it follows.
... -s
method flags sets revocation flags for the
method it follows.
...this article covers the two
methods for installing pkcs #11 modules into firefox.
Rhino overview
however, rhino is an implementation of the core language only and doesn't contain objects or
methods for manipulating html documents.
...the value of this property can be determined at runtime by calling the issecuritydomainrequired
method of context.
...if it is the interpreter class, call the getinterpretersecuritydomain()
method of context to obtain the security domain of the currently executing interpreted script or function.
...when the class was defined and loaded, the appropriate security domain was associated with it, and can be retrieved by calling this
method.
The JavaScript Runtime
instead, every property accessor
method in scriptable (has, get, set, remove, getattributes, and setattributes) has overloaded forms that take either a string or an int argument.
...for example, evaluating the expression obj["3"] will invoke the get(int, scriptable)
method even though the property name was presented in the script as a string.
...this
method defines a set of javascript objects using a java class.
... if the services provided by defineclass are insufficient, try other
methods of scriptableobject and functionobject, such as defineproperty and definefunctionproperties.
Self-hosted builtins in SpiderMonkey
otoh, normal
method calls are forbidden in self-hosted code.
...this restriction was added because otherwise it's extremely easy to accidentally call
methods that have been changed by content, changing the behavior from what was expected.
... to add a self-hosted function as a
method to a host object, add it to that host object's jsfunctionspec array using the js_self_hosted_fn macro.
... example: js_self_hosted_fn("foreach", "arrayforeach", 1,0) this causes the self-hosted function arrayforeach to be installed as the host object's
method foreach.
JS::CompileOptions
methods some
methods of js::owningcompileoptions and js::compileoptions return the instance itself to allow
method chain.
...
methods of js::readonlycompileoptions
method description bool mutederrors() const determines if errors are muted.
...
methods of js::owningcompileoptions
method description jsobject *element() const returns the dom element to which this source code belongs, if any, or null if it belongs to no dom element.
...
methods of js::compileoptions
method description jsobject *element() const same as js::owningcompileoptions.
JS::MutableHandle
}
methods here, ptr represents the private member of js::mutablehandle<t>, typed with t *.
...
method description const t &get() const returns *ptr.
...it is used in the same way as js::handle<t> and includes a |set(const t &v)|
method to allow updating the value of the referenced js::rooted<t>.
... if you want to add additional
methods to js::mutablehandle for a specific specialization, define a js::mutablehandlebase<t> specialization containing them.
JSFastNative
apis such as js_initclass and js_definefunctions can create custom
methods that are implemented as c/c++ functions of this type, instead of jsnative.
... native
methods must not call js_callee after calling js_set_rval.
... native
methods must not call js_this after calling js_set_rval.
... native
methods must not call js_this_object after calling js_set_rval.
JS_DefineFunction
obj js::handle<jsobject*> object for which to define a function as a property (
method).
... description js_definefunction exposes a c/c++ function to scripts by defining a new
method on an existing javascript object.
... it creates the new function object as though by calling js_newfunction, then makes it a
method of obj as though by calling js_defineproperty.
...that is, it is the
method name that scripts can use to call the new function.
JS_Init
once this
method has succeeded, it is safe to call js_newruntime and other jsapi
methods.
... this
method must be called before any other jsapi
method is used on any thread.
... once it has been used, it is safe to call any jsapi
method, and it remains safe to do so until js_shutdown is correctly called.
... it is currently not possible to initialize spidermonkey multiple times (that is, calling js_init, jsapi
methods, then js_shutdown in that order, then doing so again).
Feed content access API
est = new xmlhttprequest(); httprequest.open("get", feedurl, true); try { httprequest.onload = inforeceived; httprequest.send(null); } catch(e) { alert(e); } } the nsifeedprocessor interface lets you parse the feed data from several possible sources; in this case, we're loading a document into a string, then parsing that string using its parsefromstring()
method.
...the actual processing of the parsed feed is done by a
method called handleresult() on the feedtestresultlistener object.
...we could, alternatively, use its plaintext()
method to get a copy of the title translated into plain text.
...the full url of the link is retrieved using the link's resolve()
method.
Using the Places keywords API
using the keywords api the keywords api is a promise-based api available through the placesutils module: components.utils.import("resource://gre/modules/xpcomutils.jsm"); xpcomutils.definelazymodulegetter(this, "placesutils", "resource://gre/modules/placesutils.jsm"); setting a keyword for an url the insert()
method accepts a keyword entry object describing the keyword to insert.
... fetching an entry by keyword the fetch()
method acceps a keyword string (or an object having a keywords property) and might resolve to a keyword entry with the following properties: keyword: string representing the keyword url: the url represeted by the keyword postdata: optional post data string.
... placesutils.keywords.fetch("my_keyword").then(entry => { /* entry is either null, or a keyword entry */ }, e => { /* failure */}); fetching entries by url the fetch()
method also accepts a keyword entry, where it's possible to specify keyword, url, or both.
... placesutils.keywords.fetch({ url: "http://www.example.com/" }, entry => { /* invoked for each found keyword entry */ }) .then(oneentry => { /* oneentry is either null, or one of the keyword entries */ }, e => { /* failure */}); removing a keyword the remove()
method accepts a keyword string.
Using the Places tagging service
the tagging service, offered by the nsitaggingservice interface, provides
methods to tag and untag a uri, to retrieve uris for a given tag, and to retrieve all tags for a uri.
... initiating the tagging service before using the tagging service, you need to obtain a reference to an instance of it: var taggingsvc = components.classes["@mozilla.org/browser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice); tagging a uri the nsitaggingservice.taguri()
method tags a url with the given set of tags.
... tagginsvc.untaguri(uri("http://example.com/"), ["tag 1"]); //first argument = uri //second argument = array of tag(s) finding all urls with a given tag the nsitaggingservice.geturisfortag()
method returns an array of all urls tagged with the given tag.
... var tag1uris = taggingsvc.geturisfortag("tag 1"); //"tag 1" = given tag getting all tags associated with a url the nsitaggingservice.gettagsforuri()
method returns an array of all tags set for the given url.
Aggregating the In-Memory Datasource
say you were writing a datasource2, and the way you chose to implement it was to "wrap" the in-memory datasource; i.e., myclass : public nsimyinterface, public nsirdfdatasource { private: nscomptr<nsirdfdatasource> minner; public: // nsirdfdatasource
methods ns_i
method init(const char* auri) { return minner->init(auri); } ns_i
method geturi(char* *auri) { return minner->geturi(auri); } // etc., for each
method in nsirdfdatasource!
... when it won't work although this magic is terribly convenient to use, it won't work in the case that you want to "override" some of the in-memory datasource's
methods.
... for us to preserve symmetry, our queryinterface() implementation needs to forward nsirdfdatasource to the delegate3: ns_i
methodimp myclass::queryinterface(refnsiid aiid, void** aresult) { ns_precondition(aresult != nsnull, "null ptr"); if (!
...for example: ns_i
methodimp myclass::dosomething() { nscomptr<nsirdfdatasopurce> ds = do_queryinterface(minner); rv = ds->assert(/* something useful here */); // etc...
Bundling multiple binary components
possible solutions this article covers two possible ways to make binary components support multiple version of gecko: dynamic
method loading stub loader dynamic
method loading the idea with this approach is to figure out all the
methods imported from gecko and dynamically load the
methods.
... create small wrappers for calling the
methods, as you may need to thunk parameters depending on how much has changed between gecko versions.
... this approach uses only one binary for each platform (win/mac/linux) but creates complexity in the binaries - loading the
methods and creating the wrappers.
... the costs get higher if you have many
methods that need to be loaded.
Fun With XBL and XPConnect
all you have to do is specifically defining a
method on the xbl widget which forwards the
method call to the xpcom object.
... <
method name="autocomplete"> <argument name="asearchstring"/> <argument name="resultlistener"/> <body> <![cdata[ return this.autocompletesession.autocomplete(null, anonymouscontent[0], asearchstring, this.autocompletelistener); ]]> </body> </
method> you can see that the body of the
method is just getting the auto complete session object and calling the auto complete
method on it.
... now i can pass the result of autocompletelistener into
methods that require an auto complete listener (like my auto complete session object).
...the handler calls the auto complete
method we've exposed on the widget which in turn forwards the call to the xpcom object, passing in our implementation of nsiautocompletelistener.
Component Internals
a component in the xpcom framework when you build a component or module and compile it into a library, it must export a single
method named nsgetmodule.
... registration
methods in xpcom what is xpcom registration?
...as this section and the next describe, you can register your component explicitly during installation, or with the regxpcom program, or you can use the autoregistration
methods in the service manager to find and register components in a specified components directory: xpinstall apis regxpcom command-line tool nsicomponentregistrar apis from service manager the registration process is fairly involved.
...when that
method is called, the following sequence of events occurs: xpcom fires a shutdown notification to all registered observers.
Packaging WebLock
the installation script for the weblock component can also be used to register the component with the browser into which it is installed (see registration
methods in xpcom for more information on registration).
... javascript apis from the xpinstall install object download the jar in which the installable files appear and call registration
methods that tell mozilla about the new component and the ui it uses to access the weblock component.
...once triggered (see the weblock trigger script), the installation script: downloads the weblock component and places it in the components directory copies the weblock subdirectory in the mozilla chrome application subdirectory registers both the component and the ui the xpinstall api provides such essential
methods[essential-
methods] as initinstall, registerchrome, addfile, and others.
... note: install-object-
methods the
methods are available on the main install object, which is implied in the script below in the same way that the window object is implied in javascript manipulation of the dom of a web page.
Creating XPCOM components
note:this article describes a
method that uses xpidl but you should use webidl instead.
...reface who should read this book organization of the tutorial following along with the examples conventions acknowledgements an overview of xpcom the xpcom solution gecko components interfaces interfaces and encapsulation the nsisupports base interface xpcom identifiers cid contract id factories xpidl and type libraries 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 script 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 registration alternatives overview of the weblock module source digging in: required includes and constants identifiers in xpcom coding for the registration process the registration
methods creating an instance of your component weblock1.cpp using xpcom utilities to make things easier xpcom macros generic xpcom module macros common implementation macros declaration macros weblock2.cpp string classes in ...
...orts 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 manipulating files with nsifile using nsilocalfile for reading data processing the white list data iweblock
method by
method lock and unlock addsite removesite setsites getnext getsites hasmoreelements finishing the component using frozen interfaces copying interfaces into your build environment implementing the nsicontentpolicy interface receiving notifications implementing the nsicontentpolicy uniform resource locators checking the white list creating nsiuri ob...
How to build a binary XPCOM component using Visual Studio
that means you can call javascript
methods from c++ and vice versa.
...the interface defines the
methods, including arguments and return types, of the component.
...the implementation is where the
methods actually do the work.
...thing(); private: ~cspecialthing(); protected: /* additional members */ nsstring mname; }; #endif cpp file: #include "comp-impl.h" ns_impl_isupports1(cspecialthing, ispecialthing) cspecialthing::cspecialthing() { /* member initializers and constructor code */ mname.assign(l"default name"); } cspecialthing::~cspecialthing() { /* destructor code */ } /* attribute astring name; */ ns_i
methodimp cspecialthing::getname(nsastring & aname) { aname.assign(mname); return ns_ok; } ns_i
methodimp cspecialthing::setname(const nsastring & aname) { mname.assign(aname); return ns_ok; } /* long add (in long a, in long b); */ ns_i
methodimp cspecialthing::add(print32 a, print32 b, print32 *_retval) { *_retval = a + b; return ns_ok; } lastly, we need to create the module implementation.
Components.Constructor
the component is then returned immediately, with only the base interface nsisupports available on it; you must call nsisupports.queryinterface() on it to call
methods on the object.
... "nsibinaryinputstream"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsibinaryinputstream]" // someinputstream is an existing nsiinputstream bis.setinputstream(someinputstream); // succeeds if three arguments are given, then in addition to being nsisupports.queryinterface()'d, the instance will also have had an initialization
method called on it.
... the arguments used with the initialization
method are the arguments passed to the components.constructor()-created function when called: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream", "setinputstream"); try { // throws, because number of arguments isn't equal to the number of // arguments nsibinaryinputstream.setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.readbytearray(somenumberofbytes); // succeeds } compare instance creation from base principles with instance creation using componen...
...binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bis.setinputstream(someinputstream); // assumes binaryinputstream was initialized previously var bis = new binaryinputstream(someinputstream); components.constructor() is purely syntactic sugar (albeit speedy and pretty syntactic sugar) for actions that can be accomplished using other common
methods.
Components.classes
all of the properties and
methods of the nsijscid and its ancestor interface nsijsid are available for use on the objects contained in this object.
... usage in order to retrieve the object for a given contractid, you can query the components.classes array as follows: var clazz0 = components.classes["@mozilla.org/messenger;1"]; clazz0 is the class object for the contractid @mozilla.org/messenger;1, which is not usually used by itself, but whose createinstance and getservice
methods can be used to create a new instance of the component or to access the singleton instance, if the contract id represents a service.
... .createinstance(components.interfaces.nsisupportsarray); which is a shortcut to var obj = components.classes["@mozilla.org/supports-array;1"] .createinstance(); obj.queryinterface(components.interfaces.nsisupportsarray); if you don't provide a specific interface to createinstance(), it will return an xpconnect wrapper for the component, which only exposes the
methods of the nsisupports interface (and under certain circumstances the special wrappedjsobject property).
... var os = cc["@mozilla.org/observer-service;1"] .getservice(ci.nsiobserverservice); a less known trick, useful when creating multiple instances of the same component, is to use the new operator on the class object: var clazz = components.classes["@mozilla.org/supports-array;1"]; var inst = new clazz(components.interfaces.nsisupportsarray); this implicitly calls the createinstance()
method for you.
Components.utils.setGCZeal
this
method lets scripts set the zeal level for garbage collection.
... you can get details on what this
method does in js_setgczeal.
... this
method calls through to that thusly: js_setgczeal(<current context>, zeal, js_default_zeal_freq, false); syntax components.utils.setgczeal(zeal); where zeal is the zeal value you wish to use.
... this
method has no effect unless running in a debug build.
Components object
utils.lookup
method looks up a native (i.e.
... declared in the interface)
method or property of an xpcom object.
... utils.
methodjit obsolete since gecko 24.0 provides access to the value of the
methodjit property in the javascript environment.
... utils.
methodjit_always obsolete since gecko 24.0 provides access to the value of the
methodjit_always property in the javascript environment.
NS_OVERRIDE
ns_override is a macro which allows c++ code in mozilla to specify that a
method is intended to override a base class
method.
... if there is no base class
method with the same signature, a compiler with static-checking enabled will fail to compile.
...example class a has a
method getfoo() which is overridden by class b: class a { virtual nsresult getfoo(nsifoo** aresult); }; class b : public a { ns_override virtual nsresult getfoo(nsifoo** aresult); }; later, the signature of a::getfoo() is changed to remove the output parameter: class a { - virtual nsresult getfoo(nsifoo** aresult); + virtual already_addrefed<nsifoo> getfoo(); }; b::getfoo() no longer overrides a::getfoo() as was originally intended.
... a compiler with static-checking enabled will issue the following error: test.cpp:8: error: ns_override function b::getfoo(nsifoo**) does not override a base class
method with the same name and signature.
IAccessibleAction
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) every accessible object that can be manipulated via the native gui beyond the
methods available either in the msaa iaccessible interface or in the set of iaccessible2 interfaces (other than this iaccessibleaction interface) should support the iaccessibleaction interface in order to provide assistive technology access to all the actions that can be performed by the object.
...
method overview [propget] hresult description([in] long actionindex, [out] bstr description ); hresult doaction([in] long actionindex ); [propget] hresult keybinding([in] long actionindex, [in] long nmaxbindings, [out, size_is(,nmaxbindings), length_is(, nbindings)] bstr keybindings, [out] long nbindings ); [propget] hresult localizedname([in] long actionindex, [out] bstr localizedname ); hre...
...sult nactions([out,retval] long nactions ); [propget] hresult name([in] long actionindex, [out] bstr name );
methods description() returns a description of the specified action of the object.
...there is no need to implement this
method for single action controls since that would be redundant with the standard msaa programming practice of getting the mnemonic from get_acckeyboardshortcut.
IAccessibleEditableText
refer to the @ref _specialoffsets "special offsets for use in the iaccessibletext and iaccessibleeditabletext
methods" for information about a special offset constant that can be used in iaccessibleeditabletext
methods.
...
method overview hresult copytext([in] long startoffset, [in] long endoffset ); hresult cuttext([in] long startoffset, [in] long endoffset ); hresult deletetext([in] long startoffset, [in] long endoffset ); hresult inserttext([in] long offset, [in] bstr text ); hresult pastetext([in] long offset ); hresult replacetext([in] long startoffset, [in] long endoffset, [in] bstr text ); hresult setattributes([in] long startoffset, [in] long endoffset, [in] bstr attributes );
methods copytext() copies the text range into the clipboard.
...this
method is similar to the inserttext().
...this
method is equivalent to calling first deletetext() with the two indices and then calling inserttext() with the replacement text at the start index.
IAccessibleValue
method overview [propget] hresult currentvalue([out] variant currentvalue ); [propget] hresult maximumvalue([out] variant maximumvalue ); [propget] hresult minimumvalue([out] variant minimumvalue ); hresult setcurrentvalue([in] variant value );
methods currentvalue() returns the value of this object as a number.
...it does not have to be the same type as that returned by
method currentvalue().
...it does not have to be the same type as that returned by
method currentvalue().
...the argument is clipped to the valid interval whose upper and lower bounds are returned by the
methods maximumvalue() and minimumvalue(), that is if it is lower than the minimum value the new value will be the minimum and if it is greater than the maximum then the new value will be the maximum.
imgIContainerObserver
1.0 66 introduced gecko 1.7 inherits from: nsisupports last changed in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) if you wish to listen for activities on an imgicontainer, you should implement the framechanged()
method.
...
method overview void framechanged(in imgirequest arequest, in imgicontainer acontainer, [const] in nsintrect adirtyrect); native code only!
...
methods native code only!framechanged called when the frame for an image container has changed.
... notes the arequest parameter was added to this
method in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9).
imgIDecoder
method overview void close(); void flush(); void init(in imgiload aload); unsigned long writefrom(in nsiinputstream instr, in unsigned long count);
methods close() closes the stream.
...this object also implements the imgidecoderobserver interface; you should queryinterface() it to that interface and call its notification
methods while handling the decode operation.
... implementer's note: this
method is defined by this interface in order to let the output stream efficiently copy the data from the input stream into its internal buffer (if any).
... if this
method was provided as an external facility, a separate char * buffer would need to be used in order to call the output stream's other write()
method.
imgIRequest
inherits from: nsirequest last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
method overview void cancelandforgetobserver(in nsresult astatus); imgirequest clone(in imgidecoderobserver aobserver); void decrementanimationconsumers(); imgirequest getstaticrequest(); void incrementanimationconsumers(); void lockimage(); void requestdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with.
... cors_anonymous 2 cors_use_credentials 3
methods cancelandforgetobserver() cancels this request as in nsirequest.cancel(); further, also nulls out decoderobserver so it gets no further notifications from us.
...getstaticrequest() if this request is for an animated image, the
method creates a new request which contains the current frame of the image.
...imgicontainer has a requestdecode
method, but callers may want to request a decode before the container has necessarily been instantiated.
mozIJSSubScriptLoader
method overview jsval loadsubscript(in string url, in object targetobj optional, in string charset optional); jsval loadsubscriptwithoptions(in string url, in object options);
methods loadsubscript() synchronously loads and executes the script from the specified url.
... if the script returns a value, it will be returned by this
method.
... note: this
method must only be called from javascript!
... note: this
method must only be called from javascript!
mozIStorageFunction
last changed in gecko 1.9.1.4 (firefox 3.5.4) inherits from: nsisupports
method overview nsivariant onfunctioncall(in mozistoragevaluearray afunctionarguments);
methods onfunctioncall() the implementation of the function.
... javascript starting in gecko 1.9.1.4 (firefox 3.0.15), you can directly pass your function into the mozistorageconnection
method mozistorageconnection, like this: dbconn.createfunction("square", 1, function(aarguments) { let value = aarguments.getint32(0); return value * value; }); // run some query that uses the function.
... let stmt = dbconn.createstatement("select square(value) from some_table"); try { while (stmt.executestep()) { // handle the results } } finally { stmt.reset(); } in earlier versions of gecko, however, you'll need to actually create an object containing the onfunctioncall
method.
...class squarefunction : public mozistoragefunction { public: ns_i
method onfunctioncall(mozistoragevaluearray *aarguments, nsivariant **_result) { print32 value; nsresult rv = aarguments->getint32(&value); ns_ensure_success(rv, rv); nscomptr<nsiwritablevariant> result = do_createinstance("@mozilla.org/variant;1"); ns_ensure_true(result, ns_error_out_of_memory); rv = result->setasint64(value * value); ns...
nsIAlertsService
implemented by: @mozilla.org/alerts-service;1 as a service: var alertsservice = components.classes["@mozilla.org/alerts-service;1"] .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 nsiprincipal principal,[optional] in boolean inprivatebrowsing);...
... void closealert([optional] in astring name, [optional] in nsiprincipal principal);
methods showalertnotification() displays a notification window.
...it must implement an observe()
method that accepts three parameters: subject: always null.
... data: the value of the cookie parameter passed into the showalertnotification
method.
nsIAuthPrompt
to create an instance, use: var authprompt = components.classes["@mozilla.org/login-manager/prompter;1"] .createinstance(components.interfaces.nsiauthprompt);
method overview boolean prompt(in wstring dialogtitle, in wstring text, in wstring passwordrealm, in pruint32 savepassword, in wstring defaulttext, out wstring result); boolean promptpassword(in wstring dialogtitle, in wstring text, in wstring passwordrealm, in pruint32 savepassword, inout wstring pwd); boolean promptusernameandpassword(in wstring dialogtitle, in wstring text...
...
methods prompt() this
method puts up a text input dialog with ok and cancel buttons.
... promptpassword() this
method puts up a password dialog with ok and cancel buttons.
... promptusernameandpassword() this
method puts up a username/password dialog with ok and cancel buttons.
nsICategoryManager
to use this service, use: var categorymanager = components.classes["@mozilla.org/categorymanager;1"] .getservice(components.interfaces.nsicategorymanager);
method overview string addcategoryentry(in string acategory, in string aentry, in string avalue, in boolean apersist, in boolean areplace); void deletecategory(in string acategory); void deletecategoryentry(in string acategory, in string aentry, in boolean apersist); nsisimpleenumerator enumeratecategories(); nsisimpleenumerator enumeratecategory(in string a...
...category); string getcategoryentry(in string acategory, in string aentry);
methods addcategoryentry() this
method sets the value for the given entry on the given category.
... note: if the category does not exist, then this
method does nothing.
... note: if the category does not exist, then this
method does nothing.
nsIClassInfo
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview nsisupports gethelperforlanguage(in pruint32 language); void getinterfaces(out pruint32 count, [array, size_is(count), retval] out nsiidptr array); attributes attribute type description classdescription string a human readable string naming the class, or null.
...obsolete since gecko 2.0
methods gethelperforlanguage() get a language mapping specific helper object that may assist in using objects of this class in a specific lanaguage.
... getinterfaces() this
method returns an ordered list of interfaces iids that instances of the class promise to implement.
... if this
method is not supported by an implementation, then it should return 0 for count and null for array.
nsIConsoleService
inherits from: nsisupports last changed in gecko 19 (firefox 19 / thunderbird 19 / seamonkey 2.16) implemented by: @mozilla.org/consoleservice;1 as a service: var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice);
method overview void getmessagearray([array, size_is(count)] out nsiconsolemessage messages, out uint32_t count);obsolete since gecko 19 void getmessagearray([optional] out uint32_t count, [retval, array, size_is(count)] out nsiconsolemessage messages); void logmessage(in nsiconsolemessage message); void logstringmessage(in wstring message); void registerlistener...
...(in nsiconsolelistener listener); void reset(); void unregisterlistener(in nsiconsolelistener listener);
methods getmessagearray() to obtain an array of all logged messages.
... logstringmessage() a convenient
method for logging simple messages.
...eturn consoleservice.getmessagearray(array, {}) || array.value; } logging a simple message a common usage is logging a message string to the console: function log(msg) { var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); consoleservice.logstringmessage(msg); } alternative logging
methods include components.utils.reporterror and dump().
nsIContentSecurityPolicy
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview boolean permitsancestry(in nsidocshell docshell); void refinepolicy(in astring policystring, in nsiuri selfuri); void scanrequestdata(in nsihttpchannel achannel); void sendreports(in astring blockeduri, in astring violateddirective); short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shouldprocess(in unsigned long acontenttype, in nsiuri a...
...
methods permitsancestry() verifies ancestry as permitted by the policy.
... shouldload() delegate
method called by the service when sub-elements of the protected document are being loaded.
...short shouldload( in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra ); parameters acontenttype acontentlocation arequestorigin acontext amimetypeguess aextra return value shouldprocess() delegate
method called by the service when sub-elements of the protected document are being processed.
nsIController
inherits from: nsisupports last changed in gecko 1.7
method overview void docommand(in string command); boolean iscommandenabled(in string command); void onevent(in string eventname); boolean supportscommand(in string command);
methods docommand() when this
method is called, your implementation should execute the command with the specified name.
... iscommandenabled() implement this
method to indicate whether or not the specified command is enabled.
...onevent() implement this
method to process the event with the specified name.
... supportscommand() implement this
method to report whether or not the command with the specified name is supported.
nsICookieManager
it is implemented by the @mozilla.org/cookiemanager;1 component, but should generally be accessed via services.cookies
method overview void remove(in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aoriginattributes); void removeall(); attributes attribute type description enumerator nsisimpleenumerator called to enumerate through each cookie in the cookie list.
...
methods remove() this
method is called to remove an individual cookie from the cookie list, specified by host, name, and path.
...typically, the arguments to this
method will be obtained directly from the desired nsicookie object.
... removeall() this
method is called to remove all cookies from the cookie list.
nsICookieManager2
the nsicookiemanager2 interface contains additional
methods that expand upon the nsicookiemanager interface.
...to create an object implementing this interface: components.utils.import("resource://gre/modules/services.jsm"); var cookieservice = services.cookies;
method overview void add(in autf8string ahost, in autf8string apath, in acstring aname, in acstring avalue, in boolean aissecure, in boolean aishttponly, in boolean aissession, in print64 aexpiry); boolean cookieexists(in nsicookie2 acookie); unsigned long countcookiesfromhost(in autf8string ahost); boolean findmatchingcookie(in nsicookie2 acookie, out unsigned lon...
...g acountfromhost); obsolete since gecko 1.9 nsisimpleenumerator getcookiesfromhost(in autf8string ahost); void importcookies(in nsifile acookiefile);
methods add() adds a cookie.
...this
method is something of a back door.
nsIDNSService
method overview nsicancelable asyncresolve(in autf8string ahostname, in unsigned long aflags, in nsidnslistener alistener, in nsieventtarget alistenertarget); void init(); obsolete since gecko 1.8 nsidnsrecord resolve(in autf8string ahostname, in unsigned long aflags); void shutdown(); obsolete since gecko 1.8 attributes attribute type description...
...
methods asyncresolve() begins off an asynchronous host lookup.
...warning this
method may block the calling thread for a long period of time.
...note: the operating system may still have its own cache of dns records, which would be unaffected by this
method.
nsIDirectoryService
xpcom/io/nsidirectoryservice.idlscriptable this interface provides
methods to initialize and configure a directory service instance.
... inherits from: nsisupports last changed in gecko 1.7
method overview void init(); void registerprovider(in nsidirectoryserviceprovider prov); void unregisterprovider(in nsidirectoryserviceprovider prov); init() initializes the nsidirectoryservice instance.
... this
method must be called before an nsidirectoryservice instance can be used.
... in the case of the xpcom directory service, this
method is called as part of xpcom initialization.
nsIDownloadManager
to get the service, use: var downloadmanager = components.classes["@mozilla.org/download-manager;1"] .getservice(components.interfaces.nsidownloadmanager);
method overview nsidownload adddownload(in short adownloadtype, in nsiuri asource, in nsiuri atarget, in astring adisplayname, in nsimimeinfo amimeinfo, in prtime astarttime, in nsilocalfile atempfile, in nsicancelable acancelable, in boolean aisprivate); void addlistener(in nsidownloadprogresslistener alistener); void canceldownload(in unsigned long aid); void clea...
...
methods adddownload() creates an nsidownload and adds it to the list of activities being managed by the download manager.
...if you want to both add and start a download, you need to create an nsiwebbrowserpersist object, call this
method, set the progresslistener to the returned nsidownload object, and then call the nsiwebbrowserpersist.saveuri()
method.
... note: prior to gecko 12.0, this was a synchronous operation; that is, once this
method returned, you knew that the download was in the download manager's list.
nsIDynamicContainer
method overview void oncontainermoved(in long long aitemid, in long long anewparent, in long anewindex); void oncontainernodeclosed(in nsinavhistorycontainerresultnode acontainer); void oncontainernodeopening(in nsinavhistorycontainerresultnode acontainer, in nsinavhistoryqueryoptions aoptions); void oncontainerremoving(in long long aitemid);
methods oncontainermoved() this
method is called ...
... oncontainernodeclosed() this
method is called when the given container has just been collapsed so that the service can do any necessary cleanup.
... oncontainernodeopening() this
method is called when the given container node is about to be populated so that the service can populate the container if necessary.
... oncontainerremoving() this
method is called when the given container is about to be deleted from the bookmarks table, so that the service can do any necessary cleanup.
nsIFactory
inherits from: nsisupports last changed in gecko 0.9.5
method overview void createinstance(in nsisupports aouter, in nsiidref iid, [retval, iid_is(iid)] out nsqiresult result); void lockfactory(in prbool lock);
methods createinstance() creates an instance of the class associated with this factory.
... lockfactory() this
method provides the client a way to keep the component in memory until it is finished with it.
... gecko 1.7 note as of gecko 1.7, this
method is unused.
... most implementations do nothing interesting with this
method.
nsIFaviconDataCallback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void oncomplete(in nsiuri auri, in unsigned long adatalen, [const,array,size_is(adatalen)] in octet adata, in autf8string amimetype);
methods oncomplete() called when the required favicon's information is available.
... it's up to the invoking
method to state if the callback is always invoked, or called on success only.
... check the
method documentation to ensure that.
...for some
method we could not know the favicon's data (it could just be too expensive to get it, or the
method does not require we actually have any data).
nsIFeedProcessor
to create an instance, use: var feedprocessor = components.classes["@mozilla.org/feed-processor;1"] .createinstance(components.interfaces.nsifeedprocessor);
method overview void parseasync(in nsirequestobserver requestobserver, in nsiuri uri); void parsefromstream(in nsiinputstream stream, in nsiuri uri); void parsefromstring(in astring str, in nsiuri uri); attributes attribute type description listener nsifeedresultlistener the feed result listener that will respond to feed events.
...
methods parseasync() parses a feed asynchronously.
... the caller must then call the processor's nsistreamlistener
methods to drive the parsing process.
... you must not call any of the other parsing
methods on the nsifeedprocessor interface during an asynchronous parse.
nsIFilePicker
to create an instance, use: var filepicker = components.classes["@mozilla.org/filepicker;1"] .createinstance(components.interfaces.nsifilepicker);
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 description ad...
...
methods appendfilter() appends a custom file extension filter to the dialog.
...the file picker is not valid until this
method is called.
...the passed in object's done
method will be called upon completion.
nsIFrameMessageManager
content/base/public/nsimessagemanager.idlscriptable provides
methods for managing message listeners on local frames.
...
method overview void addmessagelistener(in astring amessage, in nsiframemessagelistener alistener, [optional] in boolean listenwhenclosed); void removemessagelistener(in astring amessage, in nsiframemessagelistener alistener); void sendasyncmessage(in astring amessage, in astring json);
methods addmessagelistener() adds a message listener to the local frame.
... alistener an object implementing nsiframemessagelistener whose receivemessage
method will be called when the message is received.
...an alternative
method to listen for death of frame script is to use message-manager-disconnect observer: observer notifications :: message manager.
nsIHttpActivityObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void observeactivity(in nsisupports ahttpchannel, in pruint32 aactivitytype, in pruint32 aactivitysubtype, in prtime atimestamp, in pruint64 aextrasizedata, in acstring aextrastringdata); attributes attribute type description isactive boolean true when the interface is active and should observe http activity, otherwise false.
... if this is false, the observeactivity()
method should not be called.
...
methods observeactivity() called when activity occurs on the http transport.
... you should implement this
method to perform whatever tasks you wish to perform when http activity occurs.
nsIHttpChannelInternal
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3)
method overview void getrequestversion(out unsigned long major, out unsigned long minor); void getresponseversion(out unsigned long major, out unsigned long minor); void httpupgrade(in acstring aprotocolname, in nsihttpupgradelistener alistener); void setcookie(in string acookieheader); void setupfallbackchannel(in string afallbackkey); attributes attribute type description canceled boolean returns true if and only if the...
...
methods getrequestversion() gets the request's major and minor version numbers.
...the nsihttpupgradelistener will have its nsihttpupgradelistener.ontransportavailable()
method invoked if a matching 101 is processed.
...setcookie() helper
method to set a cookie with a consumer-provided cookie header, but using the channel's other information (uri's, prompters, date headers and so on.).
nsIJSID
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the following
methods return objects that implement this interface: components.interfaces.name components.classes[contract] components.interfacesbyid[uuid] components.classesbyid[cid] the first two cases create a named jsid while the last two cases create an unnamed jsid.
...
method overview boolean equals(in nsijsid other); const nsid* getid(); violates the xpcom interface guidelines void initialize(in string idstring); string tostring(); attributes attribute type description id nsidptr read only.
...
methods equals() this
method determines if this nsijsid has the same nsid as another nsijsid.
... tostring() this
methods returns a string representation of the object.
nsILocaleService
to use this service, use: var localeservice = components.classes["@mozilla.org/intl/nslocaleservice;1"] .getservice(components.interfaces.nsilocaleservice);
method overview nsilocale getapplicationlocale(); astring getlocalecomponentforuseragent(); nsilocale getlocalefromacceptlanguage(in string acceptlanguage); nsilocale getsystemlocale(); nsilocale newlocale(in astring alocale); nsilocale newlocaleobject(in nsilocaledefinition localedefinition); obsolete since gecko 1.9
methods getapplicationloca...
...this
method returns something similar to getsystemlocale.
...this
method returns the same as getsystemlocale.getcategory("nsilocale_messages").
...calls to its getcategory
method return the values originally passed to the locale definition's addcategory
method.
nsIMessenger
method overview void setdisplaycharset(in acstring acharset); void setwindow(in nsidomwindow ptr, in nsimsgwindow msgwindow); void openurl(in acstring aurl); void loadurl(in nsidomwindow ptr, in acstring aurl); void launchexternalurl(in acstring aurl); boolean canundo(); boolean canredo(); unsigned long getundotransactiontype(); ...
...
methods setdisplaycharset() sets the character set for the displayed message.
...same as just using the openurl()
method.
...same as just using the openurl()
method.
nsIModule
inherits from: nsisupports last changed in gecko 0.9.9
method overview boolean canunload(in nsicomponentmanager acompmgr); void getclassobject(in nsicomponentmanager acompmgr, in nscidref aclass, in nsiidref aiid, [retval, iid_is(aiid)] out nsqiresult aresult); void registerself(in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr, in string atype); void unregisterself(in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr);
methods canunload() this
method may be queried to determine whether or not the component module ca...
...if the component module is native (that is, as part of a dll), then this
method may be called to determine whether or not the dll may be unloaded from memory.
... registerself() when the nsimodule is discovered, this
method will be called so that any setup registration can be preformed.
... unregisterself() when the nsimodule is being unregistered, this
method will be called so that any unregistration can be preformed.
nsIMsgIncomingServer
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)
method overview void clearallvalues(); void cleartemporaryreturnreceiptsfilter(); void closecachedconnections(); void configuretemporaryfilters(in nsimsgfilterlist filterlist); void configuretemporaryreturnreceiptsfilter(in nsimsgfilterlist filterlist); obsolete since gecko 1.8 void displayofflinemsg(in nsimsgwindow awindow); boolean equals(in nsimsgincomingserver server); void forgetpassword(); void forgetsessionpassword(); astring generateprettynameformigration(); boolean getboolattribute(in string name); boolean getboolvalue(in strin...
... usesecauth boolean valid boolean constants constant value description defaultsocket 0 trytls 1 alwaysusetls 2 usessl 3 keepdups 0 deletedups 1 movedupstotrash 2 markdupsread 3
methods clearallvalues() this is really dangerous.
...if we have set up to filter return receipts into our sent folder, this utility
method creates a filter to do that, and adds it to our filterlist if it doesn't exist.
...void configuretemporaryfilters( in nsimsgfilterlist filterlist ); parameters filterlist missing description exceptions thrown missing exception missing description configuretemporaryreturnreceiptsfilter() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) if we have set up to filter return receipts into our sent folder, this utility
method creates a filter to do that, and adds it to our filterlist if it doesn't exist.
nsIMsgWindowCommands
mailnews/base/public/nsimsgwindow.idlscriptable this interface defines
methods used by the back end to update the user interface in a mail or news message list.
...
method overview void selectfolder(in acstring folderuri); void selectmessage(in acstring messageuri); void clearmsgpane();
methods selectfolder() this
method is called by the backend to change the folder displayed in the message window.
... selectmessage() this
method is called by the backend to change the displayed message.
... clearmsgpane() this
method is called by the backend when it wants to clear the message pane, for instance if you select the group header .
nsINavHistoryContainerResultNode
1.0 66 introduced gecko 1.9 inherits from: nsinavhistoryresultnode last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview nsinavhistoryresultnode findnodebydetails(in autf8string auristring, in prtime atime, in long long aitemid, in boolean arecursive); nsinavhistoryresultnode getchild(in unsigned long aindex); unsigned long getchildindex(in nsinavhistoryresultnode anode); attributes attribute type description childcount unsigned long the number of child nodes; accessing this throws an ns_er...
...this is false for bookmark folder nodes unless the setfolderreadonly()
method has been called to specifically make the folder read-only.
...
methods findnodebydetails() returns a node matching specified details.
... remarks there are a number of untested
methods on this interface that are not documented at present, and are disabled in the idl file.
nsIObserverService
xpcom/ds/nsiobserverservice.idlscriptable this interface provides
methods to add, remove, notify, and enumerate observers of various notifications.
... implemented by @mozilla.org/observer-service;1 as a service: var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice);
method overview void addobserver( in nsiobserver anobserver, in string atopic, in boolean ownsweak); nsisimpleenumerator enumerateobservers( in string atopic ); void notifyobservers( in nsisupports asubject, in string atopic, in wstring somedata ); void removeobserver( in nsiobserver anobserver, in string atopic );
methods addobserver() registers a given listener...
... notifyobservers() this
method is called to notify all observers for a particular topic.
... removeobserver() this
method is called to unregister an observer for a particular topic.
nsIPrintingPrompt
for the print dialog: you may stub out this service by having all the
methods return ns_error_not_implemented.
... you can then fly you own dialog and then properly fill in the printsettings object before calling nsiwebbrowserprint's print
method.
... defaults for platform service: showprintdialog - displays a native dialog showpagesetup() - displays a native dialog showprogress() - displays a xul dialog
method overview void showpagesetup(in nsiprintsettings printsettings, in nsiobserver aobs); void showprintdialog(in nsiwebbrowserprint webbrowserprint, in nsiprintsettings printsettings); void showprogress(in nsiwebbrowserprint webbrowserprint, in nsiprintsettings printsettings, in nsiobserver opendialogobserver, in boolean isforprinting, out nsiwebprogresslistener webprogres...
...slistener, out nsiprintprogressparams printprogressparams, out boolean notifyonopen);
methods showpagesetup() shows the print progress dialog.
nsIPropertyBag2
xpcom/ds/nsipropertybag2.idlscriptable this interface extends nsipropertybag with some
methods for getting properties in specific formats.
... inherits from: nsipropertybag last changed in gecko 1.0
method overview nsivariant get(in astring prop); acstring getpropertyasacstring(in astring prop); astring getpropertyasastring(in astring prop); autf8string getpropertyasautf8string(in astring prop); boolean getpropertyasbool(in astring prop); double getpropertyasdouble(in astring prop); print32 getpropertyasint32(in astring prop); print64 getpropertyasint64(in astring prop); void getpropertyasinterface(in astring prop, in nsiidref iid, [iid_is(iid), retval] out nsqiresult result); pruint32 getpropertyasuint32(in astring prop); pruint64 getpropertyasuint64(in astring prop); prbool haskey(in astring prop);
methods get() t...
...his
method returns null if the value does not exist, or exists but is null.
...getpropertyasinterface() this
method returns null if the value exists, but is null.
nsIProtocolHandler
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview boolean allowport(in long port, in string scheme); nsichannel newchannel(in nsiuri auri); nsiuri newuri(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); attributes attribute type description defaultport long the default port is the port the protocol uses by default.
...
methods allowport() lets a protocol override blacklisted ports.
... this
method is called when there's an attempt to connect to a port that is blacklisted.
...when a uri containing this port number is encountered, this
method is called to ask if the protocol handler wants to override the ban.
nsIScriptError
that subclass offered the nsiscripterror.initwithwindowid()
method for that purpose; that
method is now available in this interface, however.
...
method overview void init(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category); void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); autf8string tostring(); attributes attribute type description category string a string indicating the category of error that occurred see categories for a list.
... infoflag 0x8 just a log message
methods init() initializes the object with information describing the error which occurred.
... note: prior to gecko 12.0, this
method was provided by the nsiscripterror2 interface, which has now been merged into this one.
nsIScrollable
inherits from: nsiscrollable last changed in gecko 29.0 (firefox 29.0 / thunderbird 29.0 / seamonkey 2.26)
method overview long getcurscrollpos(in long scrollorientation); obsolete since gecko 29.0 long getdefaultscrollbarpreferences(in long scrollorientation); void getscrollbarvisibility(out boolean verticalvisible, out boolean horizontalvisible); void getscrollrange(in long scrollorientation, out long minpos, out long maxpos); obsolete since gecko 29.0 void setcurscrollpos(in long scrollorientation, in long curpos); obsolete since geck...
...when passing this in to a
method you are requesting or setting data for the horizontal scrollbar.
...when passing this in to a
method you are requesting or setting data for the vertical scrollbar.
...
methods getcurscrollpos() obsolete since gecko 29.0 (firefox 29.0 / thunderbird 29.0 / seamonkey 2.26) long getcurscrollpos( in long scrollorientation ); parameters scrollorientation an integer representing the orientation of the scrollbar.
nsISeekableStream
inherits from: nsisupports last changed in gecko 1.7
method overview void seek(in long whence, in long long offset); void seteof(); long long tell(); constants constant value description ns_seek_set 0 specifies that the offset is relative to the start of the stream.
...
methods seek() this
method moves the stream offset of the stream implementing this interface.
... seteof() this
method truncates the stream at the current offset.
... tell() this
method reports the current offset, in bytes, from the start of the stream.
nsISimpleEnumerator
xpcom/ds/nsisimpleenumerator.idlscriptable this interface represents an enumeration of xpcom objects and provides
methods to access elements sequentially.
... inherits from: nsisupports last changed in gecko 0.9.6
method overview nsisupports getnext(); boolean hasmoreelements();
methods getnext() called to retrieve the next element in the enumerator.
...this
method is generally called within a loop to iterate over the elements in the enumerator.
...this
method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getnext() calls.
nsISocketTransport
it provides
methods to open blocking or non-blocking, buffered or unbuffered streams between two end-point in a ip based network.
...to create an instance, call nsisockettransportservice.createtransport()
method overview prnetaddr getpeeraddr(); native code only!
...
methods native code only!getpeeraddr returns the ip address of the socket connection peer.
... remarks this is a free-threaded interface, meaning that the
methods on this interface may be called from any thread.
nsITaskbarTabPreview
method overview void ensureregistration(); violates the xpcom interface guidelines nativewindow gethwnd(); violates the xpcom interface guidelines void move(in nsitaskbartabpreview anext); attributes attribute type description icon imgicontainer the icon displayed next to the title in the preview.
...
methods violates the xpcom interface guidelines ensureregistration() used internally to ensure that the taskbar knows about this preview.
... if a preview is not registered, the api call to set its sibling (via the move()
method) will fail silently.
... this
method is only invoked when it's safe to make taskbar api calls.
nsIThreadEventFilter
you should implement this interface and its acceptevent()
method, then pass the object implementing it as the filter.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports
method overview boolean acceptevent(in nsirunnable event);violates the xpcom interface guidelines
methods violates the xpcom interface guidelines acceptevent() this
method is called to determine whether or not an event may be accepted by a nested event queue.
... (see nsithreadinternal.pusheventqueue()) warning: this
method must not make any calls on the thread object.
... return value implement this
method to return true if the event is accepted, or false to reject it.
nsITreeSelection
inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview void adjustselection(in long index, in long count); void clearrange(in long startindex, in long endindex); void clearselection(); void getrangeat(in long i, out long min, out long max); long getrangecount(); void invalidateselection(); 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 l...
...this is not a reliable
method of determining the selected row, as the selection may include multiple rows, or the focused row may not even be selected.
... selecteventssuppressed boolean this attribute is a boolean indicating whether or not the "select" event should fire when the selection is changed using one of our
methods.
...
methods adjustselection() called when the row count changes to adjust selection indices.
nsIURI
netwerk/base/public/nsiuri.idlscriptable this is an interface for an uniform resource identifier with internationalization support, offering attributes that allow setting and querying the basic components of a uri, and
methods for performing basic operations on uris.
...illa.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); return ioservice.newuri(aurl, aorigincharset, abaseuri); } components of a uri prepath path scheme userpass host port ref ftp :// username@password @ hostname : portnumber /pathname?query=value #ref
method overview nsiuri clone(); nsiuri cloneignoringref(); boolean equals(in nsiuri other); boolean equalsexceptref(in nsiuri other); autf8string resolve(in autf8string relativepath); boolean schemeis(in string scheme); attributes attribute type description asciihost acstring the uri host with an ascii co...
... this is useful for authentication, managing sessions, or for checking the origin of an uri to prevent cross-site scripting attacks while using
methods such as window.postmessage().
...
methods clone() clones the uri, returning a new nsiuri object.
nsIUTF8StringEnumerator
inherits from: nsisupports last changed in gecko 1.7
method overview autf8string getnext(); boolean hasmore();
methods getnext() returns the next string in the enumerator.
...this
method is generally called within a loop to iterate over the strings in the enumerator.
...this
method is generally used to determine whether or not to initiate or continue iteration over the enumerator, athough it can be called without subsequent getnext() calls.
... calling this
method doesn't affect the internal state of the enumerator.
nsIUUIDGenerator
1.0 66 introduced gecko 1.8.1 inherits from: nsisupports last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) implemented by @mozilla.org/uuid-generator; as a service: var uuidgenerator = components.classes["@mozilla.org/uuid-generator;1"] .getservice(components.interfaces.nsiuuidgenerator);
method overview nsidptr generateuuid(); void generateuuidinplace(in nsnonconstidptr id); native code only!
...
methods generateuuid() obtains a new uuid using appropriate platform-specific
methods to obtain a nsid that can be considered to be globally unique.
...return value this
method returns a nsidptr containing a unique id.
... exceptions thrown ns_error_failure if a uuid cannot be generated (for example if an underlying source of randomness is not available) native code only!generateuuidinplace obtain a new uuid like the generateuuid()
method, but place it in the provided nsid pointer instead of allocating a new nsid.
nsIUpdateChecker
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void checkforupdates(in nsiupdatechecklistener listener, in boolean force); void stopchecking(in unsigned short duration); constants constant value description current_check 1 constant for the stopchecking()
method indicating that only the current update check should be stopped.
... current_session 2 constant for the stopchecking()
method indicating that all update checks during the current session should be stopped.
... any_checks 3 constant for the stopchecking()
method indicating that all update checking should be stopped.
...
methods checkforupdates() checks for available updates, notifying a listener of the results.
nsIUploadChannel2
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
method overview void explicitsetuploadstream(in nsiinputstream astream, in acstring acontenttype, in long long acontentlength, in acstring a
method, in boolean astreamhasheaders);
methods explicitsetuploadstream() sets a stream to be uploaded by this channel with the specified content-type and content-length header values.
... void explicitsetuploadstream( in nsiinputstream astream, in acstring acontenttype, in long long acontentlength, in acstring a
method, in boolean astreamhasheaders ); parameters astream the stream to be uploaded by this channel.
...acontentlength a value of -1 indicates that the length of the stream should be determined by calling the stream's available
method.
... a
method the http request
method to set on the stream.
nsIWebBrowserPersist
to create an instance, use: var webbrowserpersist = components.classes["@mozilla.org/embedding/browser/nswebbrowserpersist;1"] .createinstance(components.interfaces.nsiwebbrowserpersist);
method overview void cancelsave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in l...
...
methods cancelsave() cancels the current operation.
...do not call this
method until the document has finished loading!
... saveuri() as of firefox 26, this
method should no longer be used from add-on code.
nsIWebContentHandlerRegistrar
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by @mozilla.org/embeddor.implemented/web-content-handler-registrar;1 as a service: var nsiwchr = cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"] .getservice(ci.nsiwebcontenthandlerregistrar);
method overview void registercontenthandler(in domstring mimetype, in domstring uri, in domstring title, in nsidomwindow contentwindow) void registerprotocolhandler(in domstring protocol,in domstring uri, in domstring title, in nsidomwindow contentwindow)
methods registercontenthandler summary of re...
... contentwindow the dom content window from which the
method has been called.
... contentwindow the dom content window from which the
method has been called.
... permission denied to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler'permission denied to add http://mail.live.com/secure/start?action=compose&to=%s as a content or protocol handler' when calling
method: [nsiwebcontenthandlerregistrar::registerprotocolhandler] if the host names do match then a confirmation like this will be seen: this domain check can be bypassed by setting the preference of gecko.handlerservice.allowregisterfromdifferenthost to true as in this code here: var {classes: cc, interfaces: ci, utils: cu} = components; cu.import("resource://gre/modules/services.jsm"); var nsiwch...
nsIWebProgress
last changed in gecko 1.8.0 inherits from: nsisupports
method overview void addprogresslistener(in nsiwebprogresslistener alistener, in unsigned long anotifymask); void removeprogresslistener(in nsiwebprogresslistener alistener); attributes attribute type description domwindow nsidomwindow the dom window associated with this nsiwebprogress instance.
... constants the following flags may be combined to form the anotifymask parameter for the addprogresslistener()
method.
... these flags indicate the other events to observe, corresponding to the other four
methods defined on nsiwebprogresslistener.
...
methods addprogresslistener() registers a listener to receive web progress events.
nsIWebSocketChannel
to create an instance, use: var websocketchannel = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiwebsocketchannel);
method overview void asyncopen(in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acontext); void close(in unsigned short acode, in autf8string areason); void sendbinarymsg(in acstring amsg); void sendmsg(in autf8string amsg); attributes attribute type description extensions acstring sec-websocket...
...
methods asyncopen() asynchronously opens the websocket connection.
...the socket listener's
methods are called on the thread that calls asyncopen() and are not called until after asyncopen() returns.
... acontext an opaque parameter forwarded to alistener's
methods.
nsIWinTaskbar
among these is the addition of the
method getoverlayiconcontroller().
... this
method is currently known to crash if used under certain conditions.
...to create an instance, use: var wintaskbar = components.classes["@mozilla.org/windows-taskbar;1"] .getservice(components.interfaces.nsiwintaskbar);
method overview nsijumplistbuilder createjumplistbuilder(); nsitaskbartabpreview createtaskbartabpreview(in nsidocshell shell, in nsitaskbarpreviewcontroller controller); nsitaskbarprogress gettaskbarprogress(in nsidocshell shell); nsitaskbarwindowpreview gettaskbarwindowpreview(in nsidocshell shell); void setgroupidforwindow(in nsidomwindow aparent, in astring aidentifier); attributes attribute type description available boolean returns true if the operating system supports windows 7 or later taskbar feat...
...
methods createjumplistbuilder() retrieve a taskbar jump list builder.
nsIXULWindow
method overview void addchildwindow(in nsixulwindow achild); void applychromeflags(); native code only!
... highestz 9
methods addchildwindow() tell this window that it has picked up a child xul window.note that xul windows do not currently track child xul windows.
... native code only!applychromeflags back-door
method to force application of chrome flags at a particular time.
... aappshell the app shell passed to nsiappshellservice's createtoplevelwindow
method.
nsIAbCard/Thunderbird3
_aimscreenname dates: anniversaryyear, anniversarymonth, anniversaryday birthyear, birthmonth, birthday webpage1 (work), webpage2 (home) custom1, custom2, custom3, custom4 notes integral properties: lastmodifieddate popularityindex prefermailformat (see nsiabprefermailformat) boolean properties: allowremotecontent inherits from: nsiabitem
method overview nsivariant getproperty(in autf8string name, in nsivariant defaultvalue); [noscript] astring getpropertyasastring(in string name); [noscript] autf8string getpropertyasautf8string(in string name); [noscript] pruint32 getpropertyasuint32(in string name); [noscript] boolean getpropertyasbool(in string name); void setproperty(in autf8stri...
...
methods getproperty() returns a property for the given name.
...however, such constraints might not be checked by this
method.
...however, the implementation will not check this constraint at this
method.
nsIMsgCloudFileProvider
inherits from: nsisupports
method overview void init(in string aaccountkey); void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); acstring urlforfile(in nsilocalfile afile); void cancelfileupload(in nsilocalfile afile); void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); void createnewaccount(in acstring aemailaddress, in acstring apassword, in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingaccount(in nsirequ...
... constants the following constants are used for the status codes passed to the onstoprequest functions of the nsirequestobserver's used by the asynchronous
methods of nsimsgcloudfileprovider.
...
methods init() initializes an nsimsgcloudfileprovider to be associated with a particular account.
... if the provider has no appropriate url for the error, the
method returns the empty string.
Using js-ctypes
this is as simple as including the following line of code in the desired javascript scope: components.utils.import("resource://gre/modules/ctypes.jsm") loading a native library once you've imported the code module, you can call the ctypes.open()
method to load each native library you wish to use.
... note: js-ctypes only works with c libraries; you can't use c++
methods directly.
... after you're done when you're finished using a library, you should close it by calling the library object's close()
method: lib.close(); if you fail to close the library, it will be automatically closed when it is garbage collected.
...line 6 declares msgbox() to be a
method that calls the windows function messageboxw.
CType
these objects have assorted
methods and properties that let you create objects of these types, find out information about them, and so forth.
... the specific properties and
methods on each object vary depending on the data type represented.
...
method overview
methods available on all ctype objects ctype array([n]) string tosource() string tostring() properties properties of all ctype objects these properties are available on all ctype objects.
...
methods available on all ctype objects array() returns a new ctype representing an array of elements of the type on which it was called.
Int64
note: it's important to note that the 64-bit integer objects created by int64 are not int64 objects; rather, they're opaque objects whose values you manipulate through the other
methods on the int64 object.
...
method overview number compare(a, b); number hi(a); int64 join(high, low); number lo(a); string tosource(); string tostring([radix]);
methods compare() compares two 64-bit integer values.
... tosource() this
method is for internal debugging use only.
... warning: do not rely on the value returned by this
method, as it's subject to change at any time, depending on the debugging needs of the developers.
Library
the library object represents a native library loaded by the ctypes open()
method.
... its
methods let you declare symbols exported by the library, and to manage the library.
...
method overview close(); cdata declare(name, [abi, ], returntype[, argtype1, ...]);
methods close() closes the library.
... alternative syntax another use for ctypes.declare is to get non-function/non-
methods from libraries.
UInt64
note: it's important to note that the 64-bit integer objects created by uint64 are not uint64 objects; rather, they're opaque objects whose values you manipulate through the other
methods on the uint64 object.
...
method overview number compare(a, b); number hi(a); uint64 join(high, low); number lo(a); string tosource(); string tostring([radix]);
methods compare() compares two 64-bit integer values.
... tosource() this
method is for internal debugging use only.
... warning: do not rely on the value returned by this
method, as it's subject to change at any time, depending on the debugging needs of the developers.
Index - Firefox Developer Tools
21 debugger.memory the debugger api can help tools observe the debuggee’s memory use in various ways: 22 debugger.object a debugger.object instance represents an object in the debuggee, providing reflection-oriented
methods to inspect and modify its referent.
... the referent’s properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through
methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent’s getters and setters.
... 27 debugger.object a debugger.object instance represents an object in the debuggee, providing reflection-oriented
methods to inspect and modify its referent.
... the referent's properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through
methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent's getters and setters.
ANGLE_instanced_arrays - Web APIs
webgl extensions are available using the webglrenderingcontext.getextension()
method.
...in webgl2, the functionality of this extension is available on the webgl2 context by default and the constants and
methods are available without the "angle" suffix.
... constants this extension exposes one new constant, which can be used in the gl.getvertexattrib()
method: ext.vertex_attrib_array_divisor_angle returns a glint describing the frequency divisor used for instanced rendering when used in the gl.getvertexattrib() as the pname parameter.
...
methods this extension exposes three new
methods.
Background Tasks API - Web APIs
the callback is passed an object which conforms to idledeadline, with didtimeout set to false and a timeremaining()
method which is implemented to give the callback 50 milliseconds of time to begin with.
... the window interface is also augmented by this api to offer the new requestidlecallback() and cancelidlecallback()
methods.
... <p> demonstration of using <a href="/docs/web/api/background_tasks_api"> cooperatively scheduled background tasks</a> using the <code>requestidlecallback()</code>
method.
... the getrandomintinclusive()
method comes from the examples for math.random(); we'll just link to it below but it needs to be included here for the example to work.
BaseAudioContext.decodeAudioData() - Web APIs
the decodeaudiodata()
method of the baseaudiocontext interface is used to asynchronously decode audio file data contained in an arraybuffer.
... this is the preferred
method of creating an audio source for web audio api from an audio track.
... this
method only works on complete file data, not fragments of audio file data.
...when the stop()
method is called on the source, the source is cleared out.
Using the Beacon API - Web APIs
navigator.sendbeacon() the beacon api's navigator.sendbeacon()
method sends a beacon request to the server in the global browsing context.
... the
method takes two arguments: the url and the data to send.
... if the browser successfully queues the request for delivery, the
method returns true and returns false otherwise.
... window.onsubmit = function send_analytics() { var data = json.stringify({ location: location.href, time: date() }); navigator.sendbeacon('/analytics', data); }; workernavigator.sendbeacon() the beacon api's workernavigator.sendbeacon()
method works identically to the usual
method, but is accessible from worker global scope.
Blob - Web APIs
the blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a readablestream so its
methods can be used for processing the data.
...to create a blob that contains a subset of another blob's data, use the slice()
method.
... instance
methods blob.prototype.arraybuffer() returns a promise that resolves with an arraybuffer containing the entire contents of the blob as binary data.
...the following code reads the content of a blob as text: const text = await (new response(blob)).text(); or by using blob.prototype.text(): const text = await blob.text(); by using other
methods of filereader, it is possible to read the contents of a blob as a string or a data url.
Bluetooth.getDevices() - Web APIs
the getdevices()
method of bluetooth interface of web bluetooth api exposes the bluetooth devices this origin is allowed to access.
... this
method does not display any permission prompts.
... note: this
method returns a bluetoothdevice for each device the origin is currently allowed to access, even the ones that are out of range or powered off.
... exceptions this
method doesn't throw any exceptions.
CSSStyleSheet.removeRule() - Web APIs
the obsolete cssstylesheet
method removerule() removes a rule from the stylesheet object.
... it is functionally identical to the standard, preferred
method deleterule().
... note: this is a legacy
method which has been replaced by the standard
method deleterule().
... mystyles.removerule(0); you can rewrite this to use the standard deleterule()
method very easily: mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.removerule()' in that specification.
CSSStyleSheet - Web APIs
it inherits properties and
methods from its parent, stylesheet.
... this is normally used to access individual rules like this: stylesheet.cssrules[i] // where i = 0..cssrules.length-1 to add or remove items in cssrules, use the cssstylesheet's insertrule() and deleterule()
methods.
...
methods inherits
methods from its parent, stylesheet.
... legacy
methods these
methods are legacy
methods first introduced by microsoft; they should not be used if they can be avoided, but are not in danger of being removed anytime soon.
CacheStorage.match() - Web APIs
the match()
method of the cachestorage interface checks if a given request or url string is a key for a stored response.
... this
method returns a promise for a response, or a promise which resolves to undefined if no match is found.
... note: caches.match() is a convenience
method.
... ignore
method: a boolean that, when set to true, prevents matching operations from validating the request http
method (normally only get and head are allowed.) it defaults to false.
CanvasRenderingContext2D.createLinearGradient() - Web APIs
the canvasrenderingcontext2d.createlineargradient()
method of the canvas 2d api creates a gradient along the line connecting two given coordinates.
... this
method returns a linear canvasgradient.
... syntax canvasgradient ctx.createlineargradient(x0, y0, x1, y1); the createlineargradient()
method is specified by four parameters defining the start and end points of the gradient line.
... examples filling a rectangle with a linear gradient this example initializes a linear gradient using the createlineargradient()
method.
CanvasRenderingContext2D.createPattern() - Web APIs
the canvasrenderingcontext2d.createpattern()
method of the canvas 2d api creates a pattern using the specified image and repetition.
... this
method returns a canvaspattern.
... this
method doesn't draw anything to the canvas directly.
... examples creating a pattern from an image this example uses the createpattern()
method to create a canvaspattern with a repeating source image.
CanvasRenderingContext2D.createRadialGradient() - Web APIs
the canvasrenderingcontext2d.createradialgradient()
method of the canvas 2d api creates a radial gradient using the size and coordinates of two circles.
... this
method returns a canvasgradient.
... syntax canvasgradient ctx.createradialgradient(x0, y0, r0, x1, y1, r1); the createradialgradient()
method is specified by six parameters, three defining the gradient's start circle, and three defining the end circle.
... examples filling a rectangle with a radial gradient this example initializes a radial gradient using the createradialgradient()
method.
CanvasRenderingContext2D.fillRect() - Web APIs
the canvasrenderingcontext2d.fillrect()
method of the canvas 2d api draws a rectangle that is filled according to the current fillstyle.
... this
method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
... syntax void ctx.fillrect(x, y, width, height); the fillrect()
method draws a filled rectangle whose starting point is at (x, y) and whose size is specified by width and height.
... examples a simple filled rectangle this example draws a filled green rectangle using the fillrect()
method.
CanvasRenderingContext2D.fillText() - Web APIs
the canvasrenderingcontext2d
method filltext(), part of the canvas 2d api, draws a text string at the specified coordinates, filling the string's characters with the current fillstyle.
... this
method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
... to draw the outlines of the characters in a string, call the context's stroketext()
method.
... examples drawing filled text this example writes the words "hello world" using the filltext()
method.
CanvasRenderingContext2D.strokeRect() - Web APIs
the canvasrenderingcontext2d.strokerect()
method of the canvas 2d api draws a rectangle that is stroked (outlined) according to the current strokestyle and other context settings.
... this
method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
... syntax void ctx.strokerect(x, y, width, height); the strokerect()
method draws a stroked rectangle whose starting point is at (x, y) and whose size is specified by width and height.
... examples a simple stroked rectangle this example draws a rectangle with a green outline using the strokerect()
method.
CanvasRenderingContext2D.strokeText() - Web APIs
the canvasrenderingcontext2d
method stroketext(), part of the canvas 2d api, strokes — that is, draws the outlines of — the characters of a text string at the specified coordinates.
... this
method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
... use the filltext()
method to fill the text characters rather than having just their outlines drawn.
... examples drawing text outlines this example writes the words "hello world" using the stroketext()
method.
CanvasRenderingContext2D.translate() - Web APIs
the canvasrenderingcontext2d.translate()
method of the canvas 2d api adds a translation transformation to the current matrix.
... syntax void ctx.translate(x, y); the translate()
method adds a translation transformation to the current matrix by moving the canvas and its origin x units horizontally and y units vertically on the grid.
... examples moving a shape this example draws a square that is moved from its default position by the translate()
method.
... html <canvas id="canvas"></canvas> javascript the translate()
method translates the context by 110 horizontally and 30 vertically.
Basic animations - Web APIs
the easiest way to do this is using the clearrect()
method.
... controlling an animation shapes are drawn to the canvas by using the canvas
methods directly or by calling custom functions.
... in the examples below, we'll use the window.requestanimationframe()
method to control the animation.
... the requestanimationframe
method provides a smoother and more efficient way for animating by calling the animation frame when the system is ready to paint the frame.
Basic usage of canvas - Web APIs
the <canvas> element has a
method called getcontext(), used to obtain the rendering context and its drawing functions.
... var canvas = document.getelementbyid('tutorial'); var ctx = canvas.getcontext('2d'); the first line in the script retrieves the node in the dom representing the <canvas> element by calling the document.getelementbyid()
method.
... once you have the element node, you can access the drawing context using its getcontext()
method.
...scripts can also check for support programmatically by simply testing for the presence of the getcontext()
method.
Hit regions and accessibility - Web APIs
the api has the following three
methods (which are still experimental in current web browsers; check the browser compatibility tables).
... <canvas id="canvas"></canvas> <script> var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.arc(70, 80, 10, 0, 2 * math.pi, false); ctx.fill(); ctx.addhitregion({id: 'circle'}); canvas.addeventlistener('mousemove', function(event) { if (event.region) { alert('hit region: ' + event.region); } }); </script> the addhitregion()
method also takes a control option to route events to an element (that is a descendant of the canvas): ctx.addhitregion({control: element}); this can be useful for routing to <input> elements, for example.
... canvasrenderingcontext2d.drawfocusifneeded() if a given element is focused, this
method draws a focus ring around the current path.
... additionally, the scrollpathintoview()
method can be used to make an element visible on the screen if focused, for example.
Clipboard.read() - Web APIs
the read()
method of the clipboard interface requests a copy of the clipboard's contents, delivering the data to the returned promise when the promise is resolved.
... unlike readtext(), the read()
method can return arbitrary data, such as images.
... this
method can also return text.
...be sure to review the compatibility table before using these
methods.
ClipboardItem - Web APIs
note: to work with text see the clipboard.readtext() and clipboard.writetext()
methods of the clipboard interface.
...
methods this interface defines the following
methods.
... examples writing to clipboard here we're writing a new clipboarditem.clipboarditem() to the clipboard by requesting a png image using the fetch api, and in turn, the responses' blob()
method, to create the new clipboarditem.
...e.png'; const data = await fetch(imgurl); const blob = await data.blob(); await navigator.clipboard.write([ new clipboarditem({ [blob.type]: blob }) ]); console.log('fetched image copied.'); } catch(err) { console.error(err.name, err.message); } } reading from the clipboard here we're returning all items on the clipboard via the clipboard.read()
method.
CloseEvent.initCloseEvent() - Web APIs
the closeevent.initcloseevent()
method initializes the value of a close event once it's been created (normally using the document.createevent()
method).
... events initialized in this way must have been created with the document.createevent()
method.
... this
method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... do not use this
method anymore as it is deprecated.
Constraint validation API - Web APIs
extensions to other interfaces the constraint validation api extends the interfaces for the form-associated elements listed below with a number of new properties and
methods (elements that can have a form attribute that indicates their form owner): htmlbuttonelement htmlfieldsetelement htmlinputelement htmlobjectelement htmloutputelement htmlselectelement htmltextareaelement properties validity a read-only property that returns a validitystate object, whose properties represent validation errors for the value of that element.
...
methods checkvalidity() checks the element's value against its constraints.
... reportvalidity() htmlformelement
method checks the element's value against its constraints and also reports the validity status; if the value is invalid, it fires an invalid event at the element, returns false, and then reports the validity status to the user in whatever way the user agent has available.
...try again!'); } }); the example renders like so: in brief: we check the valid state of the input element every time its value is changed by running the checkvalidity()
method via the input event handler.
ContentIndex.delete() - Web APIs
the delete()
method of the contentindex interface unregisters an item from the currently indexed content.
... syntax contentindex.delete(id).then(...); parameters this
method receives no parameters.
...we receive a reference to the current serviceworkerregistration, which allows us to access the index property and thus access the delete
method.
... async function unregistercontent(article) { // reference registration const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) return; // unregister content from index await registration.index.delete(article.id); } the delete
method can also be used within the service worker scope.
CredentialsContainer.get() - Web APIs
the get()
method of the credentialscontainer interface returns a promise to a single credential instance that matches the provided parameters.
... this
method first collects all credentials in the credentialscontainer that meet the necessary criteria (defined in the options argument).
... this
method collects credentials by calling the "collectfromcredentialstore"
method for each credential type allowed by the options argument.
... this
method is restricted to top-level contexts.
DOMMatrix - Web APIs
2d 3d equivalent a m11 b m12 c m21 d m22 e m41 f m42
methods this interface includes the following
methods, as well as the
methods it inherits from dommatrixreadonly.
...this is equivalent to the dot product a⋅b, where matrix a is the source matrix and b is the matrix given as an input to the
method.
...this is equivalent to the dot product b⋅a, where matrix a is the source matrix and b is the matrix given as an input to the
method.
... static
methods this interface inherits
methods from dommatrixreadonly.
DOMMatrixReadOnly.scale() - Web APIs
the scale()
method of the dommatrixreadonly interface creates a new matrix being the result of the original matrix with a scale transform applied.
... syntax the scale()
method is specified with either one or six values.
... 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 javascript first creates an identity matrix, then uses the scale()
method to create a new matrix with a single parameter.
... we test if the browser supports a six parameter scale()
method by creating a new matrix using three parameters and observing it's is2d property — if this is false then the third parameter has been accepted by the browser as a scalez parameter, making this a 3d matrix.
DOMParser - Web APIs
syntax let domparser = new domparser()​​
methods domparser.parsefromstring() syntax let doc = domparser.parsefromstring(string, mimetype) return either document or xmldocument depending on the mimetype argument.
... parameters this
method has 2 parameters (both required): string the domstring to be parsed.
...this string determines a class of the the
method's return value.
...lowing: mimetype doc.constructor text/html document text/xml xmldocument application/xml xmldocument application/xhtml+xml xmldocument image/svg+xml xmldocument examples parsing xml once you have created a parser object, you can parse xml from a string using the parsefromstring()
method: let parser = new domparser() let doc = parser.parsefromstring(stringcontainingxmlsource, "application/xml") error handling note that if the parsing process fails, the domparser does not throw an exception, but instead returns an error document: <parsererror xmlns="http://www.mozilla.org/newlayout/xml/parsererror.xml"> (error description) <sourcetext>(a snippet of the source xml)</source...
DOMPointInit.w - Web APIs
there are two
methods which use dompointinit: the static function dompointreadonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
... this
method is, by inheritance, also available as dompoint.frompoint().
... the dompointreadonly.tojson()
method returns a dompointinit object that describes the same point as the original point.
... by inheritance, this
method is also available as dompoint.tojson().
DOMPointInit.y - Web APIs
there are two
methods which use dompointinit: the static function dompointreadonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
... this
method is, by inheritance, also available as dompoint.frompoint().
... the dompointreadonly.tojson()
method returns a dompointinit object that describes the same point as the original point.
... by inheritance, this
method is also available as dompoint.tojson().
DOMPointInit.z - Web APIs
there are two
methods which use dompointinit: the static function dompointreadonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
... this
method is, by inheritance, also available as dompoint.frompoint().
... the dompointreadonly.tojson()
method returns a dompointinit object that describes the same point as the original point.
... by inheritance, this
method is also available as dompoint.tojson().
DataTransfer.getData() - Web APIs
the datatransfer.getdata()
method retrieves drag data (as a domstring) for the specified type.
... if the drag operation does not include data, this
method returns an empty string.
...if the drag operation has no data or the operation has no data for the specified format, this
method returns an empty string.
... example this example shows the use of the datatransfer object's getdata() and setdata()
methods.
DataTransfer.mozSetDataAt() - Web APIs
the datatransfer.mozsetdataat()
method is used to add data to a specific index in the drag event's data transfer object.
... note: this
method is gecko-specific.
... return value void example this example shows the use of the mozsetdataat()
method in a dragstart handler.
... function dragstart_handler(event) { var dt = event.datatransfer; var idx = dt.mozitemcount; // add two new items to the drag transfer if (idx >= 0) { dt.mozsetdataat("text/uri-list","http://www.example.com/", idx); dt.mozsetdataat("text/html", "hello world", idx+1); } } specifications this
method is not defined in any web standard.
DataTransfer.mozTypesAt() - Web APIs
the datatransfer.moztypesat()
method returns a list of the format types that are stored for an item at the specified index.
... note: this
method is gecko-specific.
... example this example shows the use of the moztypesat()
method in a drop event handler.
... i < count; i++) { output(" item " + i + ":\n"); var types = dt.moztypesat(i); for (var t = 0; t < types.length; t++) { output(" " + types[t] + ": "); try { var data = dt.mozgetdataat(types[t], i); output("(" + (typeof data) + ") : <" + data + " >\n"); } catch (ex) { output("<>\n"); dump(ex); } } } } specifications this
method is not defined in any web standard.
DataTransfer.setDragImage() - Web APIs
however, if a custom image is desired, the datatransfer.setdragimage()
method can be used to set the custom image to be used.
... the
method's x and y coordinates define how the image should appear relative to the mouse pointer.
... this
method must be called in the dragstart event handler.
... return value void example this example shows how to use the setdragimage()
method.
DirectoryReaderSync - Web APIs
basic concepts before you call the only
method in this interface, readentries(), create the directoryentrysync object.
... if (!data.cmd || data.cmd != 'list') { return; } try { var fs = requestfilesystemsync(temporary, 1024*1024 /*1mb*/); getallentries(fs.root.createreader()); self.postmessage({entries: paths}); } catch (e) { onerror(e); } };
method overview entrysync readentries () raises (fileexception);
method readentries() returns a lost of entries from a specific directory.
... call this
method until an empty array is returned.
... entrysync readentries ( ) raises (fileexception); returns parameter none exceptions this
method can raise a fileexception with the following codes: exception description not_found_err the directory does not exist.
Document.createTouch() - Web APIs
note: before gecko 25.0, this
method was defined on the documenttouch mixin.
... the document.createtouch()
method creates and returns a new touch object.
... note: previous versions of this
method included the following additional parameters but those parameters are not included in either of the standards listed below.
... example this example illustrates using the document.createtouch()
method to create touch objects.
Document.getElementsByTagNameNS() - Web APIs
note: while the w3c specification says elements is a nodelist, this
method returns a htmlcollection both in gecko and internet explorer.
... opera returns a nodelist, but with a nameditem
method implemented, which makes it similar to a htmlcollection.
... note: currently parameters in this
method are case-sensitive, but they were case-insensitive in firefox 3.5 and before.
... note that when the node on which getelementsbytagname is invoked is not the document node, in fact the element.getelementsbytagnamens
method is used.
DocumentFragment - Web APIs
methods this interface inherits the
methods of its parent, node, and implements those of the parentnode interface.
... usage notes a common use for documentfragment is to create one, assemble a dom subtree within it, then append or insert the fragment into the dom using node interface
methods such as appendchild() or insertbefore().
... an empty documentfragment can be created using the document.createdocumentfragment()
method or the constructor.
... obsolete added the queryselector() and queryselectorall()
methods.
DocumentOrShadowRoot.getSelection() - Web APIs
example function foo() { var selobj = document.getselection(); alert(selobj); var selrange = selobj.getrangeat(0); // do stuff with the range } notes string representation of the selection object in javascript, when an object is passed to a function expecting a string (like window.alert()), the object's tostring()
method is called and the returned value is passed to the function.
... this can make the object appear to be a string when used with other functions when it is really an object with properties and
methods.
...however, attempting to use a javascript string property or
method such as length or substr directly on a selection object results in an error if it does not have that property or
method and may return unexpected results if it does.
... to use a selection object as a string, call its tostring()
method directly: var selectedtext = selobj.tostring(); selobj is a selection object.
Events and the DOM - Web APIs
eventtarget.addeventlistener // assuming mybutton is a button element mybutton.addeventlistener('click', greet, false) function greet(event){ // print and have a look at the event object // always print arguments in case of overlooking any other arguments console.log('greet:', arguments) alert('hello world') } this is the
method you should use in modern web pages.
... note: internet explorer 6–8 didn't support this
method, offering a similar eventtarget.attachevent api instead.
... warning: this
method should be avoided!
... the problem with this
method is that only one handler can be set per element and per event.
FileReader.readyState - Web APIs
none of the read
methods called yet.
... 1 loading a read
method has been called.
... empty the filereader has been created, but no readas
method was called yet.
... loading a readas
method was invoked.
FileSystemEntry - Web APIs
it includes
methods for working with files—including copying, moving, removing, and reading files—as well as information about a file it points to—including the file name and its path from the root to the entry.
... the filesystementry interface includes
methods that you would expect for manipulating files and directories, but it also includes a convenient
method for obtaining the url of the entry: tourl().
... example to see an example of how tourl() works, see the
method description.
...
methods this interface defines the following
methods.
File and Directory Entries API support in Firefox - Web APIs
using drag and drop by calling the datatransferitem.getasentry()
method, which lets you get a filesystemfileentry or filesystemdirectoryentry for files dropped on a drop zone.
... you can't use the localfilesystem.requestfilesystem()
method to get access to a specified local file system.
... the localfilesystem.resolvelocalfilesystemurl()
method isn't implemented.
...in particular, the filesystemfileentry.createwriter()
method, used to create a filewriter to handle writing to a file, is not implemented and will just treturn an error.
FormData.get() - Web APIs
the get()
method of the formdata interface returns the first value associated with a given key from within a formdata object.
... if you expect multiple values and want all of them, use the getall()
method instead.
... note: this
method is available in web workers.
...if the key doesn't exist, the
method returns null.
GainNode - Web APIs
to prevent this from happening, never change the value directly but use the exponential interpolation
methods on the audioparam interface.
...you shouldn't manually create a gain node; instead, use the
method audiocontext.creategain().
...you have to set audioparam.value or use the
methods of audioparam to change the effect of gain.
...
methods no specific
method; inherits
methods from its parent, audionode.
Geolocation API - Web APIs
in both cases, the
method call takes up to three arguments: a mandatory success callback: if the location retrieval is successful, the callback executes with a geolocationposition object as its only parameter, providing access to the location data.
... interfaces geolocation the main class of this api — contains
methods to retrieve the user's current position, watch for changes in their position, and clear a previously-set watch.
...a geolocationposition instance is returned by a successful call to one of the
methods contained inside geolocation, inside a success callback, and contains a timestamp plus a geolocationcoordinates object instance.
... geolocationpositionerror a geolocationpositionerror is returned by an unsuccessful call to one of the
methods contained inside geolocation, inside an error callback, and contains an error code and message.
HTMLAnchorElement - Web APIs
the htmlanchorelement interface represents hyperlink elements and provides special properties and
methods (beyond those of the regular htmlelement object interface that they inherit from) for manipulating the layout and presentation of such elements.
...
methods inherits
methods from its parent, htmlelement, and implements those from htmlhyperlinkelementutils.
... the blur() and focus()
methods are inherited from htmlelement from html5 on, but were defined on htmlanchorelement in dom level 2 html and earlier specifications.
... recommendation the
methods blur() and focus(), as well as the properties tabindex and accesskey, are now defined on htmlelement.
HTMLDialogElement.close() - Web APIs
the close()
method of the htmldialogelement interface closes the dialog.
... examples the following example shows a simple button that, when clicked, opens a <dialog> containing a form via the showmodal()
method.
... from there you can click the cancel button to close the dialog (via the htmldialogelement.close()
method), or submit the form via the submit button.
... <!-- simple pop-up dialog box, containing a form --> <dialog id="favdialog"> <form
method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="reset">cancel</button> <button type="submit">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); ...
HTMLDialogElement.show() - Web APIs
the show()
method of the htmldialogelement interface displays the dialog modelessly, i.e.
... examples the following example shows a simple button that, when clicked, opens a <dialog> containing a form via the show()
method.
... from there you can click the cancel button to close the dialog (via the htmldialogelement.close()
method), or submit the form via the submit button.
... <!-- simple pop-up dialog box, containing a form --> <dialog id="favdialog"> <form
method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="reset">cancel</button> <button type="submit">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); ...
HTMLDialogElement.showModal() - Web APIs
the showmodal()
method of the htmldialogelement interface displays the dialog as a modal, over the top of any other dialogs that might be present.
... examples the following example shows a simple button that, when clicked, opens a <dialog> containing a form via the showmodal()
method.
... from there you can click the cancel button to close the dialog (via the htmldialogelement.close()
method), or submit the form via the submit button.
... <!-- simple pop-up dialog box, containing a form --> <dialog id="favdialog"> <form
method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="reset">cancel</button> <button type="submit">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); ...
HTMLDialogElement - Web APIs
the htmldialogelement interface provides
methods to manipulate <dialog> elements.
... it inherits properties and
methods from the htmlelement interface.
...
methods inherits
methods from its parent, htmlelement.
... <!-- simple pop-up dialog box, containing a form --> <dialog id="favdialog"> <form
method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="reset">cancel</button> <b...
HTMLFormElement.requestSubmit() - Web APIs
the htmlformelement
method requestsubmit() requests that the form be submitted using a specific submit button.
... syntax htmlformelement.requestsubmit(submitter); parameters submitter optional the submit button whose attributes describe the
method by which the form is to be submitted.
... usage notes the obvious question is: why does this
method exist, when we've had the submit()
method since the dawn of time?
... if, on the other hand, requestsubmit() isn't available, this code falls back to calling the form's submit()
method.
HTMLMediaElement: pause event - Web APIs
the pause event is sent when a request to pause an activity is handled and the activity has entered its paused state, most commonly after the media has been paused through a call to the element's pause()
method.
... the event is sent once the pause()
method returns and after the media element's paused property has been changed to true.
...either the ' + 'pause()
method was called or the autoplay attribute was toggled.'); }); using the onpause event handler property: const video = document.queryselector('video'); video.onpause = (event) => { console.log('the boolean paused property is now true.
... either the ' + 'pause()
method was called or the autoplay attribute was toggled.'); }; specifications specification status html living standardthe definition of 'pause media event' in that specification.
HTMLScriptElement - Web APIs
html <script> elements expose the htmlscriptelement interface, which provides special properties and
methods for manipulating the behavior and execution of <script> elements (beyond the inherited htmlelement interface).
...these algorithms describe the core ideas, but they rely on the parsing rules for <script> start and end tags in html, in foreign content, and in xml; the rules for the document.write()
method; the handling of scripting; and so on.
... note: when inserted using the document.write()
method, <script> elements execute (typically synchronously), but when inserted using innerhtml or outerhtml, they do not execute at all.
...
methods no specific
methods; inherits
methods from its parent, htmlelement.
HTMLTableElement - Web APIs
the htmltableelement interface provides special properties and
methods (beyond the regular htmlelement object interface it also has available to it by inheritance) for manipulating the layout and presentation of tables in an html document.
...
methods inherits
methods from its parent, htmlelement.
... living standard added the sortable property and the stopsorting()
method.
... recommendation added the createtbody()
method.
HTMLVideoElement - Web APIs
the htmlvideoelement interface provides special properties and
methods for manipulating video objects.
... it also inherits properties and
methods of htmlmediaelement and htmlelement.
...
methods inherits
methods from its parent, htmlmediaelement, and from its ancestor htmlelement.
... events inherits
methods from its parent, htmlmediaelement, and from its ancestor htmlelement.
IDBCursor.continuePrimaryKey() - Web APIs
the continueprimarykey()
method of the idbcursor interface advances the cursor to the to the item whose key matches the key parameter as well as whose primary key matches the primary key parameter.
... calling this
method more than once before new cursor data has been loaded - for example, calling continueprimarykey() twice from the same onsuccess handler - results in an invalidstateerror being thrown on the second call because the cursor’s got value flag has been unset.
... this
method is only valid for cursors coming from an index.
... exceptions this
method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbcursor's transaction is inactive.
databases - Web APIs
the databases
method of the idbfactory interface returns a list represening all the available databases, including their names and versions.
... note: this
method is introduced in a draft of a specifications and browser compatibility is limited.
... syntax const promise = indexeddb.databases() parameters the
method does not take in any parameters.
... exceptions this
method may raise a domexception of the following types: attribute description securityerror the
method is called from an opaque origin.
IDBFactory.deleteDatabase() - Web APIs
the deletedatabase()
method of the idbfactory interface requests the deletion of a database.
... the
method returns an idbopendbrequest object immediately, and performs the deletion operation asynchronously.
... if the database is successfully deleted, then a success event is fired on the request object returned from this
method, with its result set to undefined.
... if an error occurs while the database is being deleted, then an error event is fired on the request object that is returned from this
method.
IDBFactory - Web APIs
methods idbfactory.open the current
method to request opening a connection to a database.
... idbfactory.deletedatabase a
method to request the deletion of a database.
... idbfactory.cmp a
method that compares two keys and returns a result indicating which one is greater in value.
... idbfactory.databases a
method that returns a list of all available databases, including their names and versions.
IDBObjectStore.add() - Web APIs
the add()
method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, creates a structured clone of the value, and stores the cloned value in the object store.
... the add
method is an insert only
method.
...for updating existing records, you should use the idbobjectstore.put
method instead.
... exceptions this
method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBObjectStore.createIndex() - Web APIs
the createindex()
method of the idbobjectstore interface creates and returns a new idbindex object in the connected database.
... note that this
method must be called only from a versionchange transaction mode callback.
... exceptions this
method may raise a domexception of one of the following types: exception description constrainterror occurs if an index with the same name already exists in the database.
... invalidstateerror occurs if either: the
method was not called from a versionchange transaction mode callback, i.e.
IDBObjectStore.deleteIndex() - Web APIs
the deleteindex()
method of the idbobjectstore interface destroys the index with the specified name in the connected database, used during a version upgrade.
... note that this
method must be called only from a versionchange transaction mode callback.
... note that this
method synchronously modifies the idbobjectstore.indexnames property.
... return value undefined exceptions this
method may raise a domexception of one of the following types: exception description invalidstateerror occurs if the
method was not called from a versionchange transaction mode callback.
IDBObjectStore.getAllKeys() - Web APIs
the getallkeys()
method of the idbobjectstore interface returns an idbrequest object retrieves record keys for all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.
... this
method produces the same result for: a record that doesn't exist in the database a record that has an undefined value to tell these situations apart, you need to call the opencursor()
method with the same key.
... that
method provides a cursor if the record exists, and no cursor if it does not.
... exceptions this
method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbobjectstore's transaction is inactive.
IDBObjectStore.put() - Web APIs
the put()
method of the idbobjectstore interface updates a given record in a database, or inserts a new record if the given item does not already exist.
... the put
method is an update or insert
method.
... see the idbobjectstore.add
method for an insert only
method.
... exceptions this
method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBTransaction.objectStore() - Web APIs
the objectstore()
method of the idbtransaction interface returns an object store that has already been added to the scope of this transaction.
... every call to this
method on the same transaction object, with the same name, returns the same idbobjectstore instance.
... if this
method is called on a different transaction object, a different idbobjectstore instance is returned.
... exceptions this
method may raise a domexception of one of the following types: exception description notfounderror the requested object store is not in this transaction's scope.
startSoftwareUpdate - Web APIs
method of installtrigger object syntax boolean startsoftwareupdate ( string url); parameters the startsoftwareupdate
method has the following parameter: url a uniform resource locator specifying the location of the xpi file containing the software.
... description the startsoftwareupdate
method triggers a software download and install from the specified url.
... this
method has been largely superseded by newer install
method, which is more flexible and allows you to install more than one xpi.
... note also that xpis installed with this
method must have their own install.js files in which the full installation is defined.
Timing element visibility with the Intersection Observer API - Web APIs
if the document has just become visible, we reverse this process: first we go through previouslyvisibleads and set each one's dataset.lastviewstarted to the current document's time (in milliseconds since the document was created) using the performance.now()
method.
...the string.padstart()
method is used to ensure that the number of seconds is padded out to two digits if it's less than 10.
...articles are inserted into the content box (that is, the <main> element that contains all the site content) after being created using a
method called createarticle(), which we'll look at next.
...then we call the observe()
method on our intersection observer, adobserver, to start watching the ad for changes to its intersection with the viewport.
Intersection Observer API - Web APIs
implementing intersection detection in the past involved event handlers and loops calling
methods like element.getboundingclientrect() to build up the needed information for every element affected.
...provides
methods for creating and managing an observer which can watch any number of target elements for the same intersection configuration.
... we call window.addeventlistener() to start listening for the load event; once the page has finished loading, we get a reference to the element with the id "box" using queryselector(), then call the createobserver()
method we'll create in a moment to handle building and installing the intersection observer.
... creating the intersection observer the createobserver()
method is called once page load is complete to handle actually creating the new intersectionobserver and starting the process of observing the target element.
Key Values - Web APIs
accepts the currently selected option or input
method sequence conversion.
... ime and composition keys keys used when using an input
method editor (ime) to input text which can't readily be entered by simple keypresses, such as text in languages such as those which have more graphemes than there are character entry keys on the keyboard.
... gdk_key_multi_key (0xff20) [1] qt::key_multi_key (0x01001120) "convert" [4] the convert key, which instructs the ime to convert the current input
method sequence into the resulting character.
...this accepts the current input
method sequence without running conversion when using an ime.
MSCandidateWindowHide - Web APIs
mscandidatewindowhide fires after the input
method editor (ime) candidate window closes and is fully hidden.
... this proprietary
method is specific to internet explorer.
... syntax event property object.oncandidatewindowhide = handler; addeventlistener
method object.addeventlistener("mscandidatewindowhide", handler, usecapture) nbsp; parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
... the handler of this event will see that the iscandidatewindowvisible
method returns false, and no clientrect object is returned from getcandidatewindowclientrect.
MSCandidateWindowShow - Web APIs
mscandidatewindowshow fires immediately after the input
method editor (ime) candidate window is set to appear, but before it renders.
... this proprietary
method is specific to internet explorer.
... syntax event property object.oncandidatewindowshow = handler; addeventlistener
method object.addeventlistener("mscandidatewindowshow", handler, usecapture) parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
...you can obtain the positioning information using the getcandidatewindowclientrect
method, and adjust your layout as needed to avoid any occlusions with the ime candidate window.
MSGestureEvent - Web APIs
though the msgestureevent.initgestureevent()
method is kept for backward compatibility, the creation of an msgestureevent object should be done using the msgestureevent() constructor.
...
methods this interface also inherits
methods of its parents, uievent and event.
...if the event has already being dispatched, this
method does nothing.
... this
method is deprecated as of microsoft edge.
MediaQueryList - Web APIs
methods the mediaquerylist interface inherits
methods from its parent interface, eventtarget.
...this
method exists primarily for backward compatibility; if possible, you should instead use addeventlistener() to watch for the change event.
...this
method has been kept for backward compatibility; if possible, you should generally use removeeventlistener() to remove change notification callbacks (which should have previously been added using addeventlistener()).
... you can find other examples on the individual property and
method pages.
MouseEvent.initMouseEvent() - Web APIs
the mouseevent.initmouseevent()
method initializes the value of a mouse event once it's been created (normally using the document.createevent()
method).
... events initialized in this way must have been created with the document.createevent()
method.
... this
method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... do not use this
method anymore as it is deprecated.
Navigator.requestMediaKeySystemAccess() - Web APIs
the navigator.requestmediakeysystemaccess()
method returns a promise which delivers a mediakeysystemaccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
... this
method is part of the encrypted media extensions api, which brings support for encrypted media and drm-protected video to the web.
... this
method may have user-visible effects such as asking for permission to access one or more system resources.
...as a general rule, this function should be called only when it's about time to create and use a mediakeys object by calling the returned mediakeysystemaccess object's createmediakeys()
method.
Navigator.vibrate() - Web APIs
the navigator.vibrate()
method pulses the vibration hardware on the device, if such hardware exists.
... if the device doesn't support vibration, this
method has no effect.
... if a vibration pattern is already in progress when this
method is called, the previous pattern is halted and the new one begins instead.
... if the
method was unable to vibrate because of invalid parameters, it will return false, else it returns true.
NavigatorID - Web APIs
the navigatorid interface contains
methods and properties related to the identity of the browser.
...
methods the navigatorid interface doesn't inherit any
methods.
...this
method is only kept for compatibility purposes.
... living standard added the appcodename property and the taintenabled()
method, for compatibility purpose.
Node.removeChild() - Web APIs
the node.removechild()
method removes a child node from the dom and returns the removed node.
... if child is actually not a child of the element node, the
method throws an exception.
... this will also happen if child was in fact a child of element at the time of the call, but was removed by an event handler invoked in the course of trying to remove the element (e.g., blur.) errors thrown the
method throws an exception in 2 different ways: if the child was in fact a child of element and so existing on the dom, but was removed the
method throws the following exception: uncaught notfounderror: failed to execute 'removechild' on 'node': the node to be removed is not a child of this node.
... if the child doesn't exist on the dom of the page, the
method throws the following exception: uncaught typeerror: failed to execute 'removechild' on 'node': parameter 1 is not of type 'node'.
Node.setUserData() - Web APIs
the node.setuserdata()
method allows a user to attach (or remove) data to an element, without needing to modify the dom.
... this
method offers the convenience of associating data with specific nodes without needing to alter the structure of a document and in a standard fashion, but it also means that extra steps may need to be taken if one wishes to serialize the information or include the information upon clone, import, or rename operations.
... the node.getuserdata and node.setuserdata
methods are no longer available from web content.
... handler is a callback which will be called any time the node is being cloned, imported, renamed, as well as if deleted or adopted; a function can be used or an object implementing the handle
method (part of the userdatahandler interface).
NodeIterator.nextNode() - Web APIs
the nodeiterator.nextnode()
method returns the next node in the set represented by the nodeiterator and advances the position of the iterator within the set.
... this
method returns null when there are no nodes left in the set.
... in old browsers, as specified in old versions of the specifications, the
method may throws the invalid_state_err domexception if this
method is called after the nodeiterator.detach()
method.
... living standard as detach() is now a no-op
method, this
method cannot throw anymore.
NodeIterator.previousNode() - Web APIs
the nodeiterator.previousnode()
method returns the previous node in the set represented by the nodeiterator and moves the position of the iterator backwards within the set.
... this
method returns null when the current node is the first node in the set.
... in old browsers, as specified in old versions of the specifications, the
method may throws the invalid_state_err domexception if this
method is called after the nodeiterator.detach()
method.
... living standard as detach() is now a no-op
method, this
method cannot throw anymore.
NodeIterator - Web APIs
syntax a nodeiterator can be created using the document.createnodeiterator()
method, as follows: const nodeiterator = document.createnodeiterator(root, whattoshow, filter); properties this interface doesn't inherit any property.
...
methods this interface doesn't inherit any
method.
... the
method detach() has been changed to be a no-op.
... the
methods previousnode() and nextnode() don't raise an exception any more.
NodeList - Web APIs
nodelist objects are collections of nodes, usually returned by properties such as node.childnodes and
methods such as document.queryselectorall().
...the ubiquitous document.queryselectorall()
method returns a static nodelist.
...
methods nodelist.item() returns an item in the list by its index, or null if the index is out-of-bounds.
... for...of loops will loop over nodelist objects correctly: const list = document.queryselectorall('input[type=checkbox]'); for (let checkbox of list) { checkbox.checked = true; } recent browsers also support iterator
methods (foreach()) as well as entries(), values(), and keys().
OES_vertex_array_object - Web APIs
webgl extensions are available using the webglrenderingcontext.getextension()
method.
...in webgl2, the functionality of this extension is available on the webgl2 context by default and the constants and
methods are available without the "oes" suffix.
... constants this extension exposes one new constant, which can be used in the gl.getparameter()
method: ext.vertex_array_binding_oes returns a webglvertexarrayobject object when used in the gl.getparameter()
method as the pname parameter.
...
methods this extension exposes four new
methods.
OscillatorNode - Web APIs
an oscillatornode is created using the baseaudiocontext.createoscillator()
method.
... if the default values are acceptable, you can simply call the baseaudiocontext.createoscillator() factory
method.
...
methods inherits
methods from its parent, audioscheduledsourcenode, and adds the following: oscillatornode.setperiodicwave() sets a periodicwave which describes a periodic waveform to be used instead of one of the standard waveforms; calling this sets the type to custom.
... this replaces the now-obsolete oscillatornode.setwavetable()
method.
PannerNode.setPosition() - Web APIs
the setposition()
method of the pannernode interface defines the position of the audio source relative to the listener (represented by an audiolistener object stored in the audiocontext.listener attribute.) the three parameters x, y and z are unitless and describe the source's position in 3d space using the right-hand cartesian coordinate system.
... the setposition()
method's default value of the position is (0, 0, 0).
... example in the following example, you can see an example of how the createpanner()
method, audiolistener and pannernode would be used to control audio spatialisation.
...if it supports those, or older
methods (like audiolistener.setorientation()) if it still supports those but not the new properties.
PannerNode.setVelocity() - Web APIs
the setvelocity()
method of the pannernode interface defines the velocity vector of the audio source — how fast it is moving and in what direction.
... this
method was removed from the specification because of gaps in its design and implementation problems.
... example in the following example, you can see an example of how the createpanner()
method, audiolistener and pannernode would be used to control audio spatialisation.
...if it supports those, or older
methods (like audiolistener.setorientation()) if it still supports those but not the new properties.
PaymentAddress - Web APIs
methods paymentaddress.tojson() a standard serializer that returns a json representation of the paymentaddress object's properties.
... examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment
methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options), and an optional object containing further options.
... const supportedinstruments = [ { supported
methods: "basic-card", }, ]; const details = { total: { label: "donation", amount: { currency: "usd", value: "65.00" } }, displayitems: [ { label: "original donation amount", amount: { currency: "usd", value: "65.00" }, }, ], shippingoptions: [ { id: "standard", label: "standard shipping", amount: { currency: "usd", value: "0.00" }, selected: true, }, ], }; const options = { requestshipping: true }; async function dopaymentrequest() { const request = new paymentrequest(supportedinstruments, details, option...
... const json = response.tojson(); const httpresponse = await fetch("/pay/", {
method: "post", body: json }); const result = httpresponse.ok ?
performance.getEntries() - Web APIs
the getentries()
method returns a list of all performanceentry objects for the page.
... the list's members (entries) can be created by making performance marks or measures (for example by calling the mark()
method) at explicit points in time.
... example function use_performanceentry_
methods() { console.log("performanceentry tests ..."); if (performance.mark === undefined) { console.log("...
... performance.mark not supported"); return; } // create some performance entries via the mark()
method performance.mark("begin"); do_work(50000); performance.mark("end"); performance.mark("begin"); do_work(100000); performance.mark("end"); do_work(200000); performance.mark("end"); // use getentries() to iterate through the each entry let p = performance.getentries(); for (var i=0; i < p.length; i++) { console.log("entry[" + i + "]"); check_performanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (let i=0; i < p.length; i++) { console.log ("mark only entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); ...
performance.getEntriesByName() - Web APIs
the getentriesbyname()
method returns a list of performanceentry objects for the given name and type.
... the list's members (entries) can be created by making performance marks or measures (for example by calling the mark()
method) at explicit points in time.
... example function use_performanceentry_
methods() { log("performanceentry tests ..."); if (performance.mark === undefined) { log("...
... performance.mark not supported"); return; } // create some performance entries via the mark()
method performance.mark("begin"); do_work(50000); performance.mark("end"); performance.mark("begin"); do_work(100000); performance.mark("end"); do_work(200000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); check_performanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performan...
performance.getEntriesByType() - Web APIs
the getentriesbytype()
method returns a list of performanceentry objects for a given type.
... the list's members (entries) can be created by making performance marks or measures (for example by calling the mark()
method) at explicit points in time.
... example function useperformanceentry
methods() { log("performanceentry tests ..."); if (performance.mark === undefined) { log("...
... performance.mark not supported"); return; } // create some performance entries via the mark()
method performance.mark("begin"); dowork(50000); performance.mark("end"); performance.mark("begin"); dowork(100000); performance.mark("end"); dowork(200000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); checkperformanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); checkperformanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.ge...
PerformanceObserverEntryList.getEntries() - Web APIs
the getentries()
method of the performanceobserverentrylist interface returns a list of explicitly observed performance entry objects for a given filter.
... the list's members are determined by the set of entry types specified in the call to the observe()
method.
... this
method is exposed to window and worker interfaces.
...the valid entry types are listed in the performanceentry.entrytype
method.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
the getentriesbyname()
method of the performanceobserverentrylist interface returns a list of explicitly observed performance entry objects for a given name and entry type.
... the list's members are determined by the set of entry types specified in the call to the observe()
method.
... this
method is exposed to window and worker interfaces.
... candidate recommendation initial definition of getentriesbyname()
method.
PerformanceObserverEntryList.getEntriesByType() - Web APIs
the getentriesbytype()
method of the performanceobserverentrylist returns a list of explicitly observed performance entry objects for a given performance entry type.
... the list's members are determined by the set of entry types specified in the call to the observe()
method.
... this
method is exposed to window and worker interfaces.
... candidate recommendation initial definition of getentriesbytype()
method.
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
isuserverifyingplatformauthenticatoravailable() is a static
method of the publickeycredential interface that returns a promise which resolves to true if a user-verifying platform authenticator is available.
... at the time of this writing, this
method's result only resolves to true on windows when windows hello capabilities are available (on recent versions of this os).
... note: this
method may only be used in top-level contexts and will not be available in an <iframe> for example.
... note: this is a static
method which is directly called on the publickeycredential interface and not on an instance.
PushManager.register() - Web APIs
the register
method is used to ask the system to request a new endpoint for notifications.
... this
method has been superceded by pushmanager.subscribe().
... syntax var request = navigator.push.register(); return a domrequest object to handle the success or failure of the
method call.
... if the
method call is successful, the request's result will be a string, which is the endpoint url.
PushManager.unregister() - Web APIs
the unregister()
method was used to ask the system to unregister and delete the specified endpoint.
... in the updated api, a subscription is can be unregistered via the pushsubscription.unsubscribe()
method.
... return a domrequest object to handle the success or failure of the
method call.
... if the
method call is successful, the request's result will be a pushregistration object representing the endpoint that has been unregistered.
PushMessageData - Web APIs
the pushmessagedata interface of the push api provides
methods which let you retrieve the push data sent by a server in various formats.
... unlike the similar
methods in the fetch api, which only allow the
method to be invoked once, these
methods can be called multiple times.
... messages received through the push api are sent encrypted by push services and then automatically decrypted by browsers before they are made accessible through the
methods of the pushmessagedata interface.
...
methods pushmessagedata.arraybuffer() extracts the data as an arraybuffer object.
RTCDataChannel.close() - Web APIs
the rtcdatachannel.close()
method closes the rtcdatachannel.
... either peer is permitted to call this
method to initiate closure of the channel.
... the sequence of events which occurs in response to this
method being called: rtcdatachannel.readystate is set to "closing".
... in firefox, the rtcdatachannel interface was implemented under the name datachannel until firefox 24, so this
method was called datachannel.close().
RTCPeerConnection.addTrack() - Web APIs
the rtcpeerconnection
method addtrack() adds a new media track to the set of tracks which will be transmitted to the other peer.
... reused senders this
method may return either a new rtcrtpsender or, under very specific circumstances, an existing compatible sender which has not yet been used to transmit data.
... the sender's set of associated streams is set to the list of streams passed into this
method, stream....
...it comes from the handlevideooffermsg()
method there, which is called when an offer message is received from the remote peer.
RTCPeerConnection.close() - Web APIs
the rtcpeerconnection.close()
method closes the current peer connection.
... syntax peerconnection.close(); this
method has no parameters, and returns nothing.
... calling this
method terminates the rtcpeerconnection's ice agent, ending any ongoing ice processing and any active streams.
... once this
method returns, the signaling state as returned by rtcpeerconnection.signalingstate is closed.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
the rtcrtptransceiver
method setcodecpreferences() configures the transceiver's codecs given a list of rtcrtpcodeccapability objects specifying the new preferences for each codec.
... the specified set of codecs and configurations will be used for all future connections including this transceiver until this
method is called again.
...if any unsupported codecs are listed, the browser will throw an invalidaccesserror exception when you call this
method.
... to determine which codecs are supported by the transceiver, call the sender's getcapabilities() and the receiver's getcapabilities()
methods and get the codecs list from the results of each.
Request() - Web APIs
the possible options are:
method: the request
method, e.g., get, post.
...note that a request using the get or head
method cannot have a body.
...hen(function(response) { var objecturl = url.createobjecturl(response); myimage.src = objecturl; }); in our fetch request with init example (see fetch request init live) we do the same thing except that we pass in an init object when we invoke fetch(): var myimage = document.queryselector('img'); var myheaders = new headers(); myheaders.append('content-type', 'image/jpeg'); var myinit = {
method: 'get', headers: myheaders, mode: 'cors', cache: 'default' }; var myrequest = new request('flowers.jpg',myinit); fetch(myrequest).then(function(response) { ...
... var myinit = {
method: 'get', headers: { 'content-type': 'image/jpeg' }, mode: 'cors', cache: 'default' }; var myrequest = new request('flowers.jpg', myinit); you may also pass a request object to the request() constructor to create a copy of the request (this is similar to calling the clone()
method.) var copy = new request(myrequest); note: this last usage is probably only useful in serviceworkers.
Using the Resource Timing API - Web APIs
to help the developer manage the buffer size, resource timing defines two
methods that extend the performance interface.
... the clearresourcetimings()
method removes all "resource" type performance entries from the browser's resource performance entry buffer.
... the setresourcetimingbuffersize()
method sets the resource performance entry buffer size to the specified number of resource performance entries.
... the following example demonstrates the usage of these two
methods.
Resource Timing API - Web APIs
methods the resource timing api includes two
methods that extend the performance interface.
... the clearresourcetimings()
method removes all "resource" type performance entries from the browser's resource performance entry buffer.
... the setresourcetimingbuffersize()
method sets the resource performance entry buffer size to the specified number of resource performance entries.
... the performanceresourcetiming interface's tojson()
method returns a json serialization of a "resource" type performance entry.
SVGLength - Web APIs
interface overview also implement none
methods void newvaluespecifiedunits(in unsigned short unittype, in float valueinspecifiedunits) void converttospecifiedunits(in unsigned short unittype) properties readonly unsigned short unittype float value float valueinspecifiedunits domstring valueasstring constants svg_lengthtype_unknown = 0 svg_lengthtype_number = 1 svg_lengthtype_percentage = 2 svg_lengthtype_ems = 3 svg_lengthtype_e...
...
methods name & arguments return description newvaluespecifiedunits(in unsigned short unittype, in float valueinspecifiedunits) void reset the value as a number with an associated unittype, thereby replacing the values for all of the attributes on the object.
...object attributes unittype, valueinspecifiedunits, and valueasstring might be modified as a result of this
method.
... for example, if the original value were "0.5cm" and the
method was invoked to convert to millimeters, then the unittype would be changed to svg_lengthtype_mm, valueinspecifiedunits would be changed to the numeric value 5 and valueasstring would be changed to "5mm".
SVGTextContentElement - Web APIs
methods this interface also inherits
methods from its parent, svggraphicselement.
...note that this
method only accounts for the widths of the glyphs in the substring and any extra spacing inserted by the css 'letter-spacing' and 'word-spacing' properties.
... note: in svg 1.1 this
method returned an svgpoint.
... note: in svg 1.1 this
method returned an svgpoint.
Screen Capture API - Web APIs
its sole
method is mediadevices.getdisplaymedia(), whose job is to ask the user to select a screen or portion of a screen to capture in the form of a mediastream.
... additions to existing interfaces the screen capture api doesn't have any interfaces of its own; instead, it adds one
method to the existing mediadevices interface.
... mediadevices interface mediadevices.getdisplaymedia() the getdisplaymedia()
method is added to the mediadevices interface.
... similar to getusermedia(), this
method creates a promise that resolves with a mediastream containing the display area selected by the user, in a format that matches the specified options.
ServiceWorkerContainer - Web APIs
most importantly, it exposes the serviceworkercontainer.register()
method used to register service workers, and the serviceworkercontainer.controller property used to determine whether or not the current page is actively controlled.
...
methods serviceworkercontainer.register() creates or updates a serviceworkerregistration for the given scripturl.
... the
method returns a promise that resolves to a serviceworkerregistration or undefined.
... the
method returns a promise that resolves to an array of serviceworkerregistration.
StorageEvent - Web APIs
k:href="/docs/web/api/storageevent" target="_top"><rect x="116" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="176" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;}
method overview void initstorageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalue, in domstring newvalue, in usvstring url, in storage storagearea ); attributes attribute type description key domstring represents the key changed.
... the key attribute is null when the change is caused by the storage clear()
method.
...the newvalue is null when the change has been invoked by storage clear()
method or the key has been removed from the storage.
...
methods initstorageevent() initializes the event in a manner analogous to the similarly-named initevent()
method in the dom events interfaces.
Storage Access API - Web APIs
the api provides
methods that allow embedded resources to check whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent.
... the storage access api is intended to solve this problem; embedded cross-origin content can request unrestricted access to its first-party storage on a site-by-site basis via the document.requeststorageaccess()
method, and check whether it already has access via the document.hasstorageaccess()
method.
... storage access api
methods the storage api
methods are implemented on the document interface: document.hasstorageaccess() returns a promise that resolves with a boolean value indicating whether the document has access to its first-party storage.
... note: user interaction propagates to the promise returned by both of these
methods, allowing the callers to take actions that require user interaction without requiring a second click from the user.
SubtleCrypto.unwrapKey() - Web APIs
the unwrapkey()
method of the subtlecrypto interface "unwraps" a key.
... supported algorithms the unwrapkey()
method supports the same algorithms as the wrapkey()
method.
...*/ function bytestoarraybuffer(bytes) { const bytesasarraybuffer = new arraybuffer(bytes.length); const bytesuint8 = new uint8array(bytesasarraybuffer); bytesuint8.set(bytes); return bytesasarraybuffer; } /* get some key material to use as input to the derivekey
method.
...*/ function bytestoarraybuffer(bytes) { const bytesasarraybuffer = new arraybuffer(bytes.length); const bytesuint8 = new uint8array(bytesasarraybuffer); bytesuint8.set(bytes); return bytesasarraybuffer; } /* get some key material to use as input to the derivekey
method.
Text - Web APIs
the node.normalize()
method merges adjacent text objects back into a single node for each block of text.
...
methods inherits
methods from its parent, characterdata.
... removed the replacewholetext()
method.
... added the replacewholetext()
method.
TextDecoder - Web APIs
constructor textdecoder() returns a newly constructed textdecoder that will generate a code point stream with the decoding
method specified in parameters.
... textdecoder.prototype.encodingread only is a domstring containing the name of the decoder, that is a string describing the
method the textdecoder will use.
...
methods the textdecoder interface doesn't inherit any
method.
... textdecoder.prototype.decode() returns a domstring containing the text decoded with the
method of the specific textdecoder object.
UIEvent - Web APIs
although the uievent.inituievent()
method is kept for backward compatibility, you should create a uievent object using the uievent() constructor.
...
methods this interface also inherits
methods of its parent, event.
...if the event has already being dispatched, this
method does nothing.
... obsolete added the uievent() constructor, deprecated the inituievent()
method and changed the type of view from abstractview to windowproxy.
URL - Web APIs
methods tostring() returns a usvstring containing the whole url.
... static
methods createobjecturl() returns a domstring containing a unique blob url, that is a url with blob: as its scheme, followed by an opaque string uniquely identifying the object in the browser.
... to get the search params from the current window's url, you can do this: // https://some.site/?id=123 const parsedurl = new url(window.location.href); console.log(parsedurl.searchparams.get("id")); // "123" the tostring()
method of url just returns the value of the href property, so the constructor can be used to normalize and encode a url directly.
... working draft added the static
methods url.createobjecturl() and url.revokeobjecturl().
WEBGL_draw_buffers - Web APIs
webgl extensions are available using the webglrenderingcontext.getextension()
method.
... constants this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffertexture2d(), gl.getframebufferattachmentparameter() ext.drawbufferswebgl(), and gl.getparameter()
methods.
...
methods this extension exposes one new
method.
...(when using webgl2, this
method is available as gl.drawbuffers() by default).
WakeLockSentinel - Web APIs
an object representing the wake lock is returned via the navigator.wakelock.request()
method.
... an acquired wakelocksentinel can be released manually via the release()
method, or automatically via the platform wake lock.
... event handlers onrelease fired when the release()
method is called or the wake lock is released by the user agent.
...
methods release() releases the wakelocksentinel, returning a promise that is resolved once the sentinel has been successfully released.
WebGLRenderingContext.getUniformLocation() - Web APIs
part of the webgl api, the webglrenderingcontext
method getuniformlocation() returns the location of a specific uniform variable which is part of a given webglprogram.
... once you have the uniform's location, you can access the uniform itself using one of the other uniform access
methods, passing in the uniform location as one of the inputs: getuniform() returns the value of the uniform at the given location.
...with this value in hand, you can call other webgl
methods to access the value of the uniform variable.
... example in this example, taken from the animatescene()
method in the article a basic 2d webgl animation example, obtains the locations of three uniforms from the shading program, then sets the value of each of the three uniforms.
Clearing with colors - Web APIs
first, we set the clear color to green, using the
method clearcolor().
...next, we actually do the drawing by calling the clear()
method.
...there is only a handful of
methods for actual drawing (clear() is one of them).
... all other
methods are for setting and querying webgl state variables (such as the clear color).
WebGL constants - Web APIs
line_width 0x0b21 passed to getparameter to get the current linewidth (set by the linewidth
method).
...can also be used with getparameter to find the current culling
method.
...can also be used with getparameter to find the current blending
method.
...can also be used with getparameter to find the current dithering
method.
Adding 2D content to a WebGL context - Web APIs
it starts by calling the gl object's createbuffer()
method to obtain a buffer into which we'll store the vertex positions.
... this is then bound to the context by calling the bindbuffer()
method.
...this is then converted into an array of floats and passed into the gl object's bufferdata()
method to establish the vertex positions for the object.
...finally we draw the object by calling the drawarrays()
method.
Writing a WebSocket server in C# - Web APIs
to create an ipaddress object from a string, use the parse static
method of ipaddress.
...
methods: start() system.net.sockets.tcpclient accepttcpclient() waits for a tcp connection, accepts it and returns it as a tcpclient object.
...em; class server { public static void main() { tcplistener server = new tcplistener(ipaddress.parse("127.0.0.1"), 80); server.start(); console.writeline("server has started on 127.0.0.1:80.{0}waiting for a connection...", environment.newline); tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); } } tcpclient
methods: system.net.sockets.networkstream getstream() gets the stream which is the communication channel.
... networkstream
methods: write(byte[] buffer, int offset, int size) writes bytes from buffer, offset and size determine length of message.
Using bounded reference spaces - Web APIs
creating the reference space simply requesting support for bounded-floor when calling the xrsystem
method requestsession() isn't enough to get a bounded space.
...if you wish to simulate a human's perspective on the scene, you probably want to move the viewpoint upward by a distance that approximates human eye level by transforming it by providing an appropriate transform matrix to the xrreferencespace
method requestoffsetreferencespace().
... this would change the onrefspacecreated()
method from the above snippet to: function onrefspacecreated(refspace) { xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); let startposition = vec3.fromvalues(0, 1.5, 0); const startorientation = vec3.fromvalues(0, 0, 1.0); xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(startposition, startorientation)); xrsession.requestanimationframe(ondrawframe); } in this code, executed after the reference space has been created, we create an xrrigidtransform representing the transform that will move the viewpoint upward by 1.5 meters.
...finally, drawing begins by calling the xrsession
method requestanimationframe().
Web Audio API best practices - Web APIs
we can use the same click event example here, test for the state of the context and start it, if it is suspended, using the resume()
method.
...ntext(); const button = document.queryselector('button'); button.addeventlistener('click', function() { // check if context is in suspended state (autoplay policy) if (audioctx.state === 'suspended') { audioctx.resume(); } }, false); you might instead be working with an offlineaudiocontext, in which case you can resume the suspended audio context with the startrendering()
method.
...however, if you're using any of the audioparam's defined
methods to set these values, they will take precedence over the above property setting.
... bearing this in mind, if your website or application requires timing and scheduling, it's best to stick with the audioparam
methods for setting values.
Controlling multiple parameters with ConstantSourceNode - Web APIs
then we assign a handler for the play button's click event (see toggling the oscillators on and off for more on the toggleplay()
method), and for the volume slider's input event (see controlling the linked oscillators to see the very short changevolume()
method).
...we connect its output to the gain audioparam on both gainnode2 and gainnode3, and we start the constant node running by calling its start()
method; now it's sending the value 0.5 to the two gain nodes' values, and any change to constantnode.offset will automatically set the gain of both gainnode2 and gainnode3 (affecting their audio inputs as expected).
... once all three oscillators have been created, they're started by calling each one's constantsourcenode.start()
method in turn, and playing is set to true to track that the tones are playing.
... function stoposcillators() { oscnode1.stop(); oscnode2.stop(); oscnode3.stop(); playing = false; } each node is stopped by calling its constantsourcenode.stop()
method, then playing is set to false.
Visualizations with Web Audio API - Web APIs
basic concepts to extract data from your audio source, you need an analysernode, which is created using the audiocontext.createanalyser()
method, for example: var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var analyser = audioctx.createanalyser(); this node is then connected to your audio source at some point between your source and your destination, for example: source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(audioctx.destination);...
... to capture data, you need to use the
methods analysernode.getfloatfrequencydata() and analysernode.getbytefrequencydata() to capture frequency data, and analysernode.getbytetimedomaindata() and analysernode.getfloattimedomaindata() to capture waveform data.
... these
methods copy data into a specified array, so you need to create a new array to receive the data before invoking one.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); to actually retrieve the data and copy it into our array, we then call the data collection
method we want, with the array passed as it's argument.
Web Audio API - Web APIs
audioparammap provides a maplike interface to a group of audioparam interfaces, which means it provides the
methods foreach(), get(), has(), keys(), and values(), as well as a size property.
... audiobuffer the audiobuffer interface represents a short audio asset residing in memory, created from an audio file using the audiocontext.decodeaudiodata()
method, or created with raw data using audiocontext.createbuffer().
...when creating the node using the createmediastreamtracksource()
method to create the node, you specify which track to use.
...we have a boombox that plays our 'tape', and we can adjust the volume and stereo panning, giving us a fairly basic working audio graph.visualizations with web audio apito extract data from your audio source, you need an analysernode, which is created using the audiocontext.createanalyser()
method, for example:web audio api best practicesthere's no strict right or wrong way when writing creative code.
Window.close() - Web APIs
the window.close()
method closes the current window, or the window on which it was called.
... this
method can only be called on windows that were opened by a script using the window.open()
method.
... syntax window.close(); examples closing a window opened with window.open() this example shows a
method which opens a window and a second one which closes the window; this demonstrates how to use window.close() to close a window opened by calling window.open().
... //global var to store a reference to the opened window var openedwindow; function openwindow() { openedwindow = window.open('moreinfo.htm'); } function closeopenedwindow() { openedwindow.close(); } closing the current window in the past, when you called the window object's close()
method directly, rather than calling close() on a window instance, the browser closed the frontmost window, whether your script created that window or not.
Window.convertPointFromNodeToPage() - Web APIs
given a point specified in a particular dom node's coordinate system, the window
method convertpointfromnodetopage() returns a point which specifies the same position in the page's coordinate system.
... this
method is non-standard and should not be used.
... please review the browser compatibility section before using this
method, as it's not widely supported (nor is the point object it uses).
... specifications this
method was specified in the defunct 20 march 2009 working draft of css 2d transforms module level 3.
Window: popstate event - Web APIs
these
methods and their corresponding events can be used to add data to the history stack which can be used to reconstruct a dynamically generated page, or to otherwise alter the state of the content being presented while remaining on the same document.
...if the goal is to catch the moment when the new document state is already fully in place, a zero-delay settimeout()
method call should be used to effectively put its inner callback function that does the processing at the end of the browser event loop: window.onpopstate = () => settimeout(dosomething, 0); when popstate is sent when the transition occurs, either due to the user triggering the browser's "back" button or otherwise, the popstate event is near the end of the process to transition to the new location.
... if current-entry's title wasn't set using one of the history api
methods (pushstate() or replacestate(), set the entry's title to the string returned by its document.title attribute.
... if the history traversal is being performed with replacement enabled, the entry immediately prior to the destination entry (taking into account the delta parameter on
methods such as go()) is removed from the history stack.
Window.print() - Web APIs
in most browsers, this
method will block while the print dialog is open.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprintchrome full support 1notes full support 1notes notes starting with chrome 46, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 5opera full support 6notes full support ...
... 6notes notes starting with opera 33, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.safari full support 1.1webview android full support 1notes full support 1notes notes starting with webview 46, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.firefox android no sup...
...port nonotes no support nonotes notes see bug 1247609.opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.safari ios full support 1samsung internet android full support 1.0notes full support 1.0notes notes starting with samsung internet 5.0, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.legend ...
Window.prompt() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpromptchrome full support 1notes full support 1notes notes starting with chrome 46, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 4notes full support 4notes notes this function has no effect in the modern...
...desktop versions of ie do implement this function.opera full support 3notes full support 3notes notes starting with opera 33, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.safari full support 1webview android full support 1notes full support 1notes notes starting with webview 46, this
method is blocked inside an <iframe> unless its sandbox attribu...
...te has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.firefox android full support 4opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.safari ios full support 1samsung internet android full support ...
... 1.0notes full support 1.0notes notes starting with samsung internet 5.0, this
method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.legend full support full supportsee implementation notes.see implementation notes.
Window.setImmediate() - Web APIs
this
method is used to break up long running operations and run a callback function immediately after the browser has completed other operations such as events and display updates.
... this
method is not expected to become standard, and is only implemented by recent builds of internet explorer and node.js 0.10+.
... notes the clearimmediate
method can be used to clear the immediate actions, just like cleartimeout for settimeout.
... this
method can be used instead of the settimeout(fn, 0)
method to execute heavy operations.
XMLHttpRequest.open() - Web APIs
the xmlhttprequest
method open() initializes a newly-created request, or re-initializes an existing one.
... note: calling this
method for an already active request (one for which open() has already been called) is the equivalent of calling abort().
... syntax xmlhttprequest.open(
method, url[, async[, user[, password]]]) parameters
method the http request
method to use, such as "get", "post", "put", "delete", etc.
...if this value is false, the send()
method does not return until the response is received.
XMLSerializer - Web APIs
the xmlserializer interface provides the serializetostring()
method to construct an xml string representing a dom tree.
...
methods serializetostring() returns the serialized subtree of a string.
... inserting nodes into a dom based on xml this example uses the element.insertadjacenthtml()
method to insert a new dom node into the body of the document, based on xml created by serializing an element object.
... note: in the real world, you should usually instead call importnode()
method to import the new node into the dom, then call one of the following
methods to add the node to the dom tree: the document and element
methods append() and prepend() the node.replacewith()
method (to replace an existing node with the new one) the document.insertadjacentelement() and element.insertadjacentelement()
methods.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
the xrreferencespace interface's getoffsetreferencespace()
method returns a new reference space object which describes the relative difference in position between the object on which the
method is called and a given point in 3d space.
...this is demonstrated in the example implementing rotation based on non-xr inputs, which demonstrates a way to use this
method to let the user use their mouse to pitch and yaw their viewing angle.
... return value a new xrreferencespace object describing a reference space with the same native origin as the reference space on which the
method was called, but with an origin offset indicating the distance from the object to the point given by originoffset.
... if the object on which you call this
method is an xrboundedreferencespace, the returned object is one as well.
XRSystem: isSessionSupported() - Web APIs
the xrsystem
method issessionsupported() returns a promise which resolves to true if the specified webxr session mode is supported by the user's webxr device.
...if it is, we set up a button to read "enter xr", to call a
method onbuttonclicked(), and enable the button.
... if no session is already underway, we request the vr session and, if successful, set up the session in a
method called onsessionstarted(), not shown.
... if a session is already underway when the button is clicked, we call the xrsession object's end()
method to shut down the webxr session.
XRSystem: requestSession() - Web APIs
the xrsystem interface's requestsession()
method returns a promise which resolves to an xrsession object through which you can manage the requested type of webxr session.
...the session's environmentblendmode indicates the
method to be used to blend the content together.
... exceptions this
method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: invalidstateerror the requested session mode is immersive-vr but there is already an immersive vr session either currently active or in the process of being set up.
...finally, the onbuttonclicked()
method calls requestsession() using the same session option passed to issessionsupported().
XRWebGLLayer - Web APIs
framebuffer read only returns a webglframebuffer suitable for passing into the bindframebuffer()
method.
...
methods getviewport() returns a new xrviewport instance representing the position, width, and height to which the webgl context's viewport must be set to contain drawing to the area of the framebuffer designated for the specified view's contents.
... static
methods getnativeframebufferscalefactor() returns the scaling factor that can be used to scale the resolution of the recommended webgl framebuffer resolution to the rendering device's native resolution.
... let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); rendering every view in a frame each time the gpu is ready to render the scene to the xr device, the xr runtime calls the function you specified when you called the xrsession
method requestanimationframe() to ask to render the frame.
Cognitive accessibility - Accessibility
headings are more obvious navigational aids compared to other
methods to identify page content sections (borders, whitespace, horizontal rules, etc.).
... multiple ways to find content different users prefer different
methods of finding information, so it is important to provide multiple ways for users to locate content on your site.
...
methods to achieve this include: using short, simple words.
... be consistent and predictable, and use norms while unlabeled iconography is not the most effective
method of conveying information, keeping the use of the icons (and if labeled, their label text) consistent helps people to understand what the icon represents.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
the box alignment specification details how alignment works in various layout
methods.
...as this page aims to detail things which are specific to block layout and box alignment, it should be read in conjunction with the main box alignment page, which details the common features of box alignment across layout
methods.
...if a content distribution
method such as space-between, space-around or space-evenly is requested then the fallback alignment will be used, as the content is treated as a single alignment subject.
... aligning in these layout
methods today as we do not currently have browser support for box alignment in block layout, your options for alignment are either to use one of the existing alignment
methods or, to make even a single item inside a container a flex item in order to use the alignment properties as specified in flexbox.
Box alignment in grid layout - CSS: Cascading Style Sheets
the box alignment specification details how alignment works in various layout
methods.
... as this page aims to detail things which are specific to css grid layout and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout
methods.
... grid axes as a two-dimensional layout
method, when working with grid layout we always have two axes on which to align our items.
...this allows them to be used for other layout
methods where a gap between items makes sense.
Box alignment in Multi-column Layout - CSS: Cascading Style Sheets
the box alignment specification details how alignment works in various layout
methods; on this page we explore how box alignment works in the context of multi-column layout.
... as this page aims to detail things which are specific to multi-column layout and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout
methods.
... column-gap the column-gap property was specified in earlier versions of the multiple-column layout specification, and has now been unified with the gap properties for other layout
methods in box alignment.
... while other layout
methods treat the initial value of column-gap as 0 multicol treats it as 1em, as in general you would not want to have no gap between columns.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
in this guide we will look at how well flexbox is supported in browsers, and look at some potential issues, resources and
methods for creating workarounds and fallbacks.
...at the time the
method of creating experimental implementations was to use a vendor prefix.
... useful fallback techniques given that flexbox usage is initiated with value of the display property, when needing to support very old browsers which do not support flexbox at all, fallbacks can be created by overwriting one layout
method with another.
... the specification defines what happens if you use other layout
methods on an element which then becomes a flex item.
Basic concepts of flexbox - CSS: Cascading Style Sheets
the flexible box module, usually referred to as flexbox, was designed as a one-dimensional layout model, and as a
method that could offer space distribution between items in an interface and powerful alignment capabilities.
...modern layout
methods encompass the range of writing modes and so we no longer assume that a line of text will start at the top left of a document and run towards the right hand side, with new lines appearing one under the other.
... after a while, thinking about start and end rather than left and right becomes natural, and will be useful to you when dealing with other layout
methods such as css grid layout which follow the same patterns.
... if we instead would like the items to grow and fill the space, then we need to have a
method of distributing the leftover space between the items.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
choose the
method you find most helpful for the problems that you are solving and the designs that you need to implement.
...i find this named areas
method very helpful at a prototyping stage, it is easy to play around with the location of elements.
... building a layout using the 12-column system to see how this layout
method works in practice, we can create the same layout that we created with grid-template-areas, this time using the 12-column grid system.
...don’t forget to find examples that are impossible to build with current
methods.
Event reference
emptied the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load()
method is called to reload it.
...for example, this event is triggered if the media has already been loaded (or partially loaded), and the load()
method is called to reload it.
... voiceschanged event web speech api the list of speechsynthesisvoice objects that would be returned by the speechsynthesis.getvoices()
method has changed (when the voiceschanged event fires.) versionchange indexeddb a versionchange transaction completed.
... mozbrowserfindchange firefox os browser api-specific sent when a search operation is performed on the browser <iframe> content (see htmliframeelement search
methods.) mozbrowserfirstpaint firefox os browser api-specific sent when the <iframe> paints content for the first time (this doesn't include the initial paint from about:blank.) mozbrowsericonchange firefox os browser api-specific sent when the favicon of a browser <iframe> changes.
Writing Web Audio API code that works in every browser - Developer guides
furthermore, as a result of the spec being still in flux, some browsers use deprecated properties and
method names that are not present in standards-compliant browsers: safari uses the old
method names, firefox uses the new ones, and chrome and opera use both.
...also, if new
methods such as start are not detected in some nodes, the library will also alias them to their old names.
...if you're porting moderately "old" code (say, a year old) it's possible that it uses some
methods that audiocontext-monkeypatch doesn't alias, because it helps you to write code in the new style.
... for example, the way to create instances of gainnode used to be var gain = audiocontext.creategainnode(); but nowadays it is just var gain = audiocontext.creategain(); since the old
method names are not present in firefox, existing code may crash with something like creategainnode is not a function, and you now know why.
DOM onevent handlers - Developer guides
in order to allow multiple handlers to be installed for the same event on a given object, you can call its addeventlistener()
method, which manages a list of handlers for the given event on the object.
... further changes to the html attribute value can be done via the setattribute
method; making changes to the javascript property will have no effect.
...using .onclick log('<br>changing onclick handler using <strong> onclick property </strong> '); el.onclick = anchoronclick; log(`changed the property to: <code> ${el.onclick.tostring()} </code>`); log(`but the html attribute is unchanged: <code> ${el.getattribute("onclick")} </code><br>`); //changing handler using .setattribute log('<hr/><br> changing onclick handler using <strong> setattribute
method </strong> '); el.setattribute("onclick", 'anchoronclick(event)'); log(`changed the property to: <code> ${el.onclick.tostring()} </code>`); log(`now even the html attribute has changed: <code> ${el.getattribute("onclick")} </code><br>`); result for historical reasons, some attributes/properties on the <body> and <frameset> elements instead set event handlers on their parent window object.
... when discussing the various
methods of listening to events: event listener refers to a function or object registered via eventtarget.addeventlistener() event handler refers to a function registered via on… attributes or properties specifications specification status comment html living standardthe definition of 'event handlers' in that specification.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
"cc-number" a credit card number or other number identifying a payment
method, such as an account number.
... "cc-exp" a payment
method expiration date, typically in the form "mm/yy" or "mm/yyyy".
... "cc-exp-month" the month in which the payment
method expires.
... "cc-exp-year" the year in which the payment
method expires.
HTML attribute: multiple - HTML: Hypertext Markup Language
file input when multiple is set on the file input type, the user can select one or more files: <form
method="post" enctype="multipart/form-data"> <p> <label for="uploads"> choose the images you want to upload: </label> <input type="file" id="uploads" name="uploads" accept=".jpg, .jpeg, .png, .svg, .gif" multiple> </p> <p> <label for="text">pick a text file to upload: </label> <input type="file" id="text" name="text" accept=".txt"> </p> <p> <input type="submit" va...
... when the form is submitted,had we used
method="get" each selected file's name would have been added to url parameters as?uploads=img1.jpg&uploads=img2.svg.
... <form
method="get" action="#"> <p> <label for="dwarfs">select the woodsmen you like:</label> <select multiple name="drawfs" id="drawfs"> <option>grumpy@woodworkers.com</option> <option>happy@woodworkers.com</option> <option>sleepy@woodworkers.com</option> <option>bashful@woodworkers.com</option> <option>sneezy@woodworkers.com</option> <option>dopey@woodworkers.com</option> <opti...
...if you do change the appearance of a select, and even if you don't, make sure to inform the user that more than one option can be selected by another
method.
<input type="file"> - HTML: Hypertext Markup Language
events change and input supported common attributes required additional attributes accept, capture, files, multiple idl attributes files and value dom interface htmlinputelement properties properties that apply only to elements of type file
methods select() value a file input's value attribute contains a domstring that represents the path to the selected file(s).
...for example, a file picker that needs content that can be presented as an image, including both standard image formats and pdf files, might look like this: <input type="file" accept="image/*,.pdf"> using file inputs a basic example <form
method="post" enctype="multipart/form-data"> <div> <label for="file">choose file to upload</label> <input type="file" id="file" name="file" multiple> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } this produces the following output: note: you can find this example on github too — see the source code, and also see it running live.
... let's look at a more complete example: <form
method="post" enctype="multipart/form-data"> <div> <label for="profile_pic">choose file to upload</label> <input type="file" id="profile_pic" name="profile_pic" accept=".jpg, .jpeg, .png"> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } this produces a similar-looking output to the previous example: note: you can find this example ...
... first of all, let's look at the html: <form
method="post" enctype="multipart/form-data"> <div> <label for="image_uploads">choose images to upload (png, jpg)</label> <input type="file" id="image_uploads" name="image_uploads" accept=".jpg, .jpeg, .png" multiple> </div> <div class="preview"> <p>no files currently selected for upload</p> </div> <div> <button>submit</button> </div> </form> html { font-family: sans-serif...
HTTP conditional requests - HTTP
the different behaviors are defined by the
method of the request used, and by the set of headers used for a precondition: for safe
methods, like get, which usually tries to fetch a document, the conditional request can be used to send back the document, if relevant only.
... for unsafe
methods, like put, which usually uploads a document, the conditional request can be used to upload the document, only if the original it is based on is the same as that stored on the server.
...the more flexible one makes use of if-unmodified-since and if-match and the server returns an error if the precondition fails; the client then restarts the download from the beginning: even if this
method works, it adds an extra response/request exchange when the document has been changed.
... with the put
method you are able to implement this.
Allow - HTTP
the allow header lists the set of
methods supported by a resource.
... this header must be sent if the server responds with a 405
method not allowed status code to indicate which request
methods can be used.
... an empty allow header indicates that the resource allows no request
methods, which might occur temporarily for a given resource, for example.
... header type entity header forbidden header name no syntax allow: <http-
methods> directives <http-
methods> the comma-separated list of allowed http request
methods.
CSP: script-src - HTTP
'unsafe-eval' allows the use of eval() and similar
methods for creating code from strings.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer
method than using the unsafe-inline expression.
... <script>var inline = 1;</script> unsafe eval expressions the 'unsafe-eval' source expression controls several script execution
methods that create code from strings.
... if 'unsafe-eval' isn't specified with the script-src directive, the following
methods are blocked and won't have any effect: eval() function() when passing a string literal like to
methods like: window.settimeout("alert(\"hello world!\");", 500); window.settimeout window.setinterval window.setimmediate window.execscript (ie < 11 only) strict-dynamic the 'strict-dynamic' source expression specifies that the trust explicitly given to a script present in the markup, by accompanying it with a nonce or a hash, shall be propagated to all the scripts loaded by that root script.
CSP: style-src - HTTP
'unsafe-eval' allows the use of eval() and similar
methods for creating code from strings.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer
method than using the unsafe-inline expression.
... <style>#inline-style { background: red; }</style> unsafe style expressions the 'unsafe-eval' source expression controls several style
methods that create style declarations from strings.
... if 'unsafe-eval' isn't specified with the style-src directive, the following
methods are blocked and won't have any effect: cssstylesheet.insertrule() cssgroupingrule.insertrule() cssstyledeclaration.csstext specifications specification status comment content security policy level 3the definition of 'style-src' in that specification.
If-Match - HTTP
for get and head
methods, the server will send back the requested resource only if it matches one of the listed etags.
... for put and other non-safe
methods, it will only upload the resource in this case.
... there are two common use cases: for get and head
methods, used in combination with a range header, it can guarantee that the new ranges requested comes from the same resource than the previous one.
... for other
methods, and in particular for put, if-match can be used to prevent the lost update problem.
302 Found - HTTP
even if the specification requires the
method (and the body) not to be altered when the redirection is performed, not all user-agents conform here - you can still find this type of bugged software out there.
... it is therefore recommended to set the 302 code only as a response for get or head
methods and to use 307 temporary redirect instead, as the
method change is explicitly prohibited in that case.
... in the cases where you want the
method used to be changed to get, use 303 see other instead.
... this is useful when you want to give a response to a put
method that is not the uploaded resource but a confirmation message such as: 'you successfully uploaded xyz'.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
the non-standard generic string
methods are deprecated and have been removed in firefox 68 and later.
... string generics provide string instance
methods on the string object allowing string
methods to be applied to any object.
... examples deprecated syntax var num = 15; string.replace(num, /5/, '2'); standard syntax var num = 15; string(num).replace(/5/, '2'); shim the following is a shim to provide support to non-supporting browsers: /*globals define*/ // assumes all supplied string instance
methods already present // (one may use shims for these if not available) (function() { 'use strict'; var i, // we could also build the array of
methods with the following, but the // getownpropertynames()
method is non-shimable: // object.getownpropertynames(string).filter(function(
methodname) { // return typeof string[
methodname] === 'function'; // });
methods = [ 'contains', 'substring', 'tolowercase', 'touppercase', 'charat', 'charcodeat', 'indexof', 'lastindexof', 'startswi...
...th', 'endswith', 'trim', 'trimleft', 'trimright', 'tolocalelowercase', 'normalize', 'tolocaleuppercase', 'localecompare', 'match', 'search', 'slice', 'replace', 'split', 'substr', 'concat', 'localecompare' ],
methodcount =
methods.length, assignstringgeneric = function(
methodname) { var
method = string.prototype[
methodname]; string[
methodname] = function(arg1) { return
method.apply(arg1, array.prototype.slice.call(arguments, 1)); }; }; for (i = 0; i <
methodcount; i++) { assignstringgeneric(
methods[i]); } }()); ...
TypeError: "x" is not a function - JavaScript
message typeerror: object doesn't support property or
method {x} (edge) typeerror: "x" is not a function error type typeerror what went wrong?
...maybe the object you are calling the
method on does not have this function?
...you will have to provide a function in order to have these
methods working properly: when working with array or typedarray objects: array.prototype.every(), array.prototype.some(), array.prototype.foreach(), array.prototype.map(), array.prototype.filter(), array.prototype.reduce(), array.prototype.reduceright(), array.prototype.find() when working with map and set objects: map.prototype.foreach() and set.prototype.foreach() examples a typo in the function name in this case, which happens way too often, there is a typo in the
method name: let x = document.getelementbyid('foo'); // typeerror: document.getel...
...ementbyid is not a function the correct function name is getelementbyid: let x = document.getelementbyid('foo'); function called on the wrong object for certain
methods, you have to provide a (callback) function and it will work on specific objects only.
Array.prototype.concat() - JavaScript
the concat()
method is used to merge two or more arrays.
... this
method does not change the existing arrays, but instead returns a new array.
... description the concat
method creates a new array consisting of the elements in the object on which it is called, followed in order by, for each argument, the elements of that argument (if the argument is an array) or the argument itself (if the argument is not an array).
... the concat
method does not alter this or any of the arrays provided as arguments but instead returns a shallow copy that contains copies of the same elements combined from the original arrays.
Array.prototype.copyWithin() - JavaScript
the copywithin()
method shallow copies part of an array to another location in the same array and returns it without modifying its length.
... description the copywithin works like c and c++'s memmove, and is a high-performance
method to shift the data of an array.
... this especially applies to the typedarray
method of the same name.
... the copywithin
method is a mutable
method.
Array.prototype.forEach() - JavaScript
the foreach()
method executes a provided function once for each array element.
...if you need such behavior, the foreach()
method is the wrong tool.
... early termination may be accomplished with: a simple for loop a for...of / for...in loops array.prototype.every() array.prototype.some() array.prototype.find() array.prototype.findindex() array
methods: every(), some(), find(), and findindex() test the array elements with a predicate returning a truthy value to determine if further iteration is required.
...if you want to flatten an array using built-in
methods you can use array.prototype.flat().
Array.prototype.pop() - JavaScript
the pop()
method removes the last element from an array and returns that element.
... this
method changes the length of the array.
... description the pop
method removes the last element from an array and returns that value to the caller.
... pop is intentionally generic; this
method can be called or applied to objects resembling arrays.
Array.prototype.slice() - JavaScript
the slice()
method returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array.
...r = ' + newcar[0].color) this script writes: mycar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2, 'cherry condition', 'purchased 1997'] newcar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2] mycar[0].color = red newcar[0].color = red the new color of my honda is purple mycar[0].color = purple newcar[0].color = purple array-like objects slice
method can also be called to convert array-like objects/collections to a new array.
... you just bind the
method to the object.
... function list() { return array.prototype.slice.call(arguments) } let list1 = list(1, 2, 3) // [1, 2, 3] binding can be done with the call()
method of function.prototype and it can also be reduced using [].slice.call(arguments) instead of array.prototype.slice.call.
Array.prototype.some() - JavaScript
the some()
method tests whether at least one element in the array passes the test implemented by the provided function.
... description the some()
method executes the callback function once for each element present in the array until it finds the one where callback returns a truthy value (a value that becomes true when converted to a boolean).
... caution: calling this
method on an empty array returns false for any condition!
... [2, 5, 8, 1, 4].some(x => x > 10); // false [12, 5, 8, 1, 4].some(x => x > 10); // true checking whether a value exists in an array to mimic the function of the includes()
method, this custom function returns true if the element exists in the array: const fruits = ['apple', 'banana', 'mango', 'guava']; function checkavailability(arr, val) { return arr.some(function(arrval) { return val === arrval; }); } checkavailability(fruits, 'kela'); // false checkavailability(fruits, 'banana'); // true checking whether a value exists using an arrow function const fruit...
Array.prototype.toLocaleString() - JavaScript
the tolocalestring()
method returns a string representing the elements of the array.
... the elements are converted to strings using their tolocalestring
methods and these strings are separated by a locale-specific string (such as a comma “,”).
... return r; } }); } if you need to support truly obsolete javascript engines that don't support object.defineproperty, it's best not to polyfill array.prototype
methods at all, as you can't make them non-enumerable.
... examples using locales and options the elements of the array are converted to strings using their tolocalestring
methods.
Array.prototype.unshift() - JavaScript
the unshift()
method adds one or more elements to the beginning of an array and returns the new length of the array.
... return value the new length property of the object upon which the
method was called.
... description the unshift
method inserts the given values to the beginning of an array-like object.
...this
method can be called or applied to objects resembling arrays.
Atomics - JavaScript
the atomics object provides atomic operations as static
methods.
...all properties and
methods of atomics are static (as is the case with the math object, for example).
... wait and notify the wait() and notify()
methods are modeled on linux futexes ("fast user-space mutex") and provide ways for waiting until a certain condition becomes true and are typically used as blocking constructs.
... static
methods atomics.add() adds the provided value to the existing value at the specified index of the array.
BigInt.prototype.toString() - JavaScript
the tostring()
method returns a string representing the specified bigint object.
... description the bigint object overrides the tostring()
method of the object object; it does not inherit object.prototype.tostring().
... for bigint objects, the tostring()
method returns a string representation of the object in the specified radix.
... the tostring()
method parses its first argument, and attempts to return a string representation in the specified radix (base).
Date.UTC() - JavaScript
the date.utc()
method accepts parameters similar to the date constructor, but treats them as utc.
... the utc()
method differs from the date constructor in two ways: date.utc() uses universal time instead of the local time.
... if a parameter is outside of the expected range, the utc()
method updates the other parameters to accommodate the value.
... utc() is a static
method of date, so it's called as date.utc() rather than as a
method of a date instance.
Date.parse() - JavaScript
the date.parse()
method parses a string representation of a date, and returns the number of milliseconds since january 1, 1970, 00:00:00 utc or nan if the string is unrecognized or, in some cases, contains illegal date values (e.g.
... description the parse()
method takes a date string (such as "2011-10-10t14:48:00") and returns the number of milliseconds since january 1, 1970, 00:00:00 utc.
... this function is useful for setting date values based on string values, for example in conjunction with the settime()
method and the date object.
... because parse() is a static
method of date, it is called as date.parse() rather than as a
method of a date instance.
Date.prototype.toString() - JavaScript
the tostring()
method returns a string representing the specified date object.
... description date instances inherit their tostring()
method from date.prototype, not object.prototype.
... the tostring()
method is automatically called when a date is to be represented as a text value, e.g.
... tostring() is a generic
method, it does not require that its this is a date instance.
Date.prototype.valueOf() - JavaScript
the valueof()
method returns the primitive value of a date object.
... description the valueof()
method returns the primitive value of a date object as a number data type, the number of milliseconds since midnight 01 january, 1970 utc.
... this
method is functionally equivalent to the date.prototype.gettime()
method.
... this
method is usually called internally by javascript and not explicitly in code.
Error - JavaScript
static
methods error.capturestacktrace() a non-standard v8 function that creates the stack property on an error instance.
... instance
methods error.prototype.tostring() returns a string representing the specified object.
... overrides the object.prototype.tostring()
method.
... es6 custom error class versions of babel prior to 7 can handle customerror class
methods, but only when they are declared with object.defineproperty().
Intl.DateTimeFormat - JavaScript
static
methods intl.datetimeformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance
methods intl.datetimeformat.prototype.format() getter function that formats a date according to the locale and formatting options of this datetimeformat object.
... intl.datetimeformat.prototype.formatrange() this
method receives two dates and formats the date range in the most concise way based on the locale and options provided when instantiating datetimeformat.
... intl.datetimeformat.prototype.formatrangetoparts() this
method receives two dates and returns an array of objects containing the locale-specific tokens representing each part of the formatted date range.
Map - JavaScript
other operations on the data fail: wrongmap.has('bla') // false wrongmap.delete('bla') // false console.log(wrongmap) // map { bla: 'blaa', bla2: 'blaaa2' } the correct usage for storing data in the map is through the set(key, value)
method.
... instance
methods map.prototype.clear() removes all key-value pairs from the map object.
... iteration
methods map.prototype[@@iterator]() returns a new iterator object that contains an array of [key, value] for each element in the map object in insertion order.
...ey, value] of mymap) { console.log(key + ' = ' + value) } // 0 = zero // 1 = one for (let key of mymap.keys()) { console.log(key) } // 0 // 1 for (let value of mymap.values()) { console.log(value) } // zero // one for (let [key, value] of mymap.entries()) { console.log(key + ' = ' + value) } // 0 = zero // 1 = one iterating map with foreach() maps can be iterated using the foreach()
method: mymap.foreach(function(value, key) { console.log(key + ' = ' + value) }) // 0 = zero // 1 = one relation with array objects let kvarray = [['key1', 'value1'], ['key2', 'value2']] // use the regular map constructor to transform a 2d key-value array into a map let mymap = new map(kvarray) mymap.get('key1') // returns "value1" // use array.from() to transform a map into a 2d key-value arra...
Math - JavaScript
math is a built-in object that has properties and
methods for mathematical constants and functions.
...all properties and
methods of math are static.
... you refer to the constant pi as math.pi and you call the sine function as math.sin(x), where x is the
method’s argument.
... static
methods math.abs(x) returns the absolute value of x.
Number.prototype.toExponential() - JavaScript
the toexponential()
method returns a string representing the number object in exponential notation.
... typeerror if this
method is invoked on an object that is not a number.
... if you use the toexponential()
method for a numeric literal and the numeric literal has no exponent and no decimal point, leave whitespace(s) before the dot that precedes the
method call to prevent the dot from being interpreted as a decimal point.
...see the discussion of rounding in the description of the tofixed()
method, which also applies to toexponential().
Number.prototype.toString() - JavaScript
the tostring()
method returns a string representing the specified number object.
... description the number object overrides the tostring()
method of the object object.
...for number objects, the tostring()
method returns a string representation of the object in the specified radix.
... the tostring()
method parses its first argument, and attempts to return a string representation in the specified radix (base).
Object.fromEntries() - JavaScript
the object.fromentries()
method transforms a list of key-value pairs into an object.
... description the object.fromentries()
method takes a list of key-value pairs and returns a new object whose properties are given by those entries.
... the iterable argument is expected to be an object that implements an @@iterator
method, that returns an iterator object, that produces a two element array-like object, whose first element is a value that will be used as a property key, and whose second element is the value to associate with that property key.
..., ['baz', 42] ]); const obj = object.fromentries(map); console.log(obj); // { foo: "bar", baz: 42 } converting an array to an object with object.fromentries, you can convert from array to object: const arr = [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]; const obj = object.fromentries(arr); console.log(obj); // { 0: "a", 1: "b", 2: "c" } object transformations with object.fromentries, its reverse
method object.entries(), and array manipulation
methods, you are able to transform objects like this: const object1 = { a: 1, b: 2, c: 3 }; const object2 = object.fromentries( object.entries(object1) .map(([ key, val ]) => [ key, val * 2 ]) ); console.log(object2); // { a: 2, b: 4, c: 6 } please do not add polyfills on mdn pages.
Object.getOwnPropertyDescriptors() - JavaScript
the object.getownpropertydescriptors()
method returns all own property descriptors of a given object.
... description this
method permits examination of the precise description of all own properties of an object.
... examples creating a shallow clone whereas the object.assign()
method will only copy enumerable and own properties from a source object to a target object, you are able to use this
method and object.create() for a shallow copy between two unknown objects: object.create( object.getprototypeof(obj), object.getownpropertydescriptors(obj) ); creating a subclass a typical way of creating a subclass is to define the subclass, set its prototype to an instance of t...
...instead, you can use this code to set the prototype: function superclass() {} superclass.prototype = { // define your
methods and properties here }; function subclass() {} subclass.prototype = object.create( superclass.prototype, { // define your
methods and properties here } ); specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertydescriptors' in that specification.
Object.prototype.hasOwnProperty() - JavaScript
the hasownproperty()
method returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it).
... description all descendents of object inherit the hasownproperty
method.
... this
method can be used to determine whether an object has the specified property as a direct property of that object; unlike the in operator, this
method does not check for a property in the object's prototype chain.
... if an object is an array, hasownproperty
method can check whether an index exists.
handler.apply() - JavaScript
the handler.apply()
method is a trap for a function call.
... syntax const p = new proxy(target, { apply: function(target, thisarg, argumentslist) { } }); parameters the following parameters are passed to the apply()
method.
... return value the apply()
method can return any value.
... description the handler.apply()
method is a trap for a function call.
handler.defineProperty() - JavaScript
the handler.defineproperty()
method is a trap for object.defineproperty().
... syntax const p = new proxy(target, { defineproperty: function(target, property, descriptor) { } }); parameters the following parameters are passed to the defineproperty()
method.
... return value the defineproperty()
method must return a boolean indicating whether or not the property has been successfully defined.
... description the handler.defineproperty()
method is a trap for object.defineproperty().
handler.deleteProperty() - JavaScript
the handler.deleteproperty()
method is a trap for the delete operator.
... syntax const p = new proxy(target, { deleteproperty: function(target, property) { } }); parameters the following parameters are passed to the deleteproperty()
method.
... return value the deleteproperty()
method must return a boolean indicating whether or not the property has been successfully deleted.
... description the handler.deleteproperty()
method is a trap for the delete operator.
handler.get() - JavaScript
the handler.get()
method is a trap for getting a property value.
... syntax const p = new proxy(target, { get: function(target, property, receiver) { } }); parameters the following parameters are passed to the get()
method.
... return value the get()
method can return any value.
... description the handler.get()
method is a trap for getting a property value.
handler.getOwnPropertyDescriptor() - JavaScript
the handler.getownpropertydescriptor()
method is a trap for object.getownpropertydescriptor().
... syntax const p = new proxy(target, { getownpropertydescriptor: function(target, prop) { } }); parameters the following parameters are passed to the getownpropertydescriptor()
method.
... return value the getownpropertydescriptor()
method must return an object or undefined.
... description the handler.getownpropertydescriptor()
method is a trap for object.getownpropertydescriptor().
handler.has() - JavaScript
the handler.has()
method is a trap for the in operator.
... syntax const p = new proxy(target, { has: function(target, prop) { } }); parameters the following parameters are passed to has()
method.
... return value the has()
method must return a boolean value.
... description the handler.has()
method is a trap for the in operator.
TypedArray.prototype.reduce() - JavaScript
the reduce()
method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value.
... this
method has the same algorithm as array.prototype.reduce().
... description the reduce
method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
... polyfill this
method uses the same algorithm as array.prototype.reduce(), so the same polyfill can be used here: simply replace array.prototype.reduce with typedarray.prototype.reduce.
TypedArray.prototype.slice() - JavaScript
the slice()
method returns a shallow copy of a portion of a typed array into a new typed array object.
... this
method has the same algorithm as array.prototype.slice().
... description the slice
method does not alter.
... if (!uint8array.prototype.slice) { object.defineproperty(uint8array.prototype, 'slice', { value: function (begin, end) { return new uint8array(array.prototype.slice.call(this, begin, end)); } }); } if you need to support truly obsolete javascript engines that don't support object.defineproperty, it's best not to polyfill array.prototype
methods at all, as you can't make them non-enumerable.
TypedArray.prototype.some() - JavaScript
the some()
method tests whether some element in the typed array passes the test implemented by the provided function.
... this
method has the same algorithm as array.prototype.some().
... description the some
method executes the callback function once for each element present in the typed array until it finds one where callback returns a true value.
... // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some if (!uint8array.prototype.some) { object.defineproperty(uint8array.prototype, 'some', { value: array.prototype.some }); } if you need to support truly obsolete javascript engines that don't support object.defineproperty, it's best not to polyfill array.prototype
methods at all, as you can't make them non-enumerable.
WeakMap - JavaScript
a map api could be implemented in javascript with two arrays (one for keys, one for values) shared by the four api
methods.
...there is no
method to obtain a list of the keys.
... instance
methods weakmap.prototype.delete(key) removes any value associated to the key.
....get(o2); // "azerty" wm2.get(o2); // undefined, because there is no key for o2 on wm2 wm2.get(o3); // undefined, because that is the set value wm1.has(o2); // true wm2.has(o2); // false wm2.has(o3); // true (even if the value itself is 'undefined') wm3.set(o1, 37); wm3.get(o1); // 37 wm1.has(o1); // true wm1.delete(o1); wm1.has(o1); // false implementing a weakmap-like class with a .clear()
method class clearableweakmap { constructor(init) { this._wm = new weakmap(init); } clear() { this._wm = new weakmap(); } delete(k) { return this._wm.delete(k); } get(k) { return this._wm.get(k); } has(k) { return this._wm.has(k); } set(k, v) { this._wm.set(k, v); return this; } } specifications specification ecmascript (ecma-...
WebAssembly.instantiate() - JavaScript
important: this
method is not the most efficient way of fetching and instantiating wasm modules.
... if at all possible, you should use the newer webassembly.instantiatestreaming()
method instead, which fetches, compiles, and instantiates a module all in one step, directly from the raw bytecode, so doesn't require conversion to an arraybuffer.
... second overload example the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compilestreaming()
method and then sends it to a worker using postmessage().
...when the module is received, we create an instance from it using the webassembly.instantiate()
method and invoke an exported function from inside it.
function* - JavaScript
when the iterator's next()
method is called, the generator function's body is executed until the first yield expression, which specifies the value to be returned from the iterator or, with yield*, delegates to another generator function.
... the next()
method returns an object with a value property containing the yielded value and a done property which indicates whether the generator has yielded its last value, as a boolean.
... calling the next()
method with an argument will resume the generator function execution, replacing the yield expression where an execution was paused with the argument from next().
...console.log(gen.next()); // { value: undefined, done: true } generator as an object property const someobj = { *generator () { yield 'a'; yield 'b'; } } const gen = someobj.generator() console.log(gen.next()); // { value: 'a', done: false } console.log(gen.next()); // { value: 'b', done: false } console.log(gen.next()); // { value: undefined, done: true } generator as an object
method class foo { *generator () { yield 1; yield 2; yield 3; } } const f = new foo (); const gen = f.generator(); console.log(gen.next()); // { value: 1, done: false } console.log(gen.next()); // { value: 2, done: false } console.log(gen.next()); // { value: 3, done: false } console.log(gen.next()); // { value: undefined, done: true } generator as a computed property class foo { ...
JavaScript typed arrays - JavaScript
moreover, not all
methods available for normal arrays are supported by typed arrays (e.g.
...it is big-endian by default and can be set to little-endian in the getter/setter
methods.
... filereader.prototype.readasarraybuffer() the filereader.prototype.readasarraybuffer()
method starts reading the contents of the specified blob or file.
... xmlhttprequest.prototype.send() xmlhttprequest instances' send()
method now supports typed arrays and arraybuffer objects as argument.
Autoplay guide for media and Web Audio APIs - Web media technologies
the play()
method the term "autoplay" also refers to scenarios in which a script tries to trigger the playback of media that includes audio, outside the context of handling a user input event.
... this is done by calling the media element's play()
method.
... document.queryselector("video").play(); example: handling play() failures it's much easier to detect a failure to autoplay media when you use the play()
method to start it.
... autoplay using the web audio api in the web audio api, a web site or app can start playing audio using the start()
method on a source node linked to the audiocontext.
Namespaces crash course - SVG: Scalable Vector Graphics
to resolve these problems, dom level 2 core added namespace aware equivalents of all the applicable dom level 1
methods.
... when scripting svg, it is important to use the namespace aware
methods.
... the table below lists the dom1
methods that shouldn't be used in svg, along with their equivalent dom2 counterparts that should be used instead.
...entsbytagnamens (also added to element) getnameditem getnameditemns hasattribute hasattributens removeattribute removeattributens removenameditem removenameditemns setattribute setattributens setattributenode setattributenodens setnameditem setnameditemns the first parameter for all the dom2 namespace aware
methods must be the namespace name (also known as the namespace uri) of the element or parameter in question.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
point or dompointreadonly instead of svgpoint implementation status unknown members of svgstylable and svglangspace available in svgelement implementation status unknown svggraphicselement instead of svglocatable and svgtransformable implementation status unknown svggeometryelement with svggeometryelement.ispointinfill() and svggeometryelement.ispointinstroke()
methods partially implemented (bug 1239100).
... the
methods ispointinfill() and ispointinstroke() are not implemented yet (bug 1325319).
... svggraphicselement.gettransformtoelement() removed not removed yet svggraphicselement.getctm() on the outermost element implementation status unknown animval attribute alias of baseval implementation status unknown dataset attribute for svgelement implementation status unknown moved pathlength attribute and gettotallength() and getpointatlength()
methods from svgpathelement to svggeometryelement implemented (bug 1239100) document structure change notes svgsvgelement.suspendredraw(), svgsvgelement.unsuspendredraw(), and svgsvgelement.unsuspendredrawall() deprecated turned into no-ops (bug 734079) externalresourcesrequired attribute removed implementation status unknown auto value for wid...
...plementation status unknown paths change notes b and b path commands implementation status unknown z and z path commands to add path coordinate data to previous command implementation status unknown not render <path>, <polygon> and <polyline> with no data implementation status unknown svgpathseg*, svganimatedpathdata and related
methods removed from svgpathelement implementation status unknown d attribute as css property implementation status unknown basic shapes change notes pathlength attribute for all basic shapes implementation status unknown svganimatedpoints.animatedpoints as alias of svganimatedpoints.points implementation status unknown auto behavio...
Gradients in SVG - SVG: Scalable Vector Graphics
the two
methods have been intermixed for the purposes of this example.
...the only other one i want to mention here is the spread
method attribute.
... spread
method <?xml version="1.0" standalone="no"?> <svg width="220" height="220" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradientpad" cx="0.5" cy="0.5" r="0.4" fx="0.75" fy="0.75" spread
method="pad"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> <radialgradient id...
...="gradientrepeat" cx="0.5" cy="0.5" r="0.4" fx="0.75" fy="0.75" spread
method="repeat"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> <radialgradient id="gradientreflect" cx="0.5" cy="0.5" r="0.4" fx="0.75" fy="0.75" spread
method="reflect"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradientpad)"/> <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#gradientrepeat)"/> <rect x="120" y="120" rx="15" ry="15" width="100" height="100" fill="url(#gradientreflect)"/> <text x="15" y="30" fill="whit...
Index - XSLT: Extensible Stylesheet Language Transformations
using the xsltprocessor.getparameter()
method, the code can figure whether to sort in ascending or descending order.
...once instantiated, an xsltprocessor has an xsltprocessor.importstylesheet()
method that takes as an argument the xslt stylesheet to be used in the transformation.
...to function correctly in netscape, this element, with the
method attribute, must be used.
... as of 7.0,
method="text" works as expected.
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
once instantiated, an xsltprocessor has an xsltprocessor.importstylesheet()
method that takes as an argument the xslt stylesheet to be used in the transformation.
...assuming that the dom to be processed is contained by an element with the id example, that dom can be "cloned" using the in-memory xml document's document.importnode()
method.
... // importnode is used to clone the nodes we want to process via xslt - true makes it do a deep clone var mynode = document.getelementbyid("example"); var clonednode = xmlref.importnode(mynode, true); // add the cloned dom into the xml document xmlref.appendchild(clonednode); once the stylesheet has been imported, xsltprocessor has to perform two
methods for the actual transformation, namely xsltprocessor.transformtodocument() and xsltprocessor.transformtofragment().
... figure 2.1 : creating an xml document from a string 'xml soup' while you can use ie loadxml
method to load a string containing xml you have to perform some tweaking and tuning to do the same in mozilla.
Using the WebAssembly JavaScript API - WebAssembly
this is achieved using the webassembly.compilestreaming() and webassembly.instantiatestreaming()
methods.
... these
methods are easier than their non-streaming counterparts, because they can turn the byte code directly into module/instance instances, cutting out the need to separately put the response into an arraybuffer.
... loading our wasm module without streaming if you can't or don't want to use the streaming
methods as described above, you can use the non-streaming
methods webassembly.compile / webassembly.instantiate instead.
... these
methods don't directly access the byte code, so require an extra step to turn the response into an arraybuffer before compiling/instantiating the wasm module.
Communicating With Other Scripts - Archive of obsolete content
content scripts content scripts loaded into the same document at the same time using the same
method can interact with each other directly as well as with the web content itself.
... content scripts that have been loaded into the same document by different
methods, or the same
method called more than once, can pass messages directly to each other using the dom postmessage() api or a customevent.
... if an add-on loads two or more content scripts into the same page, or panel, using two different
method (e.g.
port - Archive of obsolete content
port
methods emit() the port.emit() function sends a message from one side to the other.
...the port object offers a shortcut to do this: the once()
method.
...this means you can't send functions, and if the object contains
methods they won't be encoded.
request - Archive of obsolete content
once a request object has been created a get request can be executed by calling its get()
method, a post request by calling its post()
method, and so on.
...request({ url: "https://api.twitter.com/1.1/application/rate_limit_status.json", oncomplete: function (response) { if (response.json.remaining_hits) { latesttweetrequest.get(); } else { console.log("you have been rate limited!"); } } }).get();
methods get() make a get request.
...it is returned by the get(), head(), post(), put() or delete()
method of a request object.
tabs - Archive of obsolete content
to activate a tab object, call its activate
method.
...it contains various tab properties, several
methods for manipulation, as well as per-tab event registration.
...
methods pin() pins this tab as an app tab.
core/promise - Archive of obsolete content
in the add-on sdk we follow commonjs promises/a specification and model a promise as an object with a then
method, which can be used to get the eventual return (fulfillment) value or thrown exception (rejection): foo().then(function success(value) { // ...
... propagation the then
method of a promise returns a new promise that is resolved with the return value of either handler.
... defer(); promise.then(deferred.resolve, deferred.reject); delay(ms, 'timeout').then(deferred.reject); return deferred.promise; } var tweets = readasync(url); timeout(tweets, 20).then(function(data) { ui.display(data); }, function() { alert('network is being too slow, try again later'); }); alternative promise apis there may be cases where you will want to provide more than just then
method on your promises.
Running applications - Archive of obsolete content
using nsilocalfile.launch() this
method is not implemented on all platforms, especially not on unix/linux!
... see nsilocalfile.launch() for details and make sure that all your target platforms support this
method!
... this
method has the same effect as if you double-clicked the file, so for executable files—it will just run the file without any parameters.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
follow every step
methodically and you'll probably be alright.
...the easiest way to accomplish the latter is to use inline implementations for all
methods so you don't have any additional linking dependencies.
...the component implementation will include the
methods for retrieving the path or file for the extension's home directory: mylocation.prototype = { queryinterface: function(iid) { if (iid.equals(nsisupports)) return this; if (iid.equals(myilocation)) return this; components.returncode = components.results.ns_error_no_interface; return null; }, get locationfile() { return __location__.parent.parent;...
Extension Etiquette - Archive of obsolete content
these often include areas such as: object prototypes, such as string.prototype, which are often extended to add
methods to native objects.
... call .noconflict(true) where applicable many common libraries which create global variables provide a
method called noconflict, or similar, which revert any global variables they've declared, and return the object itself.
... when available, these
methods should always be used to prevent conflicts with third-party code.
Adding windows and dialogs - Archive of obsolete content
the prompt service has a confirm
method with similar behavior: let prompts = cc["@mozilla.org/embedcomp/prompt-service;1"].
...} else { // do something else } the
method returns a boolean value indicating the user's response.
...the confirmex and prompt
methods are the most customizable, allowing a great deal of options that cover most common dialog cases.
Handling Preferences - Archive of obsolete content
get count() { return this._prefservice.getintpref("extensions.xulschoolhello.message.count"); }, increment : function() { let currentcount = this._prefservice.getintpref("extensions.xulschoolhello.message.count"); this._prefservice.setintpref("extensions.xulschoolhello.message.count", currentcount + 1); } one important thing to keep in mind is that the "get"
methods of the service can throw an exception if the preference is not found.
... preference listeners the xpcom way to add a listener was mentioned in the xpcom section when describing the queryinterface
method: this._prefservice.queryinterface(ci.nsiprefbranch2); this._prefservice.addobserver(prefname, this, false); this._prefservice.queryinterface(ci.nsiprefbranch); all the qi'ing is necessary because the addobserver
method is in a different interface, and other than for adding and removing observers, we use the nsiprefbranch interface for everything related to preferences.
... then, create the observer
method: observe : function(asubject, atopic, adata) { if ("nspref:changed" == atopic) { let newvalue = asubject.getintpref(adata); // do something.
Tabbed browser - Archive of obsolete content
opening a url in the correct window/tab there are
methods available in chrome://browser/content/utilityoverlay.js that make it easy to open url in tabs such as openuilinkin and openuilink.
... gbrowser.removecurrenttab(); there is also a more generic removetab
method, which accepts a xul tab element as its single parameter.
...for example: var num = gbrowser.browsers.length; for (var i = 0; i < num; i++) { var b = gbrowser.getbrowseratindex(i); try { dump(b.currenturi.spec); // dump urls of all open tabs to console } catch(e) { components.utils.reporterror(e); } } to learn what
methods are available for <browser/> and <tabbrowser/> elements, use dom inspector or look in browser.xml for corresponding xbl bindings (or just look at the current reference pages on browser and tabbrowser.
Firefox addons developer guide - Archive of obsolete content
rules: file and directory names: italic
method and variable names: class name if you want to add a fixme, add: fixme: a message notes: the original document is in japanese and distributed via the xuldev.org website.
...
method and function names should have parentheses after them.
... for example, here: https://developer.mozilla.org/en/firefox_addons_developer_guide/let's_build_a_firefox_extension#init_
method the text of the paragraph should begin "the <code>init()</code>
method is as shown...".
Using the Stylesheet Service - Archive of obsolete content
adding a stylesheet to use the stylesheet service, you get a reference to the service, create a uri and pass the uri to the stylesheet service's loadandregistersheet
method.
...vice(components.interfaces.nsistylesheetservice); var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("chrome://myext/content/myext.css", null, null); sss.loadandregistersheet(uri, sss.user_sheet); note: loadandregistersheet will load the stylesheet synchronously, so you should only call this
method using local uris.
...twork/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("chrome://myext/content/myext.css", null, null); if(!sss.sheetregistered(uri, sss.user_sheet)) sss.loadandregistersheet(uri, sss.user_sheet); removing a previously registered stylesheet if you wish to remove a stylesheet that you previously registered, simply use the unregistersheet
method.
Creating reusable content with CSS and XBL - Archive of obsolete content
you can use xbl to link selected elements to their own: stylesheets content properties and
methods event handlers because you avoid linking everything at the document level, you can make self-contained parts that are easy to maintain and reuse.
...div anonid="square"/> <xul:button anonid="button" type="button"> <children/> </xul:button> </content> <implementation> <field name="square"><![cdata[ document.getanonymouselementbyattribute(this, "anonid", "square") ]]></field> <field name="button"><![cdata[ document.getanonymouselementbyattribute(this, "anonid", "button") ]]></field> <
method name="dodemo"> <body><![cdata[ this.square.style.backgroundcolor = "#cf4" this.square.style.marginleft = "20em" this.button.setattribute("disabled", "true") settimeout(this.cleardemo, 2000, this) ]]></body> </
method> <
method name="cleardemo"> <parameter name="me"/> <body><![cdata[ me.square.style.backgroundcolor = "trans...
...parent" me.square.style.marginleft = "0" me.button.removeattribute("disabled") ]]></body> </
method> </implementation> <handlers> <handler event="click" button="0"><![cdata[ if (event.originaltarget == this.button) this.dodemo() ]]></handler> </handlers> </binding> </bindings> make a new css file, bind6.css.
Index of archived content - Archive of obsolete content
macalias file.windowsshortcut install.adddirectory install.addfile installtrigger.installchrome installtrigger.startsoftwareupdate trigger scripts and install scripts windows install file object
methods install object
methods properties installversion object
methods properties return codes winprofile object...
...
methods winreg object
methods winregvalue xpjs components proposal xre xtech 2005 presentations directions of the mozilla rdf engine extending gecko with xbl and xtf mozilla e4x rich web svg and canvas in mozilla xul - mozilla's xml user interface language xtech 2006 presentations xul explorer xulrunner applic...
... npn_destroystream npn_enumerate npn_evaluate npn_forceredraw npn_getauthenticationinfo npn_getintidentifier npn_getproperty npn_getstringidentifier npn_getstringidentifiers npn_geturl npn_geturlnotify npn_getvalue npn_getvalueforurl npn_has
method npn_hasproperty npn_identifierisstring npn_intfromidentifier npn_invalidaterect npn_invalidateregion npn_invoke npn_invokedefault npn_memalloc npn_memflush npn_memfree npn_pluginthreadasynccall npn_posturl npn_posturlnotify npn_rel...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
this new navigational
method allows us to make html user interfaces behave similarly to non-web based applications such as contact management software.
...data request \________ dynamically create a hidden iframe \_________ content is loaded -> call data binder data binder \_____ load xml||html data from iframe "container" \_____ send content to proper layout components the
method presented here separates data request from data binding.
...to demonstrate how the callback mechanism is implemented, imagine the following html page loaded into the iframe as a result of a request (retrievedata
method requested the html file in to be loaded in the iframe): <body onload="top.iframecallback(document);" > <mydata> this is the content that comes from the server </mydata> </body> note that when the page is loaded into the iframe, the onload event is fired and the parent.iframecallback function is called in the context of the parent document (the originator).
RDF Modifications - Archive of obsolete content
when this happens, any templates observing the datasource will be notified via the rdf observer's onassert
method.
...in effect, this isn't any different than adding the same set of triples yourself using the assert
method.
...the rdf observer also has two
methods onbeginupdatebatch and onendupdatebatch.
SQLite Templates - Archive of obsolete content
the second
method involves using a special url form: profile:filename.sqlite this form with the 'profile' prefix is used to refer to files in the profile directory.
...one possibility is to simply use
methods to adjust the text within the query element and rebuild the template.
...you would likely want to add an id to the param element so that the getelementbyid
method may be used to refer to it.
Sorting Results - Archive of obsolete content
this
method of sorting a seq works best for the simple query syntax since it is obvious how the starting ref relates to the end member results (they are just the children), or for extended syntax queries that follow a similar pattern.
...changing the sort to change the sorting for a template's generated contents, you can either change the sort related attributes and rebuild the template, or you can call the sort
method of the sort service: var listbox = document.getelementbyid("alistbox"); var sortservice = components.classes["@mozilla.org/xul/xul-sort-service;1"].
...the arguments to the sort
method specify the root node (the listbox), the sort key and the sort direction.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
note: for information about how to find the directory where you installed seamonkey, see: installation directory if you cannot easily find the directory, you can use the following
method to find it.
... alternate "quick and dirty"
method for hooking up a single preexisting xul file to display in seamonkey: as described above, find the seamonkey\chrome folder.
...this may not be the most relevant spot for this addition, i posted this here because the above approach proved successful after hours of unsuccessful tinkering with
methods that proved to be obsolete or broken for various reasons.
Introduction to XBL - Archive of obsolete content
the behavior describes the properties and
methods of the scroll bar in addition to describing the xul elements that make up a scroll bar.
...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 descriptions go here --> </binding> <binding id="binding2"> <!-- content, property,
method and event descriptions go here --> </binding> </bindings> the bindings element is the root element of an xbl file and contains one or more binding elements.
...
methods:
methods added to the element.
Tree Box Objects - Archive of obsolete content
note: it is not necessary to run tree.boxobject.queryinterface(components.interfaces.nsitreeboxobject) as shown in the code examples on this page because: let boxobject = tree.treeboxobject; note: is equivalent to: let boxobject = tree.boxobject; boxobject.queryinterface("components.interfaces.nsitreeboxobject"); scrolling the tree you can also scroll the tree using four different
methods, similar to those available for listboxes.
... additional scroll
methods include the scrollbylines(), scrollbypages() and ensurerowisvisible() functions.
...this is a convenient
method since when the user resizes a flexible tree, the page size will grow and shrink, so you don't need to calculate the page size manually.
XPCOM Examples - Archive of obsolete content
the cookie manager has an enumerator
method which returns an object which implements nsisimpleenumerator.
...an enumerator has a hasmoreelements()
method which will return true until we get to the last cookie.
... the getnext()
method gets a cookie and moves the enumerator index to the next cookie.
Using spell checking in XUL - Archive of obsolete content
checking the spelling of a word to check the spelling of a word, you must first create an interface to the mozispellcheckingengine component and then call the check()
method on the string you wish to test.
... this
method returns true if the word is correctly spelled, or false if it's not.
... .getservice(components.interfaces.mozipersonaldictionary); if (mpersonaldictionary.check("kat", gspellcheckengine.dictionary)) { // it's spelled correctly accourdly to user personal dictionary } else { // it's spelled incorrectly } } getting a list of suggestions to get a list of suggestions for a misspelled word, you call the suggest()
method, specifying the word and an object to be filled with an array of possible suggestions.
XUL Questions and Answers - Archive of obsolete content
as an extension author, you have at least two options: use dom
methods to dynamically create or rearrange elements file an enhancement request in bugzilla to have extra ids added.
...json string) from the server, parsing it on client, and building the menupopup using dom
methods (such as document.createelementns).
...pass a python string/int/etc to the
method requiring an nsivariant.
The Implementation of the Application Object Model - Archive of obsolete content
four interfaces with over 100
methods combined, a significant portion of which are redundant.
... statement #1 the two points raised in the previous two paragraphs, namely (1) redundancy of
methods in the interfaces as well as a likely code redundancy in the implementation of some of those
methods, and (2) the desire to be insulated from the layout dll should those interfaces change, imply that a layer needs to exist between the pluggable content and the content tree interfaces.
...first of all it could streamline the redundancy in the interface
methods and present a new interface for pluggable content that was much smaller and easier to plug into than the 4-5 interfaces required if directly implementing the content tree interfaces.
button - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a button that can be pressed by the user.
...you can use this feature to replace the standard dialog box buttons with custom buttons, yet the dialog event
methods will still function.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
commandset - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is not displayed and serves as a container for command elements.
...you can send a custom event by calling the updatecommands
method of the command dispatcher.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
dialog - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element should be used in place of the window element for dialog boxes.
...uttonaccesskeyaccept, buttonaccesskeycancel, buttonaccesskeydisclosure, buttonaccesskeyextra1, buttonaccesskeyextra2, buttonaccesskeyhelp, buttonalign, buttondir, buttondisabledaccept, buttonlabelaccept, buttonlabelcancel, buttonlabeldisclosure, buttonlabelextra1, buttonlabelextra2, buttonlabelhelp, buttonorient, buttonpack, buttons, defaultbutton, title properties buttons, defaultbutton
methods acceptdialog, canceldialog, centerwindowonscreen, 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"> <d...
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagna...
iframe - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an inner frame that works much like the html <iframe> element.
...most of its
methods are callable directly on the element itself, such as goback and goforward.
...
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(), remove...
notificationbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] the notificationbox element is used to display notifications above an element.
... properties currentnotification, allnotifications, notificationshidden
methods appendnotification, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, inse...
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserda...
promptBox - Archive of obsolete content
it's returned by the tabbrowser
method gettabmodalpromptbox
method.
...you should use the window.alert()
method or the nsiprompt interface instead.
...
method overview nsidomelement appendprompt(args, onclosecallback); void removeprompt(nsidomelement aprompt); nodelist listprompts(nsidomelement aprompt);
methods appendprompt() creates a new prompt, adding it to the tab.
scale - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a scale (sometimes referred to as a "slider") allows the user to select a value from a range.
... attributes dir, disabled, increment, max, min, movetoclick, pageincrement, tabindex, value properties disabled, max, min, increment, pageincrement, tabindex, value,
methods decrease, decreasepage, increase, increasepage, examples horizontal scale: <scale min="1" max="10"/> vertical scale: <scale min="1" max="10" orient="vertical"/> attributes dir type: one of the values below the direction in which the child elements of the element are placed.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
scrollbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a box that has additional functions that can be used to scroll the content.
...do this instead: var xpcominterface =scrollbox_element.boxobject.queryinterface( components.interfaces.nsiscrollboxobject); xpcominterface.ensureelementisvisible(child_element_to_make_visible); see the nsiscrollboxobject api for other scroll-related
methods.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
tab - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single tab which should be placed inside a tabs element.
...the tabbrowser element's pintab and unpintab
methods handle pinning and unpinning tabs.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
toolbarbutton - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a button that appears on a toolbar.
...you can use this feature to replace the standard dialog box buttons with custom buttons, yet the dialog event
methods will still function.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature...
window - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] describes the structure of a top-level window.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
...insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata see also: dom window object
methods note the error message "xml parsing error: undefined entity...<window" can be caused by a missing or unreachable dtd file referenced in the xul file.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
(there is a diff below.) you'll need: sasoapclient.js saxmlutils.js making a soap call var url = 'http://example.com/soap/'; var ns = 'http://example.com/soap/namespace'; var
method = 'foo'; var params = { 'foo': 'bar', 'baz': 'bang' }; var callback = function(obj) { components.utils.reporterror(obj.tosource()); }; soapclient.proxy = url; var body = new soapobject(
method); body.ns = ns; for (var k in params) { body.appendchild(new soapobject(k).val(params[k])); } var req = new soaprequest(url, body); req.action = ns + '#' +
method; soapclient.sendrequest(req...
...-- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < beforesend: function(req) { < req.setrequestheader("
method", "post"); < req.setrequestheader("content-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.onreadystatechange = function()...
... { > if (4 != xhr.readystate) { return; } > getresponse(xhr); > }; > var headers = { > '
method': 'post', > 'content-type': soapclient.contenttype + '; charset="' + > soapclient.charset + '"', > 'content-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in headers) { xhr.setrequestheader(h, headers[h]); } > xhr.send(content); ...
calICalendarViewController - Archive of obsolete content
e-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.
... modifyoccurrence void modifyoccurrence (in caliitemoccurrence aoccurrence, in calidatetime anewstarttime, in calidatetime anewendtime); the modifyoccurrence
method is used to change the attributes of an already existing caliitem.
... deleteoccurrence void deleteoccurrence (in caliitemoccurrence aoccurrence); the deleteoccurrence
method is called when by the calicalendarview when caliitem should be deleted.
2006-10-20 - Archive of obsolete content
method shouldload in "content-policy" category problem ?
... a student learning xpcom is having issues with the
method shouldload in the interface nslcontentpolicy.
... when the
method is executed firefox crashes.
Monitoring plugins - Archive of obsolete content
below are a number of javascript snippets that would be useful to developers trying to use this feature: registration to register for runtime notifications with the observer service you must create a class with an observe
method which receives 3 parameters (subject, topic and data) as well as a register
method that contains the following code: var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice (components.interfaces.nsiobserverservice); observerservice.addobserver(this, "experimental-notify-plugin-call", false); observing as discussed above, to specif...
...y what you want done when a notification arrives your class must have an observe
method, receiving 3 parameters (subject, topic and data).
... clean up to unregister your class with the observer service - when you no longer want to be listening to runtime notifications - your class must include an unregister
method that contains the following code: var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.removeobserver(this, "experimental-notify-plugin-call"); skeleton observer class below is a skeleton class that you may use to listen to runtime notifications: function pluginobserv...
NPN_InvalidateRect - Archive of obsolete content
npn_invalidaterect() causes the npp_handleevent()
method to pass an update event or a paint message to the plug-in.
... after calling this
method, the plug-in receives a paint message asynchronously.
...to immediately send a paint message, the plug-in can call npn_forceredraw() after calling this
method.
NPN_InvalidateRegion - Archive of obsolete content
npn_invalidateregion() causes the npp_handleevent()
method to pass an update event or a paint message to the plug-in.
... if a plug-in calls this
method, it receives a paint message later.
...to force a paint message, the plug-in can call npn_forceredraw() after calling this
method.
Developing cross-browser and cross-platform pages - Archive of obsolete content
this
method has the advantage of not requiring you to test for anything except whether the particular features you code are supported in the visiting browser.
... the top-level if clause looks to see if there is support for a
method called getelementbyid on the document object, which is the one of the most basic levels of support for the dom in a browser.
... so, instead of needing to know which browsers and browser versions support a particular dom
method (or dom attribute or dom feature), you can verify the support for that particular
method in the visiting browser.
The global XML object - Archive of obsolete content
you can only define
methods in xml.prototype and not fields.
... to add a
method to xml.prototype, define xml.prototype.function::
methodname or xml.prototype.function::[
methodnamestring].
... the following example defines the foocount()
method, which returns the amount of <foo> elements in the xml: xml.prototype.function::foocount = function foocount() { return this..foo.length(); }; <foobar><foo/><foo/><foo/></foobar>.foocount() // returns 3 ignorecomments true by default.
Date.getVarDate() - Archive of obsolete content
warning: this
method is supported in internet explorer only.
... the getvardate
method returns a vt_date value from a date object.
... remarks the getvardate()
method is used when javascript code interacts with com objects, activex objects, or other objects that accept and return date values in vt_date format.
Enumerator.atEnd - Archive of obsolete content
the enumerator.atend
method returns a boolean value indicating if the enumerator is at the end of the collection.
... the atend
method returns true if the current item is the last one in the collection, the collection is empty, or the current item is undefined.
... example in following code, the atend
method is used to determine if the end of a list of drives has been reached: function showdrives() { var s = ""; var bytespergb = 1024 * 1024 * 1024; var fso = new activexobject("scripting.filesystemobject"); var e = new enumerator(fso.drives); e.movefirst(); while (e.atend() == false) { var drv = e.item(); s += drv.path + " - "; if (drv.isready) { var freegb = drv.freespace / bytespergb; var totalgb = drv.totalsize / bytespergb; s += freegb.tofixed(3) + " gb free of "; s += totalgb.tofixed(3) + " gb"; } else { s += "not ready"; } s += "<br />"; e.movenex...
VBArray.lbound - Archive of obsolete content
the vbarray.lbound
method returns the lowest index value used in the specified dimension of a vbarray.
... syntax safearray.lbound(dimension) remarks if the vbarray is empty, the lbound
method returns undefined.
... if dimension is greater than the number of dimensions in the vbarray, or is negative, the
method generates a "subscript out of range" error.
VBArray.ubound - Archive of obsolete content
the vbarray.ubound
method returns the highest index value used in the specified dimension of the vbarray.
... remarks if the vbarray is empty, the ubound
method returns undefined.
... if dim is greater than the number of dimensions in the vbarray, or is negative, the
method generates a "subscript out of range" error.
XForms Custom Controls Examples - Archive of obsolete content
output showing images <binding id="output-image" extends="chrome://xforms/content/xforms.xml#xformswidget-base"> <content> <html:div> <html:img anonid="content"/> </html:div> </content> <implementation implements="nsixformsuiwidget"> <
method name="refresh"> <body> var img = document.getanonymouselementbyattribute(this, "anonid", "content"); img.setattribute("src", this.stringvalue); return true; </body> </
method> </implementation> </binding> output showing xhtml <binding id="output-xhtml" extends="chrome://xforms/content/xforms-xhtml.xml#xformswidget-output"> <content> <children includes="label"/> ...
...<xhtml:div class="xf-value" anonid="content"></xhtml:div> <children/> </content> <implementation implements="nsixformsuiwidget"> <field name="_domparser">null</field> <property name="domparser" readonly="true"> <getter> if (!this._domparser) this._domparser = new domparser(); return this._domparser; </getter> </property> <
method name="refresh"> <body> // get new value, parse, and import it.
...gvalue; var newdom = this.domparser.parsefromstring(val, "text/xml"); var impnode = document.importnode(newdom.firstchild, true); // get content node, clean it, and update it var content = document.getanonymouselementbyattribute(this, "anonid", "content"); if (content.firstchild) { content.removechild(content.firstchild); } content.appendchild(impnode); return true; </body> </
method> </implementation> </binding> ...
Building up a basic demo with Babylon.js - Game development
var renderloop = function () { scene.render(); }; engine.runrenderloop(renderloop); we're using the engine's runrenderloop()
method to execute the renderloop() function repeatedly on every frame — the loop will continue to render indefinitely until told to stop.
... note: you probably noticed the babylon.vector3()
method in use here — this defines a 3d position on the scene.
...in this case we're creating a box using the mesh.createbox
method with it's own name, a size of 2, and a declaration of which scene we want it added to.
Building up a basic demo with Three.js - Game development
the setclearcolor()
method sets our background to a light gray colour, instead of the default black one.
...let's create it, by adding the following line below our previous lines: var scene = new three.scene(); later, we will be using the .add()
method, to add objects to this scene.
... var torusgeometry = new three.torusgeometry(7, 1, 6, 12); var phongmaterial = new three.meshphongmaterial({color: 0xff9500}); var torus = new three.mesh(torusgeometry, phongmaterial); scene.add(torus); these lines will add a torus geometry; the torusgeometry()
method's parameters define, and the parameters are radius, tube diameter, radial segment count, and tubular segment count.
Implementing controls using the Gamepad API - Game development
querying the gamepad object beside connect() and disconnect(), there are two more
methods in the gamepadapi object: update() and buttonpressed().
... detecting button presses the buttonpressed()
method is also placed in the main game loop to listen for button presses.
... getting the gamepads the navigator.getgamepads()
method has been updated with a longer explanation and an example piece of code.
Square tilemaps implementation: Static maps - Game development
this is the atlas we will be using as an example, which features five different tiles: to draw a tile from the atlas into the canvas we make use of the drawimage()
method in a canvas 2d context.
... gettile(): a helper
method that gets the tile index in a certain position.
...in these examples, empty tiles will be represented by index 0, so we will shift the indices of the atlases by one (and thus the first tile of the atlas will be assigned index 1, the second index 2, etc.) the gettile() helper
method returns the tile contained at the specified column and row.
Move the ball - Game development
first, add the following two lines above your draw() function, to define x and y: var x = canvas.width/2; var y = canvas.height-30; next update the draw() function to use the x and y variables in the arc()
method, as shown in the following highlighted line: function draw() { ctx.beginpath(); ctx.arc(x, y, 10, 0, math.pi*2); ctx.fillstyle = "#0095dd"; ctx.fill(); ctx.closepath(); } now comes the important part: we want to add a small value to x and y after every frame has been drawn to make it appear that the ball is moving.
...don't worry, because there's a
method to clear canvas content: clearrect().
... this
method takes four parameters: the x and y coordinates of the top left corner of a rectangle, and the x and y coordinates of the bottom right corner of a rectangle.
The score - Game development
we will use a separate variable for storing the score and phaser's text()
method to print it out onto the screen.
...var scoretext; var score = 0; adding score text to the game display now add this line at the end of the create() function: scoretext = game.add.text(5, 5, 'points: 0', { font: '18px arial', fill: '#0095dd' }); the text()
method can take four parameters: the x and y coordinates to draw the text at.
...this can be done using the settext()
method — add the two new lines seen below to the ballhitbrick() function: function ballhitbrick(ball, brick) { brick.kill(); score += 10; scoretext.settext('points: '+score); } that's it for now — reload your index.html and check that the score updates on every brick hit.
Preflight request - MDN Web Docs Glossary: Definitions of Web-related terms
a cors preflight request is a cors request that checks to see if the cors protocol is understood and a server is aware using specific
methods and headers.
... it is an options request, using three http request headers: access-control-request-
method, access-control-request-headers, and the origin header.
... for example, a client might be asking a server if it would allow a delete request, before sending a delete request, by using a preflight request: options /resource/foo access-control-request-
method: delete access-control-request-headers: origin, x-requested-with origin: https://foo.bar.org if the server allows it, then it will respond to the preflight request with an access-control-allow-
methods response header, which lists delete: http/1.1 204 no content connection: keep-alive access-control-allow-origin: https://foo.bar.org access-control-allow-
methods: post, get, options, delete access...
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, a primitive (primitive value, primitive data type) is data that is not an object and has no
methods.
... javascript // using a string
method doesn't mutate the string var bar = "baz"; console.log(bar); // baz bar.touppercase(); console.log(bar); // baz // using an array
method mutates the array var foo = []; console.log(foo); // [] foo.push("plugh"); console.log(foo); // ["plugh"] // assignment gives the primitive a new (not a mutated) value bar = bar.touppercase(); // ba...
... the wrapper's valueof()
method returns the primitive value.
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
the
methods that access the registry are symbol.for() and symbol.keyfor(); these mediate between the global symbol table (or "registry") and the run-time environment.
... the global symbol registry is mostly built by javascript's compiler infrastructure, and the global symbol registry's content is not available to javascript's run-time infrastructure, except through these reflective
methods.
... the
method symbol.for(tokenstring) returns a symbol value from the registry, and symbol.keyfor(symbolvalue) returns a token string from the registry; each is the other's inverse, so the following is true: symbol.keyfor(symbol.for("tokenstring")) === "tokenstring" // true learn more general knowledge symbol (programming) on wikipedia javascript data types and data structures symbols in ecmascript 6 symbol in the mdn js reference object.getownpropertysymbols() ...
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
if an entire interface is experimental, then the interface's name is prefixed (but not the properties or
methods within).
... if an experimental property or
method is added to a standardized interface, then the individual
method or property is prefixed.
... interface prefixes prefixes for interface names are upper-cased: webkit (chrome, safari, newer versions of opera, almost all ios browsers (including firefox for ios); basically, any webkit based browser) moz (firefox) o (older, pre-webkit, versions of opera) ms (internet explorer and microsoft edge) property and
method prefixes the prefixes for properties and
methods are lower-case: webkit (chrome, safari, newer versions of opera, almost all ios browsers (including firefox for ios); basically, any webkit based browser) moz (firefox) o (old, pre-webkit, versions of opera) ms (internet explorer and microsoft edge) sample usage: var requestanimationframe = window.requestanimationframe || window.mozrequestanimationframe || ...
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
not all http responses can be cached, these are the following constraints for an http response to be cached: the
method used in the request is itself cacheable, that is either a get or a head
method.
...(for example, firefox does not support it per https://bugzilla.mozilla.org/show_bug.cgi?id=109553.) other
methods, like put or delete are not cacheable and their result cannot be cached.
... when both, the
method of the request and the status of the response, are cacheable, the response to the request can be cached: get /pagex.html http/1.1 (…) 200 ok (…) a put request cannot be cached.
MDN Web Docs Glossary: Definitions of Web-related terms
tp header http/2 http/3 https hyperlink hypertext i i18n iana icann ice ide idempotent identifier idl ietf iife imap immutable index indexeddb information architecture inheritance input
method editor instance internationalization internet intrinsic size ip address ipv4 ipv6 irc iso isp itu j jank java javascript jpeg jquery json k key keyword l latency ...
...e local scope local variable locale localization long task loop lossless compression lossy compression ltr (left to right) m main axis main thread markup mathml media media (audio-visual presentation) media (css) metadata
method microsoft edge microsoft internet explorer middleware mime mime type minification mitm mixin mobile first modem modern web apps modularity mozilla firefox mutable mvc n namespace nan nat native navigatio...
... slug smoke test smpte (society of motion picture and television engineers) smtp snap positions soap spa (single-page application) specification speculative parsing speed index sql sql injection sri stacking context state machine statement static
method static typing strict mode string stun style origin stylesheet svg svn symbol symmetric-key cryptography synchronous syntax syntax error synthetic monitoring t tag tcp tcp handshake tcp slow start telnet ...
Handling different text directions - Learn web development
once you start to look at css layout, and in particular the newer layout
methods, this idea of block and inline becomes very important.
... due to the fact that writing mode and direction of text can change, newer css layout
methods do not refer to left and right, and top and bottom.
...however, ultimately we expect that people will transition to the logical versions for most things, as they make a lot of sense once you start also dealing with layout
methods such as flexbox and grid.
Flexbox - Learn web development
previous overview: css layout next flexbox is a one-dimensional layout
method for laying out items in rows or columns.
...this is another thing that is impossible to do with traditional layout
methods.
... previous overview: css layout next in this module introduction to css layout normal flow flexbox grid floats positioning multiple-column layout responsive design beginner's guide to media queries legacy layout
methods supporting older browsers fundamental layout comprehension assessment ...
Adding vector graphics to the Web - Learn web development
in the below code, older browsers will stick with the png that they understand, while newer browsers will load the svg: background: url("fallback.png") no-repeat center; background-image: url("image.svg"); background-size: contain; like the <img>
method described above, inserting svgs using css background images means that the svg can't be manipulated with javascript, and is also subject to the same css limitations.
... cons this
method is only suitable if you're using the svg in only one place.
... here's a quick review: <iframe src="triangle.svg" width="500" height="500" sandbox> <img src="triangle.png" alt="triangle with three unequal sides" /> </iframe> this is definitely not the best
method to choose: cons iframes do have a fallback mechanism, as you can see, but browsers only display the fallback if they lack support for iframes altogether.
Introduction to events - Learn web development
the earliest
method of registering event handlers found on the web involved event handler html attributes (or inline event handlers) like the one shown above — the attribute value is literally the javascript code you want to run when the event occurs.
...with javascript, you could easily add an event handler function to all the buttons on the page no matter how many there were, using something like this: const buttons = document.queryselectorall('button'); for (let i = 0; i < buttons.length; i++) { buttons[i].onclick = bgchange; } note that another option here would be to use the foreach() built-in
method available on nodelist objects: buttons.foreach(function(button) { button.onclick = bgchange; }); note: separating your programming logic from your content also makes your site more friendly to search engines.
... it so that a random color is applied to each one when selected: const divs = document.queryselectorall('div'); for (let i = 0; i < divs.length; i++) { divs[i].onclick = function(e) { e.target.style.backgroundcolor = bgchange(); } } the output is as follows (try clicking around on it — have fun): most event handlers you'll encounter have a standard set of properties and functions (
methods) available on the event object; see the event object reference for a full list.
Handling text — strings in JavaScript - Learn web development
try the following: let mystring = '123'; let mynum = number(mystring); typeof mynum; conversely, every number has a
method called tostring() that converts it to the equivalent string.
...in the next article, we'll build on this, looking at some of the built-in
methods available to strings in javascript and how we can use them to manipulate our strings into just the form we want.
...troubleshooting javascript storing the information you need — variables basic math in javascript — numbers and operators handling text — strings in javascript useful string
methods arrays assessment: silly story generator ...
What went wrong? Troubleshooting JavaScript - Learn web development
line 48 is using a document.queryselector()
method to get a reference to an element by selecting it with a css selector.
... looking further up our file, we can find the paragraph in question: <p class="loworhi"></p> so we need a class selector here, which begins with a dot (.), but the selector being passed into the queryselector()
method in line 48 has no dot.
... syntaxerror: missing ) after argument list this one is pretty simple — it generally means that you've missed the closing parenthesis at the end of a function/
method call.
Dynamic behavior in Svelte: working with variables and props - Learn web development
that means that the addtodo() function is executed, the element is added to the todos array, but svelte won't detect that the push
method modified the array, so it won't refresh the tasks <ul>.
...instead, we'll take out the push()
method and use spread syntax to achieve the same result — we'll assign a value to the todos array equal to the todos array plus the new object.
...tting started with ember ember app structure and componentization ember interactivity: events, classes and state ember interactivity: footer functionality, conditional rendering routing in ember ember resources and troubleshooting vue getting started with vue creating our first vue component rendering a list of vue components adding a new todo form: vue events,
methods, and models styling vue components with css using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, l...
Getting started with Vue - Learn web development
with this
method, you can use a lot of the core features of vue, such as the attributes, custom components, and data-management.
...this object is where you locally register components, define component inputs (props), handle local state, define
methods, and more.
...tting started with ember ember app structure and componentization ember interactivity: events, classes and state ember interactivity: footer functionality, conditional rendering routing in ember ember resources and troubleshooting vue getting started with vue creating our first vue component rendering a list of vue components adding a new todo form: vue events,
methods, and models styling vue components with css using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, l...
Understanding client-side JavaScript frameworks - Learn web development
adding a new todo form: vue events,
methods, and models we now have sample data in place and a loop that takes each bit of data and renders it inside a todoitem in our app.
... what we really need next is the ability to allow our users to enter their own todo items into the app, and for that, we'll need a text <input>, an event to fire when the data is submitted, a
method to fire upon submission to add the data and rerender the list, and a model to control the data.
...these work similarly to
methods but only re-run when one of their dependencies changes.
Accessibility/LiveRegionDevGuide
in addition to the standard priority queue
methods, additional
methods will need to be implemented that purge the queue based on one of the priority criterion.
... the "purge by timestamp"
method will be used to remove old messages that are no longer deemed relevant while "purge by politeness" is used to satisfy the aria live politeness specification.
... the later
method will be explained in detail below.
Creating MozSearch plugins
<searchplugin xmlns="http://www.mozilla.org/2006/browser/search/"> <shortname>yahoo</shortname> <description>yahoo search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,r0lgodlheaaqajecap8aaaaaap///waaach5baeaaaialaaaaaaqabaaaaipli+py+0nogquybdened2khkffwuamezmpzsfmaihphrrguum/ft+uwaaow==</image> <url type="application/x-suggestions+json"
method="get" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}" /> <url type="text/html"
method="get" template="http://search.yahoo.com/search"> <param name="p" value="{searchterms}"/> <param name="ei" value="utf-8"/> <mozparam name="fr" condition="pref" pref="yahoo-fr" /> </url> <searchform>http://search.yahoo.com/</searchform> </searchplugin> let's say t...
...3tdqn75d4xmavcok9armhbzaw0aecibhkalc0mdy7x9abna3obazxiaa6ikecglmvqhwwyjyul2d4v2cpg8vzswx7ghyaaak7aoif7saboqcmn4ha3ahfsidtgpq%2fvlz8p4mskj2w9h8ggbjevxvhdo4fquqg%2fkdypqcg4h8luiacnq%2fsobmyi8basajfpcj1aaeejwvqqlpabxmh5bjjqi0gi9dtaagdbbccavlkgmq7ykczxpcqxquzhaeccj4xgml493ug21zd%2badaxh0wlm4a9mzpxjkjiiawtar5pqmalacabquulttbgccagcnnzgabbgamj5thwgvjlaaaaabjru5erkjggg%3d%3d</image> <url type="text/html"
method="get" template="http://developer.mozilla.org/en/docs/special:search?search={searchterms}"/> <searchform>http://developer.mozilla.org/en/docs/special:search</searchform> </searchplugin> notice in this case that instead of using <param> to define parameters to the search engine, they're simply embedded inside the template url.
... this is actually the preferred way to do things when using get as the
method.
MozBeforePaint
gecko 2.0 adds a new
method for performing javascript controlled animations that synchronize not only with one another, but also with css transitions and smil animations being performed within the same window.
...whenever you're ready to refresh your animation, you call the window.requestanimationframe()
method.
...estamp - start; d.style.left = math.min(progress/10, 200) + "px"; if (progress < 2000) { window.mozrequestanimationframe(); } else { window.removeeventlistener("mozbeforepaint", step, false); } } window.addeventlistener("mozbeforepaint", step, false); window.mozrequestanimationframe(); </script> </body> </html> as you can see, each time the mozbeforepaint event fires, our step()
method is called.
Overview of Mozilla embedding APIs
do_getinterface this function simplfies retrieving interfaces via the nsiinterfacerequestor::getinterface(...)
method.
...to facilitate this, a set of global functions are available to access the nsmemory
methods without requiring an instance of the nsmemory service (see nsmemory.h).
...first, it provides
methods for the embedding application to notify a webbrowser of activation/deactivation and to control tabbing order...
JavaScript-DOM Prototypes in Mozilla
all the
methods that are supposed to show up on this jsobject are actually not properties of the object itself, but rather properties of the prototype of the jsobject for the wrapper (unless the c++ object's class info has the flag nsixpcscriptable::dont_share_prototype set, but lets assume that's not the case here).
...a foo()
method).
...creates a xpconnect javascript wrapper for a dom object), xpconnect will call the scriptable helper
method nsdomclassinfo::postcreate() which will make sure the prototype chain of the wrapper jsobject is properly set up.
AddonListener
these notifications come in the form of calls to
methods on the listener object.
... a listener only needs to implement the
methods corresponding to the events it cares about; missing
methods will not cause any problems.
...
method overview void onenabling(in addon addon, in boolean needsrestart) void onenabled(in addon addon) void ondisabling(in addon addon, in boolean needsrestart) void ondisabled(in addon addon) void oninstalling(in addon addon, in boolean needsrestart) void oninstalled(in addon addon) void onuninstalling(in addon addon, in boolean needsrestart) void onuninstalled(in addon addon) void onoperationcancelled(in addon addon) void onpropertychanged(in addon addon, in string properties[])
methods onenabling() called when an add-on is about to be enabled.
FxAccountsOAuthClient.jsm
components.utils.import("resource://gre/modules/fxaccountsoauthclient.jsm"); creating a new fxaccountsoauthclient new fxaccountsoauthclient(object options);
method overview launchwebflow(); teardown(); attributes parameters object returns the set of parameters that initialized the firefox accounts oauth flow.
...default: /authorization return value a newly created fxaccountsoauthclient object implementing the
methods described in this article.
...
methods launchwebflow() opens a new tab at the firefox accounts oauth authorization url.
FxAccountsProfileClient.jsm
components.utils.import("resource://gre/modules/fxaccountsprofileclient.jsm"); creating a new fxaccountsprofileclient new fxaccountsprofileclient(object options);
method overview fetchprofile(); attributes serverurl url profiler server url.
... return value a newly created fxaccountsprofileclient object implementing the
methods described in this article.
...
methods fetchprofile() fetches firefox accounts profile information.
Log.jsm
keys of prototype: leveldesc logger(); length: 2 keys of prototype: addappender(); level logstructured(); name parent removeappender(); updateappenders(); and the
methods mentioned below: logger
methods loggerrepository(); length: 0 keys of prototype: getlogger(); rootlogger storagestreamappender(); length: 1 keys of prototype: doappend(); getinputstream(); newoutputstream(); ou...
...tputstream reset(); structuredformatter(); length: 0 keys of prototype: format();
method overview enumerateinterfaces(); length: 0 enumerateproperties(); length: 2 member fields variable type description 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 fatal 70 ...
... info 40 numbers { "all": 0, "trace": 10, "debug": 20, "config": 30, "info": 40, "warn": 50, "error": 60, "fatal": 70 } trace 10 warn 50 repository loggerrepository logger
methods void fatal(string text, [optional] object params); void error(string text, [optional] object params); void warn(string text, [optional] object params); void info(string text, [optional] object params); void config(string text, [optional] object params); void debug(string text, [optional] object params); void trace(string text, [optional] object params); ...
OS.File.Info
instances of os.file.info may be obtained by: calling global
method os.file.stat() either from the main thread or from a worker thread; calling instance
method stat() of os.file either from the main thread or from a worker thread.
... global object os.file.info
methods object tomsg(in os.file.info value) os.file.tomsg convert an instance of os.file.info to a form that can be serialized and transmitted between threads or processes.
...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 javascript date object.
PerfMeasurement.jsm
method overview static bool canmeasuresomething(); void reset(); void start(); void stop(); member fields recorded data variables these variables provide access to the recorded data.
...note: these values are all zeroed (or set to -1, for events not being measured) when you initialize the perfmeasurement object, then they are not zeroed again unless you explicitly call the reset()
method.
...
methods canmeasuresomething() indicates whether or not the platform on which your code is running supports this code module.
PromiseUtils.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/promiseutils.jsm");
method overview deferred defer();
methods defer() creates a new pending promise and provides
methods to resolve or reject this promise.
... this
method was previously implemented as promise.defer(), which is obsolete since gecko 30.
... return value a new object, containing the new promise in the promise property, and the
methods to change its state in the resolve and reject properties.
Task.jsm
method overview function async(atask); promise spawn(atask); properties attribute type description 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.
...; return "value"; }
methods async() create and return an "async function" that starts a new task.
... async() simplifies the common pattern of implementing a
method via a task, like this simple object with a greet
method that has a name parameter and spawns a task to send a greeting and return its reply: let greeter = { message: "hello, name!", greet: function(name) { return task.spawn((function* () { return yield sendgreeting(this.message.replace(/name/, name)); }).bind(this); }) }; with async(), the
method can be declared succinctly: let greeter...
WebChannel.jsm
method overview listen(function callback); stoplistening(); send(object message, eventtarget target); attributes id string webchannel id
methods listen() registers the callback for messages on this channel.
... id - webchannel id of the incoming messages message - incoming message object sendercontext - incoming message context - this should be treated as an opaque object and passed to the .send()
method stoplistening() resets the callback for messages on this channel.
... parameters message the message object that will be sent sendercontext the sendercontext parameter passed to the .listen
method.
Refcount tracing and balancing
for example: perl -w tools/rb/make-tree.pl --object 0x00253ab0 < my-leak.log this will build an indented tree that looks something like this (except probably a lot larger and leafier): .root: bal=1 main: bal=1 dosomethingwithfooandreturnittoo: bal=2 ns_newfoo: bal=1 let's pretend in our toy example that ns_newfoo() is a factory
method that makes a new foo and returns it.
... dosomethingwithfooandreturnittoo() is a
method that munges the foo before returning it to main(), the main program.
...this is probably "okay" because it's a factory
method that creates an addref()-ed object.
I/O Types
prfiledesc prio
methods prfileprivate prdescidentity note that the nspr documentation follows the unix convention of using the termfiles to refer to many kinds of i/o objects.
...an i/o function on a prfiledesc structure is carried out by invoking the corresponding "
method" in the i/o
methods table (a structure of type prio
methods) of the prfiledesc structure (the "object").
... different kinds of i/o objects (such as files and sockets) have different i/o
methods tables, thus implementing different behavior in response to the same i/o function call.
PR_CreateIOLayerStub
syntax #include <prio.h> prfiledesc* pr_createiolayerstub( prdescidentity ident prio
methods const *
methods); parameters the function has the following parameters: ident the identity to be associated with the new layer.
...
methods a pointer to the prio
methods structure specifying the functions for the new layer.
...the file descriptor returned contains the pointer to the i/o
methods table provided.
4.3 Release Notes
release date: 01 april 2009 introduction network security services for java (jss) 4.3 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library pkcs11 needslogin
method support hmacsha256, hmacsha384, and hmacsha512 support for all nss 3.12 initialization options jss 4.3 is tri-licensed under mpl 1.1/gpl 2.0/lgpl 2.1.
... new sqlite-based shareable certificate and key databases by prepending the string "sql:" to the directory path passed to configdir parameter for crypomanager.initialize
method or using the nss environment variable nss_default_db_type.
... libpkix: an rfc 3280 compliant certificate path validation library (see pkixverify) pk11token.needslogin
method (see needslogin) support hmacsha256, hmacsha384, and hmacsha512 (see hmactest.java) support for all nss 3.12 initialization options (see initializationvalues) new ssl error codes (see http://mxr.mozilla.org/security/sour...util/sslerrs.h) ssl_error_unsupported_extension_alert ssl_error_certificate_unobtainable_alert ssl_error_unrecognized_name_alert ssl_error_bad_cert_status_response_alert ssl_error_bad_cert_hash_value_alert new tls cipher suites (see http://mxr.mozilla.org/security/sour...sslsocket.java): tls_rsa_with_camellia_128_cbc_sha tls_dhe_dss_with_camellia_128_cbc_sha tls_dhe_rsa_with_camellia_128_cbc_sha tls_rsa_with_camelli...
NSS_3.12_release_notes.html
igestdirect (see cryptohi.h) vfy_verifydigestwithalgorithmid (see cryptohi.h) new macros for camellia support (see blapit.h): nss_camellia nss_camellia_cbc camellia_block_size new macros for rsa (see blapit.h): rsa_max_modulus_bits rsa_max_exponent_bits new macros in certt.h: x.509 v3 ku_encipher_only cert_max_serial_number_bytes cert_max_dn_bytes pkix cert_rev_m_do_not_test_using_this_
method cert_rev_m_test_using_this_
method cert_rev_m_allow_network_fetching cert_rev_m_forbid_network_fetching cert_rev_m_allow_implicit_default_source cert_rev_m_ignore_implicit_default_source cert_rev_m_skip_test_on_missing_source cert_rev_m_require_info_on_missing_source cert_rev_m_ignore_missing_fresh_info cert_rev_m_fail_on_missing_fresh_info cert_rev_m_stop_testing_on_fresh_info cert_rev_m_continue...
..._testing_on_fresh_info cert_rev_mi_test_each_
method_separately cert_rev_mi_test_all_local_information_first cert_rev_mi_no_overall_info_requirement cert_rev_mi_require_some_fresh_info_available cert_policy_flag_no_mapping cert_policy_flag_explicit cert_policy_flag_no_any cert_enable_ldap_fetch cert_enable_http_fetch new macro in utilrename.h: smime_aes_cbc_128 the nssckbi pkcs #11 module's version changed to 1.70.
...bug 384926: libpkix build problems bug 389411: mingw build error - undefined reference to `_imp__pkix_errornames' bug 389904: avoid multiple decoding/encoding while creating and using pkix_pl_x500name bug 390209: pkix aia manager tries to get certs using aia url with ocsp access
method bug 390233: umbrella bug for libpkix cert validation failures discovered from running vfyserv bug 390499: libpkix does not check cached cert chain for revocation bug 390502: libpkix fails cert validation when no valid crl (nist validation policy is always enforced) bug 390530: libpkix does not support time override bug 390536: cert validation functions must validate leaf cert themselves bug 39055...
NSS API Guidelines
usually, every public routine has a private counterpart, and the implementation of the public routine looks like this: nssimplement rv * nsstype_
method ( nsstype *t, nssfoo *arg1, nssbar *arg2 ) { nss_clearerrorstack(); #ifdef debug if( !nssfoo_verifypointer(arg1) ) return (rv *)null; if( !nssbar_verifypointer(arg2) ) return (rv *)null; #endif /* debug */ return nsstype_
method(t, arg1, arg2); } aside from error cases, all documented entry points s...
...this
method is a more complicated than the other
methods: requiring the calling of search code tolerant to often repeated element inspection.
...
methods/functions design init, shutdown functions if a layer has some global initialization tasks, which need to be completed before the layer can be used, that layer should supply an initialization function of the form layer_init().
NSS Sample Code Sample1
the same
methods outlined // in step 4 may be used here.
...this becomes the input to // the exportkeys
method on the remote server.
...use the rsa-based wrapping //
methods instead.
nss tech note1
the
method type : whether the component type is constructed or primitive.
...tring, sec_asn1_printable_string, sec_asn1_t61_string, sec_asn1_teletex_string, sec_asn1_t61_string, sec_asn1_videotex_string, sec_asn1_ia5_string, sec_asn1_utc_time, sec_asn1_generalized_time, sec_asn1_graphic_string, sec_asn1_visible_string, sec_asn1_general_string, sec_asn1_universal_string, sec_asn1_bmp_string note that for sec_asn1_set and sec_asn1_sequence types, you must also include the
method type macro sec_asn1_constructed to construct a fully valid tag, as defined by the asn.1 standard .
...you can also use the macros sec_asn1_set_of and sec_asn1_sequence_of which define both the tag number and this modifier (but still need the
method type, this may be a bug).
Necko Interfaces Overview
channel is used to download the resource once) download initiated via nsichannel::asyncopen
method can be canceled via nsirequest::cancel
method at anytime after invocation of asyncopen
method nsiprotocolhandler a service that manages a protocol, identified by it's uri scheme (eg.
... http) maps uri string to nsiuri instance via newuri
method creates nsichannel instance from nsiuri instance via newchannel
method nsistreamlistener : nsirequestobserver implemented by the consumer of a nsichannel instance passed to nsichannel::asyncopen
method nsirequestobserver::onstartrequest - notifies start of async download nsistreamlistener::ondataavailable - notifies presence of downloaded data nsirequestobserver::onstoprequest - notifies completion of async download, possibly w/ error nsiloadgroup : nsirequest attribute of a nsirequest channel impl adds itself to its load group during invocation of asyncopen channel impl removes itself from its load group when download completes load groups in gecko own all channels used to load a particular page (until the channels com...
...plete) all channels owned by a load group can be canceled at once via the load group's nsirequest::cancel
method nsitransport represents a physical connection, such as a file descriptor or a socket used directly by protocol handler implementations (as well as by mailnews and chatzilla) synchronous i/o
methods: openinputstream, openoutputstream asynchronous i/o
methods: asyncread, asyncwrite nsitransport::asyncread takes a nsistreamlistener parameter original document information author(s): darin fisher last updated date: december 10, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Rhino Examples
the checkparam.js script is a useful tool to check that @param tags in java documentation comments match the parameters in the corresponding java
method.
...primitivewrapfactory primitivewrapfactory.java is an example of a wrapfactory that can be used to control the wrapping behavior of the rhino engine on calls to java
methods.
...the foo class - extending scriptableobject foo.java is a simple javascript host object that includes a property with an associated action and a variable argument
method.
Rhino scopes and contexts
to associate the current thread with a context, simply call the enter
method of context: context cx = context.enter(); once you are done with execution, simply exit the context: context.exit(); these calls will work properly even if there is already a context associated with the current thread.
...however, initstandardobjects is an expensive
method to call and it allocates a fair amount of memory.
...then all we need to do is create a new object and call its setprototype
method to set the prototype to the shared object, and the parent of the new scope to null: scriptable newscope = cx.newobject(sharedscope); newscope.setprototype(sharedscope); newscope.setparentscope(null); the call to newobject simply creates a new javascript object with no properties.
Shumway
the simple
method is to install the shumway extension (or run a browser version with shumway included and enabled) and browse to your flash content with adobe flash player set "ask to activate" or "never activate" in firefox's add-ons menu (this will be listed as "shockwave flash" under the plugins tab).
...several
methods exist to allow inspector access to your swf file.
...there does not currently exist a private
method to contribute source code.
Tracing JIT
therefore an assembler contains several machine-specific
methods which are implemented in the accompanying nanojit/native*.* files.
...each define architecture-specific
methods within the assembler class.
... the architecture-specific
methods found in these files are the only functions within nanojit or tracemonkey that emit raw bytes of machine-code into memory.
JS::Handle
}
methods here, ptr represents the private member of js::handle<t>, typed with t.
...
method description const t *address() const returns a pointer to ptr.
... if you want to add additional
methods to js::handle for a specific specialization, define a js::handlebase<t> specialization containing them.
JS::PersistentRooted
methods here, ptr represents the private member of js::persistentrooted<t>, typed with t.
...
method description void init(jscontext* cx) initialize with optional initial value (if not provided, it will be initialized with the initial value of the type).
... before spidermonkey 38, persistentrooted<t> itself cannot be a global variable, but from spidermonkey38, it can be declared as a global variable, and initialized later with init()
method (bug 1107639).
JS::Rooted
methods here, ptr represents the private member of js::rooted<t>, typed with t.
...
method description t &get() returns ptr.
... if you want to add additional
methods to rooted for a specific specialization, define a js::rootedbase<t> specialization containing them.
JSObjectOps.defaultValue
description the jsobjectops.defaultvalue callback corresponds to the [[defaultvalue]]
method defined in ecma 262-3 §8.6.2.6.
...it calls the javascript
methods obj.valueof() and/or obj.tostring().
...on success, *vp must be a primitive value: per es5 §8.12.8, every object "must ensure that its [[defaultvalue]] internal
method can return only primitive values." debug builds of spidermonkey will assert if a convert callback is successful but leaves *vp holding a primitive value.
JSPropertySpec
tinyid int8 obsolete since jsapi 31 unique id number for the property to aid in resolving getproperty and setproperty
method calls.
... getter jsnativewrapper or selfhostedwrapper getter
method for the property.
... setter jsnativewrapper or selfhostedwrapper setter
method for the property.
JS_NewObject
the new object will inherit all of the prototype object's properties and
methods, and the new object's __proto__ property will be a reference to the prototype object.
...clasp is a pointer to an existing class to use for internal
methods, such as finalize.
... starting with gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5), you can create a new object in a specific compartment using the components.utils.createobjectin()
method.
JS_PreventExtensions
in javascript this may be accomplished using the object.preventextensions
method.
... the similar jsapi
method is js_preventextensions.
... var target = {}; var handler = { preventextensions: function(obj) { return false; } }; var obj = new proxy(target, handler); // bool succeeded; // bool rv = js_preventextensions(cx, obj, &succeeded); // // rv == true, succeeded == false note that as with most jsapi
methods, *succeeded is only set if js_preventextensions returns true (that is, does not fail).
JS_ValueToObject
if v is a native javascript object, this calls the object's valueof
method, if any.
...(implementation note: the object's jsobjectops.defaultvalue
method is called with hint=jstype_object.) the resulting object is subject to garbage collection unless the variable *objp is protected by a local root scope, an object property, or the js_addroot function.
... note that a local root scope is not sufficient to protect the resulting object in some cases involving the valueof
method!
SpiderMonkey 1.8.8
obsolete apis ...list obsolete
methods/structs/apis here...
...removal of jscontext* parameters to many
methods the js_getclass
method now takes only a jsobject*, where previously it also required a jscontext* in threadsafe builds.
... (the js_get_class macro abstracting away this difference has accordingly been removed.) javascript shell changes detail added/removed
methods here...
SpiderMonkey 17
obsolete apis ...list obsolete
methods/structs/apis here...
...removal of jscontext* parameters to many
methods the js_getclass
method now takes only a jsobject*, where previously it also required a jscontext* in threadsafe builds.
...javascript shell changes detail added/removed
methods here...
SpiderMonkey 24
many of the garbage collector changes require type signature changes to jsapi
methods: specifically introducing js::rooted, js::handle, and js::mutablehandle types.
... obsolete apis ...list obsolete
methods/structs/apis here...
... javascript shell changes detail added/removed
methods here...
Embedded Dialog API
an example of this can be found in the mfc embedding testbed application, in the
method cmfcembedapp::initializewindowcreator (lxr link accurate at revision 1.20 of that file; search for the
method name in later revisions).
...most if not all of these dialogs will need to be child/dependent/transient windows, so each
method responsible for actually opening a window must take an nsidomwindow *aparent parameter, and use that window as the dialog's parent, if non-null.
...embedded dialog posing interface coding conventions the nsidomwindow *aparent parameter mentioned above should be the first parameter to each
method in which it appears.
XPCOM hashtable guide
there are three key
methods, get, put, and remove, which retrieve entries from the hashtable, write entries into the hashtable, and remove entries from the hashtable respectively.
... the hashtables that hold references to pointers (nsrefptrhashtable and nsinterfacehashtable) also have getweak
methods that return non-addrefed pointers.
... all of these hashtable classes can be iterated over via the iterator class and cleared via the clear
method.
Inheriting from implementation classes
ns_decl_isupports ns_decl_ia } a.cpp, as usual: ns_impl_isupports1(a, ia) ns_i
methodimp a::funca() { ...
... ns_decl_isupports_inherited ns_forward_ia(a::) // need to disambiguate ns_decl_ib } b.cpp: ns_impl_isupports_inherited1(b, a, ib) // this, superclass,added ifaces ns_i
methodimp b::funcb() { ...
... ns_decl_isupports_inherited ns_forward_ia(b::) ns_forward_ib(b::) ns_decl_ic } c.cpp: ns_impl_isupports_inherited1(c, b, ic) ns_i
methodimp c::funcc() { ...
Monitoring HTTP activity
this is very simple, requiring you to implement a single
method, nsihttpactivityobserver.observeactivity(), which gets called each time an action of interest takes place on the http channel.
...this is done using the nsihttpactivitydistributor.addobserver()
method in nsihttpactivitydistributor: var activitydistributor = components.classes["@mozilla.org/network/http-activity-distributor;1"] .getservice(components.interfaces.nsihttpactivitydistributor); activitydistributor.addobserver(httpobserver); observable activities there are two classes of observable activities: those that occur at the socket level and those that oc...
...observable socket activities when the activity type reported to your nsihttpactivityobserver.observeactivity()
method is activity_type_socket_transport, the activity subtype, which indicates the specific type of activity that occurred, will be a socket transport status code.
Observer Notifications
this lets extensions inject api into chrome windows as needed (see nsidomglobalpropertyinitializer for an alternative
method of doing this, which uses significantly less memory).
...this lets extensions inject api into content windows as needed (see nsidomglobalpropertyinitializer for an alternative
method of doing this).
...if you are referencing instances of mozistoragestatement referencing places databases when this notification occurs, you should call their mozistoragestatement.finalize()
method places-sync-finished sent when the places database has been successfully flushed to disk.
nsACString
methods beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer.
...thus, the length of the data contained in the nsacstring should be determined by calling the nsacstring::length()
method.
... the
methods defined on nsacstring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_cstring.
nsACString_internal
ef="http://developer.mozilla.org/en/ns_lossyconvertutf16toascii" shape="rect" title="ns_lossyconvertutf16toascii"> <area alt="" coords="251,389,435,437" href="http://developer.mozilla.org/en/ns_convertutf16toutf8" shape="rect" title="ns_convertutf16toutf8"> <area alt="" coords="309,293,445,341" href="http://developer.mozilla.org/en/nsadoptingcstring" shape="rect" title="nsadoptingcstring"> </map>
method overview constructors 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 ...
...
methods constructors void nsacstring_internal(const nscsubstringtuple&) - source this is public to support automatic conversion of tuple to string base type, which helps avoid converting to nstastring.
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this
method is used to remove all occurrences of achar from this string.
nsAString
methods beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer.
...thus, the length of the data contained in the nsastring should be determined by calling the nsastring::length
method.
... the
methods defined on nsastring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_string.
nsAString_internal
,192,437" href="http://developer.mozilla.org/en/ns_convertasciitoutf16" shape="rect" title="ns_convertasciitoutf16"> <area alt="" coords="216,389,400,437" href="http://developer.mozilla.org/en/ns_convertutf8toutf16" shape="rect" title="ns_convertutf8toutf16"> <area alt="" coords="277,293,405,341" href="http://developer.mozilla.org/en/nsadoptingstring" shape="rect" title="nsadoptingstring"> </map>
method overview constructors 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 ...
...
methods constructors void nsastring_internal(const nssubstringtuple&) - source this is public to support automatic conversion of tuple to string base type, which helps avoid converting to nstastring.
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this
method is used to remove all occurrences of achar from this string.
nsAutoRef
nsautoref has a role similar to nsautoptr and nsrefptr but does not require that the handle is a pointer to an object that was created with new or has addref() and release()
methods.
...no copy constructor nor copy assignment operators are available, so the handle to the resource will be held until released on destruction of the nsautoref or until explicitly reset() or transferred through provided
methods.
... in order to use nsautoref<t> for a class t associated with a particular resource type, the type of the handle to the resource and the
method for releasing the resource must be provided for class t.
nsCountedRef
nscountedref has a role similar to nsrefptr but does not require that the handle is a pointer to an object that has addref() and release()
methods.
...nscountedref<t> is derived from nsautoref<t> and so inherits its
methods.
...in order to use nscountedref<t> for a class t associated with a particular resource type, the type of the handle to the resource and the
methods for referencing and releasing the resource must be provided for class t.
nsDependentCSubstring
names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters
method overview constructors rebind 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 c...
...
methods constructors void nsdependentcsubstring(const nsacstring_internal&, pruint32, pruint32) - source parameters nsacstring_internal& str pruint32 startpos pruint32 length void nsdependentcsubstring(const char*, const char*) - source parameters char* start char* end void nsdependentcsubstring(const nsreadingiterator<char>&, const nsreadingiterator<char>&) - source parameters nsreadingiterator<char>& start nsrea...
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char, print32) - source this
method is used to remove all occurrences of achar from this string.
nsDependentSubstring
names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters
method overview constructors rebind 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 c...
...
methods constructors void nsdependentsubstring(const nsastring_internal&, pruint32, pruint32) - source parameters nsastring_internal& str pruint32 startpos pruint32 length void nsdependentsubstring(const prunichar*, const prunichar*) - source parameters prunichar* start prunichar* end void nsdependentsubstring(const nsreadingiterator<short unsigned int>&, const nsreadingiterator<short unsigned int>&) - source parame...
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar, print32) - source this
method is used to remove all occurrences of achar from this string.
nsMemory
};
methods alloc the alloc function allocates a block of memory of a particular size.
... remarks to use the
methods in this class, you must link your component or application against the xpcom glue library.
... the static
methods defined on this class are not frozen.
amIInstallTrigger
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview boolean enabled(); boolean install(in nsivariant aargs, [optional] in amiinstallcallback acallback); boolean installchrome(in pruint32 atype, in astring aurl, in astring askin); deprecated since gecko 2.0 boolean startsoftwareupdate(in astring aurl, [optional] in print32 aflags); deprecated since gecko 2.0 boolean updateenabled(); deprecated since gecko 2.0 constants retained for backwards compatibility.
... constant value description skin 1 locale 2 content 4 package 7
methods enabled() tests if installation is enabled.
...this
method is deprecated, please use install() in the future.
imgILoader
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by @mozilla.org/image/loader;1 as a service: var imgiloader = components.classes["@mozilla.org/image/loader;1"] .getservice(components.interfaces.imgiloader);
method overview imgirequest loadimage(in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy); imgirequest loadimagewithchannel(in nsichannel achannel, in imgidecoder...
...observer aobserver, in nsisupports cx, out nsistreamlistener alistener); boolean supportimagewithmimetype(in string mimetype); constants constant value description load_cors_anonymous 1 << 16 load_cors_use_credentials 1 << 17
methods loadimage() start the load and decode of an image.
...this must already be opened before this
method is called, and there must have been no ondataavailable calls for it yet.
jsdIStackFrame
once a jsdistackframe has been invalidated all
method and property accesses will throw a ns_error_not_available exception.
...
method overview boolean eval(in astring bytes, in autf8string filename, in unsigned long line, out jsdivalue result); attributes attribute type description callee jsdivalue function object running in this stack frame.
...
methods eval() evaluate arbitrary javascript in this stack frame.
mozIAsyncHistory
1.0 66 introduced gecko 24.0 inherits from: nsisupports last changed in gecko 24.0 (firefox 24.0 / thunderbird 24.0 / seamonkey 2.21) implemented by: @mozilla.org/browser/history;1 as a service: var asynchistory = components.classes["@mozilla.org/browser/history;1"] .getservice(components.interfaces.moziasynchistory);
method overview void getplacesinfo(in jsval aplaceidentifiers, in mozivisitinfocallback acallback); void isurivisited(in nsiuri auri, in mozivisitedstatuscallback acallback); void updateplaces(in moziplaceinfo, [optional] in mozivisitinfocallback acallback);
methods getplacesinfo() starts an asynchronous request to determine whether or not a given uri has been visited;...
... acallback an object implementing the mozivisitedstatuscallback.isvisited()
method.
... acallback an object implementing the mozivisitedstatuscallback.isvisited()
method; this
method will be called with the results once the request has been completed.
mozIPersonalDictionary
to access this service, use var personaldictionary = components.classes["@mozilla.org/spellchecker/personaldictionary;1"] .getservice(components.interfaces.mozipersonaldictionary);
method overview void addcorrection(in wstring word,in wstring correction, in wstring lang); void addword(in wstring word, in wstring lang); boolean check(in wstring word, in wstring lang); void endsession(); void getcorrection(in wstring word, [array, size_is(count)] out wstring words, out pruint32 count); void ignoreword(in wstring word); void load(); void removecorrection(in wstring w...
...
methods addcorrection() adds a misspelling to the list of corrections.
... note that this
method is not currently implemented.
mozIPlacesAutoComplete
toolkit/components/places/public/moziplacesautocomplete.idlscriptable this interface provides some constants used by the places autocomplete search provider as well as
methods to track opened pages for autocomplete purposes.
... 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void registeropenpage(in nsiuri auri); void unregisteropenpage(in nsiuri auri); constants constant value description match_anywhere 0 match anywhere in each searchable term.
...
methods registeropenpage() mark a page as being currently open.
mozIStoragePendingStatement
the mozistoragependingstatement interface represents a pending asynchronous database statement, and offers the cancel()
method which allows you to cancel the pending statement.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports
method overview void cancel();
methods cancel() cancels the pending statement.
...starting with gecko 1.9.2, this information is no longer provided and the
method doesn't return a value.
mozIStorageStatementCallback
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports
method overview void handlecompletion(in unsigned short areason); void handleerror(in mozistorageerror aerror); void handleresult(in mozistorageresultset aresultset); constants constant value description reason_finished 0 the statement has finished executing normally.
...
methods handlecompletion() called when a statement finishes executing.
...generally, this
method will be called several times, each time providing one or more results.
mozIStorageValueArray
the mozistoragevaluearray interface obtains provides
methods to obtain data from a given result.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports
method overview long gettypeofindex(in unsigned long aindex); long getint32(in unsigned long aindex); long long getint64(in unsigned long aindex); double getdouble(in unsigned long aindex); autf8string getutf8string(in unsigned long aindex); astring getstring(in unsigned long aindex); void getblob(in unsigned long aindex, out unsigned long adatasize, [array,size_is(adatasize)] out octet adata); boolean getisnull(in unsigned long aindex); ...
...
methods gettypeofindex() returns the type of the value at the given column index.
mozIVisitInfoCallback
toolkit/components/places/public/moziasynchistory.idlscriptable this interface provides callback handling functionality for moziasynchistory.updateplaces() 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6)
method overview void handleerror(in nsresult aresultcode, in moziplaceinfo aplaceinfo); void handleresult(in moziplaceinfo aplaceinfo); void oncomplete(in nsresult aresultcode, in moziplaceinfo aplaceinfo);obsolete since gecko 8.0
methods handleerror() called when a moziplaceinfo couldn't be processed.
... if more than one operation is done for a given visit, this
method is only called once (for all changes at once).
... notes this
method was replaced by the separate handleresult() and handleerror()
methods in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5).
nsIAccessibleDocument
you can also get one from nsiaccessnode.getaccessibledocument() or nsiaccessibleevent.getaccessibledocument()
method overview nsiaccessible getaccessibleinparentchain(in nsidomnode adomnode, in boolean acancreate); obsolete since gecko 2.0 nsiaccessnode getcachedaccessnode(in voidptr auniqueid); native code only!
...
methods getaccessibleinparentchain() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) returns the first accessible parent of a dom node.
... acancreate if true, this
method can create a new accessible.
nsIAccessibleEditableText
inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview void copytext(in long startpos, in long endpos); void cuttext(in long startpos, in long endpos); void deletetext(in long startpos, in long endpos); void inserttext(in astring text, in long position); void pastetext(in long position); void setattributes(in long startpos, in long endpos, in nsisupports attributes); unimplemented ...
...
methods copytext() copies the text range into the clipboard.
...the
method is not implemented.
nsIAccessibleHyperLink
accessible/public/nsiaccessiblehyperlink.idlscriptable a cross-platform interface that supports hyperlink-specific properties and
methods.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview nsiaccessible getanchor(in long index); note: renamed from getobject in gecko 1.9 nsiuri geturi(in long index); boolean isselected(); obsolete since gecko 1.9 boolean isvalid(); obsolete since gecko 1.9 attributes attribute type description anchorcount long the number of anchors within this hyperlink.
...
methods returns a reference to the object at the given index.
nsIAccessibleImage
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview void getimageposition(in unsigned long coordtype, out long x, out long y); void getimagesize(out long width, out long height);
methods getimageposition() returns the coordinates of the image accessible.
... this
method is the same as nsiaccessible.getbounds() excepting coordinate origin parameter.
...this
method is the same as nsiaccessible.getbounds().
nsIAccessibleRelation
method overview nsiaccessible gettarget(in unsigned long index); nsiarray gettargets(); attributes attribute type description relationtype unsigned long returns the type of the relation.
...this relation is very useful for finding the content quickly, and is the proper
method for finding content in gecko 1.9 and beyond.
...
methods gettarget() returns accessible relation target at the given index.
nsIAccessibleRetrieval
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview nsiaccessible getaccessiblefor(in nsidomnode anode); nsiaccessible getaccessibleinshell(in nsidomnode anode, in nsipresshell apresshell); nsiaccessible getaccessibleinweakshell(in nsidomnode anode, in nsiweakreference apresshell); obsolete since gecko 2.0 nsiaccessible getaccessibleinwindow(in nsidomnode anode, in nsidomwindow adomwin); obsolete since gecko 2.0 nsiaccessible getapplicationaccessible(); nsiaccessible getattachedaccessiblefor(...
...bsolete since gecko 2.0 nsidomnode getrelevantcontentnodefor(in nsidomnode anode); astring getstringeventtype(in unsigned long aeventtype); astring getstringrelationtype(in unsigned long arelationtype); astring getstringrole(in unsigned long arole); nsidomdomstringlist getstringstates(in unsigned long astates, in unsigned long aextrastates);
methods getaccessiblefor() return an nsiaccessible for a dom node in pres shell 0.
...this
method doesn't create accessible object for returned node.
nsIAnnotationObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview void onitemannotationremoved(in long long aitemid, in autf8string aname); void onitemannotationset(in long long aitemid, in autf8string aname); void onpageannotationremoved(in nsiuri auri, in autf8string aname); void onpageannotationset(in nsiuri apage, in autf8string aname);
methods onitemannotationremoved() this
method is called when an annotation is deleted for an item.
... onitemannotationset() this
method is called when an annotation value is set for an item.
... onpageannotationset() this
method is called when an annotation value is set for a uri.
nsIApplicationCache
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) each application cache has a unique client id for use with nsicacheservice.opensession()
method, to access the cache's entries.
...
method overview void activate(); void addnamespaces(in nsiarray namespaces); void discard(); void gatherentries(in pruint32 typebits, out unsigned long count, [array, size_is(count)] out string keys); nsiapplicationcachenamespace getmatchingnamespace(in acstring key); unsigned long gettypes(in acstring key); void initashandle(in acstring groupid, in acstring clientid); void markentry(in acstring key, in unsigned long typebits); void unmarkentry(in acstring key, in unsigned long ...
...
methods activate() makes this cache the active application cache for this group.
nsIApplicationCacheService
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)
method overview void cacheopportunistically(in nsiapplicationcache cache, in acstring key); nsiapplicationcache chooseapplicationcache(in acstring key); nsiapplicationcache createapplicationcache(in acstring group); void deactivategroup(in acstring group); nsiapplicationcache getactivecache(in acstring group); nsiapplicationcache getapplicationcache(in acstring clientid); void getgroups([optional] out unsigned long count, [array, size_is(count), re...
...tval] out string groupids);
methods cacheopportunistically() flags the specified key as one that should be cached opportunistically.
... note: this
method should propagate the entry to other application caches with the same opportunistic namespace; however, this is not currently implemented.
nsIArray
method overview nsisimpleenumerator enumerate(); unsigned long indexof(in unsigned long startindex, in nsisupports element); void queryelementat(in unsigned long index, in nsiidref uuid, [iid_is(uuid), retval] out nsqiresult result); attributes attribute type description length unsigned long the number of elements in the array.
...
methods enumerate() enumerate the array.
...null is a valid result for this
method, but exceptions are thrown in other circumstances.
nsIAutoCompleteListener
inherits from: nsisupports last changed in gecko 1.7
method overview void onautocomplete(in nsiautocompleteresults result, in autocompletestatus status); void onstatus(in wstring statustext); attributes attribute type description param nsisupports private parameter used by the autocomplete widget.
...
methods onautocomplete() called by the autocomplete session when the search is done or over.
...this
method does not seem to have ever been implemented.
nsIBidiKeyboard
a user is a bidirectional writer if they have keyboard layouts in both left-to-right and right-to-left directions (that is users who use arabic, iranian (persian), or israel (hebrew) keyboard layout, beside an us (english) layout.) inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6)
method overview boolean islangrtl(); void setlangfrombidilevel(in pruint8 alevel); attributes attribute type description havebidikeyboards boolean indicates whether or not the system has at least one keyboard for each direction (left-to-right and right-to-left) installed.
...
methods islangrtl() determines if the current keyboard language is right-to-left.
... (supported on: win32, mac, gtk2) note: prior to gecko 1.9 this
method used a parameter 'out prbool aisrtl' to return the value.
nsIBinaryInputStream
inherits from: nsiinputstream last changed in gecko 1.7
method overview pruint8 read8(); pruint16 read16(); pruint32 read32(); pruint64 read64(); unsigned long readarraybuffer(in pruint32 alength, in jsval aarraybuffer); prbool readboolean(); void readbytearray(in pruint32 alength, [array, size_is(alength), retval] out pruint8 abytes); void readbytes(in pruint32 alength, [size_is(alengt...
...h), retval] out string astring); acstring readcstring(); double readdouble(); float readfloat(); astring readstring(); void setinputstream(in nsiinputstream ainputstream);
methods read8() reads from the stream.
... warning: this
method is available from javascript; however javascript does not support 64-bit integers.
nsIClipboardDragDropHookList
method overview void addclipboarddragdrophooks(in nsiclipboarddragdrophooks ahooks); nsisimpleenumerator gethookenumerator(); void removeclipboarddragdrophooks(in nsiclipboarddragdrophooks ahooks);
methods addclipboarddragdrophooks() this
method adds a hook to the list.
... gethookenumerator() this
method retrieves an enumerator for all hooks which have been added.
...removeclipboarddragdrophooks() this
method removes a hook from the list.
nsIContentPrefService
to create an instance, use: var contentprefservice = components.classes["@mozilla.org/content-pref/service;1"] .getservice(components.interfaces.nsicontentprefservice);
method overview void addobserver(in astring aname, in nsicontentprefobserver aobserver); nsivariant getpref(in nsivariant agroup, in astring aname, [optional] in nsicontentprefcallback acallback); nsipropertybag2 getprefs(in nsivariant agroup); nsipropertybag2 getprefsbyname(in astring aname); boolean haspref(in nsivariant agroup, in astring aname); ...
...useful for accessing and manipulating preferences in ways that are caller-specific or for which there is not yet a generic
method, although generic functionality useful to multiple callers should generally be added to this unfrozen interface.
...
methods addobserver() adds an observer that monitors a preference for changes.
nsIConverterOutputStream
to create an instance, use: var converteroutputstream = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream);
method overview void init(in nsioutputstream aoutstream, in string acharset, in unsigned long abuffersize, in prunichar areplacementcharacter);
methods init() initialize this stream.
... must be called before any other
method on this interface, or you will crash.
... the output stream passed to this
method must not be null, or you will crash.
nsICrashReporter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void annotatecrashreport(in acstring key, in acstring data); void appendappnotestocrashreport(in acstring data); void appendobjcexceptioninfotoappnotes(in voidptr aexception); native code only!
...
methods annotatecrashreport() add some extra data to be submitted with a crash report.
...unlike annotatecrashreport(), this
method will append to existing data.
nsIDBChangeListener
there are a couple of ways to access the message database: if you have a nsimsgfolder, you can do this like so: somefolder.msgdatabase.addlistener(mylistener); alternately, you can access the message database through the nsimsgdbview like so: gfolderdisplay.view.dbview.db.addlistener(mylistener);
method overview void onhdrflagschanged(in nsimsgdbhdr ahdrchanged, in unsigned long aoldflags, in unsigned long anewflags, in nsidbchangelistener ainstigator); void onhdrdeleted(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator); void onhdradded(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbcha...
...uncer instigator); void onreadchanged(in nsidbchangelistener ainstigator); void onjunkscorechanged(in nsidbchangelistener ainstigator); void onhdrpropertychanged(in nsimsgdbhdr ahdrtochange, in unsigned long aoldflags, in prbool aprechange, inout pruint32 astatus, in nsidbchangelistener ainstigator); void onevent(in nsimsgdatabase adb, in string aevent);
methods onhdrflagschanged() called when a message's flags change.
...others use the onhdrflagschanged()
method.
nsIDNSRecord
inherits from: nsisupports last changed in gecko 1.7
method overview prnetaddr getnextaddr(in pruint16 aport); native code only!
...
methods native code only!getnextaddr this function copies the value of the next ip address into the given prnetaddr struct and increments the internal address iterator.
...hasmore() this
method checks if there is another address in the record.
nsIDOMHTMLTimeRanges
each time range represented by an nsidomhtmltimeranges object has an index number; you call the start() and end()
methods to obtain the start and end times of each range, specifying the index number of the range to look up.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports
method overview float start(in unsigned long index); float end(in unsigned long index); attributes attribute type description length unsigned long the number of ranges represented by the nsidomhtmltimeranges object.
...
methods end() returns the time offset to the end of the specified time range.
nsIDOMUserDataHandler
dom/interfaces/core/nsidomuserdatahandler.idlscriptable the callback function for the setuserdata
method.
... 1.0 66 introduced gecko 1.5 inherits from: nsisupports last changed in gecko 1.9 (firefox 3)
method overview void handle(in unsigned short operation, in domstring key, in nsivariant data, in nsidomnode src, in nsidomnode dst); constants constant value description node_cloned 1 the node was cloned.
...
methods handle() this
method is a callback which will be called if a node with user data is being cloned, imported or adopted.
nsIDOMWindowInternal
method overview firefox 3.5 note the prompt() and find()
methods changed in firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required.
... void forward() void home() void stop() void print() void moveto(in long xpos, in long ypos) void moveby(in long xdif, in long ydif) void resizeto(in long width, in long height) void resizeby(in long widthdif, in long heightdif) void scroll(in long xscroll, in long yscroll) nsidomwindow window interface's open()
method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name.
... url nsidommozurlproperty readonly: a dom url object, which provides the window.url.createobjecturl() and window.url.revokeobjecturl()
methods.
nsIDOMXULElement
66 introduced gecko 1.0 inherits from: nsidomelement last changed in gecko 1.9 (firefox 3)
method overview void blur(); void click(); void docommand(); void focus(); nsidomnodelist getelementsbyattribute(in domstring name, in domstring value); nsidomnodelist getelementsbyattributens(in domstring namespaceuri, in domstring name, in domstring value); attributes attribute type description align domstring gets/sets the value of the element's align attribute.
...
methods blur() attempts to remove focus from the element.
...click() unless the element is disabled, sends mouse events that simulate the effect of clicking the mouse on the element, then calls the docommand()
method.
nsIDeviceMotion
method overview void addlistener(in nsidevicemotionlistener alistener); void addwindowlistener(in nsidomwindow awindow); native code only!
...
methods addlistener() when called, the accelerometer support implementation must begin to notify the specified nsidevicemotionlistener by calling its nsidevicemotionlistener.onaccelerationchange()
method as appropriate to share updated acceleration data.
... void addlistener( in nsidevicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object whose nsidevicemotionlistener.onaccelerationchange()
method should be called with updated acceleration data.
nsIDialogParamBlock
inherits from: nsisupports last changed in gecko 1.7
method overview print32 getint( in print32 inindex ); wstring getstring( in print32 inindex ); void setint( in print32 inindex, in print32 inint ); void setnumberstrings( in print32 innumstrings ); void setstring( in print32 inindex, in wstring instring); attributes attribute type description objects nsimutablearray a place where you can store an nsimutablearray to pass nsisupports.
...
methods getint() get a previously set integer.
...this
method can only be called once.
nsIDragService
the only exception is getcurrentsession(), since there's currently no way to check for a drag in progress using standard dom
methods or properties.
...
method overview void enddragsession( in prbool adonedrag ) ; void dragmoved(in long ax, in long ay); native code only!
...
methods native code only!dragmoved programmatically changes the drag position of the drag session.
nsIEventListenerInfo
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
method overview nsisupports getdebugobject(); astring tosource(); attributes attribute type description allowsuntrusted boolean indicates whether or not the event listener allows untrusted events.
...
methods getdebugobject() returns the debugger object if the debug service is active.
...this is the
method you should use if you want to get access to the actual listener, but the debugger service must be already active, which significantly slows down script execution.
nsIEventListenerService
method overview void geteventtargetchainfor(in nsidomeventtarget aeventtarget, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsidomeventtarget aoutarray); void getlistenerinfofor(in nsidomeventtarget aeventtarget, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsieventlistenerinfo aoutarray); boolean ha...
... obsolete since gecko 7.0
methods geteventtargetchainfor() returns an array of event targets indicating all the targets that will receive the same events that are delivered to the specified target.
...note: some events, especially 'load', may actually have a shorter event target chain than what this
methods returns.
nsIExternalProtocolService
method overview boolean externalprotocolhandlerexists(in string aprotocolscheme); astring getapplicationdescription(in autf8string ascheme); nsihandlerinfo getprotocolhandlerinfo(in acstring aprotocolscheme); nsihandlerinfo getprotocolhandlerinfofromos(in acstring aprotocolscheme, out boolean afound); boolean isexposedprotocol(in string aprotocolscheme); void loaduri(in nsiuri auri, [opt...
...ional] in nsiinterfacerequestor awindowcontext); void loadurl(in nsiuri aurl); void setprotocolhandlerdefaults(in nsihandlerinfo ahandlerinfo, in boolean aoshandlerexists);
methods externalprotocolhandlerexists() check whether a handler for a specific protocol exists.
...if neither the application nor the os knows about a handler for the protocol, the object this
method returns will represent a default handler for unknown content.
nsIFeedProgressListener
1.0 66 introduced gecko 1.8 inherits from: nsifeedresultlistener last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void handleentry(in nsifeedentry entry, in nsifeedresult result); void handlefeedatfirstentry(in nsifeedresult result); void handlestartfeed(in nsifeedresult result); void reporterror(in astring errortext, in long linenumber, in boolean bozo);
methods handleentry() called after each entry or item is processed.
... if the document is a standalone item or entry, the handlefeedatfirstentry()
method will not already have been called, and the received nsifeedentry will have a null parent value.
...in other words, by the time this
method is called, it is most likely that most or all of the feed-level metadata has been processed and is available in the received nsifeedresult object.
nsIFeedResult
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void registerextensionprefix(in astring anamespace, in astring aprefix); attributes attribute type description bozo boolean the feed processor sets the bozo bit when a feed triggers a fatal error during xml parsing.
...this value will be one of the following: atom, rss2, rss09, rss091, rss091userland, rss092, rss1, atom03, atomentry, rssitem
methods registerextensionprefix() registers a prefix for a namespace used to access an extension in the feed or entry.
... warning: this
method is not implemented at this time.
nsIFeedTextConstruct
method overview nsidomdocumentfragment createdocumentfragment(in nsidomelement element); astring plaintext(); attributes attribute type description base nsiuri if the text construct contains html or xhtml, relative references in the content should be resolved against this base uri.
...
methods createdocumentfragment() creates a new document fragment on a given dom element, containing the text and (if the text construct contains html or xhtml) its markup.
...if the type attribute is "text", this
method returns the value of the text attribute unchanged.
nsIFileProtocolHandler
netwerk/protocol/file/nsifileprotocolhandler.idlscriptable this interface provides
methods to convert between nsifile and nsiuri.
... inherits from: nsiprotocolhandler last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
method overview nsifile getfilefromurlspec(in autf8string url); autf8string geturlspecfromactualfile(in nsifile file); autf8string geturlspecfromdir(in nsifile file); autf8string geturlspecfromfile(in nsifile file); nsiuri newfileuri(in nsifile afile); nsiuri readurlfile(in nsifile file);
methods getfilefromurlspec() converts the url string into the corresponding nsifile if possible.
...newfileuri() this
method constructs a new file uri.
nsIFileView
to create an instance, use: var fileview = components.classes["@mozilla.org/filepicker/fileview;1"] .createinstance(components.interfaces.nsifileview);
method overview void setdirectory(in nsifile directory); void setfilter(in astring filterstring); void sort(in short sorttype, in boolean reversesort); attributes attribute type description reversesort boolean if true results will be sorted in ascending order.
...
methods setdirectory() set the directory to be browsed.
... sort() set the
method used for sorting.
nsIHTMLEditor
inherits from: nsisupports last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2)
method overview void adddefaultproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void addinsertionlistener(in nsicontentfilter infilter); void align(in astring aalign); boolean breakisvisible(in nsidomnode anode); boolean candrag(in nsidomevent aevent); void checkselectionstateforanonymousbuttons(in nsiselection aselection); nsidomelement createanonymouselement(in astring atag, in nsidomnode aparentnode, in astring aanonclass, in boolean aiscreatedhidden); nsidomelement createelementwithdefaults(in astring at...
... constants constant value description eleft 0 ecenter 1 eright 2 ejustify 3
methods adddefaultproperty() registers a default style property with the editor.
...do not use this
method!
nsIJSCID
js/src/xpconnect/idl/xpcjsid.idlscriptable this interface provides
methods to instantiate a component and access service components.
... inherits from: nsijsid last changed in gecko 1.7
method overview nsisupports createinstance(); nsisupports getservice();
methods createinstance() nsisupports createinstance(); parameters none.
... return value see also see components.classes for usage patterns of the createinstance() and getservice()
methods.
nsILocalFileMac
inherits from: nsilocalfile last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview cfurlref getcfurl(); native code only!
...obsolete since gecko 2.0
methods native code only!getcfurl note: observes the state of the followlinks attribute.
...init this object with an fsspec legacy
method - leaving in place for now.
nsILoginInfo
to create an instance, use: var logininfo = components.classes["@mozilla.org/login-manager/logininfo;1"] .createinstance(components.interfaces.nsilogininfo);
method overview nsilogininfo clone(); boolean equals(in nsilogininfo alogininfo); void init(in astring ahostname, in astring aformsubmiturl, in astring ahttprealm, in astring ausername, in astring apassword, in astring ausernamefield, in astring apasswordfield); boolean matches(in nsilogininfo alogininfo, in boolean ignorepassword); attributes attri...
...
methods clone() returns a clone of this login.
... return value an nsilogininfo containing a clone of the login on which this
method was invoked.
nsIMIMEInputStream
to create an instance, use: var mimeinputstream = components.classes["@mozilla.org/network/mime-input-stream;1"] .createinstance(components.interfaces.nsimimeinputstream);
method overview void addheader(in string name, in string value); void setdata(in nsiinputstream stream); attributes attribute type description addcontentlength boolean when true a "content-length" header is automatically added to the stream.
... the value of the content-length is automatically calculated using the available()
method on the data stream.
...
methods addheader() adds an additional header to the stream on the form "name: value".
nsIMemory
method overview voidptr alloc(in size_t size); violates the xpcom interface guidelines void free(in voidptr ptr); violates the xpcom interface guidelines void heapminimize(in boolean immediate); boolean islowmemory(); deprecated since gecko 2.0 voidptr realloc(in voidptr ptr, in size_t newsize); violates the xpcom interface guidelines
methods alloc allocates a block of memory of a particular size.
...a particular nsimemory instance may choose not to implement this
method.
... note: this
method was deprecated in gecko 2.0.
nsIMemoryReporterManager
xpcom/base/nsimemoryreporter.idlscriptable a service that provides
methods for managing nsimemoryreporter objects.
...
method overview nsisimpleenumerator enumeratemultireporters(); nsisimpleenumerator enumeratereporters(); void init(); void registermultireporter(in nsimemorymultireporter reporter); void registerreporter(in nsimemoryreporter reporter); void unregistermultireporter(in nsimemorymultireporter reporter); ...
...
methods enumeratemultireporters() returns an enumerator for looking at the installed memory multi-reporters.
nsIMessageListenerManager
to access this service, use: var globalmm = components.classes["@mozilla.org/globalmessagemanager;1"] .getservice(components.interfaces.nsimessagelistenermanager);
method overview void addmessagelistener(in astring messagename, in nsimessagelistener listener, [optional] in boolean listenwhenclosed) void removemessagelistener(in astring messagename, in nsimessagelistener listener); void addweakmessagelistener(in astring messagename, ...
... in nsimessagelistener listener); void removeweakmessagelistener(in astring messagename, in nsimessagelistener listener);
methods addmessagelistener() register listener to receive messagename.
...an alternative
method to listen for death of frame script is to use a message-manager-disconnect observer; see observer notifications :: message manager.
nsIMicrosummaryGenerator
1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3)
method overview long calculateupdateinterval(in nsidomnode apagecontent); boolean equals(in nsimicrosummarygenerator aother); astring generatemicrosummary(in nsidomnode apagecontent); attributes attribute type description loaded boolean has the generator itself (which may be a remote resource) been loaded.
...
methods calculateupdateinterval() calculates the interval until the microsummary should be updated for the next time, depending on the page content.
...if a generator doesn't need content, pass null as the parameter to this
method.
nsIMsgCustomColumnHandler
the interface inherits from nsitreeview, however when you're implementing a custom handler in javascript its not necessary to implement all of nsitreeview's
methods.
...arow, acol) { }, getsortstringforrow: function(ahdr) { return ""; }, isstring: function() {return true;}, getcellproperties: function(arow, acol, aprops) { }, getrowproperties: function(arow, aprops) { }, getimagesrc: function(arow, acol) {return null;}, getsortlongforrow: function(ahdr) {return 0;} } to attach it use the nsimsgdbview.addcolumnhandler()
method (recall gdbview is the global nsimsgdbview in thunderbird): gdbview.addcolumnhandler("newcolumn", columnhandler); after which it can be retrieved using the nsimsgdbview.getcolumnhandler()
method: var handler = gdbview.getcolumnhandler("newcolumn"); and removed using the nsimsgdbview.removecolumnhandler()
method: gdbview.removecolumnhandler("newcolumn");
method overview astring getsortstr...
...ingforrow(in nsimsgdbhdr ahdr); unsigned long getsortlongforrow(in nsimsgdbhdr ahdr); boolean isstring();
methods getsortstringforrow() if the column displays a string, this will return the string that the column should be sorted by.
nsIMsgDBView
method overview void open(in nsimsgfolder folder, in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder, in nsmsgviewflagstypevalue viewflags, out long count); void openwithhdrs(in nsisimpleenumerator aheaders, in nsmsgviewsorttypevalue asorttype, in nsmsgviewsortordervalue asortorder, in nsmsgviewflagstypevalue aviewflags, out long acount); void close(); ...
...
methods open() opens a folder in the database.
...this
method will automatically expand the destination thread.
nsIMsgDatabase
last changed in gecko 1.9 (firefox 3) inherits from: nsidbchangeannouncer
method overview void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void resethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrformessageid(in string messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey key)...
... defaultviewflags nsmsgviewflagstypevalue readonly: defaultsorttype nsmsgviewsorttypevalue readonly: defaultsortorder nsmsgviewsortordervalue readonly: msghdrcachesize unsigned long folderstream nsioutputstream summaryvalid boolean
methods open() opens a database folder.
... boolean ismdnneeded(in nsmsgkey key); markmdnsent() void markmdnsent(in nsmsgkey key, in boolean bneeded, in nsidbchangelistener instigator); ismdnsent() boolean ismdnsent(in nsmsgkey key); markread()
methods to get and set docsets for ids.
nsIMsgSearchSession
searchsession.addscopeterm(components.interfaces.nsmsgsearchscope.offlinemail, afolder); var searchterm = searchsession.createterm(); var value = searchterm.value; value.str = avalue; searchterm.value = value; searchterm.op = searchsession.booleanor; searchterm.booleanand = false; searchsession.appendterm(searchterm); searchsession.search(null); inherits from: nsisupports
method overview void addsearchterm(in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in string arbitraryheader); nsimsgsearchterm createterm(); void appendterm(in nsimsgsearchterm term); void registerlistener(in nsimsgsearchnotify listener); void unregisterlistener(in nsimsgsearchnotify listener); ...
... long readonly: runningadapter nsimsgsearchadapter readonly: searchparam voidptr not scriptable and readonly: searchtype nsmsgsearchtype readonly: numresults long readonly: window nsimsgwindow constants name value description booleanor 0 booleanand 1
methods addsearchterm() void addsearchterm(in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in string arbitraryheader); parameters attrib attribute for this term.
... void addallscopes(in nsmsgsearchscopevalue attrib); parameters attrib search() void search(in nsimsgwindow awindow); parameters awindow interruptsearch() void interruptsearch(); pausesearch() these two
methods are used when the search session is using a timer to do local search, and the search adapter needs to run a url (e.g., to reparse a local folder) and wants to pause the timer while running the url.
nsINavHistoryResult
viewers register themselves through the registerviewer()
method.
...
method overview void addobserver(in nsinavhistoryresultobserver aobserver, in boolean aownsweak); void removeobserver(in nsinavhistoryresultobserver aobserver); attributes attribute type description root nsinavhistorycontainerresultnode the root of the results.
...obsolete since gecko 2.0
methods addobserver() adds an observer for changes that occur on the result.
nsIPluginHost
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview nsifile createtempfiletopost(in string apostdataurl); native code only!
...
methods native code only!createtempfiletopost to create temp file with content len header in, it will use by http post.
... void newpluginnativewindow( out nspluginnativewindowptr apluginnativewindow ); parameters apluginnativewindow native code only!parsepostbuffertofixheaders this
method parses post buffer to find out case insensitive "content-length" string and cr or lf some where after that, then it assumes there is http headers in the input buffer and continue to search for end of headers (crlfcrlf or lflf).
nsIProfileLock
toolkit/profile/public/nsitoolkitprofile.idlscriptable an object returned by the nsitoolkitprofile.lock
method; as long as you hold a reference to the object, the profile remains locked.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void unlock(); attributes attribute type description directory nsilocalfile the main profile directory.
...
methods unlock() unlocks the profile.
nsIProfileUnlocker
profile/public/nsiprofileunlocker.idlscriptable returned by the nsitoolkitprofile.lock
method; you can use this to attempt to force a profile to be unlocked.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void unlock(in unsigned long aseverity); constants constant value description attempt_quit 0 politely ask the process currently holding the profile's lock to quit.
...
methods unlock() tries to unlock the profile by attempting or forcing the process that currently holds the lock to quit.
nsIProgressEventSink
the channel will begin passing notifications to the progress event sink after its asyncopen
method has been called.
... notifications will cease once the channel calls its listener's onstoprequest
method or once the channel is canceled (via nsirequest.cancel()).
...
method overview void onprogress(in nsirequest arequest, in nsisupports acontext, in unsigned long long aprogress, in unsigned long long aprogressmax); void onstatus(in nsirequest arequest, in nsisupports acontext, in nsresult astatus, in wstring astatusarg);
methods onprogress() called to notify the event sink that progress has occurred for the given request.
nsIPrompt
to avoid redundancy, all
methods here link to nsipromptservice.
... if you are using this interface, you must remove the nsidomwindow arguments from those
methods.
...
method overview void alert(in wstring dialogtitle, in wstring text); void alertcheck(in wstring dialogtitle, in wstring text, in wstring checkmsg, inout boolean checkvalue); boolean confirm(in wstring dialogtitle, in wstring text); boolean confirmcheck(in wstring dialogtitle, in wstring text, in wstring checkmsg, inout boolean checkvalue); print32 confirmex(in wstring dialogtitle, in wstring text, in unsigned long buttonflags, in wstring button0title, in wstring button1title, in wstring button2titl...
nsIProxyInfo
note: prior to gecko 1.8 host was available by the host
method.
... note: prior to gecko 1.8 port was available by the port
method.
... note: prior to gecko 1.8 type was available by the type
method.
nsIPushSubscription
method overview void getkey(in domstring name, [optional] out uint32_t keylen, [array, size_is(keylen), retval] out uint8_t key); bool quotaapplies(); bool isexpired(); attributes attribute type description endpoint domstring the subscription url.
...
methods getkey() returns a byte array containing the key material for this subscription.
...please see
method parameters in xpidl for more details on using out parameters in javascript.
nsISHistory
to create an instance, use: var shistory = components.classes["@mozilla.org/browser/shistory;1"] .createinstance(components.interfaces.nsishistory);
method overview void addshistorylistener(in nsishistorylistener alistener); nsishentry getentryatindex(in long index, in boolean modifyindex); void purgehistory(in long numentries); void reloadcurrententry(); void removeshistorylistener(in nsishistorylistener alistener); attributes attribute type description count long the...
...the enumerator object thus returned by this
method can be traversed using nsisimpleenumerator.
...
methods addshistorylistener() called to register a listener for the session history component.
nsISHistoryListener
the listener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback
method.
... a session history listener can be registered on a particular nsishistory instance via the nsishistory.addshistorylistener()
method.
...
method overview boolean onhistorygoback(in nsiuri abackuri); boolean onhistorygoforward(in nsiuri aforwarduri); boolean onhistorygotoindex(in long aindex, in nsiuri agotouri); void onhistorynewentry(in nsiuri anewuri); boolean onhistorypurge(in long anumentries); boolean onhistoryreload(in nsiuri areloaduri, in unsigned long areloadflags);
methods onhistorygoback() called when navigating to a previous session history entry, for example due to an nsiwebnavigation.goback() call.
nsIScreen
implemented by: @mozilla.org/gfx/screenmanager;1 as a service: var screen = components.classes["@mozilla.org/gfx/screenmanager;1"] .getservice(components.interfaces.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 description colordepth ...
...
methods getavailrect() returns a rectangle indicating the portion of the screen that is available for use.
...each call to this
method must eventually be followed by a corresponding call to unlockminimumbrightness() with the same value for the brightness parameter.
nsIScriptableUnescapeHTML
implemented by: @mozilla.org/feed-unescapehtml;1 as a service: var scriptableunescapehtml = components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscriptableunescapehtml);
method overview nsidomdocumentfragment parsefragment(in astring fragment, in prbool isxml, in nsiuri baseuri, in nsidomelement element); astring unescape(in astring src);
methods parsefragment() parses a string of html or xml source into a sanitized documentfragment.
...you should call nsiparserutils::parsefragment() instead of calling this
method.
...you should call nsiparserutils::converttoplaintext() instead of calling this
method.
nsISelection2
method overview void getrangesforinterval(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalcomarray(in nsidomnode beginnode, in print32 beginoffset, in nsidomnode endnode, in print32 endoffset, in prbool allowadjacent, in rangearr...
...
methods getrangesforinterval() return array of ranges intersecting with the given dom interval.
...if false, posts a request which is processed at some point after the
method returns.
nsIServerSocketListener
the address of the client can be found by calling the nsisockettransport.getaddress()
method or by inspecting nsisockettransport.gethost(), which returns a string representation of the client's ip address, which may be either an ipv4 or an ipv6 address.
... inherits from: nsisupports last changed in gecko 1.7
method overview void onsocketaccepted(in nsiserversocket aserv, in nsisockettransport atransport); void onstoplistening(in nsiserversocket aserv, in nsresult astatus);
methods onsocketaccepted() this
method is called when a client connection is accepted.
... onstoplistening() this
method is called when the listening socket stops for some reason.
nsISocketTransportService
to create an instance, use: var sockettransportservice = components.classes["@mozilla.org/network/socket-transport-service;1"] .getservice(components.interfaces.nsisockettransportservice);
method overview void attachsocket(in prfiledescptr afd, in nsasockethandlerptr ahandler); native code only!
...obsolete since gecko 1.8
methods native code only!
...in this case, the notifywhencanattachsocket()
method should be used.
nsIStringEnumerator
inherits from: nsisupports last changed in gecko 1.7
method overview astring getnext(); boolean hasmore();
methods getnext() called to retrieve the next string in the enumerator.
...this
method is generally called within a loop to iterate over the strings in the enumerator.
...this
method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getnext() calls.
nsISupports
last changed in gecko 1.0
method overview nsrefcnt addref();violates the xpcom interface guidelines void queryinterface(in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); nsrefcnt release();violates the xpcom interface guidelines
methods violates the xpcom interface guidelines addref() notifies the object that an interface pointer has been duplicated.
...queryinterface() the queryinterface
method provides runtime type discovery.
...remarks the
method descriptions above were taken from essential com by don box.
nsITaskbarPreview
method overview void invalidate(); attributes attribute type description active boolean indicates whether or not the preview is marked as active (currently selected) in the taskbar.
... note: neither nsitaskbartabpreview or nsitaskbarwindowpreview makes full use of the controller; see the documentation for each interface for details on which controller
methods are used.
...
methods invalidate() invalidates the taskbar's cached image of the preview, forcing a redraw if necessary.
nsITelemetry
1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) implemented by: @mozilla.org/base/telemetry;1 as a service: let telemetry = components.classes["@mozilla.org/base/telemetry;1"] .getservice(components.interfaces.nsitelemetry);
method overview jsval gethistogrambyid(in acstring id); jsval snapshothistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); jsval getkeyedhistogrambyid(in acstring id); void capturestack(in acstring name); jsval snapshotcapturedstacks([optional] in boolean clear); nsisupports getloadedmodules(); jsval snapshotkeyedh...
... void keyedscalarset(in acstring aname, in astring akey, in jsval avalue); void keyedscalarsetmaximum(in acstring aname, in astring akey, in jsval avalue); jsval snapshotkeyedscalars(in uint32_t adataset, [optional] in boolean aclear); void clearscalars(); test only void flushbatchedchildtelemetry(); void recordevent(in acstring acategory, in acstring a
method, in acstring aobject, [optional] in jsval avalue, [optional] in jsval extra); void seteventrecordingenabled(in acstring acategory, in boolean aenabled); jsval snapshotevents(in uint32_t adataset, [optional] in boolean aclear); void registerevents(in acstring acategory, in jsval aeventdata); void registerscalars(in acstring acategoryname, in jsval ascalardata); ...
...
methods gethistogrambyid() get an histogram by id for histograms registered in histograms.json.
nsIToolkitProfileService
method overview nsitoolkitprofile createprofile(in nsilocalfile arootdir, in autf8string aname); void flush(); nsitoolkitprofile getprofilebyname(in autf8string aname); nsiprofilelock lockprofilepath(in nsilocalfile adirectory, in nsilocalfile atempdirectory); attributes attribute type description profilecount unsigned long the numb...
... profiles nsisimpleenumerator an enumerator providing access to the list of profiles; each profile is an nsitoolkitprofile object (though you must first call aprofile.queryinterface(components.interfaces.nsitoolkitprofile) to get access to its attributes and
methods).
... startoffline boolean startwithlastprofile boolean
methods createprofile() creates a new profile.
nsITransport
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) this interface provides
methods to open blocking or non-blocking, buffered or unbuffered streams to the resource.
...
method overview void close(in nsresult areason); nsiinputstream openinputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); nsioutputstream openoutputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); void seteventsink(in nsitransporteventsink asink, in nsieventtarget aeventtarget); constants open flags...
... constant value description status_reading 0x804b0008 status_writing 0x804b0009
methods close() close the transport and any open streams.
nsITreeColumns
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports
method overview nsitreecolumn getcolumnat(in long index); nsitreecolumn getcolumnfor(in nsidomelement element); nsitreecolumn getfirstcolumn(); nsitreecolumn getkeycolumn(); nsitreecolumn getlastcolumn(); nsitreecolumn getnamedcolumn(in astring id); nsitreecolumn getprimarycolumn(); nsitreecolumn getsortedcolumn(); void invalidatecolumns(); void restorenaturalorder(); attributes attribute type description count long the number of columns.
...
methods getcolumnat() get the column for a given index.
...invalidatecolumns() this
method is called whenever a treecol is added or removed and the column cache needs to be rebuilt.
nsIURLParser
inherits from: nsisupports last changed in gecko 1.7
method overview void parseauthority(in string authority, in long authoritylen, out unsigned long usernamepos, out long usernamelen, out unsigned long passwordpos, out long passwordlen, out unsigned long hostnamepos, out long hostnamelen, out long port); void parsefilename(in string filename, in long filenamelen, out unsigned long basenamepos, out long basenamelen, out unsigned long extensionpos, out long extensionlen); void parsefilepath(in string filepath, in long filepathlen, out unsigned long directorypos, out long directorylen, out unsigned long basenamepos, out long basenamelen...
...hostnamelen, out long port); void parseurl(in string spec, in long speclen, out unsigned long schemepos, out long schemelen, out unsigned long authoritypos, out long authoritylen, out unsigned long pathpos, out long pathlen); void parseuserinfo(in string userinfo, in long userinfolen, out unsigned long usernamepos, out long usernamelen, out unsigned long passwordpos, out long passwordlen);
methods the string to parse in the
methods may be given as a null terminated string, in which case the length argument should be -1.
... out parameters of the
methods are all optional (that is the caller may pass-in a null value if the corresponding results are not needed).
nsIUpdateTimerManager
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void registertimer(in astring id, in nsitimercallback callback, in unsigned long interval);
methods registertimer() presents a user interface that checks for and displays the available updates.
... in order to avoid having to instantiate a component to call the registertimer()
method, the component can instead register an update-timer category with comma-separated values as a single string representing the timer, like this: _xpcom_categories: [{ category: "update-timer", value: "contractid," + "
method," + "id," + "preference," + "inter...
...
method the
method used to instantiate the interface; this should be either getservice or createinstance, depending on your component.
nsIUploadChannel
inherits from: nsisupports last changed in gecko 1.7
method overview void setuploadstream(in nsiinputstream astream, in acstring acontenttype, in long acontentlength); attributes attribute type description uploadstream nsiinputstream get the stream (to be) uploaded by this channel.
...
methods setuploadstream() sets a stream to be uploaded by this channel.
...acontentlength a value of -1 indicates that the length of the stream should be determined by calling the stream's available
method.
nsIWebBrowser
method overview void addwebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); void removewebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); attributes attribute type description containerwindow nsiwebbrowserchrome the chrome object associated with the browser instance.
...
methods addwebbrowserlistener() registers a listener of the type specified by the iid to receive callbacks.
...typically this
method will be called to register an object to receive nsiwebprogresslistener or nsishistorylistener notifications in which case the the iid is that of the interface.
nsIWebBrowserChrome2
1.0 66 introduced gecko 1.9 inherits from: nsiwebbrowserchrome last changed in gecko 1.9 (firefox 3)
method overview void setstatuswithcontext(in unsigned long statustype, in astring statustext, in nsisupports statuscontext);
methods setstatuswithcontext() called when the status text in the chrome needs to be updated.
... this
method may be called instead of nsiwebbrowserchrome.setstatus().
... an implementor of this
method, should still implement nsiwebbrowserchrome.setstatus().
nsIWebNavigation
it provides
methods and attributes to direct an object to navigate to a new location, stop or restart an in process load, or determine where the object has previously gone.
...
method overview void goback void goforward void gotoindex( in long index ) void loaduri(in wstring uri , in unsigned long loadflags , in nsiuri referrer , in nsiinputstream postdata, in nsiinputstream headers) void reload(in unsigned long reloadflags) void stop(in unsigned long stopflags) constants load flags constant value ...
...
methods goback() tells the object to navigate to the previous session history item.
nsIWebNavigationInfo
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/webnavigation-info;1 as a service: var webnavigationinfo = components.classes["@mozilla.org/webnavigation-info;1"] .getservice(components.interfaces.nsiwebnavigationinfo);
method overview unsigned long istypesupported(in acstring atype, in nsiwebnavigation awebnav); constants support type constants constant value description unsupported 0 returned by istypesupported() to indicate lack of support for a type.
...
methods istypesupported() determines whether or not the specified mime type is supported by the given nsiwebnavigation object.
... note: this
method may cause plug-ins to be rescanned in order to ensure they are properly registered for the types they support.
nsIWebSocketListener
1.0 66 introduced gecko 8.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
method overview void onacknowledge(in nsisupports acontext, in pruint32 asize); void onbinarymessageavailable(in nsisupports acontext, in acstring amsg); void onmessageavailable(in nsisupports acontext, in autf8string amsg); void onserverclose(in nsisupports acontext, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acontext); void onstop(in nsisupports acontext, in nsresult ...
...astatuscode);
methods onacknowledge() called to acknowledge a message sent via nsiwebsocketchannel.sendmsg() or nsiwebsocketchannel.sendbinarymsg().
...in the case of errors, onstop() may be called without this
method ever getting called.
nsIWritablePropertyBag2
xpcom/ds/nsiwritablepropertybag2.idlscriptable this interface extends nsipropertybag2 with
methods for setting properties.
... 1.0 66 introduced gecko 1.8 inherits from: nsipropertybag2 last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)
method overview void setpropertyasacstring(in astring prop, in acstring value); void setpropertyasastring(in astring prop, in astring value); void setpropertyasautf8string(in astring prop, in autf8string value); void setpropertyasbool(in astring prop, in boolean value); void setpropertyasdouble(in astring prop, in double value); void setpropertyasint32(in astring prop, in print32 value); void setpropertyasint64(in astring prop, in print64 value); void setpropertyasinterface(in astring prop, in nsisupports value); void setpropertyasuint32(in astring prop, in prui...
...nt32 value); void setpropertyasuint64(in astring prop, in pruint64 value);
methods setpropertyasacstring() void setpropertyasacstring( in astring prop, in acstring value ); parameters prop property to set the value of.
nsIXULBrowserWindow
xpfe/appshell/public/nsixulbrowserwindow.idlscriptable provides
methods that may be called from the internals of the browser area to tell the containing xul window to update its user interface.
...note: the xulbrowserwindow object offered to javascript code provides a great many more
methods and attributes than those listed here, which are only the ones available to c++ code.
...
method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); void setjsdefaultstatus(in astring status); void setjsstatus(in astring status); void setoverlink(in astring link, in nsidomelement element);
methods onbeforelinktraversal() called before traversing a link to determine the appropriate target into which to load the link.
nsIZipReader
modules/libjar/nsizipreader.idlscriptable this interface provides
methods for reading compressed (zip) files.
...
method overview void close(); void extract(in autf8string zipentry, in nsifile outfile); void extract(in string zipentry, in nsifile outfile); obsolete since gecko 10 nsiutf8stringenumerator findentries(in autf8string apattern); nsiutf8stringenumerator findentries(in string apattern); obsolete since gecko 10 nsiprincipal getcertificateprincipal(in autf8str...
...
methods close() closes a zip reader.
wrappedJSObject
this article focuses on the latter kind of wrappers, which hide any properties or
methods on the component that are not part of the supported interfaces as declared in xpidl.
...in this example we use getservice, but as long as we get the reference from xpcom, our component gets wrapped by xpconnect in the same way: var comp = components.classes["@myself.com/my-component;1"].getservice(); if we try to call the hello()
method we defined in our component implementation, we get: > comp.hello(); typeerror on line 1: comp.hello is not a function this happens because, as we mentioned earlier, comp is not the helloworld js object itself, but an xpconnect wrapper around it: > dump(comp); [xpconnect wrapped nsisupports] the idea of these wrappers is to make the javascript-implemented xpcom components look just like any ...
...assuming the nsihelloworld interface defines the hello
method, we can now call it: > comp.hello() hello world!
Address Book examples
} } note: this
method doesn't work with remote address books (e.g.
... * the onshow
method should take the input fields in the document, * and render the requested photo in the img tag with id * atargetid.
... the * onsave
method is responsible for analyzing the photo of this * type requested by the user, and storing it, as well as the * other fields required by onload/onshow to retrieve and display * the photo again.
Address book sync client design
* * this
method is called regardless of whether the the operation was * successful.
...this
method is * called only once, at the beginning of a sync transaction * */ void onstartoperation(in print32 atransactionid, in pruint32 amsgsize); /** * notify the observer that progress as occurred for the ab sync operation */ void onprogress(in print32 atransactionid, in pruint32 aprogress, in pruint32 aprogressmax); /** * notify the observer with...
... * * this
method is called regardless of whether the the operation was * successful.
Access Thunderbird Window Areas
to access particular parts of the thunderbird window you can use these helper
methods.
... an alternative to these
methods is to directly access the element by it's id as in the detect when a folder opens example.
... var foldertree = getfoldertree(); var searchinput = getsearchinput(); var messagepane = getmessagepane(); var messagepaneframe = getmessagepaneframe(); var mailtoolbox = getmailtoolbox(); var currentmsgfolder = getloadedmsgfolder(); see the msgmail3panewindow.js for other helper
methods ...
StructType
you can call the resulting type's define()
method to assign it a non-opaque type later.
...
method overview define(fields)
methods inherited from ctype ctype array([n]) string tosource() string tostring()
methods define() defines a previously declared opaque type's fields.
... structtype cdata
method_overview cdata addressoffield(name)
methods inherited from cdata cdata address() string tosource() string tostring() structtype cdata
methods addressoffield() returns a new cdata object of the appropriate pointer type, whose value points to the specified field of the structure on which the
method was called.
ctypes
the ctypes object contains
methods and predefined data types used to create and manage a library.
...
method overview ctype arraytype(type[, length]); cdata cast(data, type); ctype functiontype(abi, returntype[, argtype1, ...]); cdata int64(n); string libraryname(name); library open(libspec); ctype pointertype(typespec); ctype structtype(name[, fields]); cdata uint64(n); properties property type description errno number the value of the latest system error.
...
methods cast() casts the specified cdata object to a new type, returning a new cdata object representing the value in the new type.
Browser Side Plug-in API - Plugins
« previousnext » this chapter describes
methods in the plug-in api that are available from the browser.
... the names of all of these
methods begin with npn_ to indicate that they are implemented by the browser and called by the plug-in.
... netscape plug-in
method summary « previousnext » npn_destroystream closes and deletes a stream.
Plug-in Basics - Plugins
see initialization and destruction for more information about using these
methods.
... plug-in
methods are functions that you implement in the plug-in; gecko calls these functions.
... browser
methods are functions implemented by gecko; the plug-in calls these functions.
Plug-in Side Plug-in API - Plugins
« previousnext » this chapter describes
methods in the plug-in api that are available for the plug-in object.
... the names of all of these
methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser.
... plugin
method summary npp_destroy deletes a specific instance of a plug-in.
Debugger.Environment - Firefox Developer Tools
this allows the code using each debugger instance to place whatever properties it likes on its own debugger.object instances, without worrying about interfering with other debuggers.) if a debugger.environment instance’s referent is not a debuggee environment, then attempting to access its properties (other than inspectable) or call any its
methods throws an instance of error.
...all other properties and
methods of debugger.environment instances throw if applied to a non-inspectable environment.
... function properties of the debugger.environment prototype object the
methods described below may only be called with a this value referring to a debugger.environment instance; they may not be used as
methods of other kinds of objects.
AbsoluteOrientationSensor - Web APIs
properties no specific properties; inherits
methods from its ancestors orientationsensor and sensor.
... event handlers no specific event handlers; inherits
methods from its ancestor, sensor.
...
methods no specific
methods; inherits
methods from its ancestors orientationsensor and sensor.
Animation.finish() - Web APIs
the finish()
method of the web animations api's animation interface sets the current playback time to the end of the animation corresponding to the current playback direction.
... that is, if the animation is playing forward, it sets the playback time to the length of the animation sequence, and if the animation is playing in reverse (having had its reverse()
method called), it sets the playback time to 0.
... examples the following example shows how to use the finish()
method and catch an invalidstate error.
AnimationEvent.initAnimationEvent() - Web APIs
summary the animationevent.initanimationevent()
method initializes an animation event created using the deprecated document.createevent("animationevent")
method.
... note: during the standardization process, this
method was removed from the specification.
...do not use this
method; instead, use the standard constructor, animationevent(), to create a synthetic animationevent.
AudioListener.setOrientation() - Web APIs
the setorientation()
method of the audiolistener interface defines the orientation of the listener.
... example in the following example, you can see an example of how the createpanner()
method, audiolistener and pannernode would be used to control audio spatialisation.
...if it supports those, or older
methods (like audiolistener.setorientation()) if it still supports those but not the new properties.
AudioListener.setPosition() - Web APIs
the setposition()
method of the audiolistener interface defines the position of the listener.
... example in the following example, you can see an example of how the createpanner()
method, audiolistener and pannernode would be used to control audio spatialisation.
...if it supports those, or older
methods (like audiolistener.setorientation()) if it still supports those but not the new properties.
AudioParam.value - Web APIs
one solution is to use the math.fround()
method, which returns the single-precision value equivalent to the 64-bit javascript value specified—when setting value, like this: const source = new audiobuffersourcenode(...); const rate = math.fround(5.3); source.playbackrate.value = rate; console.log(source.playbackrate.value === rate); in this case, the log output will be true.
... if any gradiated or ramped value changing
methods have been called and the current time is within the time range over which the graduated change should occur, the value is updated based on the appropriate algorithm.
... these ramped or gradiated value-changing
methods include linearramptovalueattime(), settargetattime(), and setvaluecurveattime().
BaseAudioContext.createPanner() - Web APIs
the createpanner()
method of the baseaudiocontext interface is used to create a new pannernode, which is used to spatialize an incoming audio stream in 3d space.
... example in the following example, you can see an example of how the createpanner()
method, audiolistener and pannernode would be used to control audio spatialisation.
...if it supports those, or older
methods (like audiolistener.setorientation()) if it still supports those but not the new properties.
BaseAudioContext - Web APIs
this occurs when the audiocontext's state changes, due to the calling of one of the state change
methods (audiocontext.suspend, audiocontext.resume, or audiocontext.close).
...
methods also implements
methods from the interface eventtarget.
...this
method only works on complete files, not fragments of audio files.
BasicCardRequest - Web APIs
obsolete properties these properties have been removed from the payment
method: basic card specification and should no longer be used.
...those are: amex cartebancaire diners discover jcb mastercard mir unionpay visa examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment
methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options), and an optional object that describes what data is needed to fullfil the payment (e.g., a shipping address).
... var supportedinstruments = [{ supported
methods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'] } }]; var details = { total: {label: 'donation', amount: {currency: 'usd', value: '65.00'}}, displayitems: [ { label: 'original donation amount', amount: {currency: 'usd', value: '65.00'} } ], shippingoptions: [ { id: 'standard', label: 'standard shipping', amount: {currency: 'usd', value: '0.00'}, selected: true } ] }; var options = {requestshipping: true}; ...
BatteryManager - Web APIs
the navigator.getbattery()
method returns a battery promise that is resolved in a batterymanager interface which you can use to interact with the battery status api.
...
methods inherited from eventtarget: eventtarget.addeventlistener() registers an event handler of a specific event type on the eventtarget.
... additional
methods in mozilla chrome codebase mozilla includes a couple of extensions for use by js-implemented event targets to implement onevent properties.
BiquadFilterNode - Web APIs
the biquadfilternode interface represents a simple low-order filter, and is created using the audiocontext.createbiquadfilter()
method.
... not used
methods inherits
methods from its parent, audionode.
... biquadfilternode.getfrequencyresponse() from the current filter parameter settings this
method calculates the frequency response for frequencies specified in the provided array of frequencies.
Blob.arrayBuffer() - Web APIs
the arraybuffer()
method in the blob interface returns a promise that resolves with the contents of the blob as binary data contained in an arraybuffer.
... exceptions while this
method doesn't throw exceptions, it may reject the promise.
... usage notes while similar to the filereader.readasarraybuffer()
method, arraybuffer() returns a promise rather than being an event-based api, as is the case with the filereader interface's
method.
CSSStyleDeclaration - Web APIs
the cssstyledeclaration interface represents an object that is a css declaration block, and exposes style information and various style-related
methods and properties.
...see the item()
method below.
...
methods cssstyledeclaration.getpropertypriority() returns the optional priority, "important".
CSSStyleSheet.addRule() - Web APIs
the obsolete cssstylesheet interface's addrule() legacy
method adds a new rule to the stylesheet.
... you should avoid using this
method, and should instead use the more standard insertrule()
method.
... usage notes this
method is implemented by browsers by constructing a string using the template literal `${selector}{${styleblock}}`, then passing it into the standard insertrule()
method.
Using dynamic styling information - Web APIs
--> <button onclick="resetstyle('p1');">reset background color</button> </body> </html> the getcomputedstyle()
method on the document.defaultview object returns all styles that have actually been computed for an element.
... see example 6: getcomputedstyle in the examples chapter for more information on how to use this
method.
... using the setattribute
method note that you can also change style of an element by getting a reference to it and then use its setattribute
method to specify the css property and its value.
Cache.match() - Web APIs
the match()
method of the cache interface returns a promise that resolves to the response associated with the first matching request in the cache object.
... ignore
method: a boolean that, when set to true, prevents matching operations from validating the request http
method (normally only get and head are allowed.) it defaults to false.
... if (event.request.
method === 'get' && event.request.headers.get('accept').indexof('text/html') !== -1) { console.log('handling fetch event for', event.request.url); event.respondwith( fetch(event.request).catch(function(e) { console.error('fetch failed; returning offline page instead.', e); return caches.open(offline_cache).then(function(cache) { return cache.match(offline_ur...
CacheStorage - Web APIs
note: cachestorage.match() is a convenience
method.
...
methods cachestorage.match() checks if a given request is a key in any of the cache objects that the cachestorage object tracks, and returns a promise that resolves to that match.
...use this
method to iterate over a list of all the cache objects.
ChildNode.before() - Web APIs
the childnode.before()
method inserts a set of node or domstring objects in the children list of this childnode's parent, just before this childnode.
...); console.log(parent.outerhtml); // "<div>text<p></p></div>" inserting an element and text var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendchild(child); var span = document.createelement("span"); child.before(span, "text"); console.log(parent.outerhtml); // "<div><span></span>text<p></p></div>" childnode.before() is unscopable the before()
method is not scoped into the with statement.
... with(node) { before("foo"); } // referenceerror: before is not defined polyfill you can polyfill the before()
method in internet explorer 9 and higher with the following code: // from: https://github.com/jserz/js_piece/blob/master/dom/childnode/before()/before().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('before')) { return; } object.defineproperty(item, 'before', { configurable: true, enumerable: true, writable: true, value: function before() { var argarr = array.prototype.slice.call(arguments), docfrag = document.createdocumentfragment(); argarr.foreach(function (argitem) { var isnode = argitem instanceof node; docfrag.a...
ChildNode.remove() - Web APIs
the childnode.remove()
method removes the object from the tree it belongs to.
... syntax node.remove(); example using remove() <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <div id="div-03">here is div-03</div> var el = document.getelementbyid('div-02'); el.remove(); // removes the div with the 'div-02' id childnode.remove() is unscopable the remove()
method is not scoped into the with statement.
... with(node) { remove(); } // referenceerror: remove is not defined polyfill you can polyfill the remove()
method in internet explorer 9 and higher with the following code: // from:https://github.com/jserz/js_piece/blob/master/dom/childnode/remove()/remove().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('remove')) { return; } object.defineproperty(item, 'remove', { configurable: true, enumerable: true, writable: true, value: function remove() { this.parentnode.removechild(this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specifications specification status comment domthe definition of...
ChildNode.replaceWith() - Web APIs
the childnode.replacewith()
method replaces this childnode in the children list of its parent with a set of node or domstring objects.
... examples using replacewith() var parent = document.createelement("div"); var child = document.createelement("p"); parent.appendchild(child); var span = document.createelement("span"); child.replacewith(span); console.log(parent.outerhtml); // "<div><span></span></div>" childnode.replacewith() is unscopable the replacewith()
method is not scoped into the with statement.
... with(node) { replacewith("foo"); } // referenceerror: replacewith is not defined polyfill you can polyfill the replacewith()
method in internet explorer 10+ and higher with the following code: function replacewithpolyfill() { 'use-strict'; // for safari, and ie > 10 var parent = this.parentnode, i = arguments.length, currentnode; if (!parent) return; if (!i) // if there are no arguments parent.removechild(this); while (i--) { // i-- decrements i and returns the value of i before the decrement currentnode = arguments[i]; if (typeof currentnode !== 'object'){ currentnode = this.ownerdocument.createtextnode(currentnode); } else if (currentnode.parentnode){ currentnode.parentnode.removechild(currentnode); ...
ChildNode - Web APIs
the childnode mixin contains
methods and properties that are common to all types of node objects that can have a parent.
...
methods there are no inherited
methods.
...added the remove(), before(), after() and replacewith()
methods.
Clients.matchAll() - Web APIs
the matchall()
method of the clients interface returns a promise for a list of service worker client objects.
...if options are not included, the
method returns only the service worker clients controlled by the service worker.
...in chrome 46/firefox 54 and later, this
method returns clients in most recently focused order, correct as per spec.
Clients.openWindow() - Web APIs
the openwindow()
method of the clients interface creates a new top level browsing context and loads a given url.
... in firefox, the
method is allowed to show popups only when called as the result of a notification click event.
... in chrome for android, the
method may instead open the url in an existing browsing context provided by a standalone web app previously added to the user's home screen.
CloseEvent - Web APIs
methods this interface also inherits
methods from its parent, event.
...if the event has already being dispatched, this
method does nothing.
... do not use this
method anymore, use the closeevent() constructor instead.
CompositionEvent - Web APIs
compositionevent.data read only returns the characters generated by the input
method that raised the event; its varies depending on the type of event that generated the compositionevent object.
... compositionevent.locale read only returns the locale of current input
method (for example, the keyboard layout locale if the composition is associated with ime).
...
methods this interface also inherits
methods of its parent, uievent, and its ancestor — event.
ConstantSourceNode - Web APIs
methods inherits
methods from its parent interface, audioscheduledsourcenode.
... some browsers' implementations of these
methods are part of the audioscheduledsourcenode interface.
...after starting the constant source by calling its start()
method.
ContentIndex.add() - Web APIs
the add()
method of the contentindex interface registers an item with the content index.
... examples here we're declaring an item in the correct format and creating an asynchronous function which uses the add
method to register it with the content index.
...rticle' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } the add
method can also be used within the service worker scope.
ContentIndex - Web APIs
methods contentindex.add registers an item with the content index.
... // reference registration const registration = await navigator.serviceworker.ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } adding to the content index here we're declaring an item in the correct format and creating an asynchronous function which uses the add()
method to register it with the content index.
... async function unregistercontent(article) { // reference registration const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) return; // unregister content from index await registration.index.delete(article.id); } all the above
methods are available within the scope of the service worker.
Content Index API - Web APIs
// reference registration const registration = await navigator.serviceworker.ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } adding to the content index here we're declaring an item in the correct format and creating an asynchronous function which uses the add()
method to register it with the content index.
... async function unregistercontent(article) { // reference registration const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) return; // unregister content from index await registration.index.delete(article.id); } all the above
methods are available within the scope of the service worker.
...it is not fired when the contentindex.delete
method is called.
CredentialsContainer.preventSilentAccess() - Web APIs
the preventsilentaccess()
method of the credentialscontainer interface sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty promise.
...this
method is typically called after a user signs out of a website, ensuring this user's login information is not automatically passed on the next site visit.
... earlier versions of the spec called this
method requireusermediation().
CredentialsContainer - Web APIs
the credentialscontainer interface of the the credential management api exposes
methods to request credentials and notify the user agent when events such as successful sign in or sign out happen.
...
methods credentialscontainer.create()secure context returns a promise that resolves with a new credential instance based on the provided options, or null if no credential object can be created.
...earlier versions of the spec called this
method requireusermediation().
Crypto.getRandomValues() - Web APIs
the crypto.getrandomvalues()
method lets you get cryptographically strong random values.
... exceptions this
method can throw an exception under error conditions.
...instead, use the generatekey()
method.
NodeList.item() - Web APIs
this
method doesn't throw exceptions as long as you provide arguments.
...this is usually obtained from another dom property or
method, such as childnodes.
... nodeitem is the indexth node in the nodelist returned by the item
method.
OES_texture_float - Web APIs
webgl extensions are available using the webglrenderingcontext.getextension()
method.
... extended
methods this extension extends webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d(): the type parameter now accepts gl.float.
...if you set the magnification or minification filter in the webglrenderingcontext.texparameter()
method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use floating-point textures, the texture will be marked as incomplete.
OES_texture_half_float - Web APIs
webgl extensions are available using the webglrenderingcontext.getextension()
method.
... extended
methods this extension extends webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d(): the type parameter now accepts ext.half_float_oes.
...if you set the magnification or minification filter in the webglrenderingcontext.texparameter()
method to one of gl.linear, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear, or gl.linear_mipmap_linear, and use half floating-point textures, the texture will be marked as incomplete.
OfflineAudioContext - Web APIs
methods also inherits
methods from its parent interface, baseaudiocontext.
... deprecated
methods offlineaudiocontext.resume() resumes the progression of time in an audio context that has previously been suspended.
... note: the resume()
method is still available — it is now defined on the baseaudiocontext interface (see baseaudiocontext.resume()) and thus can be accessed by both the audiocontext and offlineaudiocontext interfaces.
OffscreenCanvas - Web APIs
methods offscreencanvas.getcontext() returns a rendering context for the offscreen canvas.
...once a new frame has finished rendering in this context, the transfertoimagebitmap()
method can be called to save the most recent rendered image.
... this
method returns an imagebitmap object, which can be used in a variety of web apis and also in a second canvas without creating a transfer copy.
PannerNode.setOrientation() - Web APIs
the setorientation()
method of the pannernode interface defines the direction the audio source is playing in.
... example in the following example, you can see an example of how the createpanner()
method, audiolistener and pannernode would be used to control audio spatialisation.
...if it supports those, or older
methods (like audiolistener.setorientation()) if it still supports those but not the new properties.
PannerNode - Web APIs
methods inherits
methods from its parent, audionode.
... examples in the following example, you can see an example of how the createpanner()
method, audiolistener and pannernode would be used to control audio spatialisation.
...if it supports those, or older
methods (like audiolistener.setorientation()) if it still supports those but not the new properties.
ParentNode.append() - Web APIs
the parentnode.append()
method inserts a set of node objects or domstring objects after the last child of the parentnode.
... ] appending text let parent = document.createelement("div") parent.append("some text") console.log(parent.textcontent) // "some text" appending an element and text let parent = document.createelement("div") let p = document.createelement("p") parent.append("some text", p) console.log(parent.childnodes) // nodelist [ #text "some text", <p> ] parentnode.append() is unscopable the append()
method is not scoped into the with statement.
... let parent = document.createelement("div") with(parent) { append("foo") } // referenceerror: append is not defined polyfill you can polyfill the append()
method in internet explorer 9 and higher with the following code: // source: https://github.com/jserz/js_piece/blob/master/dom/parentnode/append()/append().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('append')) { return; } object.defineproperty(item, 'append', { configurable: true, enumerable: true, writable: true, value: function append() { var argarr = array.prototype.slice.call(arguments), docfrag = document.createdocumentfragment(); argarr.foreach(function (argitem) { var isnod...
ParentNode.prepend() - Web APIs
the parentnode.prepend()
method inserts a set of node objects or domstring objects before the first child of the parentnode.
...lement("div"); parent.append("some text"); parent.prepend("headline: "); console.log(parent.textcontent); // "headline: some text" appending an element and text var parent = document.createelement("div"); var p = document.createelement("p"); parent.prepend("some text", p); console.log(parent.childnodes); // nodelist [ #text "some text", <p> ] parentnode.prepend() is unscopable the prepend()
method is not scoped into the with statement.
... var parent = document.createelement("div"); with(parent) { prepend("foo"); } // referenceerror: prepend is not defined polyfill you can polyfill the prepend()
method if it's not available: // source: https://github.com/jserz/js_piece/blob/master/dom/parentnode/prepend()/prepend().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('prepend')) { return; } object.defineproperty(item, 'prepend', { configurable: true, enumerable: true, writable: true, value: function prepend() { var argarr = array.prototype.slice.call(arguments), docfrag = document.createdocumentfragment(); argarr.foreach(function (argitem) { var isnode = argitem instanceof nod...
ParentNode.querySelectorAll() - Web APIs
the parentnode mixin defines the queryselectorall()
method as returning a nodelist representing a list of elements matching the specified group of selectors which are descendants of the object on which the
method was called.
... if you need only a single result, consider the queryselector()
method instead.
... note: this
method is implemented as element.queryselectorall(), document.queryselectorall(), and documentfragment.queryselectorall() syntax elementlist = parentnode.queryselectorall(selectors); parameters selectors a domstring containing one or more selectors to match against.
ParentNode - Web APIs
the parentnode mixin contains
methods and properties that are common to all types of node objects that can have children.
...
methods parentnode.append() inserts a set of node objects or domstring objects after the last child of the parentnode.
...added the parentnode.children property, and the parentnode.queryselector(), parentnode.queryselectorall(), parentnode.append(), and parentnode.prepend()
methods.
PaymentDetailsUpdate - Web APIs
this can be done either by calling the paymentrequestupdateevent.updatewith()
method or by using the paymentrequest.show()
method's detailspromise parameter to provide a promise that returns a paymentdetailsupdate that updates the payment information before the user interface is even enabled for the first time.
... modifiers optional an array of paymentdetailsmodifier objects, each describing a modifier for particular payment
method identifiers.
... for example, you can use one to adjust the total payment amount based on the selected payment
method ("5% cash discount!").
PaymentRequest - Web APIs
methods paymentrequest.canmakepayment() secure context indicates whether the paymentrequest object can make a payment before calling show().
... payment
methodchange secure context with some payment handlers (e.g., apple pay), dispatched whenever the user changes payment instrument, like switching from a credit card to a debit card.
... also available using the onpayment
methodchange event handler property.
PaymentRequestUpdateEvent.updateWith() - Web APIs
the updatewith()
method of the paymentrequestupdateevent interface updates the details of an existing paymentrequest.
... modifiers optional an array of paymentdetailsmodifier objects, each describing a modifier for particular payment
method identifiers.
... for example, you can use one to adjust the total payment amount based on the selected payment
method ("5% cash discount!").
PaymentResponse.complete() - Web APIs
the paymentrequest
method complete() of the payment request api notifies the user agent that the user interaction is over, and causes any remaining user interface to be closed.
... this
method must be called after the user accepts the payment request and the promise returned by the paymentrequest.show()
method is resolved.
...var payment = new paymentrequest(supportedinstruments, details, options); payment.show().then(function(paymentresponse) { var fetchoptions = {
method: 'post', credentials: include, body: json.stringify(paymentresponse) }; var serverpaymentrequest = new request('secure/payment/endpoint'); fetch(serverpaymentrequest, fetchoptions).then( response => { if (response.status < 400) { paymentresponse.complete("success"); } else { paymentresponse.complete("fail"); }; }).catch( reason => { paymentresponse.comp...
PaymentResponse: payerdetailchange event - Web APIs
if any are invalid, appropriate error messages should be configured and the retry()
method should be called on the paymentresponse to ask the user to update the invalid entries.
... const options = { requestshipping: true, requestpayeremail: true, requestpayername: true, requestpayerphone: true, }; const request = new paymentrequest(
methods, details, options); const response = request.show(); // get the data from the response let { payername: oldpayername, payeremail: oldpayeremail, payerphone: oldpayerphone, } = response; // set up a handler for payerdetailchange events, to // request corrections as needed.
... const errors = await promise.all(promisestovalidate).then(results => results.reduce((errors, result), object.assign(errors, result)) ); // if we found any errors, wait for them to be corrected if (object.getownpropertynames(errors).length) { await response.retry(errors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", {
method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); addeventlistener equivalent you could also set up the event handler using the addeventlistener()
method: response.addeventlistener("payerdetailchange", async ev => { ...
PaymentValidationErrors - Web APIs
when validation of the paymentresponse returned by the paymentrequest.show() or paymentresponse.retry()
methods fails, your code creates a paymentvalidationerrors object to pass into retry() so that the user agent knows what needs to be fixed and what if any error messages to display to the user.
... payment
method optional any payment
method specific errors which may have occurred.
...for example, if the user chose to pay by credit card using the basic-card payment
method, this is a basiccarderrors object.
performance.clearMarks() - Web APIs
the clearmarks()
method removes the named mark from the browser's performance entry buffer.
... if the
method is called with no arguments, all performance entries with an entry type of "mark" will be removed from the performance entry buffer.
... return value void example the following example shows both uses of the clearmarks()
method.
performance.clearMeasures() - Web APIs
the clearmeasures()
method removes the named measure from the browser's performance entry buffer.
... if the
method is called with no arguments, all performance entries with an entry type of "measure" will be removed from the performance entry buffer.
... return value void example the following example shows both uses of the clearmeasures()
method.
performance.clearResourceTimings() - Web APIs
the clearresourcetimings()
method removes all performance entries with an entrytype of "resource" from the browser's performance data buffer and sets the size of the performance data buffer to zero.
... to set the size of the browser's performance data buffer, use the performance.setresourcetimingbuffersize()
method.
... syntax performance.clearresourcetimings(); arguments void return value none this
method has no return value.
performance.mark() - Web APIs
the mark()
method creates a timestamp in the browser's performance entry buffer with the given name.
... the application defined timestamp can be retrieved by one of the performance interface's getentries*()
methods (getentries(), getentriesbyname() or getentriesbytype()).
...if the name given to this
method already exists in the performancetiming interface, syntaxerror is thrown.
PerformanceEntry - Web APIs
a performance entry can be directly created by making a performance mark or measure (for example by calling the mark()
method) at an explicit point in an application.
...
methods performanceentry.tojson() returns a json representation of the performanceentry object.
... candidate recommendation added tojson() serializer
method.
Using Pointer Events - Web APIs
this may be a finger (or elbow, ear, nose, whatever, but typically a finger), stylus, mouse, or any other
method for specifying a single point on the surface.
... example the text below uses the term "finger" when describing the contact with the surface, but it could, of course, also be a stylus, mouse, or other
method of pointing at a location.
... this lets us get the coordinates of the previous position of each touch and use the appropriate context
methods to draw a line segment joining the two positions together.
PublicKeyCredential - Web APIs
methods publickeycredential.getclientextensionresults()secure context if any extensions were requested, this
method will return the results of processing those extensions.
... publickeycredential.isuserverifyingplatformauthenticatoravailable()secure context a static
method returning a promise which resolves to true if an authenticator bound to the platform is capable of verifying the user.
... with the current state of implementation, this
method only resolves to true when windows hello is available on the system.
PushManager.registrations() - Web APIs
the registrations
method is used to ask the system about existing push endpoint registrations.
... syntax var request = navigator.push.registrations(); return a domrequest object to handle the success or failure of the
method call.
... if the
method call is successful, the request's result will be an array of pushregistration objects.
PushManager - Web APIs
methods pushmanager.getsubscription() retrieves an existing push subscription.
... deprecated
methods pushmanager.haspermission() returns a promise that resolves to the pushpermissionstatus of the requesting webapp, which will be one of granted, denied, or default.
...in the updated api, a subscription is unregistered by calling the pushsubscription.unsubscribe()
method.
RTCDataChannel - Web APIs
to create a data channel and ask a remote peer to join you, call the rtcpeerconnection's createdatachannel()
method.
...this event is sent to the channel when a message is received from the other peer.onopen the rtcdatachannel.onopen property is an eventhandler which specifies a function to be called when the open event is fired; this is a simple event which is sent when the data channel's underlying data transport—the link over which the rtcdatachannel's messages flow—is established or re-established.
methodsalso inherits
methods from: eventtargetclose()the rtcdatachannel.close()
method closes the rtcdatachannel.
... either peer is permitted to call this
method to initiate closure of the channel.send()the send()
method of the rtcdatachannel interface sends data across the data channel to the remote peer.
RTCOfferOptions.iceRestart - Web APIs
note: rather than manually creating and submitting an offer with icerestart set to true, you should consider calling the rtcpeerconnection
method restartice() instead.
...you should ideally do this by calling the rtcpeerconnection's restartice()
method, if it's available.
... pc.oniceconnectionstatechange = function(evt) { if (pc.iceconnectionstate === "failed") { if (pc.restartice) { pc.restartice(); } else { pc.createoffer({ icerestart: true }) .then(pc.setlocaldescription) .then(sendoffertoserver); } } } if the state changes to failed, this handler starts by looking to see if the rtcpeerconnection includes the restartice()
method; if it does, we call that to request an ice restart.
RTCPeerConnection.addStream() - Web APIs
the obsolete rtcpeerconnection
method addstream() adds a mediastream as a local source of audio or video.
... instead of using this obsolete
method, you should instead use addtrack() once for each track you wish to send to the remote peer.
... navigator.mediadevices.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); pc.addstream(stream); }); migrating to addtrack() compatibility allowing, you should update your code to instead use the addtrack()
method: navigator.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); stream.gettracks().foreach(function(track) { pc.addtrack(track, stream); }); }); the newer addtrack() api avoids confusion over whether later changes to the track-makeup of a stream affects a peer connection (they do not).
RTCPeerConnection.getIdentityAssertion() - Web APIs
the rtcpeerconnection.getidentityassertion()
method initiates the gathering of an identity assertion.
... the
method returns immediately.
... syntax pc.getidentityassertion(); there is neither parameter nor return value for this
method.
HTML in XMLHttpRequest - Web APIs
var xhr = new xmlhttprequest(); xhr.onload = function() { console.log(this.responsexml.title); } xhr.open("get", "file.html"); xhr.responsetype = "document"; xhr.send(); feature detection
method 1 this
method relies on the "force async" nature of the feature.
... function htmlinxhr() { if (!window.xmlhttprequest) return false; var req = new window.xmlhttprequest(); req.open('get', window.location.href, false); try { req.responsetype = 'document'; } catch(e) { return true; } return false; } view on jsfiddle this
method is synchronous, does not rely on external assets though it may not be as reliable as
method 2 described below since it does not check the actual feature but an indication of that feature.
...
method 2 there are two challenges to detecting exactly if a browser supports html parsing in xmlhttprequest.
XMLHttpRequest.getResponseHeader() - Web APIs
the xmlhttprequest
method getresponseheader() returns the string containing the text of a particular header's value.
...the getresponseheader()
method returns the value as a utf byte sequence.
... if you need to get the raw string of all of the headers, use the getallresponseheaders()
method, which returns the entire raw header string.
XMLHttpRequest.readyState - Web APIs
unsent the xmlhttprequest client has been created, but the open()
method hasn't been called yet.
... opened open()
method has been invoked.
... during this state, the request headers can be set using the setrequestheader()
method and the send()
method can be called which will initiate the fetch.
XPathEvaluator.evaluate() - Web APIs
the evaluate()
method of the xpathevaluator interface executes an xpath expression on the given node or document and returns an xpathresult.
... result optional allows to specify a result object which may be reused and returned by this
method.
... example the following example shows the use of the evaluate()
method.
XPathExpression.evaluate() - Web APIs
the evaluate()
method of the xpathexpression interface executes an xpath expression on the given node or document and returns an xpathresult.
... result optional allows to specify a result object which may be reused and returned by this
method.
... example the following example shows the use of the evaluate()
method.
XRFrame - Web APIs
in addition to providing a reference to the xrsession for which this frame is to be rendered, the getviewerpose()
method is provided to obtain the xrviewerpose describing the viewer's position and orientation in space, and getpose() can be used to create an xrpose describing the relative position of one xrspace relative to another.
...the information about a specific object can be obtained by calling one of the
methods on the object.
...
methods getpose() returns an xrpose object representing the spatial relationship between the two specified xrspace objects.
XRInputSource - Web APIs
targetraymoderead only a domstring indicating the
methodology used to produce the target ray: gaze, tracked-pointer, or screen.
...this space is established using the
method defined by targetraymode.
...
methods the xrinputsource interface defines no
methods.
XRInputSourceArray.entries() - Web APIs
the xrinputsourcearray interface's entries()
method returns a javascript iterator which can then be used to iterate over the key/value pairs in the input source array.
...in hand controller */ handlemainhandinput(input); } else { /* handle other inputs */ } } } for each input in the llist, gamepad inputs are dispatched to a checkgamepad() with the input's gamepad object, taken from its gamepad property, as an input for other devices, we look for tracked-pointer devices in the player's main hand, dispatching those to a handlemainhandinput()
method.
... specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like
methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values()
methods to be exposed from objects that implement the interface.
XRInputSourceArray.forEach() - Web APIs
the xrinputsourcearray
method foreach() executes the specified callback once for each input source in the array, starting at index 0 and progressing until the end of the list.
...troller */ handlemainhandinput(input); } else { /* handle other inputs */ } } }); for each input in the llist, the callback dispatches gamepad inputs to a checkgamepad() with the input's gamepad object, taken from its gamepad property, as an input for other devices, we look for tracked-pointer devices in the player's main hand, dispatching those to a handlemainhandinput()
method.
... specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like
methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values()
methods to be exposed from objects that implement the interface.
XRInputSourceArray - Web APIs
in addition to being able to access the input sources in the list using standard array notation (that is, with index numbers insize square brackets),
methods are available to allow the use of iterators and the foreach()
method is also available.
...
methods the following
methods are available on xrinputsourcearray objects.
... in addition to these
methods, you may use array notation to access items in the list by index for example, the snippet of code below calls a function handleinput(), passing into it the first item in the input source list, if the list isn't empty.
XRInputSourceEventInit.frame - Web APIs
the xrinputsourceeventinit dictionary's property frame specifies an xrframe providing information about the timestamp at which the new input source event took place, as well as access to the xrframe
method getpose() which can be used to map the coordinates of any xrreferencespace to the space in which the event took place.
... syntax xrinputsourceeventinit.frame = xrframe; let xrinputsourceeventinit = { frame: xrframe }; let xrinputsourceevent = new xrinputsourceevent(type, { frame: xrframe }); value an xrframe indicating the time at which the event took place, and providing a getpose()
method which can be used to map reference spaces to the world reference space.
...instead, the xrframe specified by the frame property is simply a
method to provide access to the getpose()
method, which you can use to get the relative positions of the objects in the scene at the time the event occurred.
XRSession.updateRenderState() - Web APIs
the updaterenderstate()
method of the xrsession interface of webxr api schedules changes to be applied to the active render state prior to rendering of the next frame.
... exceptions this
method may throw any of the following exceptions.
... these are true exceptions, since this
method does not return a promise.
XSLTProcessor - Web APIs
it has
methods to load the xslt stylesheet, to manipulate <xsl:param> parameter values, and to apply the transformation to documents.
... new xsltprocessor()
methods [throws] void xsltprocessor.importstylesheet(node stylesheet) imports the xslt stylesheet.
... the resultant object depends on the output
method of the stylesheet: output
method result type html htmldocument xml xmldocument text xmldocument with a single root element <transformiix:result> with the text as a child [throws] void xsltprocessor.setparameter(string namespaceuri, string localname, any value) sets a parameter in the xslt stylesheet that was impo...
msPutPropertyEnabled - Web APIs
the msputpropertyenabled
method sets whether a given property in the style object is enabled or disabled.
... this proprietary
method is specific to internet explorer and microsoft edge.
... return value type = hresult: if this
method succeeds, it returns s_ok.
ARIA Test Cases - Accessibility
optional but desired: at should provide simple
method to navigate only among the current drop targets.
... markup used: aria-label="my something-or-other" notes: if the screen reader simply uses the accessible name property it should get the correct text to speak, even if several
methods (aria-label, aria-labelledby, alt, label for, descendant text, title, etc.) are used.
... markup used: aria-labelledby notes: if the screen reader simply uses the accessible name property it should get the correct text to speak, even if several
methods (aria-label, aria-labelledby, alt, label for, descendant text, title, etc.) are used.
Alerts - Accessibility
here is a simple form: <form
method="post" action="post.php"> <fieldset> <legend>please enter your contact details</legend> <label for="name">your name (required):</label> <input name="name" id="name" aria-required="true"/> <br /> <label for="email">e-mail address (required):</label> <input name="email" id="email" aria-required="true"/> <br /> <label for="website">website (optional):</labe...
...d(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(); } } </script> the checkvalidity function the primary
method in javascript used for form validation is the checkvalidity function.
... this
method takes three parameters: the id of the input that is to be validated, the term to search for to ensure validity, and the error message to be inserted into the alert.
Color picker tool - CSS: Cascading Style Sheets
this.r = obj.r; this.g = obj.g; this.b = obj.b; this.a = obj.a; this.hue = obj.hue; this.saturation = obj.saturation; this.value = obj.value; this.format = '' + obj.format; this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv') this.format = 'hsv'; if (format === 'hsl') this.format = 'hsl'; }; /*==========
methods to set color properties ==========*/ color.prototype.isvalidrgbvalue = function isvalidrgbvalue(value) { return (typeof(value) === 'number' && isnan(value) === false && value >= 0 && value <= 255); }; color.prototype.setrgba = function setrgba(red, green, blue, alpha) { if (this.isvalidrgbvalue(red) === false || this.isvalidrgbvalue(green) === false || this.isvalidrgbvalue(blue...
...valid !== true) return; if (value[0] === '#') value = value.slice(1, value.length); if (value.length === 3) value = value.replace(/([0-9a-f])([0-9a-f])([0-9a-f])/i,'$1$1$2$2$3$3'); this.r = parseint(value.substr(0, 2), 16); this.g = parseint(value.substr(2, 2), 16); this.b = parseint(value.substr(4, 2), 16); this.alpha = 1; this.rgbtohsv(); }; /*========== conversion
methods ==========*/ color.prototype.converttohsl = function converttohsl() { if (this.format === 'hsl') return; this.setformat('hsl'); this.rgbtohsl(); }; color.prototype.converttohsv = function converttohsv() { if (this.format === 'hsv') return; this.setformat('hsv'); this.rgbtohsv(); }; /*========== update
methods ==========*/ color.prototype.updatergb = function updater...
...lta) { if (cmax === red ) { hue = ((green - blue) / delta); } if (cmax === green ) { hue = 2 + (blue - red) / delta; } if (cmax === blue ) { hue = 4 + (red - green) / delta; } if (cmax) saturation = delta / x; } this.hue = 60 * hue | 0; if (this.hue < 0) this.hue += 360; this.saturation = (saturation * 100) | 0; this.lightness = (lightness * 100) | 0; }; /*========== get
methods ==========*/ color.prototype.gethexa = function gethexa() { var r = this.r.tostring(16); var g = this.g.tostring(16); var b = this.b.tostring(16); if (this.r < 16) r = '0' + r; if (this.g < 16) g = '0' + g; if (this.b < 16) b = '0' + b; var value = '#' + r + g + b; return value.touppercase(); }; color.prototype.getrgba = function getrgba() { var rgb = '(' + this.r + ', ' ...
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
this specification details how alignment should work in all the different layout
methods.
... layout
methods will conform to the specification where possible and implement individual behavior based on their differences (features and constraints).
... while the specification currently specifies alignment details for all layout
methods, browsers have not fully implemented all of the specification; however, the css grid layout
method has been widely adopted.
Testing media queries programmatically - CSS: Cascading Style Sheets
the dom provides features that can test the results of a media query programmatically, via the mediaquerylist interface and its
methods and properties.
...to do this, use the window.matchmedia
method.
...to do this, call the addlistener()
method on the mediaquerylist object, with a callback function to invoke when the media query status changes (e.g., the media query test goes from true to false): // create the query list.
Creating and triggering events - Developer guides
elem.dispatchevent(event); the above code example uses the eventtarget.dispatchevent()
method.
...ueryselector('form'); const textarea = document.queryselector('textarea'); // create a new event, allow bubbling, and provide any data you want to pass to the "detail" property const eventawesome = new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } }); // the form element listens for the custom "awesome" event and then consoles the output of the passed text()
method form.addeventlistener('awesome', e => console.log(e.detail.text())); // as the user types, the textarea inside the form dispatches/triggers the event to fire, and uses itself as the starting point textarea.addeventlistener('input', e => e.target.dispatchevent(eventawesome)); creating and dispatching events dynamically elements can listen for events that haven't been created yet: <form> <te...
...onally, we've also leveraged the "function expression" (instead of the "arrow function expression") so "this" will represent the element this.dispatchevent(new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } })) }); triggering built-in events this example demonstrates simulating a click (that is programmatically generating a click event) on a checkbox using dom
methods.
Media events - Developer guides
emptied the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load()
method is called to reload it.
... play sent when the playback state is no longer paused, as a result of the play
method, or the autoplay attribute.
... the listener simply calls the element's play()
method, which starts playback.
<button>: The Button element - HTML: Hypertext Markup Language
form
method html5 if the button is a submit button (it's inside/associated with a <form> and doesn't have type="button"), this attribute specifies the http
method used to submit the form.
...use this
method when the form has no side effects, like search forms.
... if specified, this attribute overrides the
method attribute of the button's form owner.
<dialog>: The Dialog element - HTML: Hypertext Markup Language
usage notes <form> elements can close a dialog if they have the attribute
method="dialog".
... html <!-- simple pop-up dialog box containing a form --> <dialog id="favdialog"> <form
method="dialog"> <p><label>favorite animal: <select> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select> </label></p> <menu> <button value="cancel">cancel</button> <button id="confirmbtn" value="default">confirm</button> </menu> </form> </dialog> <menu> <button id=...
...open() { if (typeof favdialog.showmodal === "function") { favdialog.showmodal(); } else { alert("the <dialog> api is not supported by this browser"); } }); // "favorite animal" input sets the value of the submit button selectel.addeventlistener('change', function onselect(e) { confirmbtn.value = selectel.value; }); // "confirm" button of form triggers "close" on dialog because of [
method="dialog"] favdialog.addeventlistener('close', function onclose() { outputbox.value = favdialog.returnvalue + " button clicked - " + (new date()).tostring(); }); result specifications specification status comment html living standardthe definition of '<dialog>' in that specification.
<input type="datetime-local"> - HTML: Hypertext Markup Language
methods select(), stepdown(), stepup() value a domstring representing the value of the date entered into the input.
... you can also get and set the date value in javascript using the htmlinputelement.value property, for example: var datecontrol = document.queryselector('input[type="datetime-local"]'); datecontrol.value = '2017-06-01t08:30'; there are several
methods provided by javascript's date that can be used to convert numeric date information into a properly-formatted string, or you can do it manually.
... for example, the date.toisostring()
method can be used for this purpose.
<input type="range"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, max, min, and step idl attributes list, value, and valueasnumber
methods stepdown() and stepup() validation there is no pattern validation available; however, the following forms of automatic validation are performed: if the value is set to something which can't be converted into a valid floating-point number, validation fails because the input is suffering from a bad input.
... note: the following input attributes do not apply to the input range: accept, alt, checked, dirname, formaction, formenctype, form
method, formnovalidate, formtarget, height, maxlength, minlength, multiple, pattern, placeholder, readonly, required, size, src, and width.
... in the meantime, we can make the range vertical by rotating it using using css transforms, or, by targeting each browser engine with their own
method, which includes setting the appearance to slider-vertical, by using a non-standard orient attribute in firefox, or by changing the text direction for internet explorer and edge.
Evolution of HTTP - HTTP
http/0.9 is extremely simple: requests consist of a single line and start with the only possible
method get followed by the path to the resource (not the url as both the protocol, server, and port are unnecessary once connected to the server).
... more than 15 years of extensions thanks to its extensibility – creating new headers or
methods is easy – and even if the http/1.1 protocol was refined over two revisions, rfc 2616 published in june 1999 and the series of rfc 7230-rfc 7235 published in june 2014 in prevision of the release of http/2, this protocol has been extremely stable over more than 15 years.
...the actions induced by the api were no more conveyed by new http
methods, but only by accessing specific uris with basic http/1.1
methods.
MIME types (IANA media types) - HTTP
with the exception of multipart/form-data, used in the post
method of html forms, and multipart/byteranges, used with 206 partial content to send part of a document, http doesn't handle multipart documents in a special way: the message is transmitted to the browser (which will likely show a "save as" window if it doesn't know how to display the document).
...boundary=aboundarystring (other headers associated with the multipart document as a whole) --aboundarystring content-disposition: form-data; name="myfile"; filename="img.jpg" content-type: image/jpeg (data) --aboundarystring content-disposition: form-data; name="myfield" (data) --aboundarystring (more subparts) --aboundarystring-- the following <form>: <form action="http://localhost:8000/"
method="post" enctype="multipart/form-data"> <label>name: <input name="mytextfield" value="test"></label> <label><input type="checkbox" name="mycheckbox"> check</label> <label>upload file: <input type="file" name="myfile" value="test.txt"></label> <button>send the file</button> </form> will send this message: post / http/1.1 host: localhost:8000 user-agent: mozilla/5.0 (macintosh; intel mac os...
... other
methods of conveying document type mime types are not the only way to convey document type information: filename suffixes are sometimes used, especially on microsoft windows.
Browser detection using the user agent - HTTP
the boxes can be separated into multiple columns via two equally fair
method.
...the first
method uses horizontal flexboxes to group the content such that when the page is displayed to the end user, all the dogs boxes are at the top of the page and all the cat boxes are lower on the page.
... the second
method uses a column layout and resents all the dogs to the left and all the cats to the right.
HTTP caching - HTTP
however, common http caches are typically limited to caching responses to get and may decline other
methods.
... the primary cache key consists of the request
method and target uri (oftentimes only the uri is used as only get requests are caching targets).
...in order to have the new versions, all the links to them must be changed, that is the drawback of this
method: additional complexity that is usually taken care of by the tool chain used by web developers.
CSP: form-action - HTTP
'unsafe-eval' allows the use of eval() and similar
methods for creating code from strings.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer
method than using the unsafe-inline expression.
... <meta http-equiv="content-security-policy" content="form-action 'none'"> <form action="javascript:alert('foo')" id="form1"
method="post"> <input type="text" name="fieldname" value="fieldvalue"> <input type="submit" id="submit" value="submit"> </form> // error: refused to send form data because it violates the following // content security policy directive: "form-action 'none'".
CSP: navigate-to - HTTP
'unsafe-eval' allows the use of eval() and similar
methods for creating code from strings.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer
method than using the unsafe-inline expression.
... <meta http-equiv="content-security-policy" content="navigate-to 'none'"> <form action="javascript:alert('foo')" id="form1"
method="post"> <input type="text" name="fieldname" value="fieldvalue"> <input type="submit" id="submit" value="submit"> </form> specifications specification status comment content security policy level 3the definition of 'navigate-to' in that specification.
Large-Allocation - HTTP
this error is displayed when loading a document with a large-allocation header with a non-get http
method.
... the document with the large-allocation header was loaded in a window which was opened by window.open(), <a target="_blank"> or other similar
methods without rel="noopener" or the "noopener" feature being set.
... the document with the large-allocation header has opened another window with window.open(), <a target="_blank"> or other similar
methods without rel="noopener" or the "noopener" feature being set.
HTTP Messages - HTTP
their start-line contain three elements: an http
method, a verb (like get, put or post) or a noun (like head or options), that describes the action to be performed.
...the format of this request target varies between different http
methods.
...this is the most common form, known as the origin form, and is used with get, post, head, and options
methods.
CONNECT - HTTP
the http connect
method starts two-way communications with the requested resource.
... for example, the connect
method can be used to access websites that use ssl (https).
... connect is a hop-by-hop
method.
PATCH - HTTP
the http patch request
method applies partial modifications to a resource.
... to find out whether a server supports patch, a server can advertise its support by adding it to the list in the allow or access-control-allow-
methods (for cors) response headers.
... http/1.1 204 no content content-location: /file.txt etag: "e0023aa4f" specifications specification title rfc 5789: patch patch
method for http ...
POST - HTTP
the http post
method sends data to the server.
... text/plain when the post request is sent via a
method other than an html form — like via an xmlhttprequest — the body can take any type.
... as described in the http 1.1 specification, post is designed to allow a uniform
method to cover the following functions: annotation of existing resources posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; adding a new user through a signup modal; providing a block of data, such as the result of submitting a form, to a data-handling process; extending a database through an append operation.
An overview of HTTP - HTTP
cache or authentication
methods were functions handled early in http history.
... requests an example http request: requests consists of the following elements: an http
method, usually a verb like get, post or a noun like options or head that defines the operation the client wants to perform.
... or a body, for some
methods like post, similar to those in responses, which contain the resource sent.
501 Not Implemented - HTTP
501 is the appropriate response when the server does not recognize the request
method and is incapable of supporting it for any resource.
... the only
methods that servers are required to support (and therefore that must not return 501) are get and head.
... if the server does recognize the
method, but intentionally does not support it, the appropriate response is 405
method not allowed.
Expressions and operators - JavaScript
to actually manipulate the array, use the various array
methods such as splice.
...ber or string, the typeof operator returns the following results: typeof 62; // returns "number" typeof 'hello world'; // returns "string" for property values, the typeof operator returns the type of value the property contains: typeof document.lastmodified; // returns "string" typeof window.length; // returns "number" typeof math.ln2; // returns "number" for
methods and functions, the typeof operator returns results as follows: typeof blur; // returns "function" typeof eval; // returns "function" typeof parseint; // returns "function" typeof shape.split; // returns "function" for predefined objects, the typeof operator returns results as follows: typeof date; // returns "function" typeof function; // returns "function" typeof math; ...
...in general, this refers to the calling object in a
method.
Keyed collections - JavaScript
one difference to map objects is that weakmap keys are not enumerable (i.e., there is no
method giving you a list of the keys).
...the private data and
methods belong inside the object and are stored in the privates weakmap object.
... const privates = new weakmap(); function public() { const me = { // private data goes here }; privates.set(this, me); } public.prototype.
method = function () { const me = privates.get(this); // do stuff with private data in `me`...
TypeError: 'x' is not iterable - JavaScript
function* generate(a, b) { yield a; yield b; } for (let x of generate(1,2)) console.log(x); iterating over a custom iterable custom iterables can be created by implementing the symbol.iterator
method.
... you must be certain that your iterator
method returns an object which is an iterator, which is to say it must have a next
method.
... const myemptyiterable = { [symbol.iterator]() { return [] // [] is iterable, but it is not an iterator -- it has no next
method.
The arguments object - JavaScript
note: “array-like” means that arguments has a length property and properties indexed from zero, but it doesn't have array's built-in
methods like foreach() or map().
...for example, it does not have the pop()
method.
... however, it can be converted to a real array: var args = array.prototype.slice.call(arguments); // using an array literal is shorter than above but allocates an empty array var args = [].slice.call(arguments); as you can do with any array-like object, you can use es2015's array.from()
method or spread syntax to convert arguments to a real array: let args = array.from(arguments); // or let args = [...arguments]; the arguments object is useful for functions called with more arguments than they are formally declared to accept.
Rest parameters - JavaScript
formally defined in function expression), while the arguments object contains all arguments passed to the function; the arguments object is not a real array, while rest parameters are array instances, meaning
methods like sort, map, foreach or pop can be applied on it directly; the arguments object has additional functionality specific to itself (like the callee property).
...each one of them is then multiplied by the first parameter, and the array is returned: function multiply(multiplier, ...theargs) { return theargs.map(element => { return multiplier * element }) } let arr = multiply(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 sortedargs = theargs.sort() return sortedargs } console.log(sortrestargs(5, 3, 7, 1)) // 1, 3, 5, 7 function sortarguments() { let sortedargs = arguments.sort() return sortedargs // this will never happen } console.log(sortarguments(5, 3, 7, 1)) // throws a typeerror (arguments.
...sort is not a function) to use array
methods on the arguments object, it must be converted to a real array first.
Array.prototype[@@unscopables] - JavaScript
however, in ecmascript 2015 and later, the array.prototype.keys()
method was introduced.
... that means that inside with environments, "keys" would now be the
method and not the variable.
... this is where now the built-in @@unscopables array.prototype[@@unscopables] symbol property comes into play and prevents that some of the array
methods are being scoped into the with statement.
Array.prototype.reduce() - JavaScript
the reduce()
method executes a reducer function (that you provide) on each element of the array, resulting in single output value.
... description the reduce()
method executes the callback once for each assigned value present in the array, taking four arguments: accumulator currentvalue currentindex array the first time the callback is called, accumulator and currentvalue can be one of two values.
... return value; } }); } caution: if you need to support truly obsolete javascript engines that do not support object.defineproperty(), it is best not to polyfill array.prototype
methods at all, as you cannot make them non-enumerable.
JSON.stringify() - JavaScript
the json.stringify()
method converts a javascript object or value to a json string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.
... description json.stringify() converts a value to json notation representing it: if the value has a tojson()
method, it's responsible to define what data will be serialized.
... json.stringify({ a: 2 }, null, ' '); // '{ // "a": 2 // }' using a tab character mimics standard pretty-print appearance: json.stringify({ uno: 1, dos: 2 }, null, '\t'); // returns the string: // '{ // "uno": 1, // "dos": 2 // }' tojson() behavior if an object being stringified has a property named tojson whose value is a function, then the tojson()
method customizes json stringification behavior: instead of the object being serialized, the value returned by the tojson()
method when called will be serialized.
JSON - JavaScript
the json object contains
methods for parsing javascript object notation (json) and converting values to json.
... it can't be called or constructed, and aside from its two
method properties, it has no interesting functionality of its own.
... static
methods json.parse(text[, reviver]) parse the string text as json, optionally transform the produced value and its properties, and return the value.
Math.trunc() - JavaScript
description unlike the other three math
methods: math.floor(), math.ceil() and math.round(), the way math.trunc() works is very simple.
... the argument passed to this
method will be converted to number type implicitly.
... because trunc() is a static
method of math, you always use it as math.trunc(), rather than as a
method of a math object you created (math is not a constructor).
Number.prototype.toFixed() - JavaScript
the tofixed()
method formats a number using fixed-point notation.
... typeerror if this
method is invoked on an object that is not a number.
...if the absolute value of numobj is greater or equal to 1e+21, this
method simply calls number.prototype.tostring() and returns a string in exponential notation.
Object.assign() - JavaScript
the object.assign()
method copies all enumerable own properties from one or more source objects to a target object.
... the object.assign()
method only copies enumerable and own properties from a source object to a target object.
...console.log(target.foo3); // undefined, assign
method has finished, foo3 will not be copied.
Object.getOwnPropertyDescriptor() - JavaScript
the object.getownpropertydescriptor()
method returns an object describing the configuration of a specific property on a given object (that is, one directly present on an object and not in the object's prototype chain).
... description this
method permits examination of the precise description of a property.
...figurable: true, // enumerable: true, // value: 73, // writable: true // } o = {}; object.defineproperty(o, 'qux', { value: 8675309, writable: false, enumerable: false }); d = object.getownpropertydescriptor(o, 'qux'); // d is { // value: 8675309, // writable: false, // enumerable: false, // configurable: false // } non-object coercion in es5, if the first argument to this
method is not an object (a primitive), then it will cause a typeerror.
Object.prototype.isPrototypeOf() - JavaScript
the isprototypeof()
method checks if an object exists in another object's prototype chain.
... description the isprototypeof()
method allows you to check whether or not an object exists within another object's prototype chain.
...o() {} function bar() {} function baz() {} bar.prototype = object.create(foo.prototype); baz.prototype = object.create(bar.prototype); var baz = new baz(); console.log(baz.prototype.isprototypeof(baz)); // true console.log(bar.prototype.isprototypeof(baz)); // true console.log(foo.prototype.isprototypeof(baz)); // true console.log(object.prototype.isprototypeof(baz)); // true isprototypeof()
method, along with the instanceof operator particularly comes in handy if you have code that can only function when dealing with objects descended from a specific prototype chain, e.g., to guarantee that certain
methods or properties will be present on that object.
Object.preventExtensions() - JavaScript
the object.preventextensions()
method prevents new properties from ever being added to an object (i.e.
... this
method makes the [[prototype]] of the target immutable; any [[prototype]] re-assignment will throw a typeerror.
...fixed.__proto__ = { oh: 'hai' }; non-object coercion in es5, if the argument to this
method is not an object (a primitive), then it will cause a typeerror.
Object.prototype.toLocaleString() - JavaScript
the tolocalestring()
method returns a string representing the object.
... this
method is meant to be overridden by derived objects for locale-specific purposes.
... this function is provided to give objects a generic tolocalestring
method, even though not all may use it.
Promise.all() - JavaScript
the promise.all()
method takes an iterable of promises as an input, and returns a single promise that resolves to an array of the results of the input promises.
... description this
method can be useful for aggregating the results of multiple promises.
... if an empty iterable is passed, then this
method returns (synchronously) an already resolved promise.
Promise.prototype.finally() - JavaScript
the finally()
method returns a promise.
... description the finally()
method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.
... the finally()
method is very similar to calling .then(onfinally, onfinally) however there are a couple of differences: when creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it a finally callback will not receive any argument, since there's no reliable means of determining if the promise was fulfilled or rejected.
Promise.resolve() - JavaScript
the promise.resolve()
method returns a promise object that is resolved with a given value.
...has a "then"
method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the value.
... examples using the static promise.resolve
method promise.resolve('success').then(function(value) { console.log(value); // "success" }, function(value) { // not called }); resolving an array var p = promise.resolve([1,2,3]); p.then(function(v) { console.log(v[0]); // 1 }); resolving another promise var original = promise.resolve(33); var cast = promise.resolve(original); cast.then(function(value) { console.log('value: ' + value); ...
Reflect.getOwnPropertyDescriptor() - JavaScript
the static reflect.getownpropertydescriptor()
method is similar to object.getownpropertydescriptor().
... description the reflect.getownpropertydescriptor
method returns a property descriptor of the given property if it exists in the target object, undefined otherwise.
...ptor() reflect.getownpropertydescriptor({x: 'hello'}, 'x') // {value: "hello", writable: true, enumerable: true, configurable: true} reflect.getownpropertydescriptor({x: 'hello'}, 'y') // undefined reflect.getownpropertydescriptor([], 'length') // {value: 0, writable: true, enumerable: false, configurable: false} difference to object.getownpropertydescriptor() if the target argument to this
method is not an object (a primitive), then it will cause a typeerror.
Reflect.has() - JavaScript
the static reflect.has()
method works like the in operator as a function.
... description the reflect.has
method allows you to check if a property is in an object.
... examples using reflect.has() reflect.has({x: 0}, 'x') // true reflect.has({x: 0}, 'y') // false // returns true for properties in the prototype chain reflect.has({x: 0}, 'tostring') // proxy with .has() handler
method obj = new proxy({}, { has(t, k) { return k.startswith('door') } }); reflect.has(obj, 'doorbell') // true reflect.has(obj, 'dormitory') // false reflect.has returns true for any inherited properties, like the in operator: const a = {foo: 123} const b = {__proto__: a} const c = {__proto__: b} // the prototype chain is: c -> b -> a reflect.has(c, 'foo') // true specifications specification ecmascript (ecma-262)the definition of 'reflect.has' in that specification.
Reflect.preventExtensions() - JavaScript
the static reflect.preventextensions()
method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object).
... description the reflect.preventextensions()
method allows you to prevent new properties from ever being added to an object (i.e., prevents future extensions to the object).
...reflect.preventextensions(empty) reflect.isextensible(empty) // === false difference from object.preventextensions() if the target argument to this
method is not an object (a primitive), then it will cause a typeerror.
Rule Compilation - Archive of obsolete content
however, rebuilding the template (using the builder.rebuild
method) will recompile the query and rules and reapply the template again.
... this means that you can change the rules using dom
methods, rebuild the template, and get different results.
Features of a Window - Archive of obsolete content
as in html, you can use the window interface's open()
method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name.
... see also window interface's open()
method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name.
Manifest Files - Archive of obsolete content
the
method used depends on what kind of application you are creating.
...however, applications installed with a script will not be listed in the extension manager and there is no automated
method to uninstall them.
XUL Structure - Archive of obsolete content
for this reason, mozilla provides a
method of installing content locally and registering the installed files as part of its chrome system.
...this newer
method is the manifest file mentioned earlier, and you will find these as files with the .manifest extension in the chrome directory.
XUL Accesskey FAQ and Policies - Archive of obsolete content
an accesskey is an underlined letter in a web page, menu or dialog that indicates to a user a quick, keyboard
method of simulating a click on that element.
...if
methods like confirm(), confirmex() or prompt() are being used to create a dialog, use an & before the button or checkbox text to make the next character an accesskey.
XUL Event Propagation - Archive of obsolete content
any xul element may use the dom addeventlistener
method to register itself to capture events.
... note: the dom provides the addeventlistener
method for creating event listeners on nodes that do not otherwise supply them.
action - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] used to specify the content that should be generated for each matching result from a query.
...es 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, ,, tooltip, tooltiptext, 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...
assign - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] for xml templates, specifies an additional variable to assign a value to.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
bbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a horizontal box that is baseline aligned.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
binding - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] should be contained within a bindings 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, ,, tooltip, tooltiptext, 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...
bindings - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] used to specify a set of variable bindings for a rule.
...s 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, ,, tooltip, tooltiptext, 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...
box - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container element which can contain any number of child elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
broadcaster - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a broadcaster is used when you want multiple elements to share one or more attribute values, or when you want elements to respond to a state change.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
broadcasterset - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container element for broadcaster elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
caption - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a header for a groupbox.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature...
checkbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element that can be turned on and off.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
colorpicker - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a palette of colors from which a user may select by clicking on one of the grid cells.
... value property gets and sets color attribute
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
column - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single column in a columns element.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
columns - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] defines the columns of a grid.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
command - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a command element can be used to invoke an operation that can come from multiple sources.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
conditions - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element should appear directly inside a rule element and is used to define conditions for the rule.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
content - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] Éste elemento debería pertenecer a query ("consulta").
... métodos inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattr...
datepicker - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a datepicker allows the user to enter a date.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
deck - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element that displays only one of its children at a time.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
description - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used to create a block of text.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
dialogheader - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a heading row for a dialog box.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
dropmarker - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a dropmarker is a button with an arrow which will reveal more details when pressed.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
grid - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a grid is a layout type that arranges elements in rows and columns.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
grippy - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
groupbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] the groupbox is used to group related elements together.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
hbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container element which can contain any number of child elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
image - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] summary an element that displays an image, much like the html img 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, ,, tooltip, tooltiptext, 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(), getfeatur...
key - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] the key element defines a window-global keyboard shortcut and must be placed inside a keyset element.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
keyset - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container element for key elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
label - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used to provide a label for a control element.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatu...
listcell - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single cell of a listbox.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
listcol - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a column in a listbox.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
listcols - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container for the columns of a listbox, each of which are created with the listcol element.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
listhead - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a header row of a listbox.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
listheader - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a header for a single column in a listbox.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
listitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single row in a listbox.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
member - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] used within a rule's conditions element to match elements that are containers or are contained within another 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, ,, tooltip, tooltiptext, 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(), getfeatur...
menubar - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container that usually contains menu elements.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
menuitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single choice in a menupopup 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, ,, tooltip, tooltiptext, 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(), getfeatur...
menuseparator - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] used to create a separator between menu items.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
observes - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] the observes element can be used to listen to a broadcaster and receive events and attributes from it.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
page - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] similar to a window, except it should be used for xul files that are to be loaded into an iframe.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
param - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] for sql templates, used to bind values to parameters specified within an sql statement.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
popupset - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container for menupopup, panel and tooltip elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
progressmeter - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a meter which can be used to display the progress of a lengthy operation.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
query - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] used to specify the query for a template.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
queryset - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container for query elements when more than one query is used.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
radio - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element that can be turned on and off.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
resizer - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element used for window resizing.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
richlistitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an individual item in a richlistbox.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
row - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single row in a rows element.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
rows - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] defines the rows of a grid.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
rule - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a rule is used in a template.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
script - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] much like the html script element, this is used to declare a script to be used by the xul window.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
scrollbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] when a container's contents which are larger that the size of the container, scroll bars may be placed at the side of the container to allow the user to scroll around in the container.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
scrollcorner - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is used for the small box where the horizontal and vertical scrollbars meet.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
separator - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] creates a small separating gap between elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
spacer - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element that takes up space but does not display anything.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
spinbuttons - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] spin buttons are two arrows, one to increase a value and one to decrease a value.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
splitter - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element which should appear before or after an element inside a container.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
stack - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element that renders its children on top of each other.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
statusbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] an element used to create a status bar, usually placed along the bottom of a window.
... 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, ,, tooltip, tooltiptext, 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...
<statusbarpanel> - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] firefox 4 note the status bar has been removed.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
stringbundleset - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container for stringbundle elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
tabbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container used to display a set of tabbed pages of elements.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
tabpanel - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a individual panel in a tabpanels element.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
tabpanels - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container to hold the set of pages in a tabbox.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
template - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] used to declare a template for rule-based construction of elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
textnode - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] normally when substituting rdf resources in template rules, you place the rdf property name inside an attribute value preceded with rdf:.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
timepicker - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] the timepicker is used to allow the user to enter a time.
...
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeatur...
titlebar - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] boxes created with the titlebar element behave just like a normal window titlebar: when the element is clicked and dragged, the window moves with it.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
toolbargrippy - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] not in firefox the notch on the side of a toolbar which can be used to collapse and expand it.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
toolbaritem - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] firefox only an item that appears on a toolbar.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
toolbarpalette - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] firefox only the item is a palette of available toolbar items.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
toolbarseparator - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] creates a separator between groups of toolbar items.
... 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, ,, tooltip, tooltiptext, 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...
toolbarset - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog.
...ies 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, ,, tooltip, tooltiptext, 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...
toolbarspacer - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] firefox only a space between toolbar items.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
toolbarspring - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] firefox only a flexible space between toolbar items.
... 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, ,, tooltip, tooltiptext, 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...
treecell - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single cell in a tree.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
treechildren - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element is the body of the tree.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
treecol - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a column of a tree.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
treecols - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a group of treecol elements.
... 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, ,, tooltip, tooltiptext, 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(), getfeatur...
treeitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a treeitem should be placed inside a treechildren element and should contain treerow elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
treerow - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a single row in a tree.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
treeseparator - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] used to place a separator row in a tree.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
triple - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a triple can be included inside a rule's conditions element.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
vbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] a container element which can contain any number of child elements.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
where - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] indicate a condition that must match for a template result to be used.
...s 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, ,, tooltip, tooltiptext, 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(), getfeatur...
wizardpage - Archive of obsolete content
« xul reference home [ examples | attributes | properties |
methods | related ] this element defines a page in a wizard.
...ited 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, ,, tooltip, tooltiptext, top, width
methods inherited
methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagna...
XULRunner tips - Archive of obsolete content
sions theme manager chrome://mozapps/content/extensions/extensions.xul?type=themes extension:manager-themes javascript console chrome://global/content/console.xul global:console about:config chrome://global/content/config.xul developer extensions venkman need a custom build or a compatible extension need to edit compatibility in needs a
method to start venkman (usually by overlaying the main xul file, similar to existing code for firefox, suite, etc.) the function toopenwindowbytype() needs to be defined.
... note: i use this
method of installing extensions into all of my mozilla applications.
Archived Mozilla and build documentation - Archive of obsolete content
because of this close association between
methods and attributes on the one hand, and content on the other, calicalendarview implementations are particularly well suited to xbl.
... microsummary topics to programmatically install a microsummary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsimicrosummaryservice interface implemented by the nsimicrosummaryservice component, then call its installgenerator()
method, passing it an xml document containing the generator.
2006-12-01 - Archive of obsolete content
http://www.juicescript.org/ discussions deleting objects in spidermonkey a user asks if there's a
method of manually deleting an object in spidermonkey before garbage collector deletes it.
... peter wilson's reply was to add a
method that does the deleting with a native implementation that releases the resources held by the object as seen in this database interface: var mydbase = new pgsqlconnection; mydbase.connect("database"); mydbase.exec("select * from mytable where ..."); // use the result data - (native implementation function) mydbase.close() spidermonkey for server side inquiry about why javascript hasn't caught on for general server-side scripting.
2006-12-01 - Archive of obsolete content
discussions cancellable async requests discussions about a bug of calicalendar's async
methods.
... override a
method (xbl) discussions about how to override a js function in a js file.
Browser-side plug-in API - Archive of obsolete content
this chapter describes
methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
... the names of all of these
methods begin with npn_ to indicate that they are implemented by the browser and called by the plug-in.
nsEmbedCString
methods nsembedcstring constructors for nsembedcstring.
... remarks the
methods defined on nsembedcstring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_cstring.
nsEmbedString
methods nsembedstring constructors for nsembedstring.
... remarks the
methods defined on nsembedstring are implemented as inline wrappers around the xpcom string functions, prefixed with ns_string.
nsLiteralCString (External)
class declaration
method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar r...
...
methods rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar ...
nsLiteralString (External)
class declaration
method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar r...
...
methods rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar ...
nsStringContainer (External)
class declaration
method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar ...
...
methods beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
nsString external
class declaration basic strings
method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral ...
...
methods constructors void nsstring_external() - source void nsstring_external(const nsstring_external&) - source parameters nsstring_external& astring void nsstring_external(const nsastring&) - source parameters nsastring& areadable void nsstring_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source ...
XPCOM glue classes
clarationns convertutf16toutf8 externalclass declarationns convertutf8toutf16 externalclass declarationns lossyconvertutf16toascii externalclass declarationns_convertasciitoutf16class declarationns_convertutf16toutf8class declarationns_convertutf8toutf16class declarationns_lossyconvertutf16toasciiclass declarationns_overridens_override is a macro which allows c++ code in mozilla to specify that a
method is intended to override a base class
method.
... if there is no base class
method with the same signature, a compiler with static-checking enabled will fail to compile.ns_postconditionmacrons_preconditionmacronsacstringthe nsacstring abstract class represents a character string composed of single-byte storage units.
IAccessible2
1.0 66 introduced gecko 1.9 inherits from: iaccessible last changed in gecko 1.9 (firefox 3)
method overview [propget] hresult attributes([out] bstr attributes ); [propget] hresult extendedrole([out] bstr extendedrole ); [propget] hresult extendedstates([in] long maxextendedstates, [out, size_is(,maxextendedstates), length_is(, nextendedstates)] bstr extendedstates, [out] long nextendedstates ); [propget] hresult groupposition([out] long grouplevel, [out] long similaritemsingroup, [out] long positioningroup ); [propget] hresult indexinparent([out] long indexinparent ); [propget] hresult locale([out] ia2locale locale ); [propget] hresult localizedextendedrole([ou...
...n relations, [out] long nrelations ); hresult role([out] long role ); hresult scrollto([in] enum ia2scrolltype scrolltype ); hresult scrolltopoint([in] enum ia2coordinatetype coordinatetype, [in] long x, [in] long y ); [propget] hresult states([out] accessiblestates states ); [propget] hresult uniqueid([out] long uniqueid ); [propget] hresult windowhandle([out] hwnd windowhandle );
methods attributes() returns the attributes specific to this iaccessible2 object, such as a cell's formula.
IAccessibleTable
method overview [propget] hresult accessibleat([in] long row, [in] long column, [out] iunknown accessible ); [propget] hresult caption([out] iunknown accessible ); [propget] hresult childindex([in] long rowindex, [in] long columnindex, [out] long cellindex ); [propget] hresult columndescription([in] long column, [out] bstr description ); [propget] hresult columnextentat([in] long row, [in] lo...
...s, [out, size_is(,maxcolumns), length_is(, ncolumns)] long columns, [out] long ncolumns ); [propget] hresult selectedrows([in] long maxrows, [out, size_is(,maxrows), length_is(, nrows)] long rows, [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 accessibleat() returns the accessible object at the specified row and column in the table.
IAccessibleTable2
method overview [propget] hresult caption([out] iunknown accessible ); [propget] hresult cellat([in] long row, [in] long column, [out] iunknown cell ); [propget] hresult columndescription([in] long column, [out] bstr description ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult isrowselected([in] long row, [out] boolean isselected ); [prop...
...lectedcells ); [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() returns the caption for the table.
IAccessibleTableCell
1.0 66 introduced gecko 1.9.2 inherits from: iunknown last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0)
method overview [propget] hresult columnextent([out] long ncolumnsspanned ); [propget] hresult columnheadercells([out, size_is(, ncolumnheadercells,)] iunknown cellaccessibles, [out] long ncolumnheadercells ); [propget] hresult columnindex([out] long columnindex ); [propget] hresult isselected([out] boolean isselected ); [propget] hresult rowcolumnextents([out] long row, [out] long column, [out] long rowextents, [out] long columnextents, [out] boolean isselected ); [propget] hresult rowextent([out] lo...
...ng nrowsspanned ); [propget] hresult rowheadercells([out, size_is(, nrowheadercells,)] iunknown cellaccessibles, [out] long nrowheadercells ); [propget] hresult rowindex([out] long rowindex ); [propget] hresult table([out] iunknown table );
methods columnextent() returns the number of columns occupied by this cell accessible.
amIWebInstallInfo
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)
method overview void install(); attributes attribute type description installs nsivariant an array of addoninstall objects.
...
methods install() starts all installs.
amIWebInstallListener
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
method overview boolean onwebinstallblocked(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); void onwebinstalldisabled(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); boolean onwebinstallrequested(in nsidomwindow awindow, in nsiur...
...
methods onwebinstallblocked() called when the website is not allowed to directly prompt the user to install add-ons.
amIWebInstallPrompt
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
method overview void confirm(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindow.
...
methods confirm() gets a confirmation that the user wants to start the installs.
amIWebInstaller
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5)
method overview boolean installaddonsfromwebpage(in astring amimetype, in nsidomwindow awindow, in nsiuri areferer, [array, size_is(ainstallcount)] in wstring auris, [array, size_is(ainstallcount)] in wstring ahashes, [array, size_is(ainstallcount)] in wstring anames, [array, size_is(ainstallcount)] in wstring aicons, [optional] in amiinstallcallback acallback, [optional] in pruint32 ainstallcount); boolean isinstallenabled(in astring amimetype, in nsiuri areferer); note: prior ...
...
methods installaddonsfromwebpage() installs an array of add-ons at the request of a webpage.
nsIMicrosummaryObserver
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides
methods for observing changes to micrummaries.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3)
method overview void oncontentloaded(in nsimicrosummary microsummary); void onelementappended(in nsimicrosummary microsummary); void onerror(in nsimicrosummary microsummary);
methods oncontentloaded() called when an observed microsummary updates its content.
nsIMimeConverter
method overview string encodemimepartiistr(in string header, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize); string encodemimepartiistr_utf8(in autf8string header, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize); string decodemimeheadertocharptr(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); astring decodemimeheader(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); mimeen...
...coderdata *b64encoderinit(in mimeconverteroutputcallback output_fn, in void *closure); mimeencoderdata *qpencoderinit(in mimeconverteroutputcallback output_fn, in void *closure); void encoderdestroy(in mimeencoderdata *data, in boolean abort_p); long encoderwrite(in mimeencoderdata *data, in string buffer, in long size);
methods encodemimepartiistr() an variant of encodemimepartiistr_utf8() which treats the header as written in the given charset.
nsIMimeHeaders
as a service: var mimeheaders = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsimimeheaders);
method overview string extractheader([const] in string headername, in boolean getallofthem); void initialize([const] in string allheaders, in long allheaderssize); attributes attribute type description allheaders string read only.
...
methods extractheader() string extractheader( [const] in string headername, in boolean getallofthem ); parameters headername missing description getallofthem missing description return value missing description exceptions thrown missing exception missing description initialize() void initialize( [const] in string allheaders, in long allheaderssize ); parameters allheaders insert the complete message content allheaderssize length of the passed in content exceptions thrown missing exception missing description remarks see also ...
nsIMsgAccount
inherits from: nsisupports last changed in gecko 1.7
method overview void addidentity(in nsimsgidentity identity); void clearallvalues(); void init(); void removeidentity(in nsimsgidentity identity); astring tostring(); attributes attribute type description defaultidentity nsimsgidentity identities nsisupportsarray read only.
... outgoing identity list (array of nsimsgidentity's) incomingserver nsimsgincomingserver incoming server stuff key acstring internal key identifying itself
methods addidentity() adds a new identity to this account.
nsIMsgAccountManagerExtension
inherits from: nsisupports
method overview boolean showpanel(in nsimsgincomingserver server); attributes attribute type description name acstring name of the account manager extension.
...
methods showpanel() before displaying a panel in the account manager this
method is triggered.
nsIMsgCompFields
references char * replyto astring securityinfo nsisupports subject astring templatename astring temporaryfiles char * obsolete temporaryfiles obsolete, do not use anymore to astring usemultipartalternative prbool uuencodeattachments prbool
methods utility
methods prbool checkcharsetconversion ( out char * fallbackcharset ); nsimsgrecipientarray splitrecipients ( in prunichar * recipients, in prbool emailaddressonly ); void convertbodytoplaintext ( ); attachment handling
methods void addattachment ( in nsimsgattachment attachment ); void removeattachment ( in nsimsgattachment ...
...attachment ); void removeattachments ( ); header
methods void setheader(char* name, char* value); references this interface is the type of the following properties: nsimsgcompose.compfields, nsimsgcomposeparams.composefields this interface is passed as an argument to the following
methods: nsimsgcomposesecure.begincryptoencapsulation, nsimsgcomposesecure.requirescryptoencapsulation, nsimsgsend.createandsendmessage, nsimsgsend.sendmessagefile, nsismimejshelper.getnocertaddresses, nsismimejshelper.getrecipientcertsinfo ...
nsIMsgDBHdr
method overview astring getproperty(in string propertyname); void setproperty(in string propertyname, in astring propertystr); void setstringproperty(in string propertyname, in string propertyvalue); string getstringproperty(in string propertyname); unsigned long getuint32property(in string propertyname); void setuint32property(in string propertynam...
...(new in 3.1?)
methods getproperty() astring getproperty(in string propertyname); parameters propertyname the name of the property to retrieve.
nsIMsgFilterCustomAction
*/ attribute boolean allowduplicates; /* * the custom action itself * * generally for the apply
method, folder-based
methods give correct * results and are preferred if available.
... */ /** * apply the custom action to an array of messages * * @param msghdrs array of nsimsgdbhdr objects of messages * @param actionvalue user-set value to use in the action * @param copylistener calling
method (filtertype manual only) * @param filtertype type of filter being applied * @param msgwindow message window */ void apply(in nsiarray msghdrs /* nsimsgdbhdr array */, in autf8string actionvalue, in nsimsgcopyservicelistener copylistener, in nsmsgfiltertypetype filtertype, in nsimsgwindow msgwindow); /* does this actio...
nsIMsgHeaderParser
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) to create an instance, use: var msgheaderparser = components.classes["@mozilla.org/messenger/headerparser;1"] .createinstance(components.interfaces.nsimsgheaderparser);
method overview string extractheaderaddressmailboxes(in string line); void extractheaderaddressname(in string line, out string name); void extractheaderaddressnames(in string line, out string usernames); astring makefulladdress(in astring aname, in astring aaddress); string makefulladdressstring(in string aname, in string aaddress); wstring makeful...
...ing reformattedaddress); wstring reformatunquotedaddresses(in wstring line); void removeduplicateaddresses(in string addrs, in string other_addrs, in prbool removealiasestome, out string newaddress); string unquotephraseoraddr(in string line, in boolean preserveintegrity); wstring unquotephraseoraddrwstring(in wstring line, in boolean preserveintegrity);
methods extractheaderaddressmailboxes() given a string which contains a list of header addresses, returns a comma-separated list of just the 'mailbox' portions.
nsIMsgIdentity
inherits from: nsisupports
method overview void clearallvalues(); void copy(in nsimsgidentity identity); astring getunicharattribute(in string name); void setunicharattribute(in string name, in astring value); acstring getcharattribute(in string name); void setcharattribute(in string name, in acstring value); boolean getboolattribute(in string name); void setboolattribute(in string name, in boolean value); long getintattribute(in string name); void setintattribute(in str...
...
methods clearallvalues() note: this is really dangerous!
nsIMsgProtocolInfo
method overview long getdefaultserverport(in boolean issecure); attributes attribute type description candelete boolean true if an account of this type may be deleted.
...
methods getdefaultserverport() returns the default port for a connection to a server of this account type.
nsIMsgThread
inherits from: nsisupports
method overview void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean threadinthread, in nsidbchangeannouncer announcer); nsimsgdbhdr getchildat(in long index); nsmsgkey getchildkeyat(in long index); nsimsgdbhdr getchild(in nsmsgkey msgkey); nsimsgdbhdr getchildhdrat(in long index); nsimsgdbhdr getroothdr(out long index); void removechildat(in long index); void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); void markchildread(in boolean bread); nsimsgdbhdr getfirstunreadchild(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); ...
...
methods addchild() add a message to the thread.
nsIMsgWindow
method overview void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to send commands to the ui, such as clearmsgpane.
...
methods displayhtmlinmessagepane() loads the specified html in the message pane.
nsIMutableArray
any of these
methods may throw ns_error_out_of_memory when the array must grow to complete the call, but the allocation fails.
...
method overview void appendelement(in nsisupports element, in boolean weak); void clear(); void insertelementat(in nsisupports element, in unsigned long index, in boolean weak); void removeelementat(in unsigned long index); void replaceelementat(in nsisupports element, in unsigned long index, in boolean weak);
methods appendelement() append an element at the end of the array.
nsINavHistoryQueryResultNode
method overview void getqueries([optional] out unsigned long querycount, [retval,array,size_is(querycount)] out nsinavhistoryquery queries); attributes attribute type description folderitemid long long for both simple folder nodes and simple-folder-query nodes, this is set to the concrete itemid of the folder.
...
methods getqueries() returns the queries that build the node's children; only valid for result_type_query nodes.