Search completed in 0.85 seconds.
511 results for "Constants":
Your results are loading. Please wait...
WebGL constants - Web APIs
the webgl api provides several constants that are passed into or returned by functions.
... all constants are of type glenum.
... standard webgl constants are installed on the webglrenderingcontext and webgl2renderingcontext objects, so that you use them as gl.constant_name: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcontext('webgl'); gl.getparameter(gl.line_width); some constants are also provided by webgl extensions.
...And 25 more matches
Controlling multiple parameters with ConstantSourceNode - Web APIs
this article demonstrates how to use a constantsourcenode to link multiple parameters together so they share the same value, which can be changed by simply setting the value of the constantsourcenode.offset parameter.
... the solution is simple, and it involves using an audio node type which, at first glance, doesn't look all that useful: constantsourcenode.
...you simply need to create a constantsourcenode and connect it to all of the audioparams whose values should be linked to always match each other.
...And 10 more matches
ConstantSourceNode - Web APIs
the constantsourcenode interface—part of the web audio api—represents an audio source (based upon audioscheduledsourcenode) whose output is single unchanging value.
...in addition, it can be used like a constructible audioparam by automating the value of its offset or by connecting another node to it; see controlling multiple parameters with constantsourcenode.
... a constantsourcenode has no inputs and exactly one monaural (one-channel) output.
...And 8 more matches
JavaScript OS.Constants
javascript module os.constants contains operating system-specific constants.
... using os.constants from the main thread to initialize os.constants for use in the main thread, add the following snippet to your code: components.classes["@mozilla.org/net/osfileconstantsservice;1"].
... getservice(components.interfaces.nsiosfileconstantsservice).
...And 7 more matches
ConstantSourceNode() - Web APIs
the constantsourcenode() constructor creates a new constantsourcenode object instance, representing an audio source which constantly outputs samples whose values are always the same.
... syntax var constantsourcenode = new constantsourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with.
... options a constantsourceoptions dictionary object defining the properties you want the constantsourcenode to have: offset: a read-only audioparam specifying the constant value generated by the source.
...And 3 more matches
ConstantSourceNode.offset - Web APIs
the read-only offset property of the constantsourcenode interface returns a audioparam object indicating the numeric a-rate value which is always returned by the source when asked for the next sample.
...so you can change the value of offset by setting the value of constantsourcenode.offset.value: myconstantsourcenode.offset.value = newvalue; syntax let offsetparameter = constantaudionode.offset; let offset = constantsourcenode.offset.value; constantsourcenode.offset.value = newvalue; value an audioparam object indicating the a-rate value returned for every sample by this node.
... example this example shows how to set up a constantsourcenode so its offset is used as the input to a pair of gainnodes; this snippet is derived from the complete example you can find in controlling multiple parameters with constantsourcenode.
...And 3 more matches
BaseAudioContext.createConstantSource() - Web APIs
the createconstantsource() property of the baseaudiocontext interface creates a constantsourcenode object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value.
... syntax var constantsourcenode = audiocontext.createconstantsource() parameters none.
... returns a constantsourcenode instance.
...And 2 more matches
Constants - Plugins
plug-in version constants constant value description np_version_major 0 major version number; changes with major code release number.
... version feature constants npvers constant: version feature information value description npvers_has_streamoutput 8 streaming data.
Index
MozillaTechXPCOMIndex
see the role_* constants in roles documentation.
... 290 nsiaccessiblecoordinatetype accessibility, interfaces, interfaces:scriptable, xpcom, xpcom interface reference prior to gecko 1.9, these constants were implemented in nsiaccessibletext.
... 314 nsiaccessiblestates accessibility, interfaces, interfaces:scriptable, xpcom, xpcom interface reference prior to gecko 1.9, these constants were implemented in nsiaccessible.
...And 16 more matches
Index - Web APIs
WebAPIIndex
182 audioscheduledsourcenode.onended api, audio, audiobuffersourcenode, audioscheduledsourcenode, constantsourcenode, event handler, media, oscillatornode, property, web audio api, onended the onended event handler for the audioscheduledsourcenode interface specifies an eventhandler to be executed when the ended event occurs on the node.
... this event is sent to the node when the concrete interface (such as audiobuffersourcenode, oscillatornode, or constantsourcenode) determines that it has stopped playing.
... 234 baseaudiocontext.createconstantsource() api, audio, audiocontext, baseaudiocontext, constantsourcenode, media, method, createconstantsource the createconstantsource() property of the baseaudiocontext interface creates a constantsourcenode object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value.
...And 15 more matches
nsIDOMWindowUtils
values correspond to the ime_status_* constants defined below.
... constants constant value description modifier_alt 0x0001 getmodifierstate("alt") of the send event will return true if this is specified for amodifiers of send*event() except sendnative*event().
... using constants defined in nsidomnsevent.
...And 13 more matches
source-editor.jsm
constants preference name constants these constants define the names of preferences used by the source editor.
... 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.
... theme constants these constants are used to identify the available themes that can be used by the syntax highlighter.
...And 12 more matches
OS.File for the main thread
let sessionstore = os.path.join(os.constants.path.profiledir, "sessionstore.js"); // under linux, this is generally "$home/.firefox/profiles/$profilename/sessionstore.js" // under macos, this is generally "$home/library/application support/firefox/$profilename/sessionstore.js" // under windows, this is generally "%appdata%\local\temp\%profilename%"\sessionstore.js // etc.
... var writepath = os.path.join(os.constants.path.desktopdir, 'savedimage.png'); var promise = os.file.writeatomic(writepath, new uint8array(r.result), { tmppath: writepath + '.tmp' }); promise.then( function(aval) { console.log('successfully saved image to disk'); }, function(areason) { console.log('writeatomic failed for reason:...
... var pth = os.path.join(os.constants.path.desktopdir, 'app.txt'); os.file.open(pth, {write: true, append: true}).then(valopen => { console.log('valopen:', 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('v...
...And 9 more matches
Python binding for NSS
constants are all upper case with words seperated by underscores, they match the nss/nspr c api.
... enumerated constants used in the nss/nspr api's are available in the python module under the exact same name as they appear in the c header files of nss/nspr.
...`pip wheel -w dist .` the following constants were added: ssl.tls_aes_128_gcm_sha256 ssl.tls_aes_256_gcm_sha384 ssl.tls_chacha20_poly1305_sha256 release 1.0.0 release date 2016-09-01 scm tag pynss_release_1_0_0 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_1_0_0/src/ change log of...
...And 8 more matches
XPCOM reference
nsmsgnavigationtypethe nsmsgnavigationtype interface contains constants used for message navigation in thunderbird.
... for example to move forward a message, you would call:nsmsgsearchopvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl nsmsgviewcommandcheckstatethe nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird.
... it is (as far as i can tell) not currently used anywhere in thunderbird.nsmsgviewcommandtypethe nsmsgviewcommandtype interface contains constants used for commands in thunderbird.
...And 8 more matches
nsITextInputProcessor
constants constant value description attr_raw_clause 0x02 a clause attribute.
...must be one of attr_* constants.
... akeyflags optional see key_* constants.
...And 6 more matches
nsIAccessibleText
constants text offset constants constant value description text_offset_end_of_text -1 will be treated as the equal to the end of the text.
... text boundary constants constant value description boundary_char 0 boundary_word_start 1 boundary_word_end 2 boundary_sentence_start 3 do not use in new code.
... boundary_line_start 5 boundary_line_end 6 boundary_attribute_range 7 coordinate type constants obsolete since gecko 1.9 (firefox 3)this feature is obsolete.
...And 5 more matches
nsIAccessibleStates
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) prior to gecko 1.9, these constants were implemented in nsiaccessible.
... constants state constants msaa state flags - used for bitfield.
...(see nsiaccessiblerole.constants).
...And 4 more matches
nsIDocShell
types are defined in constants.
...valid states are defined in constants.
...valid states are defined in constants.
...And 4 more matches
nsINavHistoryQueryOptions
see query type constants for possible values.
... redirectsmode unsigned short specifies how to handle redirects; see redirects mode constants for details.
...see result type constants for possible values.
...And 4 more matches
Bootstrapped extensions - Archive of obsolete content
reason one of the reason constants, indicating why the extension is being started up.
... reason one of the reason constants, indicating why the extension is being shut down.
... reason one of the reason constants, indicating why the extension is being installed.
...And 3 more matches
Accessing the Windows Registry Using XPCOM
notice in the open() call that the root key to use is specified using the named constants available on the nsiwindowsregkey interface, in this case root_key_local_machine, which corresponds to hkey_local_machine in the windows registry.
... also notice that the path to the key has backslashes escaped, a necessity in javascript and c++ string constants.
...from javascript, you will want to use the named constants on the interface for this parameter.
...And 3 more matches
nsIApplicationCache
each entry in the cache can be marked with a set of types, specified in the constants section.
... constants constant value description item_manifest 1 this item is the application manifest.
...see constants for a list of types.
...And 3 more matches
nsINavBookmarkObserver
aitemtype the type of the item that is about to be removed; this is one of the nsinavbookmarksservice.type constants.
...this should be one of the nsinavbookmarksservice.type constants.
...this should be one of the nsinavbookmarksservice.type constants.
...And 3 more matches
nsIPermissionManager
constants permission type constants constant value description unknown_action 0 default permission when no entry is found for a host.
... permission expiration constants constant value description expire_never 0 permission never expires.
...see nsipermissionmanager.permission_type_constants.
...And 3 more matches
nsISmsRequestManager
rror); void notifynomessageinlist(in long arequestid); void notifyreadmessagelistfailed(in long arequestid, in long aerror); void notifysmsdeleted(in long arequestid, in bool adeleted); void notifysmsdeletefailed(in long arequestid, in long aerror); void notifysmssendfailed(in long arequestid, in long aerror); void notifysmssent(in long arequestid, in nsidommozsmsmessage amessage); constants all sms related errors that could apply to smsrequest objects.
...see constants.
...see constants.
...And 3 more matches
RTCPeerConnection - Web APIs
constants rtcbundlepolicy enum the rtcbundlepolicy enum defines string constants which are used to request a specific policy for gathering ice candidates if the remote peer isn't "bundle-aware" (compatible with the sdp bundle standard for bundling multiple media streams on a single transport link).
... rtciceconnectionstate enum the rtciceconnectionstate enum defines the string constants used to describe the current state of the ice agent and its connection to the ice server (that is, the stun or turn server).
... rtcicegatheringstate enum the rtcicegatheringstate enum defines string constants which reflect the current status of ice gathering, as returned using the rtcpeerconnection.icegatheringstate property.
...And 3 more matches
confirm - Archive of obsolete content
the value is calculated by multiplying the corresponding button position constant with a button title constant for each button, then adding the results and any additional options (see other constants).
... button position constants button_pos_0: the first logical button button_pos_1: the second logical button button_pos_2: the third logical button button title constants button_title_ok: an 'ok' button button_title_cancel: a 'cancel' button button_title_yes: a 'yes' button button_title_no: a 'no' button button_title_save: a 'save' button button_title_dont_save: a 'don't save' button button_title_revert: a 'revert' button button_title_is_string: custom title specified by the corresponding abuttonxtitle parameter other constants button_pos_0_default: specifies button 0 as the default button.
... std_ok_cancel_buttons: use this instead of the constants above to have standard 'ok' and 'cancel' buttons.
...And 2 more matches
A first splash into JavaScript - Learn web development
r(math.random() * 100) + 1; const guesses = document.queryselector('.guesses'); const lastresult = document.queryselector('.lastresult'); const loworhi = document.queryselector('.loworhi'); const guesssubmit = document.queryselector('.guesssubmit'); const guessfield = document.queryselector('.guessfield'); let guesscount = 1; let resetbutton; this section of the code sets up the variables and constants we need to store the data our program will use.
...constants are used to store values that are immutable or can't be changed and are created with the keyword const.
... in this case, we are using constants to store references to parts of our user interface; the text inside some of them might change, but the html elements referenced stay the same.
...And 2 more matches
nsIFilePicker
constants mode constants these constants are used to specify the type of file picker to create when calling init().
... return value constants these values are returned by show() or passed as an argument to open()'s callback, indicating the result of the file picker activity.
... constant value description returnok 0 the file picker dialog was closed by the user hitting 'ok' returncancel 1 the file picker dialog was closed by the user hitting 'cancel' returnreplace 2 the user chose an existing file and acknowledged that they want to overwrite the file filter constants these constants are used to create filters for commonly-used file types.
...And 2 more matches
nsIHttpActivityObserver
constants activity type constants constant value description activity_type_socket_transport 0x0001 socket transport activity has occurred.
... activity subtype constants constant value description activity_subtype_request_header 0x5001 the http request is about to be queued for sending.
...aactivitytype the type of activity that occurred; this will be one of the values specified in activity type constants.
...And 2 more matches
nsIScreen
rotation unsigned long the screen's current rotation; you may set this to any of the values listed in screen rotation constants.
... constants screen brightness constants constant value description brightness_dim 0 the screen is fully dimmed (that is, off).
... screen rotation constants requires gecko 13.0(firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) constant value description rotation_0_deg 0 0° of rotation (that is, no rotation, or default orientation).
...And 2 more matches
nsISocketTransport
see connection flag constants for more details.
... constants timeout type this constants are used by gettransport() and settransport() to specify socket timeouts constant value description timeout_connect 0 connecting timeout.
... nsitransporteventsink status codes note: although these constants look like xpcom error codes and are passed in an nsresult variable, they are not error codes.
...And 2 more matches
nsITimer
must be one of the constants defined under constants on this page.
... constants constant value description type_one_shot 0 type of a timer that fires once only.
...must be one of the constants defined under constants on this page.
...And 2 more matches
nsIWindowsRegKey
constants root key constants the values for these keys correspond to the values from winreg.h in the ms platform sdk.
... 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.
..._keys 0x00000008 access_notify 0x00000010 access_read access_basic | access_query_value | access_enumerate_sub_keys | access_notify access_write access_basic | access_set_value | access_create_sub_key access_all access_read | access_write wow64_32 0x00000200 wow64_64 0x00000100 type constants values for the type of a registry value.
...And 2 more matches
nsIZipWriter
constants constant value description compression_none 0 do not compress the file.
... acompression one of the compression constants, indicating the compression method to use.
...(a forward slash is '/') acompression one of the compression constants, indicating the compression method to use.
...And 2 more matches
XPIDL
interfaces may furthermore contain typedefs, natives, methods, constants, or attributes.
... constants constants are technically legal at the top level, but xpidl i forbids them from being placed there; instead, they must be in an interface.
... the only constants supported are those which become integer types when compiled to source code; string constants and floating point constants, though parseable, cannot be made into a header or xpt file.
...And 2 more matches
CSSRule - Web APIs
WebAPICSSRule
there are several types of rules, listed in the type constants section below.
... cssrule.parentstylesheet read only returns the cssstylesheet object for the style sheet that contains this rule cssrule.type read only one of the type constants indicating the type of css rule.
... constants type constants the cssrule interface specifies integer constants that can be used in conjunction with a cssrule's type property to discern the rule type (and therefore, which specialized interface it implements).
...And 2 more matches
JavaScript Object Management - Archive of obsolete content
the 2 declared constants above are used to reduce code size.
... we frequently need to use xpcom components in our code, so instead of doing this: this.obsservice = components.classes["@mozilla.org/observer-service;1"].getservice(components.interfaces.nsiobserverservice); it's better to do this: this.obsservice = cc["@mozilla.org/observer-service;1"].getservice(ci.nsiobserverservice); these 2 constants don't need to be defined in the overlay because they are already defined globally in the browser.js file in firefox.
... we only need to define them when we're making windows of our own, or when we're working with code outside of the chrome (or porting your code to seamonkey, which doesn't have those constants declared in the main window).
... include the cc and ci constants in all xul windows that are not overlays, all jsm files, and all xpcom components (see further ahead).
Gecko info for Windows accessibility vendors
please let us know if you find any differences not listed here: accessible relations are supported the accnavigate() method can be used with new constants defined for gecko.
...epth first search order if the current item matches your criteria, then return current_item if the current_item == start_item, return null (no item found) if the end has been reached, go back to the start if wrapping is desired, otherwise return null (no item found) go to step 2 checkable, required and invalid states are supported gecko defines three state constants using previously unused states: const unsigned long state_checkable = state_marqueed; // useful on menuitem, listitem // and treeitem.
...it will also create isimpledomnode_i.c and isimpledomdocument_i.c, which contain the necessary iid constants.
... hresult get_language([out, retval] bstr *language); please look at the isimpledomnode.idl file for parameter types and the definitions of the node type constants.
FileUtils.jsm
); nsifileoutputstream openfileoutputstream(nsifile file, int modeflags); nsifileoutputstream openatomicfileoutputstream(nsifile file, int modeflags); nsifileoutputstream opensafefileoutputstream(nsifile file, int modeflags); void closeatomicfileoutputstream(nsifileoutputstream stream); void closesafefileoutputstream(nsifileoutputstream stream); constants constant value description mode_rdonly 0x01 corresponds to the pr_rdonly parameter to pr_open mode_wronly 0x02 corresponds to the pr_wronly parameter to pr_open mode_create 0x08 corresponds to the pr_create_file parameter to pr_open mode_append 0x10 corresponds to the pr_append parameter to pr_open mode_truncate ...
... modeflags optional file open flags (see constants above) return value returns nsifileoutputstream (the non-safe variant) to write to.
... modeflags optional file open flags (see constants above) return value returns nsifileoutputstream (the safe variant) to write to.
... modeflags optional file open flags (see constants above) return value returns nsifileoutputstream (the safe variant) to write to.
NSPR API Reference
ode nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities controlling per-thread private data interrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock ...
... offset interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o functions socket manipulation functions converting between host and network addresses memory-mapped i/o functions anonymous pipe function polling functions pollable events manipulating layers network addresses network address types and constants network address functions atomic operations pr_atomicincrement pr_atomicdecrement pr_atomicset interval timing interval time type and constants interval functions date and time types and constants time parameter callback functions functions memory management operations memory allocation functions memory allocation macros string operations pl_strlen pl_strcpy pl_s...
...pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program platform notes dynamic library search path exporting symbols from the main executable program process management and interprocess communication process management types and constants prprocess prprocessattr process management functions setting the attributes of a new process creating and managing processes multiwait receive system information and environment variables logging conditional compilation and execution log types and variables prlogmoduleinfo prlogmodulelevel nspr_log_modules nspr_log_file logging functions ...
...e instrumentation counters named shared memory shared memory protocol named shared memory functions anonymous shared memory anonymous memory protocol anonymous shared memory functions ipc semaphores ipc semaphore functions thread pools thread pool types thread pool functions random number generator random number generator function hash tables hash tables and type constants hash table functions nspr error handling error type error functions error codes ...
Index
81 js::truehandlevalue jsapi reference, reference, référence(2), spidermonkey js::truehandlevalue and js::falsehandlevalue are js::handlevalue constants that represent the javascript values true and false.
...its value is the logical or of zero or more of the following constants: 93 jsconstdoublespec jsapi reference, spidermonkey jsconstdoublespecs is used to define a set of double values that are assigned as properties to an object using js_defineconstdoubles.
... 177 jsval_true jsapi reference, obsolete, spidermonkey jsval_true and jsval_false are jsval constants that represent the javascript boolean values, true and false.
...the result is one of the jsversion constants.
nsIAccessibleProvider
see constants for details.
... constants common use constants constant value description noaccessible 0 do not create an accessible for this object this is useful if an ancestor binding already implements nsiaccessibleprovider, but no accessible is desired for the inheriting binding.
... xul controls constants constant value description xulalert 0x00001001 xulbutton 0x00001002 xulcheckbox 0x00001003 xulcolorpicker 0x00001004 xulcolorpickertile 0x00001005 xulcombobox 0x00001006 xuldropmarker 0x00001007 xulgroupbox 0x00001008 xulimage 0x00001009 xullink 0x0000100a xullistbox 0x0000100b xullistcell 0x00001026 xullisthead 0x00001024 xullistheader 0x00001025 xullistitem 0x0000100c xulmenubar 0x0000100d xulmenuitem 0x0000100e xulmenupopup 0x0000100f xulmenuseparator 0x00001010 xulpane 0x00001011 xulprogressmeter 0x00001012 xulscale 0x00001013 xulstatusbar 0...
... xultext 0x0000101a xultextbox 0x0000101b xulthumb 0x0000101c xultree 0x0000101d xultreecolumns 0x0000101e xultreecolumnitem 0x0000101f xultoolbar 0x00001020 xultoolbarseparator 0x00001021 xultooltip 0x00001022 xultoolbarbutton 0x00001023 xforms elements constants constant value description xformscontainer 0x00002000 used for xforms elements that provide accessible object for itself as well for anonymous content.
nsIAuthPrompt
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, in wstring passwordrealm, in pruint32 savepassword, inout wstring user, inout wstring pwd); constants constant value description save_password_never 0 never saves the password.
...one of the save_password_* constants defaulttext the default text for the text input dialog box.
...one of the save_password_* constants pwd the password entered by the user if ok was selected.
...one of the save_password_* constants user the username entered in the dialog.
nsIMemoryReporter
kind print32 the memory kind, one of the memory reporter kind constants below.
... units print32 the units used by the amount attribute; this will be one of the unit type constants.
... constants memory reporter kind constants these allocation kind constants describe the types of memory allocation described by memory use reporters.
... unit type constants requires gecko 7.0(firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) the amount reported by a memory reporter may use one of the following units.
nsIMessenger
constants name value description eunknown 0 unknown transaction type.
...see #constants for available types.
...available types are defined as constants in nsimessenger.
...see #constants for available types.
nsIScriptError
flags pruint32 flags; see flag constants for a list.
... flag constants constant value description errorflag 0x0 error messages.
... flags one of flags listed in flag constants.
... flags one of the script error flag constants category a string indicating what kind of code caused the message.
nsISelectionPrivate
interlineposition boolean type short returns the type of the selection (see nsiselectioncontroller for available constants).
... 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().
... long gettableselectiontype( in nsidomrange range ); parameters range return value one of tableselection_* constants.
... void scrollintoview( in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent ); parameters aregion the region inside the selection to scroll into view (see selection region constants defined in nsiselectioncontroller).
nsIStyleSheetService
ozilla.org/content/style-sheet-service;1"] .getservice(components.interfaces.nsistylesheetservice); method overview void loadandregistersheet(in nsiuri sheeturi, in unsigned long type); boolean sheetregistered(in nsiuri sheeturi, in unsigned long type); void unregistersheet(in nsiuri sheeturi, in unsigned long type); constants constant value description agent_sheet 0 user_sheet 1 author_sheet 2 methods loadandregistersheet() synchronously loads a style sheet from sheeturi and adds it to the list of user or agent style sheets.
... type one of the type constants.
... type one of the type constants.
... type one of the type constants.
nsITreeView
constants constant value description progress_normal 1 note: renamed from progressnormal in gecko 1.8 progress_undetermined 2 note: renamed from progressundetermined in gecko 1.8 progress_none 3 note: renamed from progressnone in gecko 1.8 drop_before -1 drop_on 0 drop_after 1...
...defined in constants.
...defined in constants.
...see the constants section for possible modes.
nsIUpdateItem
constants item type constants constants representing types of update checks.
... constants that callers can use to indicate the reason for an add-on update check.
... internal code uses other constants in nsextensionmanager.js.in.
... type the type of item; see item type constants.
SVGLength - Web APIs
WebAPISVGLength
ace 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_exs = 4 svg_lengthtype_px = 5 svg_lengthtype_cm = 6 svg_lengthtype_mm = 7 svg_lengthtype_in = 8 svg_lengthtype_pt = 9 svg_lengthtype_pc = 10 normative document svg 1.1 (2nd edition) exam...
..."green" stroke="black" stroke-width="1" width="1cm" height="1cm" /> </svg> results on a desktop monitor (pixel units will be dpi-dependent): value: 37.7952766418457, valueinspecifiedunits: 6: 1, valueasstring: 1cm value: 26.66666603088379, valueinspecifiedunits 9: 20, valueasstring: 20pt value: 26.66666603088379, valueinspecifiedunits 8: 0.277777761220932, valueasstring: 0.277778in constants name value description svg_lengthtype_unknown 0 the unit type is not one of predefined unit types.
... properties name type description unittype unsigned short the type of the value as specified by one of the svg_lengthtype_* constants defined on this interface.
... exceptions: a domexception with code not_supported_err is raised if unittype is svg_lengthtype_unknown or not a valid unit type constant (one of the other svg_lengthtype_* constants defined on this interface).
SVGPreserveAspectRatio - Web APIs
interface overview also implement none methods none properties unsigned short align unsigned short meetorslice constants svg_preserveaspectratio_unknown = 0 svg_preserveaspectratio_none = 1 svg_preserveaspectratio_xminymin = 2 svg_preserveaspectratio_xmidymin = 3 svg_preserveaspectratio_xmaxymin = 4 svg_preserveaspectratio_xminymid = 5 svg_preserveaspectratio_xmidymid = 6 svg_preserveaspectratio_xmaxymid = 7 svg_preserveaspectratio_xminymax = 8 svg_preserve...
...aspectratio_xmidymax = 9 svg_preserveaspectratio_xmaxymax = 10 svg_meetorslice_unknown = 0 svg_meetorslice_meet = 1 svg_meetorslice_slice = 2 normative document svg 1.1 (2nd edition) constants name value description svg_preserveaspectratio_unknown 0 the enumeration was set to a value that is not one of predefined types.
... properties name type description align unsigned short the type of the alignment value as specified by one of the svg_preserveaspectratio_* constants defined on this interface.
... meetorslice unsigned short the type of the meet-or-slice value as specified by one of the svg_meetorslice_* constants defined on this interface.
Movement, orientation, and motion: A WebXR example - Web APIs
options this example has a number of options you can configure by adjusting the values of constants before you load it in the browser.
... setup and utility functions next, we declare the variables and constants used throughout the application, starting with those used to store webgl and webxr specific information: let polyfill = null; let xrsession = null; let xrinputsources = null; let xrreferencespace = null; let xrbutton = null; let gl = null; let animationframerequestid = 0; let shaderprogram = null; let programinfo = null; let buffers = null; let texture = null; let mouseyaw = 0; let mousepitch = ...
...0; this is followed by a set of constants, mostly to contain various vectors and matrices used while rendering the scene.
...these values are calculated as the number of radians of rotation to apply given the elapsed time and stored into the constants xrotationfortime, yrotationfortime, and zrotationfortime.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
msaa events cheat sheet for information on what each event does, see the msdn event constants page.
...dio buttons] event_object_locationchange event_object_namechange event_object_descriptionchange event_object_valuechange [important for sliders and progress meters] event_object_parentchange event_object_helpchange event_object_defactionchange event_object_acceleratorchange msaa states cheat sheet for information on what each state does, see the msdn state constants page.
...oicing state_focusable [important] state_selectable [important] state_linked [important] state_traversed [important] state_multiselectable [important] state_extselectable state_alert_low state_alert_medium state_alert_high state_protected [important] state_haspopup msaa roles cheat sheet for information on what each role does, see the msdn role constants page.
... role_spinbutton role_diagram role_animation role_equation role_buttondropdown role_buttonmenu role_buttondropdowngrid role_whitespace role_pagetablist [important] role_clock role_splitbutton role_ipaddress role_nothing msaa object identifiers cheat sheet for information on what each object identifier does, see the msdn object identifiers constants page.
XPCOM Objects - Archive of obsolete content
you can define numeric and boolean constants in idl files, but not string constants.
...you can access constants through a reference of the component, or directly from the interface: // these are equivalent.
... const class_id = components.id("{37ed5d2a-e223-4386-9854-b64fd38932bf}"); const class_name = "hello world counter"; const contract_id = "@xulschool.com/counter;1"; these constants are used at the bottom, in the component registration code.
Client-side storage - Learn web development
we'll start off by creating references to all the html features we need to manipulate in this example — we'll create them all as constants, as these references do not need to change in the lifecycle of the app.
... add the following lines to your javascript file: // create needed constants const rememberdiv = document.queryselector('.remember'); const forgetdiv = document.queryselector('.forget'); const form = document.queryselector('form'); const nameinput = document.queryselector('#entername'); const submitbtn = document.queryselector('#submitname'); const forgetbtn = document.queryselector('#forgetname'); const h1 = document.queryselector('h1'); const personalgreeting = document.queryselector('.personal-greeting'); next up, we need to include a small event listener to stop the form from actually submitting itself when the submit button is pressed, as this is not the behavior we want.
...the javascript file contains five declared constants containing references to the <ul> element the notes will be displayed in, the title and body <input> elements, the <form> itself, and the <button>.
Commenting IDL for better documentation
[scriptable, uuid(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)] interface nsicookiemonster : nsicookiefan { // cookie flavor constants /** * simple sugar cookie.
... */ const integer cookie_flavor_other = 0; // yumminess constants /** * the cookie is disgusting.
...must be one of the * cookie_flavor_* constants.
Performance
performance best practices declaring stateless functions once per process bad: // addon.js services.mm.loadframescript("framescript.js", true) // framescript.js const precomputedconstants = // ...
...and since frame scripts get evaluated for each tab this means new function objects get instantiated, new constants get computed, block scopes must be set up etc.
... better: addon.js as above // framescript.js components.utils.import("resource://my-addon/processmodule.jsm", {}).addframe(this) // processmodule.jsm const exported_symbols = ['addframe']; const precomputedconstants = // ...
Downloads.jsm
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.
... components.utils.import("resource://gre/modules/downloads.jsm"); components.utils.import("resource://gre/modules/osfile.jsm") components.utils.import("resource://gre/modules/task.jsm"); task.spawn(function () { yield downloads.fetch("http://www.mozilla.org/", os.path.join(os.constants.path.tmpdir, "example-download.html")); console.log("example-download.html has been downloaded."); }).then(null, components.utils.reporterror); observing downloads this example logs a message every time a change occurs in one of the global download lists.
...(downloads.all); let view = { ondownloadadded: download => console.log("added", download), ondownloadchanged: download => console.log("changed", download), ondownloadremoved: download => console.log("removed", download) }; yield list.addview(view); try { let download = yield downloads.createdownload({ source: "http://www.mozilla.org/", target: os.path.join(os.constants.path.tmpdir, "example-download.html"), }); list.add(download); try { download.start(); alert("now monitoring all downloads.
Examples
components.utils.import("resource://gre/modules/osfile.jsm") let path = os.path.join(os.constants.path.tmpdir, "file.txt"); let promise = os.file.exists(path); let newpromise = promise.then(function onfulfill(aexists) { if (aexists) { console.log("you have file.txt in your temporary directory."); } else { throw new error("you don't have file.txt in your temporary directory."); } }); // unexpected errors should always be reported at the end of a promise chain.
... components.utils.import("resource://gre/modules/osfile.jsm") let path = os.path.join(os.constants.path.tmpdir, "file.txt"); let promise = os.file.exists(path); let newpromise = promise.then(function onfulfill(aexists) { if (aexists) { console.log("you have file.txt in your temporary directory."); } else { console.log("you don't have file.txt in your temporary directory."); } }); // unexpected errors should always be reported at the end of a promise chain.
... using a promise returned by a function (compact) the same code as the previous example is usually written with a more compact syntax: components.utils.import("resource://gre/modules/osfile.jsm") let path = os.path.join(os.constants.path.tmpdir, "file.txt"); os.file.exists(path).then(exists => { console.log(exists ?
Date and Time
nspr provides types and constants for both representations, and functions to convert time values between the two.
... macros for time unit conversion types and constants time parameter callback functions functions macros for time unit conversion macros for converting between seconds, milliseconds, microseconds, and nanoseconds.
... pr_msec_per_sec pr_usec_per_sec pr_nsec_per_sec pr_usec_per_msec pr_nsec_per_msec types and constants types and constants defined for nspr dates and times are: prtime prtimeparameters prexplodedtime time parameter callback functions in some geographic locations, use of daylight saving time (dst) and the rule for determining the dates on which dst starts and ends have changed a few times.
PRIntervalTime
the constants pr_interval_min and pr_interval_max define a range in ticks per second.
... these constants bound both the period and the resolution of a printervaltime object.
... the reserved constants pr_interval_no_wait and pr_interval_no_timeout have special meaning for nspr.
NSS Tools modutil
it is constructed as a bitwise or of the following constants.
...it is constructed as a bitwise or of the following constants.
...this string is a bitwise or of the following constants: user read: 0400 user write: 0200 user execute: 0100 group read: 0040 group write: 0020 group execute: 0010 other read: 0004 other write: 0002 other execute: 0001 some platforms may not understand these permissions.
SpiderMonkey Internals
contains well-known string constants, their atoms, the global atom hash table and related state, the js_atomize() function that turns a counted string of bytes into an atom, and literal pool (jsatommap) methods.
... jscpucfg.cpp this standalone program generates jscpucfg.h, a header file containing bytes per word and other constants that depend on cpu architecture and c compiler type model.
... it tries to discover most of these constants by running its own experiments on the build host, so if you are cross-compiling, beware.
JSVAL_TRUE
jsval constants that represent the javascript values true and false.
... syntax jsval_true jsval_false description jsval_true and jsval_false are jsval constants that represent the javascript boolean values, true and false.
... take care not to confuse the jsval constants jsval_true and jsval_false with the bool constants true and false.
Creating the Component Code
basic structure of the weblock component source weblock1.cpp that defines these classes and the code you need to create a basic component has the following structure: * required includes and constants * weblock: public iweblock * weblockfactory: public nsifactory * weblockmodule: public nsimodule in xpcom, all of these classes also derive from the nsisupports base interface.
... digging in: required includes and constants let's take a look at the first several lines of code in the component and discuss what they mean in xpcom.
... 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.
imgIContainer
constants constant value description type_raster 0 enumerated values for the 'type' attribute (below).
... flag_sync_decode 0x1 flag_decode_no_premultiply_alpha 0x2 flag_decode_no_colorspace_conversion 0x4 flag_clamp 0x8 frame_first 0 constants for specifying various "special" frames.
... frame_current 1 frame_max_value 1 knormalanimmode 0 animation mode constants 0 = normal 1 = do not animate 2 = loop once.
imgIEncoder
ut nsifile aimagefile); obsolete since gecko 1.9 void endimageencode(); void initfromdata([array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions); void startimageencode(in pruint32 width, in pruint32 height, in pruint32 inputformat, in astring outputoptions); constants possible values for input format (note that not all image formats support saving alpha channels): constant value description input_format_rgb 0 input is rgb each pixel is represented by three bytes: r, g, and b (in that order, regardless of host endianness) input_format_rgba 1 input is rgb each pixel is represented by four bytes: r, g, and b (in that order, regardless of host endianness)...
...inputformat one of input_format_* constants specifying the format of data.
...inputformat one of input_format_* constants specifying the format of data.
nsIAccessibleCoordinateType
accessible/public/nsiaccessibletypes.idlscriptable these constants define which coordinate system a point is located in.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) prior to gecko 1.9, these constants were implemented in nsiaccessibletext.
... constants constant value description coordtype_screen_relative 0x00 the coordinates are relative to the screen.
nsIAnnotationService
tions(in nsiuri asourceuri, in nsiuri adesturi, in boolean aoverwritedest); void copyitemannotations(in long long asourceitemid, in long long adestitemid, in boolean aoverwritedest); void addobserver(in nsiannotationobserver aobserver); void removeobserver(in nsiannotationobserver aobserver); nsiuri getannotationuri(in nsiuri auri, in autf8string aname); constants constant value description expire_session 0 for temporary data that can be discarded when the user exits.
... return value returns one of the type_* constants defined above.
... return value returns one of the type_* constants defined above.
nsIAuthPrompt2
-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 sent unencrypted.
... acallback acontext level one of the level constants.
... level one of the level constants.
nsIBlocklistService
igned long getaddonblockliststate(in jsval addon, [optional] in astring appversion, [optional] in astring toolkitversion); unsigned long getpluginblockliststate(in nsiplugintag plugin, [optional] in astring appversion, [optional] in astring toolkitversion); boolean isaddonblocklisted(in jsval addon, [optional] in astring appversion, [optional] in astring toolkitversion); constants constant value description state_not_blocked 0 state_softblocked 1 state_blocked 2 state_outdated 3 methods getaddonblockliststate() determine the blocklist state of an add-on.
... return value the blocklist state of the add-on, one of the constants.
... return value the blocklist state of the plugin, one of the constants.
nsIClassInfo
possible values for this attribute include a bit-wise combination of the constants read only.
...see nsiprogramminglanguage.constants for a list of possible values.
... constants bitflags for 'flags' attribute.
nsIDNSService
constants resolve flag constants various flags that may be ored together to form the aflags parameter passed to asyncresolve() and resolve().
... aflags a bitwise or of the resolve flag constants.
... aflags a bitwise or of the resolve flag constants.
nsIDOMSimpleGestureEvent
see direction constants and rotation constants on this page.
... constants direction constants constant value description direction_up 1 upward swipe.
... rotation constants constant value description rotation_counterclockwise 1 counter-clockwise rotation.
nsIDownloadProgressListener
see nsidownloadmanager.constants for a list of possible values.
...see nsidownloadmanager.constants for a list of possible values.
...this can also be one of the nsidownloadmanager.constants.
nsIHttpChannel
void setrequestheader(in acstring aheader, in acstring avalue, in boolean amerge); void setresponseheader(in acstring header, in acstring value, in boolean merge); void visitoriginalresponseheaders(in nsihttpheadervisitor avisitor); void visitrequestheaders(in nsihttpheadervisitor avisitor); void visitresponseheaders(in nsihttpheadervisitor avisitor); constants constant description referrer_policy_no_referrer_when_downgrade default; indicates not to pass on the referrer when downgrading from https to http referrer_policy_no_referrer indicates no referrer will be sent referrer_policy_origin only send the origin of the referring uri referrer_policy_origin_when_xorigin same as the default; only s...
... referrerpolicy read only unsigned long the referrer policy in use for this channel, indicated by one of the constants listed above methods getoriginalresponseheader() get the value of a particular original response header, that is, in the same form as it came from the network.
... setreferrerwithpolicy() call this method to set the channel's referrer using the referrer policy indicated with one of the predefined constants.
nsIMsgDBView
constants are defined in nsmsgviewtype.
... viewflags nsmsgviewflagstypevalue constants are defined in nsmsgviewflagstype.
... sortorder nsmsgviewsortordervalue readonly: constants are defined in nsmsgviewsortorder.
nsINavHistoryQuery
begintimereference long one of the constants time_relative_* which indicates how to interpret the corresponding begin time value.
... endtimereference long one of the constants time_relative_* which indicates how to interpret the corresponding end time value.
... constants constant value description time_relative_epoch 0 default value.
nsIPromptService
msg, inout boolean acheckstate); boolean promptpassword(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, inout wstring apassword, in wstring acheckmsg, inout boolean acheckstate); boolean select(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in pruint32 acount, [array, size_is(acount)] in wstring aselectlist, out long aoutselection); constants the following flags are combined to form the abuttonflags parameter passed to confirmex.
... all flags are defined as unsigned long constants and can be accessed as components.interfaces.nsipromptservice.flagname from javascript and as nsipromptservice::flagname from c++.
...use this for labels that don't match one of the constants above.
nsISelectionController
constants selection constants constant gecko version description 1.7 - 1.9 1.9.1 - 1.9.2 2.0 selection_none 0 selection_normal 1 selection_spellcheck 2 selection_ime_rawinput 4 selection_ime_selectedrawtext 8 ...
... selection_on 2 selection_disabled 3 selection_attention 4 scroll constants constant value description scroll_synchronous 1<<1 if set scrolls the selection into view before returning.
...(selectionregion) flags one of the scroll_* constants.
nsISocketProvider
constants constant value description proxy_resolves_host 1 << 0 this flag is set if the proxy is to perform hostname resolution instead of the client.
... aflags control flags that govern this connection (see constants).
... aflags control flags that govern this connection (see constants) afiledesc the resulting prfiledesc.
nsIWindowMediator
constants constant value description zleveltop 1 send window to top.
... inposition requested position one of the zlevel constants.
... inposition requested position one of the zlevel constants.
nsMsgViewFlagsType
the nsmsgviewflagstype interface contains constants used for view flags in thunderbird.
...it is only used to store constants.
... for example, the 'unread only' view would use the flag: components.interfaces.nsmsgviewflagstype.kunreadonly constants name value description knone 0x0 kthreadeddisplay 0x1 kshowignored 0x8 kunreadonly 0x10 kexpandall 0x20 kgroupbysort 0x40 ...
nsMsgViewSortOrder
the nsmsgviewsortorder interface contains constants used for sort direction in thunderbird.
...it is only used to store constants.
... last changed in gecko 1.9 (firefox 3) constants name value description none 0 ascending 1 descending 2 ...
nsMsgViewSortType
the nsmsgviewsorttype interface contains constants used for sorting the thunderbird threadpane.
...it is only used to store constants.
... last changed in gecko 1.9 (firefox 3) constants name value description bynone 0x11 not sorted bydate 0x12 bysubject 0x13 byauthor 0x14 byid 0x15 bythread 0x16 bypriority 0x17 bystatus 0x18 bysize 0x19 byflagged 0x1a byunread 0x1b byrecipient 0x1c bylocation 0x1d bytags 0x1e byjunkstatus 0x1f byattachments 0x20 byaccount 0x21 bycustom 0x22 byreceived 0x23 ...
nsMsgViewType
the nsmsgviewtype interface contains constants used for views in thunderbird.
...it is only used to store constants.
... for example, to request the 'show all threads' view use the constant: components.interfaces.nsmsgviewtype.eshowallthreads constants name value description eshowallthreads 0 eshowthreadswithunread 2 eshowwatchedthreadswithunread 3 eshowquicksearchresults 4 eshowvirtualfolderresults 5 eshowsearch 6 ...
Working with ArrayBuffers
var lib; switch (os.constants.sys.name.tolowercase()) { case 'winnt': case 'winmo': case 'winnt': //windows lib = ctypes.open('msvcrt'); break; case 'darwin': // mac lib = ctypes.open('libc.dylib'); break; case 'freebsd': lib = ctypes.open('libc.so.7'); break; case 'openbsd': lib = ctypes.open('libc.so.61.0'); break; case 'android': ...
... break; case 'linux': lib = ctypes.open('libc.so.6'); break; case 'gnu/kfreebsd': lib = ctypes.open('libc.so.0.1'); break; default: //assume unix try { lib = ctypes.open(ctypes.libraryname('c')); } catch (ex) { throw new error('i dont know where to memcpy is defined on your operating system, "' + os.constants.sys.name + '"'); lib.close(); } } try { var memcpy = lib.declare('memcpy', os.constants.sys.name.tolowercase().indexof('win') == 0 ?
... ctypes.winapi_abi : ctypes.default_abi, ctypes.void_t, // return ctypes.void_t.ptr, // *dest ctypes.void_t.ptr, // *src ctypes.size_t // count ); } catch (ex) { throw new error('i dont know where to memcpy is defined on your operating system, "' + os.constants.sys.name + '"'); lib.close() } memcpy(myimgdat.data, pixelbuffer, myimgdat.data.length); // myimgdat.data.length is imgwidth * imgheight *4 because per pixel there is r, g, b, a numbers lib.close(); see also type conversion ...
FunctionType
ctype functiontype( abi, returntype[, argtype1, ...] ); parameters abi the abi type for the function; this is one of the abi constants.
...the equivalent c function type declaration would be: returntype (*) ([argtype1, ..., argtypen]); exceptions thrown typeerror abi is not a valid abi constants, or returntype or any of the argument types are not valid ctype objects.
... properties property type description abi one of the abi constants the abi of the function.
IDBCursor - Web APIs
WebAPIIDBCursor
see constants for possible values.
... constants these constants are no longer available — they were removed in gecko 25.
... you should use the string constants directly instead.
IDBTransaction - Web APIs
mode constants these constants are no longer available — they were removed in gecko 25.
... you should use the string constants directly instead.
...transactions in this mode are known as "upgrade transactions." even if these constants are now deprecated, you can still use them to provide backward compatibility if required (in chrome the change was made in version 21).
KeyboardEvent - Web APIs
constants the keyboardevent interface defines the following constants.
... keyboard locations the following constants identify which part of the keyboard the key event originates from.
...a list of the constants identifying the locations is shown above in keyboard locations.
Node.nodeType - Web APIs
WebAPINodenodeType
possible values are listed in node type constants.
... constants node type constants constant value description node.element_node 1 an element node like <p> or <div>.
... deprecated node type constants the following constants have been deprecated and should not be used anymore.
RTCConfiguration - Web APIs
constants rtcbundlepolicy enum the rtcbundlepolicy enum defines string constants which are used to request a specific policy for gathering ice candidates if the remote peer isn't "bundle-aware" (compatible with the sdp bundle standard for bundling multiple media streams on a single transport link).
... rtcicetransportpolicy enum the rtcicetransportpolicy enum defines string constants which can be used to limit the transport policies of the ice candidates to be considered during the connection process.
... rtcrtcpmuxpolicy enum the rtcrtcpmuxpolicy enum defines string constants which specify what ice candidates are gathered to support non-multiplexed rtcp.
SVGAngle - Web APIs
WebAPISVGAngle
constants svg_angletype_unknown some unknown type of value.
... properties unittype the type of the value as specified by one of the svg_angletype_* constants defined on this interface.
... exceptions: a domexception with code not_supported_err is raised if unittype is svg_angletype_unknown or not a valid unit type constant (one of the other svg_angletype_* constants defined on this interface).
SVGFEDisplacementMapElement - Web APIs
lacementmapelement" target="_top"><rect x="211" y="65" width="270" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="346" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfedisplacementmapelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_channel_unknown 0 the type is not one of predefined types.
...it takes one of the svg_channel_* constants defined on this interface.
...it takes one of the svg_channel_* constants defined on this interface.
SVGFETurbulenceElement - Web APIs
/svgfeturbulenceelement" target="_top"><rect x="261" y="65" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfeturbulenceelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants turbulence types name value description svg_turbulence_type_unknown 0 the type is not one of predefined types.
...it takes one of the svg_stitchtype_* constants defined on this interface.
...it takes one of the svg_turbulence_type_* constants defined on this interface.
SVGPathSeg - Web APIs
interface overview also implement none methods none properties unsigned short pathsegtype domstring pathsegtypeasletter constants pathseg_unknown = 0 pathseg_closepath = 1 pathseg_moveto_abs = 2 pathseg_moveto_rel = 3 pathseg_lineto_abs = 4 pathseg_lineto_rel = 5 pathseg_curveto_cubic_abs = 6 pathseg_curveto_cubic_rel = 7 pathseg_curveto_quadratic_abs = 8 pathseg_curveto_quadratic_re...
...bs = 14 pathseg_lineto_vertical_rel = 15 pathseg_curveto_cubic_smooth_abs = 16 pathseg_curveto_cubic_smooth_rel = 17 pathseg_curveto_quadratic_smooth_abs = 18 pathseg_curveto_quadratic_smooth_rel = 19 normative document svg 1.1 (2nd edition) constants name value description pathseg_unknown 0 the unit type is not one of predefined types.
... properties name type description pathsegtype unsigned short the type of the path segment as specified by one of the constants defined on this interface.
SVGTextPathElement - Web APIs
web/api/svgtextpathelement" 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.
...it takes one of the textpath_methodtype_* constants defined on this interface.
...it takes one of the textpath_spacingtype_* constants defined on this interface.
WebGLRenderingContext.stencilOp() - Web APIs
syntax void gl.stencilop(fail, zfail, zpass); parameters all three parameters accept all constants listed below.
... constants gl.keep keeps the current value.
... gl.enable(gl.stencil_test); gl.stencilop(gl.incr, gl.decr, gl.invert); to get the current information about stencil and depth pass or fail, query the following constants with getparameter().
WebGLRenderingContext.stencilOpSeparate() - Web APIs
syntax void gl.stencilopseparate(face, fail, zfail, zpass); parameters the fail, zfail and zpass parameters accept all constants listed below.
... constants gl.keep keeps the current value.
... gl.enable(gl.stencil_test); gl.stencilopseparate(gl.front, gl.incr, gl.decr, gl.invert); to get the current information about stencil and depth pass or fail, query the following constants with getparameter().
XPathResult.resultType - Web APIs
the read-only resulttype property of the xpathresult interface represents the type of the result, as defined by the type constants.
... syntax var resulttype = result.resulttype; return value an integer value representing the type of the result, as defined by the type constants.
... constants result type defined constant value description any_type 0 a result set containing whatever type naturally results from evaluation of the expression.
Grammar and types - JavaScript
constants you can create a read-only, named constant with the const keyword.
... the scope rules for constants are the same as those for let block-scope variables.
...for example: // this will cause an error function f() {}; const f = 5; // this will cause an error too function f() { const g = 5; var g; //statements } however, the properties of objects assigned to constants are not protected, so the following statement is executed without problems.
const - JavaScript
constants are block-scoped, much like variables defined using the let keyword.
...global constants do not become properties of the window object, unlike var variables.
... examples basic const usage constants can be declared with uppercase or lowercase, but a common convention is to use all-uppercase letters.
Introduction to using XPath in JavaScript - XPath
there is a section in the appendix which contains a full list of the available constants.
...xmldoc.documentelement : xmldoc.ownerdocument.documentelement); var personiterator = xmldoc.evaluate('//person', xmldoc, nsresolver, xpathresult.any_type, null ); note when the xpathresult object is not defined, the constants can be retrieved in privileged code using components.interfaces.nsidomxpathresult.any_type (ci.nsidomxpathresult).
...lver), one could obtain them as follows: var xpathels = 'someelements[@*[local-name() = "href" and namespace-uri() = "http://www.w3.org/1999/xlink"]]'; // grabs elements with any single attribute that has both the local name 'href' and the xlink namespace var thislevel = xml.evaluate(xpathels, xml, null, xpathresult.any_type, null); var thisitemel = thislevel.iteratenext(); xpathresult defined constants result type defined constant value description any_type 0 a result set containing whatever type naturally results from the evaluation of the expression.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
some of the constants are still useful though.
...#define appendascii(str) appendliteral(str) the internal api distinguishes between literals (which must be character constants) and ascii strings.
Intercepting Page Loads - Archive of obsolete content
for that, we recommend that you first read the documentation on nsiwebprogresslistener and the nsiwebprogress.constants (webprogress notify constants).
... in a nutshell, there are a lot of state and status changes going on when a page loads, and the notify constants allow you to filter out the events you don't need to listen to.
Drag and Drop - Archive of obsolete content
this should be set to one of the following constants, or several added together.
... dragaction set to the current action to be performed, which should be one or more of the constants described earlier.
Open and Save Dialogs - Archive of obsolete content
these modes are constants of the nsifilepicker interface.
...the function returns one of three constants: returnok - the user selected a file and pressed ok.
browser - Archive of obsolete content
it also contains the load constants used by reloadwithflags and loaduriwithflags.
...the flags listed below may be used, which are all constants of the webnavigation property (or the nsiwebnavigation interface).
tabbrowser - Archive of obsolete content
it also contains the load constants used by reloadwithflags and loaduriwithflags.
...the flags listed below may be used, which are all constants of the webnavigation property (or the nsiwebnavigation interface).
nsIContentPolicy - Archive of obsolete content
type, 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 nsisupports aextra, in nsiprincipal arequestprincipal); constants content types constant value description type_other 1 indicates content whose type is unknown, or is not interesting outside a limited use case.
...this will be one of the type_* constants.
NPN_Version - Archive of obsolete content
you can use npn_version() to inquire on version constants (npvers constants), which represent particular browser features.
...for a listing of version constants defined in the plug-in api, see version feature constants.
Storing the information you need — Variables - Learn web development
constants in javascript many programming languages have the concept of a constant — a value that once declared can't be changed.
... in the early days of javascript, constants didn't exist.
React interactivity: Editing, filtering, conditional rendering - Learn web development
{props.name}</span> </button> <button type="button" classname="btn btn__danger" onclick={() => props.deletetask(props.id)} > delete <span classname="visually-hidden">{props.name}</span> </button> </div> </div> ); we've now got the two different template structures — "edit" and "view" — defined inside two separate constants.
... beneath our previous addition, add the following — here we are using the object.keys() method to collect an array of filter_names: const filter_names = object.keys(filter_map); note: we are defining these constants outside our app() function because if they were defined inside it, they would be recalculated every time the <app /> component re-renders, and we don’t want that.
AddonManager
addonlistcallback() a callback that is passed an array of addons void addonlistcallback( in addon addons[] ) parameters addons the array of addons passed back from the asynchronous request constants addoninstall states constant description state_available an install that is waiting to be started.
... startup change types these constants represent the lists of types of changes that can occur to add-ons during startup; they're used with the getstartupchanges(), addstartupchange(), and removestartupchange() methods.
CustomizableUI.jsm
area constants attribute type description area_navbar string "nav-bar", a constant reference to the id of the navigation toolbar.
... widget constants provider_xul string "xul", a constant indicating an xul-type provider.
OS.File.Error
for more details, you may compare it with the error constants of os.constants.libc.e*.
...for more details, you may compare it with the error constants of os.constants.win.error_*.
PerfMeasurement.jsm
constants event mask constants these constants are used to construct the mask indicating which events you want to monitor.
...perfmeasurement( eventmask tomeasure ); parameters tomeasure a mask of all of the event types you want to record; see event mask constants for a list of values.
Network Addresses
network address types and constants network address functions the api described in this chapter recognizes the emergence of internet protocol version 6 (ipv6).
... network address types and constants prhostent prprotoent pr_netdb_buf_size network address functions initializing a network address pr_initializenetaddr facilitates the use of prnetaddr, the basic network address structure, in a polymorphic manner.
PR_Open
note: the constants pr_rdwr and friends are not in any interface (bug 433295).
... thus they cannot be used in javascript, you have to use the octal constants (see file i/o snippets).
Threads
threading types and constants threading functions a thread has a limited number of resources that it truly owns.
... threading types and constants prthread prthreadtype prthreadscope prthreadstate prthreadpriority prthreadprivatedtor threading functions most of the functions described here accept a pointer to the thread as an argument.
64-bit Compatibility
to insert constants, use lirwriter::insimmptr() for pointer types or lirwriter::insimmword() for integral types.
...tracemonkey uses this to decide whether arbitrary constants in lir are pointers or doubles.
Bytecode Descriptions
constants undefined stack: ⇒ undefined push undefined.
...format: jof_jump tableswitch operands: (int32_t defaultoffset, int32_t low, int32_t high, uint24_t firstresumeindex) stack: i ⇒ optimized switch-statement dispatch, used when all case labels are small integer constants.
JS::Value
the old jsval_is_* methods, jsval_* constants and *_to_jsval methods, and jsval_to_* methods are also deprecated; uses of each should be replaced with use of the corresponding val.is*(), *value(), and val.to*() methods.
... js type jsval type tests jsval constants and constructors jsval accessors null jsval_is_null(v) jsval_null undefined jsval_is_void(v) jsval_void boolean jsval_is_boolean(v) jsval_true, jsval_false, boolean_to_jsval(b) jsval_to_boolean(v) number jsval_is_number(v), jsval_is_int(v), jsval_is_double(v) jsval_zero, jsval_one, int_to_jsval(i), double_to_jsval(d) jsval_to_int(v), jsval_to_double(v) string jsval_is_string(v) string_to_jsval(str) jsval_to_string(v), js_getstringchars(str), js_getstringlength(str) object !jsval_is_primitive(v) object_to_jsval(obj) jsval_to_object(v) there was also a further method, jsval_is_object(v), which did not what you would expec...
JSAPI reference
y 24 js::falsevalue added in spidermonkey 24 js::numbervalue added in spidermonkey 24 js::int32value added in spidermonkey 24 js::doublevalue added in spidermonkey 24 js::float32value added in spidermonkey 24 js::stringvalue added in spidermonkey 24 js::objectvalue added in spidermonkey 24 js::objectornullvalue added in spidermonkey 24 js::symbolvalue added in spidermonkey 38 js::value constants: js::nullhandlevalue added in spidermonkey 24 js::undefinedhandlevalue added in spidermonkey 24 js::truehandlevalue added in spidermonkey 38 js::falsehandlevalue added in spidermonkey 38 jsval constants: jsval_null obsolete since jsapi 42 jsval_void obsolete since jsapi 42 jsval_true obsolete since jsapi 42 jsval_false obsolete since jsapi 42 jsval_zero obsolete since jsapi 42 jsv...
...spidermonkey 38 js_indextoid added in spidermonkey 17 js_charstoid added in spidermonkey 24 js::protokeytoid added in spidermonkey 38 js_isidentifier added in spidermonkey 17 struct jsidarray class js::autoidarray added in spidermonkey 17 js_idarraylength added in spidermonkey 17 js_idarrayget added in spidermonkey 17 js_destroyidarray js_getobjectid obsolete since jsapi 31 jsid constants: jsid_void jsid_voidhandle added in spidermonkey 31 jsid_empty jsid_emptyhandle added in spidermonkey 31 function for checking and converting the type of a jsid: jsid_is_zero jsid_is_void jsid_is_empty jsid_is_string jsid_to_string interned_string_to_jsid added in spidermonkey 38 jsid_to_flat_string added in spidermonkey 17 jsid_is_int jsid_to_int int_fits_in_jsid int_to_jsid...
Places utilities for JavaScript
global objects there are a few global objects and constants defined in utils.js.
...trecentfolderforfeeduri(nsiuri auri); nsinavhistoryresultnode geturlsforcontainernode(nsinavhistoryresultnode anode); void opencontainernodeintabs(nsinavhistoryresultnode anode, nsidomevent aevent); void openurinodesintabs(array nsinavhistoryresultnode anodes, nsidomevent aevent); void createmenuitemfornode(nsinavhistoryresultnode anode, acontainersmap); constants mimetypes type_x_moz_place_container type_x_moz_place_separator: "text/x-moz-place-separator", type_x_moz_place: "text/x-moz-place", type_x_moz_url: "text/x-moz-url", type_html: "text/html", type_unicode: "text/unicode", services there's easy access to some of the common services used in bookmarks or history navigation here.
Components.interfaces
accessing constants defined in an interface interface descriptions (cf.
... xpidl) may not only contain method declarations, but also constants.
inIDOMUtils
vepseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); astring rgbtocolorname(in octet ar, in octet ag, in octet ab); bool selectormatcheselement(in nsidomelement aelement, in nsidomcssstylerule arule, in unsigned long aselectorindex, [optional] in domstring apseudo); void setcontentstate(in nsidomelement aelement, in unsigned long long astate); constants constant value description exclude_shorthands (1<<0) include_aliases (1<<1) content state flags the content state flags are used in a bitmask.
...see constants.
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.
mozIStorageConnection
constants transaction execution time constants.
... void begintransactionas( in print32 transactiontype ); parameters transactiontype one of the transaction constants (mozistorageconnection.transaction_deferred, mozistorageconnection.transaction_immediate, mozistorageconnection.transaction_exclusive) clone() clones a database connection, optionally making the new connection read only.
mozIStorageError
result long one of the error code values listed under constants on this page.
... constants constant value description error 1 general sql error, or missing database ioerr 10 a disk i/o error occurred.
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.
... void handlecompletion( in unsigned short areason ); parameters areason the reason the statement stopped executing; see the list of possible values in the constants section.
mozIStorageValueArray
constants constant value description value_type_null 0 null data type.
... return value one of the constants mozistoragevaluearray.value_type_null, mozistoragevaluearray.value_type_integer, mozistoragevaluearray.value_type_float, mozistoragevaluearray.value_type_text, or mozistoragevaluearray.value_type_blob describing the type aindex is.
nsIAccessNode
void scrollto( in unsigned long ascrolltype ); parameters ascrolltype defines where the object should be placed on the screen (see nsiaccessiblescrolltype.constants for available constants).
... void scrolltopoint( in unsigned long acoordinatetype, in long ax, in long ay ); parameters acoordinatetype specifies whether the coordinates are relative to the screen or the parent object (for available constants refer to nsiaccessiblecoordinatetype.constants.
nsIAccessibleRelation
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: be carefull, do not change constants until atk has a structure to map gecko constants into atk constants.
... constants constant value description relation_nul 0x00 relation_controlled_by 0x01 some attribute of this object is affected by a target object.
nsIAccessibleScrollType
accessible/public/nsiaccessibletypes.idlscriptable these constants control the scrolling of an object or substring into a window.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) constants constant value description scroll_type_top_left 0x00 scroll the top left of the object or substring to the top left of the window (or as close as possible).
nsIAppShellService
obsolete since gecko 1.8 constants constant value description size_to_content -1 create a window, which will be initially invisible.
... void quit( in pruint32 aferocity ); parameters aferocity one of the e* constants.
nsIAppStartup
obsolete since gecko 1.9.1 constants the following flags may be passed as the amode parameter to the quit() method.
... void quit( in pruint32 amode ); parameters amode this parameter modifies how the application is shutdown, and it is constructed from the constants defined above.
nsIApplicationCacheNamespace
must be one or more of the constants defined under constants on this page.
... constants constant value description namespace_bypass 1 items matching this namespace can be fetched from the network when loading from this cache.
nsIAuthInformation
a bitwise or of the constants.
... constants constant value description auth_host 1 this dialog belongs to a network host.
nsIAuthModule
ame, 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 unsigned long aouttokenlength); constants constant value description req_default 0 default behavior.
...aserviceflags a bitwise-or of the req_ constants (pass req_default for default behavior).
nsIAuthPromptProvider
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getauthprompt(in pruint32 apromptreason, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result); constants constant value description prompt_normal 0 normal (non-proxy) prompt request.
...void getauthprompt( in pruint32 apromptreason, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result ); parameters apromptreason the reason for the authentication prompt, one of the prompt_* constants.
nsICache
the nsicache is a namespace for various cache constants.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports constants constant value description access_none 0 access granted - no descriptor is provided.
nsICommandLine
see state constants.
... constants state constants constant value description state_initial_launch 0 the first launch of the application instance.
nsICompositionStringSynthesizer
tring gecko 36 or later, you can use "compositioncommit": domwindowutils.sendcompositionevent("compositioncommit", "foo-bar-buzz", ""); method overview void appendclause(in unsigned long alength, in unsigned long aattribute); boolean dispatchevent(); void setcaret(in unsigned long aoffset, in unsigned long alength); void setstring(in astring astring); constants constant value description attr_raw_input 0x02 a clause attribute.
...must be one of attr_* constants.
nsICookieAcceptDialog
extensions/cookie/nsicookieacceptdialog.idlscriptable this interface holds some constants for the cookie accept dialog.
... inherits from: nsisupports last changed in gecko 1.7 constants constant value description accept_cookie 0 value for accepting a cookie object.
nsICryptoHash
o 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 init() method to indicate which hashing function to use.
...all of the available algorithms are specified as constants on the interface.
nsIDOMChromeWindow
title domstring obsolete since gecko 1.9.1 windowstate unsigned short returns current window state, the value is one of state_* constants.
... constants constant value description state_maximized 1 the window is maximized.
nsIDOMFileException
last changed in gecko 1.9 (firefox 3) attributes attribute type description code unsigned short the error code describing the error condition that took place; see the constants list for details.
... constants constant value description not_found_err 0 the specified file wasn't found.
nsIDOMGeoPositionError
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports attributes attribute type description code short numerical error code; see error constants for a complete list.
... error constants constant value description permission_denied 1 the user denied permission to retrieve location data.
nsIDOMOfflineResourceList
status unsigned short one of the application cache state constants indicating the status of the application cache.
... constants application cache state constants constant value description uncached 0 the object isn't associated with an application cache.
nsIDOMUserDataHandler
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.
...void handle( in unsigned short operation, in domstring key, in nsivariant data, in nsidomnode src, in nsidomnode dst ); parameters operation one of the node_* operation type constants from the above table.
nsIDOMXPathResult
resulttype unsigned short the type of result; can be any of the type constants except any_type.
... constants type constants constant value description any_type 0 used when evaluating an xpath expression; the evaluator will return the most appropriate type.
nsIDeviceMotionData
attributes attribute type description type unsigned long the type of motion data reported by this object; see motion type constants for possible values.
...constants motion type constants constant value description type_acceleration 0 the motion data describes device acceleration.
nsIDirIndex
type unsigned long the type of the entry; one of the type_* constants.
... constants constant value description type_unknown 0 the type is unknown.
nsIDownloadManagerUI
constants constant value description reason_user_interacted 0 when opening the download manager user interface, this value indicates that it's being done at the user's request.
... areason optional one of the reason constants indicating why the user interface should be displayed.
nsIFeed
see constants.
... constants constant value description type_feed 0 a standard text-based feed.
nsIFileOutputStream
inherits from: nsioutputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants behavior flag constants constant value description defer_open 1<<0 see the same constant in nsifileinputstream.
... behaviorflags flags specifying various behaviors of the class; see behavior flag constants above.
nsIFileView
constants constant value description sortname 0 sort by file name.
...void sort( in short sorttype, in boolean reversesort ); parameters sorttype one of the sort* constants.
nsIHapticFeedback
.getservice(components.interfaces.nsihapticfeedback); once you have the service, you can initiate haptic feedback (that is, cause the device to vibrate, if it's supported) by calling performsimpleaction(): hapticfeedback.performsimpleaction(components.interfaces.nsihapticfeedback.longpress); method overview void performsimpleaction(in long islongpress); constants press length constants constant value description shortpress 0 specify as the action type to perform a short vibration.
...see press length constants for permitted values.
nsIINIParserWriter
method overview void setstring(in autf8string asection, in autf8string akey, in autf8string avalue); void writefile([optional] in nsifile ainifile, [optional] in unsigned long aflags); constants file writing constants these constants are specified when calling writefile(), in order to change its behavior.
...see file writing constants for details on the permitted values.
nsINavBookmarksService
constants constant value description default_index -1 this is the default index; this value should be used for apis that allow passing in an index where the index is not known or is not required to be specified, such as when appending an item to a folder.
...the type is one of the type_* constants defined above.
nsINavHistoryContainerResultNode
this is one of the state constants.
... constants state constants constant value description state_closed 0 the container is closed.
nsINavHistoryObserver
void onpageexpired(in nsiuri auri, in prtime avisittime, in boolean awholeentry); obsolete since gecko 2.0 void ontitlechanged(in nsiuri auri, in astring apagetitle); void onvisit(in nsiuri auri, in long long avisitid, in prtime atime, in long long asessionid, in long long areferringid, in unsigned long atransitiontype, in acstring aguid, out unsigned long aadded); constants constant value description attribute_favicon 3 the page's favicon changed.
... atransitiontype the type of the item that is about to be removed; this is one of the nsinavbookmarksservice.constants defined in the nsinavbookmarksservice interface.
nsINavHistoryResultObserver
aoldstate the prior state of the node; this will be one of the nsinavhistorycontainerresultnode.state constants.
... anewstate the new state of the node; this is one of the nsinavhistorycontainerresultnode.state constants.
nsINetworkLinkService
linktype unsigned long the type of network connection, one of the link_type_* constants.
... constants constant value description link_type_unknown 0 we were unable to determine the network connection type.
nsIParentalControlsService
constants constant value description epclog_urivisit 1 this log entry type represents an access to web content.
...see the constants for allowed values.
nsIPermission
see nsipermissionmanager.permission_type_constants for allowed values.
...constants are defined in nsipermissionmanager.permission_expiration_constants.
nsIProfile
constants profile shutdown types constant value description shutdown_persist 0x00000001 when shutting down the profile, save all changes.
...void shutdowncurrentprofile( in unsigned long shutdowntype ); parameters shutdowntype the type of shutdown to perform; see shutdown type constants.
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.
...void seek( in long whence, in long long offset ); parameters whence specifies how to interpret the 'offset' parameter in setting the stream offset associated with the implementing stream, according to the table of constants above.
nsISelection2
void scrollintoview(in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent); attributes attribute type description type short returns the type of the selection (see nsiselectioncontroller for available constants).
... void scrollintoview( in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent ); parameters aregion the region inside the selection to scroll into view (see selection region constants defined in nsiselectioncontroller).
nsISessionStartup
to use this service, use: var sessionstartup = components.classes["@mozilla.org/browser/sessionstartup;1"] .getservice(components.interfaces.nsisessionstartup); method overview boolean dorestore(); attributes attribute type description sessiontype unsigned long the type of session being restored; this will be one of the session type constants.
... constants session type constants constant value description no_session 0 there's no data available from the previous session.
nsISound
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 receives email.
... void playeventsound( in unsigned long aeventid ); parameters aeventid an event id which is defined in the constants.
nsIStackFrame
language pruint32 see nsiprogramminglanguage for a list of language constants.
... languagename string see nsiprogramminglanguage for a list of language constants.
nsIStandardURL
obsolete since gecko 1.9 constants these constants describe how to normalize an url.
...void init( in unsigned long aurltype, in long adefaultport, in autf8string aspec, in string aorigincharset, in nsiuri abaseuri ); parameters aurltype one of the constants listed above.
nsITaskbarProgress
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 setprogressstate(in nstaskbarprogressstate state, in unsigned long long currentvalue optional, in unsigned long long maxvalue optional); constants constant value description state_no_progress 0 stop displaying progress on the taskbar button.
...void setprogressstate( in nstaskbarprogressstate state, in unsigned long long currentvalue, optional in unsigned long long maxvalue optional ); parameters state one of the state constants.
nsITreeColumn
type short the type of the column, see constants.
... constants constant value description type_text 1 text column type.
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.
...void stopchecking( in unsigned short duration ); parameters duration one of the constants indicating the set of updates to stop.
nsIWebNavigationInfo
d 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.
... return value returns one of the support type constants, indicating whether or not the specified mime type is supported, and in what form that support exists.
nsIWebPageDescriptor
constants display type constants constant value description display_as_source 0x0001 generates an optionally syntax-highlighted (for xml/html documents) source of the original page.
...adisplaytype the display type to use when displaying the loaded page; see display type constants for possible values.
nsIWindowsShellService
constants valid starting keys for the windows registry.
...string getregistryentry( in long ahkeyconstant, in string asubkeyname, in string avaluename ); parameters ahkeyconstant the starting key, using the constants defined above.
nsIXMLHttpRequest
the most obvious benefit is that we can set nsirequest - constants in the xhr.channel.loadflags.
...you only want this if your url is to a zip file or some file you want to download and make a nsiarraybufferinputstream out of it or something xhr.send(null); } xhr('https://www.gravatar.com/avatar/eb9895ade1bd6627e054429d1e18b576?s=24&d=identicon&r=pg&f=1', data => { services.prompt.alert(null, 'xhr success', data); var file = os.path.join(os.constants.path.desktopdir, "test.png"); var promised = os.file.writeatomic(file, new uint8array(data)); promised.then( function() { alert('succesfully saved image to desktop') }, function(ex) { alert('failed in saving image to desktop') } ); }); ...
nsIXULRuntime
returns one of process type constants.
... constants process type constants constant value description process_type_default 0 the default (chrome) process.
nsIXULWindow
zlevel unsigned long one of the z level constants below.
... constants constant value description lowestz 0 loweredz 4 the z level of an independent window opened with the "alwayslowered" chrome flag.
nsIXmlRpcClient
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.
... void createtype ( in unsigned long type, out nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result ) ; parameters type one of the listed constants.
nsMsgNavigationType
the nsmsgnavigationtype interface contains constants used for message navigation in thunderbird.
... last changed in gecko 1.9 (firefox 3) constants name value description firstmessage 1 go to the first message in the view.
nsMsgViewCommandCheckState
the nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird.
... last changed in gecko 1.9 (firefox 3) constants name value description notused 0 checked 1 unchecked 2 ...
nsMsgViewCommandType
the nsmsgviewcommandtype interface contains constants used for commands in thunderbird.
... last changed in gecko 1.9 (firefox 3) constants name value description markmessagesread 0 marks the selected messages as read.
Add to iPhoto
this extension uses a number of methods and data types, as well as constants, from three system frameworks.
... there are also a few constants used for the flags field in the lsapplicationparameters structure: this.klsrolesnone = 1; this.klsrolesviewer = 2; this.klsroleseditor = 4; this.klsrolesall = 0xffffffff; implementing the extension now that the mac os x apis we'll be using have been declared, we can write the core of the extension itself.
DevTools API - Firefox Developer Tools
the value is one of the toolbox.hosttype constants.
... constants the toolbox constructor contains following constant properties.
ANGLE_instanced_arrays - Web APIs
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.
EXT_blend_minmax - Web APIs
the constants in webgl2 are gl.min and gl.max.
... constants this extension adds two new constants, which can be used in webglrenderingcontext.blendequation() and webglrenderingcontext.blendequationseparate(): ext.min_ext produces the minimum color components of the source and destination colors.
EXT_sRGB - Web APIs
WebAPIEXT sRGB
the constants in webgl2 are: gl.srgb, gl.srgb8, gl.srgb8_alpha8 and gl.framebuffer_attachment_color_encoding.
... constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods.
EXT_texture_filter_anisotropic - Web APIs
the ext_texture_filter_anisotropic extension is part of the webgl api and exposes two constants for anisotropic filtering (af).
... constants ext.max_texture_max_anisotropy_ext this is the pname argument to the gl.getparameter() call, and it returns the maximum available anisotropy.
Event.eventPhase - Web APIs
WebAPIEventeventPhase
possible values are listed in event phase constants.
... constants event phase constants these values describe which phase the event flow is currently being evaluated.
IDBCursorSync - Web APIs
see constants for possible values.
... constants constant value description next 0 this cursor includes duplicates, and its direction is monotonically increasing in the order of keys.
IDBObjectStoreSync - Web APIs
for possible values, see constants.
... constants mode constants constant value description read_only 1 modification operations are not allowed on this object store.
Using IndexedDB - Web APIs
// moreover, you may need references to some window.idb* objects: window.idbtransaction = window.idbtransaction || window.webkitidbtransaction || window.msidbtransaction || {read_write: "readwrite"}; // this line should only be needed if it is needed to support the object's constants for older browsers window.idbkeyrange = window.idbkeyrange || window.webkitidbkeyrange || window.msidbkeyrange; // (mozilla has never prefixed these objects, so we don't need window.mozidb*) beware that implementations that use a prefix may be buggy, or incomplete, or following an old version of the specification.
... cursor.continue(); } }; please see "idbcursor constants" for the valid direction arguments.
MediaError.code - Web APIs
WebAPIMediaErrorcode
the possible values are described below, in media error code constants.
... media error code constants name value description media_err_aborted 1 the fetching of the associated resource was aborted by the user's request.
MouseEvent - Web APIs
mouseevent.mozinputsource read only the type of device that generated the event (one of the moz_source_* constants listed below).
... 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.
OES_vertex_array_object - Web APIs
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.
SVGComponentTransferFunctionElement - Web APIs
ionelement" target="_top"><rect x="131" y="65" width="350" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgcomponenttransferfunctionelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_fecomponenttransfer_type_unknown 0 the type is not one of predefined types.
...it takes one of the svg_fecomponenttransfer_type_* constants defined on this interface.
SVGFEBlendElement - Web APIs
cs/web/api/svgfeblendelement" target="_top"><rect x="311" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfeblendelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_feblend_mode_unknown 0 the type is not one of predefined types.
...it takes one of the svg_feblend_mode_* constants defined on this interface.
SVGFEColorMatrixElement - Web APIs
vgfecolormatrixelement" target="_top"><rect x="251" y="65" width="230" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="366" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfecolormatrixelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_fecolormatrix_type_unknown 0 the type is not one of predefined types.
...it takes one of the svg_fecolormatrix_type_* constants defined on this interface.
SVGFECompositeElement - Web APIs
pi/svgfecompositeelement" target="_top"><rect x="271" y="65" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfecompositeelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_fecomposite_operator_unknown 0 the type is not one of predefined types.
...it takes one of the svg_fecomposite_operator_* constants defined on this interface.
SVGFEConvolveMatrixElement - Web APIs
nvolvematrixelement" target="_top"><rect x="221" y="65" width="260" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="351" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfeconvolvematrixelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_edgemode_unknown 0 the type is not one of predefined types.
...takes one of the svg_edgemode_* constants defined on this interface.
SVGFEGaussianBlurElement - Web APIs
fegaussianblurelement" target="_top"><rect x="241" y="65" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="361" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfegaussianblurelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_edgemode_unknown 0 the type is not one of predefined types.
...takes one of the svg_edgemode_* constants defined on this interface.
SVGFEMorphologyElement - Web APIs
/svgfemorphologyelement" target="_top"><rect x="261" y="65" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfemorphologyelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_morphology_operator_unknown 0 the type is not one of predefined types.
...it takes one of the svg_morphology_operator_* constants defined on this interface.
SVGFilterElement - Web APIs
takes one of the constants defined in svgunittypes.
...takes one of the constants defined in svgunittypes.
SVGGradientElement - Web APIs
/web/api/svggradientelement" target="_top"><rect x="301" y="65" width="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_spreadmethod_unknown 0 the type is not one of predefined types.
...takes one of the constants defined in svgunittypes.
SVGMarkerElement - Web APIs
properties svganimatedlength refx svganimatedlength refy svganimatedenumeration markerunits svganimatedlength markerwidth svganimatedlength markerheight svganimatedenumeration orienttype svganimatedangle orientangle constants svg_marker_orient_unknown = 0 svg_marker_orient_auto = 1 svg_marker_orient_angle = 2 svg_markerunits_unknown = 0 svg_markerunits_userspaceonuse = 1 svg_markerunits_strokewidth = 2 normative document svg 1.1 (2nd editi...
...on) constants orientation name value description svg_marker_orient_unknown 0 the marker orientation is not one of predefined types.
SVGMaskElement - Web APIs
takes one of the constants defined in svgunittypes.
...takes one of the constants defined in svgunittypes.
SVGPatternElement - Web APIs
takes one of the constants defined in svgunittypes.
...takes one of the constants defined in svgunittypes.
SVGTransform - Web APIs
atrix(in svgmatrix matrix) void settranslate(in float tx, in float ty) void setscale(in float sx, in float sy) void setrotate(in float angle, in float cx, in float cy) void setskewx(in float angle) void setskewy(in float angle) properties readonly unsigned short type readonly float angle readonly svgmatrix matrix constants svg_transform_unknown = 0 svg_transform_matrix = 1 svg_transform_translate = 2 svg_transform_scale = 3 svg_transform_rotate = 4 svg_transform_skewx = 5 svg_transform_skewy = 6 normative document svg 1.1 (2nd edition) constants name value description svg_transform_unknown 0 the unit type is not o...
..._scale 3 a scale(…) transformation svg_transform_rotate 4 a rotate(…) transformation svg_transform_skewx 5 a skewx(…) transformation svg_transform_skewy 6 a skewy(…) transformation properties name type description type unsigned short the type of the value as specified by one of the svg_transform_* constants defined on this interface.
SVGUnitTypes - Web APIs
the svgunittypes interface defines a commonly used set of constants used for reflecting gradientunits, patterncontentunits and other similar attributes.
...link:href="/docs/web/api/svgunittypes" target="_top"><rect x="1" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="61" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgunittypes</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_unit_type_unknown 0 the type is not one of predefined types.
TextTrack.mode - Web APIs
WebAPITextTrackmode
the text track mode is one of the values listed below, under text track mode constants.
... text track mode constants the text track mode—sometimes identified using the idl enum texttrackmode—must be one of the following values: disabled the text track is currently disabled.
WEBGL_compressed_texture_astc - Web APIs
constants the compressed texture formats are exposed by 28 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
... constants blocks bits per pixel arraybuffer bytelength bytes if height and width are 512 ext.compressed_rgba_astc_4x4_khr ext.compressed_srgb8_alpha8_astc_4x4_khr 4x4 8.00 floor((width + 3) / 4) * floor((height + 3) / 4) * 16 262144 ext.compressed_rgba_astc_5x4_khr ext.compressed_srgb8_alpha8_astc_5x4_khr 5x4 6.40 floor((width + 4) / 5) * floor((height + 3) / 4) * 16 210944 ext.compressed_rgba_astc_5x5_khr ext.compressed_srgb8_alpha8_astc_5x5_khr 5x5 5.12 floor((width + 4) / 5) * floor((height + 4) / 5) * 16 169744 ext.compressed_rgba_astc_6x5_khr ext.compressed_srgb8_alpha8_astc_6x5_khr 6x5 4.27 floor((width + 5) / 6) * floor((height + 4) / 5) * 16 141728 ext.compre...
WEBGL_debug_renderer_info - Web APIs
the webgl_debug_renderer_info extension is part of the webgl api and exposes two constants with information about the graphics driver for debugging purposes.
... constants ext.unmasked_vendor_webgl vendor string of the graphics driver.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
note: when using webgl2, this method is available as gl.drawbuffers() by default and the constants are named gl.color_attachment1 etc.
... syntax void gl.getextension('webgl_draw_buffers').drawbufferswebgl(buffers); parameters buffers an array of glenum constants defining drawing buffers.
WEBGL_draw_buffers - Web APIs
in webgl 2, the constants are available without the "webgl" suffix and the new glsl built-ins require glsl #version 300 es.
... constants this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffertexture2d(), gl.getframebufferattachmentparameter() ext.drawbufferswebgl(), and gl.getparameter() methods.
WebGLRenderingContext.blendFunc() - Web APIs
constants the following constants can be used for sfactor and dfactor.
... gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
constants the following constants can be used for srcrgb, dstrgb, srcalpha, and dstalpha the formulas for the blending factors can be described like this (all rgba values are between 0 and 1): color(rgb) = (sourcecolor * srcrgb) + (destinationcolor * dstrgb) color(a) = (sourcealpha * srcalpha) + (destinationalpha * dstalpha) constant rgb factor alpha factor description ...
... gl.enable(gl.blend); gl.blendfuncseparate(gl.src_color, gl.dst_color, gl.one, gl.zero); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants.
WebXR performance guide - Web APIs
} } now, instead of allocating variables every loop iteration, we're using global constants(or class member constants).
... you can't accidentally delete the objects that contain your vectors and matrices, since they're constants.
Web audio spatialization basics - Web APIs
let's create constants that store the values we'll use for these parameters later on: const innercone = 60; const outercone = 90; const outergain = 0.3; the next parameter is distancemodel — this can only be set to linear, inverse, or exponential.
... let's set up a rotation rate, which we'll convert into a radian range value for use in math.sin and math.cos later, when we want to figure out the new coordinates when we're rotating our boombox: // set up rotation constants const rotationrate = 60; // bigger number equals slower sound rotation const q = math.pi/rotationrate; //rotation increment in radians we can also use this to work out degrees rotated, which will help with the css transforms we will have to create (note we need both an x and y-axis for the css transforms): // get degrees for css const degreesx = (q * 180)/math.pi; const degreesy = (q * 180)/m...
XPathException - Web APIs
properties xpathexception.code read only returns a short that contains one of the error code constants.
... constants constant value description invalid_expression_err 51 if the expression has a syntax error or otherwise is not a legal expression according to the rules of the specific xpathevaluator or contains specialized extension functions or variables not supported by this implementation.
XPathResult - Web APIs
xpathresult.resulttyperead only a number code representing the type of the result, as defined by the type constants.
... constants result type defined constant value description any_type 0 a result set containing whatever type naturally results from evaluation of the expression.
Numbers and dates - JavaScript
0xfffffffffffffffff // 295147905179352830000 0x123456789abcdef // 81985529216486900 0xa // 10 exponentiation 1e3 // 1000 2e6 // 2000000 0.1e2 // 10 number object the built-in number object has properties for numerical constants, such as maximum value, not-a-number, and infinity.
... math object the built-in math object has properties and methods for mathematical constants and functions.
Math - JavaScript
math is a built-in object that has properties and methods for mathematical constants and functions.
...constants are defined with the full precision of real numbers in javascript.
Values - MathML
mathml accepts different units and constants for specifying lengths.
... constants a replacement for the deprecated constants below is: veryverythinmathspace => 0.05555555555555555em verythinmathspace => 0.1111111111111111em thinmathspace => 0.16666666666666666em mediummathspace => 0.2222222222222222em thickmathspace => 0.2777777777777778em verythickmathspace => 0.3333333333333333em veryverythickmathspace => 0.3888888888888889em ...
MathML documentation index - MathML
WebMathMLIndex
mathml accepts different units and constants for specifying lengths.
... 17 <mi> mathml, mathml reference, mathml:element, mathml:token elements the mathml <mi> element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants.
system/runtime - Archive of obsolete content
processtype the type of the caller's process, which will be one of these constants: constant value description process_type_default 0 the default (chrome) process.
Finding window handles - Archive of obsolete content
.treeowner .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsibasewindow); var nswindowstring = basewindow.nativehandle; components.utils.import('resource://gre/modules/ctypes.jsm'); var objc = ctypes.open(ctypes.libraryname('objc')); // types let id = ctypes.voidptr_t; let sel = ctypes.voidptr_t; // constants let nil = ctypes.voidptr_t(0); //common functions let sel_registername = objc.declare('sel_registername', ctypes.default_abi, sel, ctypes.char.ptr); let objc_msgsend = objc.declare('objc_msgsend', ctypes.default_abi, id, id, sel, '...'); /* https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/nsapplication_class/index.html#//apple_ref/occ/instp/nsapplicat...
Forms related code snippets - Archive of obsolete content
similar to variables declared with the let statement, constants declared with const will be block-scoped.
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.
Extensions support in SeaMonkey 2 - Archive of obsolete content
seamonkey on the other hand defaults to not support them so they either need to be expanded to their proper forms or matching constants/variables need to be defined in custom code.
Index - Archive of obsolete content
in mozilla/seamonkey, these constants are defined as part of the xpinstall object (formerly the softwareupdate object in netscape communicator 4.5).
JXON - Archive of obsolete content
similar to variables declared with the let statement, constants declared with const will be block-scoped.
Dehydra Object Reference - Archive of obsolete content
.arguments array an array where arguments are either strings representing c++ constants or type objects.
The Download Manager schema - Archive of obsolete content
see the constants list in the nsidownloadmanager documentation.
compareTo - Archive of obsolete content
the following constants are defined and available for checking the value returned by compareto: installversion.major_diff installversion.minor_diff installversion.rel_diff installversion.bld_diff installversion.equal installversion.major_diff_minus installversion.minor_diff_minus installversion.rel_diff_minus installversion.bld_diff_minus example this code...
Return Codes - Archive of obsolete content
in mozilla/seamonkey, these constants are defined as part of the xpinstall object (formerly the softwareupdate object in netscape communicator 4.5).
checkState - Archive of obsolete content
constants for the possible values for this attribute are in the nsidomxulbuttonelement interface.
priority - Archive of obsolete content
should be one of the constants described in the notificationbox's appendnotification method.
reloadWithFlags - Archive of obsolete content
the flags listed below may be used, which are all constants of the webnavigation property (or the nsiwebnavigation interface).
Node - Archive of obsolete content
ArchiveMozillaXULNode
constants the nsidomnode interface is the primary datatype for the entire document object model.
webNavigation - Archive of obsolete content
it also contains the load constants used by reloadwithflags and loaduriwithflags.
Tree Widget Changes - Archive of obsolete content
the constants below have been changed, and their integer values are different: nsitreeview.indropbefore -> nsitreeview.drop_before (-1) nsitreeview.indropon -> nsitreeview.drop_on (0) nsitreeview.indropafter -> nsitreeview.drop_after (1) nsitreeview.progressnormal -> nsitreeview.progress_normal (1) nsitreeview.progressundeterm...
Keyboard Shortcuts - Archive of obsolete content
the keycode property holds the key code and may be compared to one of the constants from the key table earlier in this section.
button - Archive of obsolete content
constants for the possible values for this attribute are in the nsidomxulbuttonelement interface.
editor - Archive of obsolete content
it also contains the load constants used by reloadwithflags and loaduriwithflags.
iframe - Archive of obsolete content
it also contains the load constants used by reloadwithflags and loaduriwithflags.
notification - Archive of obsolete content
should be one of the constants described in the notificationbox's appendnotification method.
toolbarbutton - Archive of obsolete content
constants for the possible values for this attribute are in the nsidomxulbuttonelement interface.
Debug.msUpdateAsyncCallbackRelation - Archive of obsolete content
the possible values for relationtype include: debug.ms_async_callback_status_assign_delegate debug.ms_async_callback_status_join debug.ms_async_callback_status_chooseany debug.ms_async_callback_status_cancel debug.ms_async_callback_status_error for more information, see debug constants.
Debug - Archive of obsolete content
constants async callback status codes contant description value debug.ms_async_callback_status_assign_delegate the synchronous work item assigned a callback or continuation to be run by an asynchronous operation.
Constant - MDN Web Docs Glossary: Definitions of Web-related terms
like variables, some constants are bound to identifiers.
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
let sym = symbol("sym") alert(sym.tostring()) // symbol(sym), now it works or you can use the symbol.description property to get its description: let _sym = symbol("sym"); alert(_sym.description); // sym well-known symbols the symbol class has constants for so-called well-known symbols.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
inside the empty <script> element on your page, start by adding the following lines of code that define some constants and variables you'll need in the rest of the code: const spinner = document.queryselector('.spinner p'); const spinnercontainer = document.queryselector('.spinner'); let rotatecount = 0; let starttime = null; let raf; const btn = document.queryselector('button'); const result = document.queryselector('.result'); in order, these are: a reference to the spinner, so you can animate it.
Fetching data from the server - Learn web development
this stores a reference to the <select> and <pre> elements in constants and defines an onchange event handler function so that when the select's value is changed, its value is passed to an invoked function updatedisplay() as a parameter.
Introduction to web APIs - Learn web development
we start by creating an audiocontext instance inside which to manipulate our track: const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); next, we create constants that store references to our <audio>, <button>, and <input> elements, and use the audiocontext.createmediaelementsource() method to create a mediaelementaudiosourcenode representing the source of our audio — the <audio> element will be played from: const audioelement = document.queryselector('audio'); const playbtn = document.queryselector('button'); const volumeslider = document.queryselector...
Video and Audio APIs - Learn web development
t.queryselector('.controls'); const play = document.queryselector('.play'); const stop = document.queryselector('.stop'); const rwd = document.queryselector('.rwd'); const fwd = document.queryselector('.fwd'); const timerwrapper = document.queryselector('.timer'); const timer = document.queryselector('.timer span'); const timerbar = document.queryselector('.timer div'); here we are creating constants to hold references to all the objects we want to manipulate.
Object building practice - Learn web development
next, we set constants called width and height, and the width and height of the canvas element (represented by the canvas.width and canvas.height properties) to equal the width and height of the browser viewport (the area that the webpage appears on — this can be gotten from the window.innerwidth and window.innerheight properties).
Accessibility in React - Learn web development
change the import statement at the top of todo.js so that it includes useref: import react, { useref, usestate } from "react"; then, create two new constants beneath the hooks in your todo() function.
Accessibility API cross-reference
to do fill out mac api column.(mac os x - carbon accessibility api and accessibility constants) finish aria column - add explanation of the term 'abstract role' fill out html column create aom column fill out xul column.
Mozilla accessibility architecture
examples of accessible role constants are role_button, role_checkbox and role_list, although they can have slightly different names and values in each api.
Error codes returned by Mozilla APIs
these constants can be accessed through components.results.
AddonUpdateChecker
etcompatibilityupdate(in updateinfo updates[], in string version, in boolean ignorecompatibility, in string appversion, in string platformversion) updateinfo getnewestcompatibleupdate(in updateinfo updates[], in string appversion, in string platformversion) void checkforupdates(in string id, in string type, in string updatekey, string url, in updatechecklistener listener) constants constant description error_timeout the update check timed out.
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.
JavaScript OS
os.constants os-related constants, including errors, file opening modes, system configuration, etc.
OSFile.jsm
shared components os.path and os.constants.path manipulation of paths os.file.error representation of file-related errors os.file.info representation of file information (size, creation date, etc.) os.file.directoryiterator.entry file information obtained while visiting a directory ...
Sqlite.jsm
this must be one of the transaction_* constants on the opened connection instance.
Using JavaScript code modules
creating a javascript code module a very simple javascript module looks like this: var exported_symbols = ["foo", "bar"]; function foo() { return "foo"; } var bar = { name : "bar", size : 3 }; var dummy = "dummy"; notice that the module uses normal javascript to create functions, objects, constants, and any other javascript type.
Mozilla DOM Hacking Guide
it defines a set of constants, called the "scriptable flags", and a set of functions, like newresolve(), setproperty(), ...
Hash Tables
hash table types and constants hash table functions hash table types and constants plhashentry plhashtable plhashnumber plhashfunction plhashcomparator plhashenumerator plhashallocops hash table functions pl_newhashtable pl_hashtabledestroy pl_hashtableadd pl_hashtableremove pl_hashtablelookup pl_hashtableenumerateentries pl_hashstring pl_comparestrings pl_comparevalues see also xpcom hashtable guide ...
Interval Timing
this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
NSPR Types
prptrdiff pruptrdiff boolean types type and constants for boolean values.
Process Initialization
identity and versioning initialization and cleanup module initialization identity and versioning name and version constants pr_name pr_version pr_versioncheck initialization and cleanup nspr detects whether the library has been initialized and performs implicit initialization if it hasn't.
Process Management and Interprocess Communication
process management types and constants the types defined for process management are: prprocess prprocessattr process management functions the process manipulation function fall into these categories: setting the attributes of a new process creating and managing processes setting the attributes of a new process the functions that create and manipulate attribute sets of new processes are: pr_newprocessattr pr_resetp...
NSS API Guidelines
errors, though not integers, are done as external constants, instead of preprocessor definitions.
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
*/ /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define i...
sample2
topt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <cryptohi.h> #include <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv----...
JIT Optimization Strategies
for example, in the following code: var constants = {}; constants.n = 100; function testarray(array) { for (var i = 0; i < array.length; i++) { if (array[i] > constants.n) return true; } return false; } will have the loop compiled into the following when testarray gets hot.
JS::TrueHandleValue
syntax const js::handlevalue js::truehandlevalue; const js::handlevalue js::falsehandlevalue; description js::truehandlevalue and js::falsehandlevalue are js::handlevalue constants that represent the javascript values true and false.
JSClass.flags
its value is the logical or of zero or more of the following constants: flag meaning jsclass_has_private this class uses private data.
JSClass
this field is the bitwise or of one or more of the jsclass_* constants described in jsclass.flags.
JSErrorFormatString
exntype int16_t one of the jsexntype constants.
JSErrorReport
exntype int16_t one of the jsexntype constants.
JSVAL_TO_BOOLEAN
these are constants of type jsbool, which is an integer type, the spidermonkey version of bool.
JS_AddFinalizeCallback
status jsfinalizestatus one of the jsfinalizestatus constants, described below, indicating the stage of finalize.
JS_GetVersion
the result is one of the jsversion constants.
JS_InitStandardClasses
these global objects, functions, constructors, and constants are created as properties of obj.
JS_MapGCRoots
these constants are flags; you can or them together.
JS_SetGCCallback
status jsgcstatus one of the jsgcstatus constants, described below, indicating the stage of gc.
JS_SetOptions
to turn individual options on or off, use js_setoptions with js_getoptions: // turn on warnings for dubious practices js_setoptions(cx, js_getoptions(cx) | jsoption_extra_warnings); // turn off those extra warnings js_setoptions(cx, js_getoptions(cx) & ~jsoption_extra_warnings); the options parameter and the return value are the logical or of zero or more constants from the following table: option description jsoption_extra_warnings warn on dubious practice.
JS_TracerInit
kind uint32 one of the constants jstrace_object, jstrace_double, jstrace_string; or a tag denoting an internal implementation-specific traversal kind.
SpiderMonkey 31
the jsbool type has been removed, along with the corresponding js_true and js_false constants.
TPS History Lists
an integer value from one of the transition types listed at https://developer.mozilla.org/en/nsinavhistoryservice#constants.
Gecko events
event constants are defined in nsiaccessibleevent interface.
Gecko Roles
role constants are defined in the nsiaccessiblerole interface.
Gecko states
state constants are defined in nsiaccessiblestates.
XForms Accessibility
instance node states are mapped to accessibility state constants declared in nsiaccessiblestates interface like it shown below: relevant - state_unavailable readonly - state_readonly required - state_required invalid - state_invalid out of range - state_invalid attributes redefines datatype aria attribute.
Using the Places annotation service
four functions are provided to get this information: getpageannotationinfo(auri, aname, aflags, aexpiration, amimetype, atype) getitemannotationinfo(aitemid, aname, aflags, aexpiration, amimetype, atype) getpageannotationtype(auri, aname); getitemannotationtype(aitemid, aname); the returned type will be one of the value_type constants in mozistoragevaluearray.idl: after bug 377066 the value_type_* type handling was changed to this: type_int32 = 1 type_double = 2 type_string = 3 type_binary = 4 type_int64 = 5 try { var value = annotationservice.getpageannotation(uri, "my_extension/some_annotation"); } catch(e) { // annotation does not exist } other functions getpageswithannotation(aname, resultcount, results)...
STEEL
consider using the functions found in appconstants.jsm or services.jsm instead steel is the scriptable thunderbird easy extension library.
An Overview of XPCOM
xpcom uses its own variant of the corba omg interface definition language (idl) called xpidl, which allows you to specify methods, attributes and constants of a given interface, and also to define interface inheritance.
Creating XPCOM components
fests 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 xpcom using strings nsembedstring and nsembedcstring sm...
Monitoring HTTP activity
observable http activities when the activity type is activity_type_http_transaction, the activity subtype will be one of the activity subtype constants.
amIInstallTrigger
lean 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.
imgILoader
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 imgidecoderobserver 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.
imgIRequest
constants constant value description status_none 0x0 nothing to report.
mozIAsyncHistory
providing an invalid transitiontype (see nsinavbookmarksservice.constants) for a mozivisitinfo.
mozIStorageStatement
statement status constants constant value description moz_storage_statement_invalid 0 the sql statement is invalid.
mozITXTToHTMLConv
nterfaces.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 attributes these bits allow you to control the conversion of text into html.
mozIVisitInfo
one of the nsinavbookmarksservice.constants on nsinavhistory.
nsIAboutModule
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long geturiflags(in nsiuri auri); nsichannel newchannel(in nsiuri auri); constants constant value description uri_safe_for_untrusted_content (1 << 0) a flag that indicates whether a uri is safe for untrusted content.
GetAccessibleRelated
nsiaccessible getaccessiblerelated( in unsigned long arelationtype ); parameters arelationtype[in] the relation type between the accessible (see constants listed in relations documentation).
GetState
void getstate( out unsigned long astate, out unsigned long aextrastate ); parameters astate[out] the first bit field (see state_* constants in states documentation).aextrastate[out] the second bit field (see ext_state_* constants in states documentation).
Role
see the role_* constants in roles documentation.
nsIAccessibleEvent
constants constant gecko version description 1.7 - 1.8.1 1.9 - 1.9.2 2.0 event_show 0x8002 0x0001 an object has been created.
nsIAccessibleImage
void getimageposition( in unsigned long coordtype, out long x, out long y ); parameters coordtype specifies coordinates origin (for available constants refer to nsiaccessiblecoordinatetype).
nsIAccessibleRetrieval
astring getstringrole( in unsigned long arole ); parameters arole the accessible role constants.
nsIAccessibleRole
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) constants constant value description role_nothing 0 used when accessible has no strong defined role.
nsIAccessibleSelectable
constants constant value description eselection_add 0 eselection_remove 1 eselection_getstate 2 methods addchildtoselection() adds the specified accessible child of the object to the object's selection.
nsIAccessibleStateChangeEvent
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean isenabled(); boolean isextrastate(); attributes attribute type description state unsigned long returns the state of accessible (see constants declared in nsiaccessiblestates).
nsIAsyncInputStream
method overview void asyncwait(in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult astatus); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the oninputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the underlying stream).
nsIAsyncOutputStream
method overview void asyncwait(in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the underlying stream).
nsIAutoCompleteListener
status one of the constants defined in the nsiautocompletestatus interface.
nsICRLManager
rlinfo info, in unsigned long autoupdatetype, in double noofdays); void deletecrl(in unsigned long crlindex); nsiarray getcrls(); void importcrl([array, size_is(length)] in octet data, in unsigned long length, in nsiuri uri, in unsigned long type, in boolean dosilentdownload, in wstring crlkey); void reschedulecrlautoupdate(); boolean updatecrlfromurl(in wstring url, in wstring key); constants constant value description type_autoupdate_time_based 1 type_autoupdate_freq_based 2 methods computenextautoupdatetime() wstring computenextautoupdatetime( in nsicrlinfo info, in unsigned long autoupdatetype, in double noofdays ); parameters info autoupdatetype noofdays return value deletecrl() delete the crl.
nsICachingChannel
constants constant value description load_no_network_io 1 << 26 this load flag inhibits fetching from the net.
nsIChannel
constants channel specific load flags: bits 23-31 are reserved for future use by this interface or one of its derivatives (for an example see nsicachingchannel).
nsIChannelEventSink
method overview void asynconchannelredirect(in nsichannel oldchannel, in nsichannel newchannel, in unsigned long flags, in nsiasyncverifyredirectcallback callback); void onchannelredirect(in nsichannel oldchannel, in nsichannel newchannel, in unsigned long flags); obsolete since gecko 2.0 constants constant value description redirect_temporary 1 << 0 this is a temporary redirect.
nsIChromeRegistry
classes["@mozilla.org/chrome/chrome-registry;1"] .getservice(components.interfaces.nsichromeregistry); method overview void canonify(in nsiuri achromeurl); obsolete since gecko 1.8 void checkfornewchrome(); nsiuri convertchromeurl(in nsiuri achromeurl); boolean wrappersenabled(in nsiuri auri); violates the xpcom interface guidelines constants constant value description none 0 partial 1 full 2 methods canonify() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: this method is obsolete; use convertchromeurl() instead.
nsIClipboard
nsferable 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 supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by the typical control-c/control-v keyboard shortcuts.
nsIContentPrefCallback2
.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.
nsIConverterInputStream
to create an instance, use: var converterinputstream = components.classes["@mozilla.org/intl/converter-input-stream;1"] .createinstance(components.interfaces.nsiconverterinputstream); method overview void init(in nsiinputstream astream, in string acharset, in long abuffersize, in prunichar areplacementchar); constants constant value description default_replacement_character 0xfffd default replacement character value.
nsICookie
constants constant value description status_unknown 0 the cookie collected in a previous session, and its information no longer exists.
nsICookiePermission
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 additional values for nscookieaccess, which are not directly used by any methods on this interface, but are nevertheless convenient to define here.
nsICookiePromptService
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview long cookiedialog(in nsidomwindow parent, in nsicookie cookie, in acstring hostname, in long cookiesfromhost, in boolean changingcookie, out boolean rememberdecision); constants constant value description deny_cookie 0 holds the value for a denying the cookie.
nsICryptoHMAC
its 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.
nsIDOMEvent
constants constant value description none 0 the event is not being dispatched.
nsIDOMMouseScrollEvent
constants constant value description horizontal_axis 1 the horizontal (x) axis.
nsIDOMMozNetworkStatsManager
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.
nsIDOMNode
constants constant value description element_node 1 attribute_node 2 text_node 3 cdata_section_node 4 entity_reference_node 5 entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 methods appendchild() nsidomnode appendchild( in nsidomnode newchild ); parameters ne...
nsIDOMXPathEvaluator
type a number that corresponds to one of the type constants of nsixpathresult.
nsIDOMXPathException
constants error codes constant value description invalid_expression_err 51 an invalid xpath expression was used.
nsIDOMXPathExpression
type a number that corresponds to one of the type constants of nsidomxpathresult.
nsIDialogCreator
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 opendialog(in unsigned long atype, in acstring aname, in acstring afeatures, in nsidialogparamblock aarguments, [optional] in nsidomelement aframeelement); constants constant value description unknown_dialog 0 generic_dialog 1 select_dialog 2 methods opendialog() void opendialog( in unsigned long atype, in acstring aname, in acstring afeatures, in nsidialogparamblock aarguments, in nsidomelement aframeelement optional ); parameters atype aname afeatures aarguments aframeelement optional ...
nsIDownload
see nsidownloadmanager.constants.
nsIDownloadManager
constants constant value description download_notstarted -1 the download has not been started yet.
nsIDragService
in long aimagey, in nsidomdragevent adragevent, in nsidomdatatransfer adatatransfer); void invokedragsessionwithselection(in nsiselection aselection, in nsisupportsarray atransferablearray, in unsigned long aactiontype, in nsidomdragevent adragevent, in nsidomdatatransfer adatatransfer); void startdragsession( ) ; void suppress(); void unsuppress(); constants constant value description dragdrop_action_none 0 no action.
nsIEditor
void adddocumentstatelistener(in nsidocumentstatelistener listener); void removedocumentstatelistener(in nsidocumentstatelistener listener); debug methods void dumpcontenttree(); void debugdumpcontent() ; void debugunittests(out long outnumtests, out long outnumtestsfailed); [notxpcom] boolean ismodifiablenode(in nsidomnode anode); constants load flags constant value description enone 0 enext 1 eprevious 2 enextword 3 epreviousword 4 etobeginningofline 5 etoendofline 6 attributes attribute type description contentsmimetype string the mime type of the doc...
nsIEventTarget
obsolete since gecko 1.9 constants dispatch flags constant value description dispatch_normal 0 this flag specifies the default mode of event dispatch, whereby the event is simply queued for later processing.
nsIFile
constants constant value description normal_file_type 0 a normal file.
nsIFileInputStream
inherits from: nsiinputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constant value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the stream is closed.
nsIFileStreams
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constants value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the stream is closed.
nsIFocusManager
constants constant value description flag_raise 1 flag_noscroll 2 do not scroll the element to focus into view.
nsIHTMLEditor
constants constant value description eleft 0 ecenter 1 eright 2 ejustify 3 methods adddefaultproperty() registers a default style property with the editor.
nsIInstallLocation
constants constants representing priority of some default install locations.
nsIJumpListBuilder
constants constant value description jumplist_category_tasks 0 tasks are common actions performed by users within the application.
nsIJumpListItem
constants constant value description jumplist_item_empty 0 empty list item.
nsILocalFile
constants constant value description delete_on_close 0x80000000 optional parameter used by opennsprfiledesc().
nsILocalFileMac
constants constant value description current_process_creator 0x8000000 use with setfiletype() to specify the signature of current process.
nsIMsgFolder
constants constant value description nsmsgbiffstate_newmail 0 user has new mail waiting.
nsIMsgIncomingServer
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.
nsIMsgSearchSession
e type description searchterms nsisupportsarray readonly: numsearchterms unsigned 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 attri...
nsINavHistoryFullVisitResultNode
this will be one of the nsinavhistoryservice.transition type constants.
nsINavHistoryResultNode
obsolete since gecko 1.9.2 constants constant value description result_type_uri 0 nsinavhistoryresultnode.
nsINavHistoryResultTreeViewer
obsolete since gecko 1.9 constants constant value description index_invisible 0xffffffff returned by treeindexfornode() when the requested node isn't visible (such as when its parent is collapsed).
nsINavHistoryResultViewObserver
eopenstate(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.
nsINavHistoryResultViewer
void sortingchanged( in unsigned short sortingmode ); parameters sortingmode one of the nsinavhistoryqueryoptions.sort_by_* constants, indicating the softing mode.
nsINavHistoryService
constants transition type constants constant value description transition_link 1 this transition type means the user followed a link and got a new toplevel window.
nsIParserUtils
service(components.interfaces.nsiparserutils); method overview astring converttoplaintext(in astring src, in unsigned long flags, in unsigned long wrapcol); nsidomdocumentfragment parsefragment(in astring fragment, in unsigned long flags, in boolean isxml, in nsiuri baseuri, in nsidomelement element); astring sanitize(in astring src, in unsigned long flags); constants constant value description sanitizerallowcomments (1 << 0) flag for sanitizer: allow comment nodes.
Component; nsIPrefBranch
constants constant value description pref_invalid 0 long pref_string 32 long data type.
nsIPrincipal
constants principal capability constants these values indicate the capabilities of a principal.
nsIProfileUnlocker
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.
nsIProgrammingLanguage
inherits from: nsisupports last changed in gecko 0.9.5 constants identifiers for programming languages.
nsIPrompt
ring checkmsg, inout boolean checkvalue); boolean promptusernameandpassword(in wstring dialogtitle, in wstring text, inout wstring username, inout wstring password, in wstring checkmsg, inout boolean checkvalue); boolean select(in wstring dialogtitle, in wstring text, in pruint32 count, [array, size_is(count)] in wstring selectlist, out long outselection); constants the button flags defined in nsiprompt are the same as those defined in nsipromptservice.constants.
nsIProtocolHandler
constants constant value description uri_std 0 a standard full uri with authority component and understanding relative uris; this includes http and ftp, for example.
nsIProtocolProxyService
utf8string ahost,in long aport, in unsigned long aflags, in unsigned long afailovertimeout, in nsiproxyinfo afailoverproxy); nsiproxyinfo getfailoverforproxy(in nsiproxyinfo aproxyinfo, in nsiuri auri, in 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.
nsIProxyInfo
constants the following "proxy flags" may be bit-wise combined to construct the flags attribute defined on this interface.
nsIRadioInterfaceLayer
speakerenabled bool constants call state constants constant value description call_state_unknown 0 call_state_dialing 1 call_state_alerting 2 call_state_busy 3 call_state_connecting 4 call_state_connected 5 call_state_holding 6 call_state_held 7 call_state_resuming 8 call_state_disconnecting 9 call_state_disconnected 10 call_state_incoming 11 datacall_state_unknown 0 dat...
nsIRequest
constants various load flags which may be or'd together.
nsISHistoryListener
see the nsiwebnavigation interface's load constants.
nsIScriptError2
flags one of the script error flag constants.
nsIScrollable
bsolete since gecko 29.0 void setdefaultscrollbarpreferences(in long scrollorientation, in long scrollbarpref); void setscrollrange(in long scrollorientation, in long minpos, in long maxpos); obsolete since gecko 29.0 void setscrollrangeex(in long minhorizontalpos, in long maxhorizontalpos, in long minverticalpos, in long maxverticalpos); obsolete since gecko 29.0 constants scroll orientations scroll orientations a scrollbar can be in.
nsISearchEngine
constants search engine type constants constant value description type_mozsearch 1 type_sherlock 2 type_opensearch 3 search engine data type constants constant value description data_xml 1 data type is xml data_t...
type
information is now located at: nsisupportsprimitive.constants ...
nsISupportsPrimitive
constants constant value description type_id 1 corresponding to nsisupportsid.
nsISupportsPriority
constants constant value description priority_highest -20 the highest priority.
nsITaskbarWindowPreview
constants constant value description num_toolbar_buttons 7 the maximum number of toolbar buttons supported by the windows taskbar api.
nsITelemetry
constants histogram types constant value description histogram_exponential 0 buckets increase exponentially.
nsIToolkitProfileService
warning: this service is synchronous so it is recommended that you use os.file to find the profile directory via os.constants.path.profiledir.
nsITransferable
constants kflavorhasdataprovider (that title needs to be better) constant value description kflavorhasdataprovider 0 a description is needed here.
nsITransport
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.
nsIURIFixup
l/urifixup;1"] .createinstance(components.interfaces.nsiurifixup); method overview nsiuri createexposableuri(in nsiuri auri); nsiuri createfixupuri(in autf8string auritext, in unsigned long afixupflags); nsiuri keywordtouri(in autf8string akeyword); nsiurifixupinfo getfixupuriinfo(in autf8string auritext, in unsigned long afixupflags); constants constant value description fixup_flag_none 0 no fixup flags.
nsIWebBrowserChrome
constants constant value description status_script 1 flag for setstatus() status_script_default 2 flag for setstatus() status_link 3 flag for setstatus() chrome_default 1 value for the chromeflags attribute.
nsIWebBrowserPersist
constants constant value description persist_flags_none 0 no special persistence behavior.
nsIWebNavigation
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 description load_flags_mask 65535 this flag defines the range of bits that may be specified.
nsIWebProgress
constants the following flags may be combined to form the anotifymask parameter for the addprogresslistener() method.
nsIWebProgressListener
totalprogress); void onsecuritychange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astateflags, in nsresult astatus); void onstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); constants state transition flags these flags indicate the various states that requests may transition through as they are being loaded.
nsIXPCScriptable
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.
nsIXPConnect
deferreleasesuntilaftergarbagecollection prbool obsolete since gecko 1.9 pendingexception nsiexception constants constant value description init_js_standard_classes 1 << 0 flag_system_global_object 1 << 1 omit_components_object 1 << 2 xpc_xow_clearscope 1 tells updatexows() to clear the scope of all of the xows it finds.
nsIXULSortService
obsolete since gecko 1.9 void sort(in nsidomnode anode, in astring asortkey, in astring asorthints); constants constant value description sort_comparecase 0x0001 sort_integer 0x0100 methods native code only!insertcontainernode obsolete since gecko 1.9 (firefox 3)this feature is obsolete.
nsIZipReader
var zr = cc["@mozilla.org/libjar/zip-reader;1"].createinstance(ci.nsizipreader); cu.import('resource://gre/modules/osfile.jsm'); cu.import('resource://gre/modules/fileutils.jsm'); var reusablestreaminstance = cc['@mozilla.org/scriptableinputstream;1'].createinstance(ci.nsiscriptableinputstream); var pathtoxpitoread = os.path.join(os.constants.path.profiledir, 'extensions', 'portabletester@jetpack.xpi'); var nsifilexpi = new fileutils.file(pathtoxpitoread); //services.ww.activewindow.alert(pathtoxpitoread); try { zr.open(nsifilexpi); //if file dne it throws here var entries = zr.findentries('*'); //we use asterik because we want everything listed out while (entries.hasmore()) { var entryp...
nsMsgMessageFlags
constants name value description read 0x00000001 indicates whether or not the message is read.
Storage
the latter takes one of three constants to describe the type of transaction: mozistorageconnection.transaction_deferred mozistorageconnection.transaction_immediate mozistorageconnection.transaction_exclusive mozistorageconnection.begintransaction() is equivalent to calling mozistorageconnection.begintransactionas() and passing mozistorageconnection.transaction_deferred.
nsIMsgCloudFileProvider
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.
Activity Manager examples
(this example seems to be outdated and not working, see bug 557467 comment 1.) //optional: define some convenience constants const nsactprocess = components.constructor("@mozilla.org/activity-process;1", "nsiactivityprocess", "init"); const nsactevent = components.constructor("@mozilla.org/activity-event;1", "nsiactivityevent", "init"); // step 1: implement nsiactivitycontextdisplayhelper to show a // customized display tex...
Using COM from js-ctypes
romarr = iidfromarr = function(jsarr_pieces) { let guid = guid(); // clsid and iid are same they are guid guid.data1 = parseint(jsarr_pieces[0], 16); guid.data2 = parseint(jsarr_pieces[1], 16); guid.data3 = parseint(jsarr_pieces[2], 16); let j = 2; for (let i=0; i<8; i++) { j++; guid.data4[i] = parseint(jsarr_pieces[j], 16); }; return guid; } // constants let coinit_multithreaded = 0; let coinit_apartmentthreaded = 2; let clsctx_all = 0x17; let clsid_spvoice = clsidfromarr(['0x96749377', '0x3391', '0x11d2', '0x9e', '0xe3', '0x00', '0xc0', '0x4f', '0x79', '0x73', '0x96']); let iid_ispvoice = iidfromarr(['0x6c44df74', '0x72b9', '0x4992', '0xa1', '0xec'...
Examples
lightweight bridge for calling cocoa frameworks from javascript, js-macosx transparently handles definition of cocoa api, both c and objective-c, and provides automatic declarations for framework functions, structures, constants and enumerations, as well as allows creating and subclassing cocoa classes.
Using js-ctypes
; var sint32 = ctypes.long; var void = ctypes.void_t; var __cfstring = new ctypes.structtype("__cfstring"); var cfstringref = __cfstring.ptr; var __cfurl = new ctypes.structtype("__cfurl"); var cfurlref = __cfurl.ptr; var __cfallocator = new ctypes.structtype("__cfallocator"); var cfallocatorref = __cfallocator.ptr; var unichar = ctypes.jschar; // uint16 with automatic conversion // define constants var kcfusernotificationstopalertlevel = 0; var kcfusernotificationnotealertlevel = 1; var kcfusernotificationcautionalertlevel = 2; var kcfusernotificationplainalertlevel = 3; // declare functions /* https://developer.apple.com/library/mac/documentation/corefoundation/reference/cfusernotificationref/index.html#//apple_ref/c/func/cfusernotificationdisplaynotice * sint32 cfusernotificationdisplay...
Library
see abi constants.
ctypes
constants abi constants these constants are used to specify the abi used to call a native function in the library.
Mozilla
these constants can be accessed through components.results.
Version, UI, and Status Information - Plugins
int plugin_major, plugin_minor, netscape_major, netscape_minor; // declare variables to hold version numbers void npn_version( &plugin_major, &plugin_minor, &netscape_major, &netscape_minor ); // find version numbers finding out if a feature exists a plug-in can figure out whether it is running in a version of the browser that supports a particular feature by using version or npvers constants (see version feature constants).
Gecko Plugin API Reference - Plugins
npn_invokedefault npn_evaluate npn_getproperty npn_setproperty npn_removeproperty npn_hasproperty npn_hasmethod npn_setexception npclass structures npanycallbackstruct npbyterange npembedprint npevent npfullprint npp np_port npprint npprintcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npwindow constants error codes result codes plug-in version constants version feature constants external resources external projects and articles for plugin creation original document information copyright information: netscape communication ...
AudioContextOptions - Web APIs
constants standard values for latencyhint the latencyhint property can be number specifying a preferred maximum latency in seconds or a string from the audiocontextlatencycategory enumerated string, which selects a standard value for a given type of audio usage: value description "balanced" the user agent should balance audio output latency and power consumption when selecting a ...
AudioScheduledSourceNode.onended - Web APIs
this event is sent to the node when the concrete interface (such as audiobuffersourcenode, oscillatornode, or constantsourcenode) determines that it has stopped playing.
AudioScheduledSourceNode - Web APIs
instead, use the interface which extends it, such as audiobuffersourcenode, oscillatornode, and constantsourcenode.
BaseAudioContext - Web APIs
baseaudiocontext.createconstantsource() creates a constantsourcenode object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
the code read-only property of the domexception interface returns a short that contains one of the error code constants, or 0 if none match.
DOMException - Web APIs
properties domexception.code read only returns a short that contains one of the error code constants, or 0 if none match.
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
result types (merge with template:xpathresultconstants?
EXT_color_buffer_half_float - Web APIs
constants ext.rgba16f_ext rgba 16-bit floating-point color-renderable format.
EXT_disjoint_timer_query - Web APIs
constants this extension exposes seven new constants.
EXT_texture_compression_bptc - Web APIs
constants the compressed texture formats are exposed by 4 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
EXT_texture_compression_rgtc - Web APIs
constants the compressed texture formats are exposed by 4 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
Element: mousedown event - Web APIs
when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
Element: mousemove event - Web APIs
when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
Element: mouseup event - Web APIs
when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
EventTarget.addEventListener() - Web APIs
that means that the variables and constants available to the containing function are also available to the event handler when using an arrow function.
FileError - Web APIs
WebAPIFileError
error codes note: do not rely on the numeric values of the constants, which might change as the specifications continue to change.
FileException - Web APIs
constants note: do not rely on the numeric values of the constants, which might change as the specifications continue to change.
FileReader.readyState - Web APIs
example var reader = new filereader(); console.log('empty', reader.readystate); // readystate will be 0 reader.readastext(blob); console.log('loading', reader.readystate); // readystate will be 1 reader.onloadend = function () { console.log('done', reader.readystate); // readystate will be 2 }; value a number which is one of the three possible state constants define for the filereader api.
Force Touch events - Web APIs
event properties the following property is known to be available on the webkitmouseforcewillbegin, mousedown, webkitmouseforcechanged, webkitmouseforcedown, webkitmouseforceup, mousemove, and mouseup event objects: mouseevent.webkitforce read only the amount of pressure currently being applied to the trackpad/touchscreen constants these constants are useful for determining the relative intensity of the pressure indicated by mouseevent.webkitforce: 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 specifications not part of any specification.
HTMLCanvasElement.toBlob() - Web APIs
cu.import('resource://gre/modules/osfile.jsm'); var writepath = os.path.join(os.constants.path.desktopdir, iconname + '.ico'); var promise = os.file.writeatomic(writepath, new uint8array(r.result), {tmppath:writepath + '.tmp'}); promise.then( function() { console.log('successfully wrote file'); }, function() { console.log('failure writing file') } ); }; r.read...
Ajax navigation example - Web APIs
requestpage(this.href); return false; } return true; } function init () { opageinfo.title = document.title; history.replacestate(opageinfo, opageinfo.title, opageinfo.url); for (var olink, nidx = 0, nlen = document.links.length; nidx < nlen; document.links[nidx++].onclick = processlink); } const /* customizable constants */ stargetid = "ajax-content", sviewkey = "view_as", sajaxclass = "ajax-nav", /* not customizable constants */ rsearch = /\?.*$/, rhost = /^[^\?]*\?*&*/, rview = new regexp("&" + sviewkey + "\\=[^&]*|&*$", "i"), rendqstmark = /\?$/, oloadingbox = document.createelement("div"), ocover = document.createelement("div"), oloadingimg = new image(), opageinfo = {...
IDBDatabaseException - Web APIs
constants note: do not rely on the numeric values of the constants, which might change as the specifications continue to change.
IDBIndex.openCursor() - Web APIs
see idbcursor constants for possible values.
IDBIndex.openKeyCursor() - Web APIs
see idbcursor constants for possible values.
compareVersion - Web APIs
the following constants can be used to check the value returned by compareversion: int major_diff = 4; int minor_diff = 3; int rel_diff = 2; int bld_diff = 1; int equal = 0; in communicator 4.5, the following constants are defined and available for checking the value returned by compareversion: <code>installtrigger.major_diff installtrigger.minor_diff installtrigger.rel_diff installtrigger.bld_diff installtrigger.eq...
Intersection Observer API - Web APIs
const numsteps = 20.0; let boxelement; let prevratio = 0.0; let increasingcolor = "rgba(40, 40, 190, ratio)"; let decreasingcolor = "rgba(190, 40, 40, ratio)"; // set things up window.addeventlistener("load", (event) => { boxelement = document.queryselector("#box"); createobserver(); }, false); the constants and variables we set up here are: numsteps a constant which indicates how many thresholds we want to have between a visibility ratio of 0.0 and 1.0.
LocalFileSystem - Web APIs
.requestfilesystem(window.persistent, 1024*1024,oninitfs,errorhandler); method overview void requestfilesystem (in unsigned short type, in unsigned long long size, in filesystemcallback successcallback, in optional errorcallback errorcallback); void resolvelocalfilesystemurl (in domstring url, in entrycallback successcallback, in optional errorcallback errorcallback); constants constant value description temporary 0 transient storage that can be be removed by the browser at its discretion.
LocalFileSystemSync - Web APIs
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.
MouseScrollEvent - Web APIs
constants delta modes constant value description horizontal_axis 0x01 the event is caused by horizontal wheel operation.
NodeIterator - Web APIs
nodeiterator.whattoshow read only returns an unsigned long being a bitmask made of constants describing the types of node that must to be presented.
OES_standard_derivatives - Web APIs
constants this extension exposes one new constant, which can be used in the hint() and getparameter() methods.
OES_texture_half_float - Web APIs
constants ext.half_float_oes half floating-point type (16-bit).
OVR_multiview2 - Web APIs
constants this extension exposes 4 constants that can be used in getparameter() or getframebufferattachmentparameter().
ParentNode.replaceChildren() - Web APIs
it then calls replacechildren() on the list to transfer the options to, using the spread operator to pass in all the options contained in both constants.
RTCDataChannel.readyState - Web APIs
rtcdatachannelstate enum the rtcdatachannelstate enum defines string constants which reflect the current status of the rtcdatachannel's underlying data connection.
RTCPeerConnection.connectionState - Web APIs
rtcpeerconnectionstate enum the rtcpeerconnectionstate enum defines string constants which describe states in which the rtcpeerconnection may be.
RTCPeerConnection.iceConnectionState - Web APIs
rtciceconnectionstate enum the rtciceconnectionstate enum defines the string constants used to describe the current state of the ice agent and its connection to the ice server (that is, the stun or turn server).
RTCPeerConnection.iceGatheringState - Web APIs
rtcicegatheringstate enum the rtcicegatheringstate enum defines string constants which reflect the current status of ice gathering, as returned using the rtcpeerconnection.icegatheringstate property.
RTCSessionDescription - Web APIs
constants rtcsdptype this enum defines strings that describe the current state of the session description, as used in the type property.
SVGClipPathElement - Web APIs
takes one of the constants defined in svgunittypes.
SVGColorProfileElement - Web APIs
it takes one of the rendering_intent_* constants defined on the svgrenderingintent interface that corresponds to the value of the rendering-intent attribute.
SVGRenderingIntent - Web APIs
constants name value description rendering_intent_unknown 0 the type is not one of predefined types.
SVGTextContentElement - Web APIs
api/svgtextcontentelement" target="_top"><rect x="51" y="65" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="156" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextcontentelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants constant value description lengthadjust_unknown 0 some other value.
SVGZoomAndPan - Web APIs
nk:href="/docs/web/api/svgzoomandpan" target="_top"><rect x="1" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgzoomandpan</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_zoomandpan_unknown 0 the type is not one of predefined types.
Using the Screen Capture API - Web APIs
setup first, some constants are set up to reference the elements on the page to which we'll need access: the <video> into which the captured screen contents will be streamed, a box into which logged output will be drawn, and the start and stop buttons that will turn on and off capture of screen imagery.
TextTrack - Web APIs
WebAPITextTrack
permitted values are listed under text track mode constants.
TreeWalker.whatToShow - Web APIs
the treewalker.whattoshow read-only property returns an unsigned long being a bitmask made of constants describing the types of node that must to be presented.
TreeWalker - Web APIs
treewalker.whattoshow read only returns an unsigned long being a bitmask made of constants describing the types of node that must be presented.
TypeInfo - Web APIs
WebAPITypeInfo
constants constant value derivation_restriction 1 derivation_extension 2 derivation_union 4 derivation_list 8 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'typeinfo' in that specification.
UserDataHandler - Web APIs
constants constant value operation node_cloned 1 node.clonenode() node_imported 2 document.importnode() node_deleted unimplemented (see bug 550400) 3 node_renamed unimplemented 4 node.renamenode() node_adopted 5 document.adoptnode() (node_renamed is currently not supported since node.renamenode() is not supp...
WEBGL_color_buffer_float - Web APIs
constants ext.rgba32f_ext rgba 32-bit floating-point color-renderable format.
WEBGL_compressed_texture_atc - Web APIs
constants the compressed texture formats are exposed by 3 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_compressed_texture_etc - Web APIs
constants the compressed texture formats are exposed by 10 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_compressed_texture_etc1 - Web APIs
constants the compressed texture format is exposed by a constant and can be used with the compressedteximage2d() method (note that etc1 is not supported with the compressedtexsubimage2d() method).
WEBGL_compressed_texture_pvrtc - Web APIs
constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() (where the height and width parameters must be powers of 2) and compressedtexsubimage2d() (where the the height and width parameters must equal the current values of the existing texture and the xoffset and yoffset parameters must be 0).
WEBGL_compressed_texture_s3tc - Web APIs
constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_compressed_texture_s3tc_srgb - Web APIs
constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
WEBGL_depth_texture - Web APIs
constants this extension adds a new constant: ext.unsigned_int_24_8_webgl unsigned integer type for 24-bit depth texture data.
WebGL2RenderingContext - Web APIs
constants see the webgl constants page.
WebGLRenderingContext.bindBuffer() - Web APIs
examples binding a buffer to a target var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); getting current bindings to check the current buffer bindings, query the array_buffer_binding and element_array_buffer_binding constants.
WebGLRenderingContext.bindTexture() - Web APIs
examples binding a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); getting current bindings to check the current texture binding, query the gl.texture_binding_2d or gl.texture_binding_cube_map constants.
WebGLRenderingContext.blendEquation() - Web APIs
examples to set the blend equation, use: gl.blendequation(gl.func_add); gl.blendequation(gl.func_subtract); gl.blendequation(gl.func_reverse_subtract); to get the blend equations, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
examples to set the blend equations, use: gl.blendequationseparate(gl.func_add, gl.func_subtract); to get the current blend equations, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext.
WebGLRenderingContext.clear() - Web APIs
gl.clear(gl.depth_buffer_bit); gl.clear(gl.depth_buffer_bit | gl.color_buffer_bit); to get the current clear values, query the color_clear_value, depth_clear_value, and stencil_clear_value constants.
WebGLRenderingContext.getExtension() - Web APIs
examples once a webgl extension is enabled, you are able to use the methods, properties or constants that this extension object provides.
WebGLRenderingContext.polygonOffset() - Web APIs
gl.enable(gl.polygon_offset_fill); gl.polygonoffset(2, 3); to check the current polygon offset factor or units, query the polygon_offset_factor and polygon_offset_units constants.
WebGLRenderingContext.sampleCoverage() - Web APIs
gl.enable(gl.sample_coverage); gl.samplecoverage(0.5, false); to check the sample coverage values, query the sample_coverage_value and sample_coverage_invert constants.
WebGLRenderingContext.stencilFunc() - Web APIs
gl.enable(gl.stencil_test); gl.stencilfunc(gl.less, 0, 0b1110011); to get the current stencil function, reference value, or other stencil information, query the following constants with getparameter().
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
gl.enable(gl.stencil_test); gl.stencilfuncseparate(gl.front, gl.less, 0.2, 1110011); to get the current stencil function, reference value, or other stencil information, query the following constants with getparameter().
WebGLRenderingContext.stencilMask() - Web APIs
examples gl.stencilmask(110101); to get the current stencil masks, query the stencil_writemask, stencil_back_writemask, or stencil_bits constants.
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
examples gl.stencilmaskseparate(gl.front, 110101); to get the current stencil masks, query the stencil_writemask, stencil_back_writemask, or stencil_bits constants.
WebGLRenderingContext - Web APIs
constants see the webgl constants page.
Compressed texture formats - Web APIs
if supported, it will return an extension object with constants for the added formats and the formats will also be returned by calls to gl.getparameter(gl.compressed_texture_formats).
WebGL types - Web APIs
WebAPIWebGL APITypes
see also the list of constants.
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
ressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context events webglcontextlost webglcontextrestored webglcontextcreationerror constants and types webgl constants webgl types webgl 2 webgl 2 is a major update to webgl which is provided through the webgl2renderingcontext interface.
WebSocket - Web APIs
WebAPIWebSocket
constants constant value websocket.connecting 0 websocket.open 1 websocket.closing 2 websocket.closed 3 properties websocket.binarytype the binary data type used by the connection.
Visualizations with Web Audio API - Web APIs
then capture audio data using a fast fourier transform (fft) in a certain frequency domain, depending on what you specify as the analysernode.fftsize property value (if no value is specified, the default is 2048.) note: you can also specify a minimum and maximum power value for the fft data scaling range, using analysernode.mindecibels and analysernode.maxdecibels, and different data averaging constants using analysernode.smoothingtimeconstant.
Web Audio API - Web APIs
pt, establishing it as an audio worklet processor, and then using that processor within a web audio application is the topic of this article.basic concepts behind web audio apithis article explains some of the audio theory behind how the features of the web audio api work, to help you make informed decisions while designing how audio is routed through your app.controlling multiple parameters with constantsourcenodethis article demonstrates how to use a constantsourcenode to link multiple parameters together so they share the same value, which can be changed by simply setting the value of the constantsourcenode.offset parameter.example and tutorial: simple synth keyboardthis article presents the code and working demo of a video keyboard you can play using the mouse.
XPathEvaluator.evaluate() - Web APIs
this must be one of the xpathresult.constants.
XPathException.code - Web APIs
the code read-only property of the xpathexception interface returns a short that contains one of the error code constants.
XPathExpression.evaluate() - Web APIs
this must be one of the xpathresult.constants.
Web APIs
WebAPI
ortsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry customevent d domconfiguration domerror domexception domhighrestimestamp domimplementation domimplementationlist domlocator dommatrix d...
Mouse gesture events - Developer guides
direction constants the direction field in the gesture events can take one of the following values: simplegestureevent.direction_left leftward swipe.
A re-introduction to JavaScript (JS tutorial) - JavaScript
there's also a built-in object that we did not mention earlier called math that provides advanced mathematical functions and constants: math.sin(3.5); var circumference = 2 * math.pi * r; you can convert a string to an integer using the built-in parseint() function.
JavaScript data types and data structures - JavaScript
to check for the largest available value or smallest available value within ±infinity, you can use the constants number.max_value or number.min_value.
TypeError: invalid assignment to const "x" - JavaScript
in javascript, constants are declared using the const keyword.
SyntaxError: missing = in const declaration - JavaScript
in javascript, constants are declared using the const keyword.
Math.log() - JavaScript
if you need the natural log of 2 or 10, use the constants math.ln2 or math.ln10 .
Number - JavaScript
the number constructor contains constants and methods for working with numbers.
WebAssembly - JavaScript
you can compare it to math, which is also a namespace object for mathematical constants and functions, or to intl which is the namespace object for internationalization constructors and other language-sensitive functions.
<mi> - MathML
WebMathMLElementmi
the mathml <mi> element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants.
Caching compiled WebAssembly modules - WebAssembly
the function starts off by defining some necessary constants: function instantiatecachedurl(dbversion, url, importobject) { const dbname = 'wasm-cache'; const storename = 'wasm-cache'; setting up the database the first helper function contained inside instantiatecachedurl() — opendatabase() — creates an object store for storing wasm modules, and also handles clearing out the database if the dbversion is updated; it returns a promise resolving to...
Understanding WebAssembly text format - WebAssembly
in shared1.wat, we export a function called doit — this function creates two constants containing the values 0 and 42, then calls i32.store to store a provided value at a provided index of the imported memory.