Search completed in 1.35 seconds.
MessageEvent.MessageEvent() - Web APIs
the
messageevent() constructor creates a new
messageevent object instance.
... syntax var
messageevent = new
messageevent(type, init); parameters type the type of
messageevent that will be created.
... this can be one of xxx init optional a dictionary object that can contain the following properties: data: the data you want contained in the
messageevent.
...And 5 more matches
MessagePort.postMessage() - Web APIs
the post
message() method of the
messageport interface sends a
message from the port, and optionally, transfers ownership of objects to other browsing contexts.
... syntax port.post
message(
message, transferlist); returns void.
... parameters
message the
message you want to send through the channel.
...And 5 more matches
MessagePort.onmessage - Web APIs
the on
message event handler of the
messageport interface is an eventlistener, called whenever an
messageevent of type
message is fired on the port — that is, when the port receives a
message.
... syntax channel.on
message = function() { ...
... }; example in the following code block, you can see a new channel being created using the
messagechannel.
messagechannel constructor.
...And 4 more matches
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
... the serviceworker
messageevent() constructor creates a new serviceworker
messageevent object instance.
... syntax var myswme = new serviceworker
messageevent(type, init); parameters type a domstring that defines the type of the
message event being created.
...And 3 more matches
MessagePort: message event - Web APIs
the
message event is fired on a
messageport object when a
message arrives on that channel.
... bubbles no cancelable no interface
messageevent event handler property on
message examples suppose a script creates a
messagechannel and sends one of the ports to a different browsing context, such as another <iframe>, using code like this: const channel = new
messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const
messagecontrol = document.queryselector('#
message'); const channel
messagebutton = document.queryselector('#channel-
message'); channel
messagebutton.addeventlistener('click', () => { myport.post
message(
messagecontrol.value); }) targetframe.post
message('init', targetorigin, [channel.port2]); the target can receive the port and start listenin...
...g for
messages on it using code like this: window.addeventlistener('
message', (event) => { const myport = event.ports[0]; myport.addeventlistener('
message', (event) => { received.textcontent = event.data; }); myport.start(); }); note that the listener must call
messageport.start() before any
messages will be delivered to this port.
... this is only needed when using the addeventlistener() method: if the receiver uses on
message instead, start() is called implicitly: window.addeventlistener('
message', (event) => { const myport = event.ports[0]; myport.on
message = (event) => { received.textcontent = event.data; }; }); specifications specification status html living standard living standard ...
MessagePort: messageerror event - Web APIs
the
messageerror event is fired on a
messageport object when it receives a
message that can't be deserialized.
... bubbles no cancelable no interface
messageevent event handler property on
messageerror examples suppose a script creates a
messagechannel and sends one of the ports to a different browsing context, such as another <iframe>, using code like this: const channel = new
messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const
messagecontrol = document.queryselector('#
message'); const channel
messagebutton = document.queryselector('#channel-
message'); channel
messagebutton.addeventlistener('click', () => { myport.post
message(
messagecontrol.value); }) targetframe.post
message('init', targetorigin, [channel.port2]); the target can receive the port and start lis...
...tening for
messages and
message errors on it using code like this: window.addeventlistener('
message', (event) => { const myport = event.ports[0]; myport.addeventlistener('
message', (event) => { received.textcontent = event.data; }); myport.addeventlistener('
messageerror', (event) => { console.error(event.data); }); myport.start(); }); note that the listener must call
messageport.start() before any
messages will be delivered to this port.
... this is only needed when using the addeventlistener() method: if the receiver uses on
message instead, start() is called implicitly: window.addeventlistener('
message', (event) => { const myport = event.ports[0]; myport.on
message = (event) => { received.textcontent = event.data; }; myport.on
messageerror = (event) => { console.error(event.data); }; }); specifications specification status html living standard living standard ...
MessagePort.onmessageerror - Web APIs
the on
messageerror event handler of the
messageport interface is an eventlistener, called whenever an
messageevent of type
messageerror is fired on the port—that is, when it receives a
message that cannot be deserialized.
... syntax port.on
messageerror = function() { ...
... }; specifications specification status comment html living standardthe definition of 'on
messageerror' in that specification.
MediaKeyMessageEvent.messageType - Web APIs
the mediakey
messageevent.
messagetype read-only property indicates the type of
message.
... syntax var
messagetype = mediakey
messageevent.
messagetype; specifications specification status comment encrypted media extensionsthe definition of '
messagetype' in that specification.
Message manager overview
message managers are designed to enable chrome-privileged javascript code in one process to communicate with chrome-privileged javascript code in a different process.
... this article describes the different types of
message manager, how to access them, and at a high level, what sorts of things you can use them for.
... at the top level, there are two different sorts of
message managers: frame
message managers: these enable chrome process code to load a script into a browser frame (essentially, a single browser tab) in the content process.
...And 42 more matches
Creating a gloda message query
this content covers features introduced in thunderbird 3 this page describes how to programmatically create a
message query using gloda, thunderbird's global database.
... creating your first
message query...
...you can find the file, which includes doxygen markup of sorts, here: https://hg.mozilla.org/comm-central/file/tip/mailnews/db/gloda/modules/gloda.js components.utils.import("resource:///modules/gloda/public.js"); create the query let query = gloda.newquery(gloda.noun_
message); add constraints to the query each constraint function takes one or more arguments which are "or"ed together.
...And 40 more matches
nsIMsgMessageService
objects that implements nsimsg
messageservice give the user top level routines related to
messages like copying, displaying, attachment's manipulation, printing, streaming the
message content to eml format string, etc.
... inherits from: nsisupports method overview void copy
message(in string asrcuri, in nsistreamlistener acopylistener, in boolean amove
message, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); [noscript] void copy
messages(in nsmsgkeyarrayptr keys, in nsimsgfolder srcfolder, in nsistreamlistener acopylistener, in boolean amove
message, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); void display
message(in string a
messageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in string acharsetoverride, out nsiuri aurl); void openattachment(in string acontenttype, in string afilename, in string aurl, in string a
messageuri, in nsisupports adisplayconsumer, in nsimsg...
...window amsgwindow, in nsiurllistener aurllistener); void save
messagetodisk(in string a
messageuri, in nsifilespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); void geturlforuri(in string a
messageuri, out nsiuri aurl, in nsimsgwindow amsgwindow); void display
messageforprinting(in string a
messageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, out nsiuri aurl); void search(in nsimsgsearchsession asearchsession, in nsimsgwindow amsgwindow, in nsimsgfolder amsgfolder, in string asearchuri); nsiuri stream
message(in string a
messageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistener...
...And 38 more matches
window.postMessage() - Web APIs
the window.post
message() method safely enables cross-origin communication between window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.
...window.post
message() provides a controlled mechanism to securely circumvent this restriction (if used properly).
... broadly, one window may obtain a reference to another (e.g., via targetwindow = window.opener), and then dispatch a
messageevent on it with targetwindow.post
message().
...And 34 more matches
Console messages - Firefox Developer Tools
most of the web console is occupied by the
message display pane: each
message is displayed as a separate row: time the time the
message was recorded.
... icon not all console
messages contain icons.
... the following icons may be used: informational
message warning error blocked; for network
messages in addition, a disclosure triangle indicates that further information is available; clicking it displays or collapses that information.
...And 32 more matches
nsIMessageListenerManager
dom/base/nsi
messagemanager.idlscriptable this interface enables clients to listen for
messages sent using the nsi
messagebroadcaster, nsi
messagesender, or nsisync
messagesender interfaces.
... 1.0 66 introduced gecko 17 inherits from: nsisupports last changed in gecko 41 (firefox 41 / thunderbird 41 / seamonkey 2.38) implemented by: @mozilla.org/global
messagemanager;1.
... to access this service, use: var globalmm = components.classes["@mozilla.org/global
messagemanager;1"] .getservice(components.interfaces.nsi
messagelistenermanager); method overview void add
messagelistener(in astring
messagename, in nsi
messagelistener listener, [optional] in boolean listenwhenclosed) void remove
messagelistener(in astring
messagename, in nsi
messagelistener listener); void addweak
messagelistener(in astring
messagename, in nsi
messagelistener listener); void removeweak
messagelistener(in astring
messagename, in nsi
messagelistener listener); methods add
messagelistener() reg...
...And 24 more matches
nsISyncMessageSender
idl file: mozilla-central/source/dom/base/nsi
messagemanager.idl inherits from: nsi
messagelistenermanager
message "senders" have a single "other side" to which
messages are sent.
... for example, a child-process
message manager will send
messages that are only delivered to its one parent-process
message manager.
... see
message manager interfaces for more details on the distinction between
message senders and
message broadcasters.
...And 22 more matches
MessageEvent - Web APIs
the
messageevent interface represents a
message received by a target object.
... this is used to represent
messages in: server-sent events (see eventsource.on
message).
... web sockets (see the on
message property of the websocket interface).
...And 22 more matches
Message manager overview
message managers are designed to enable code in one process to communicate with code in a different process.
... at the top level, there are two different sorts of
message managers: frame
message managers: these enable chrome process code to load a script into a browser frame (essentially, a single browser tab) in the content process.
...if chrome code wants to run code in the content process so it can access web content, this is usually the sort of
message manager to use.
...And 20 more matches
HTTP Messages - HTTP
http
messages are how data is exchanged between a server and a client.
... there are two types of
messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server.
... http
messages are composed of textual information encoded in ascii, and span over multiple lines.
...And 17 more matches
nsIMessageBroadcaster
idl file: mozilla-central/source/dom/base/nsi
messagemanager.idl inherits from: nsi
messagelistenermanager
message "broadcasters" don't have a single "other side" that they send
messages to, but rather a set of subordinate
message managers.
... for example, broadcasting a
message through a window
message manager will broadcast the
message to all frame
message managers within its window.
... see
message manager interfaces for more details on the distinction between
message senders and
message broadcasters.
...And 15 more matches
nsIFrameMessageManager
content/base/public/nsi
messagemanager.idlscriptable provides methods for managing
message listeners on local frames.
... this provides a way for local frames to receive
messages from remote frames.
...you should use nsi
messagelistenermanager or nsi
messagesender instead.
...And 13 more matches
nsIMessageListener
idl file: mozilla-central/source/dom/base/nsi
messagemanager.idl inherits from: nsisupports this interface is used to receive
messages sent using the nsi
messagebroadcaster, nsi
messagesender, or nsisync
messagesender interfaces.
... listeners are attached using the nsi
messagelistenermanager interface.
... methods void receive
message(); receive
message() this is for js only.
...And 13 more matches
nsIMessageSender
idl file: mozilla-central/source/dom/base/nsi
messagemanager.idl inherits from: nsi
messagelistenermanager
message senders enable clients to send asynchronous
messages to a single "other side".
... for example, a child-process
message manager will send
messages that are only delivered to its one parent-process
message manager.
... to send
messages to multiple "other sides", you would use nsi
messagebroadcaster.
...And 12 more matches
nsMsgMessageFlags
the nsmsg
messageflags interface describes possible flags for
messages.
... equivalent flags are also defined in nsmsg
messageflags.h.
... constants name value description read 0x00000001 indicates whether or not the
message is read.
...And 11 more matches
MessagePort - Web APIs
the
messageport interface of the channel messaging api represents one of the two ports of a
messagechannel, allowing
messages to be sent from one port and listening out for them arriving at the other.
... methods inherits methods from its parent, eventtarget post
message() sends a
message from the port, and optionally, transfers ownership of objects to other browsing contexts.
... start() starts the sending of
messages queued on the port (only needed when using eventtarget.addeventlistener; it is implied when using
messageport.on
message.) close() disconnects the port, so it is no longer active.
...And 11 more matches
Communicating using "postMessage" - Archive of obsolete content
as an alternative to port, content modules support the built-in
message event.
... in most cases port is preferable to
message events.
... however, the context-menu module does not support port, so to send
messages from a content script to the add-on via a context menu object, you must use
message events.
...And 10 more matches
Folders and message lists
getting the currently-selected
message the folderdisplaywidget has several ways of getting the currently-selected
message(s), depending on what exactly you're trying to do: gfolderdisplay.selectedcount: returns the number of
messages currently selected.
... gfolderdisplay.selected
message: returns the first currently-selected
message.
... when using this, be sure that there's only one selected
message (or that you only care about the first one).
...And 10 more matches
ServiceWorkerMessageEvent - Web APIs
service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
... the serviceworker
messageevent interface of the serviceworker api contains information about an event sent to a serviceworkercontainer target.
... this extends the default
message event to allow setting a serviceworker object as the source of a
message.
...And 9 more matches
Worker.prototype.postMessage() - Web APIs
the post
message() method of the worker interface sends a
message to the worker's inner scope.
... the worker can send back information to the thread that spawned it using the dedicatedworkerglobalscope.post
message method.
... syntax worker.post
message(
message, [transfer]); parameters
message the object to deliver to the worker; this will be in the data field in the event delivered to the dedicatedworkerglobalscope.on
message handler.
...And 9 more matches
ExtendableMessageEvent - Web APIs
the extendable
messageevent interface of the service worker api represents the event object of a
message event fired on a service worker (when a
message is received on the serviceworkerglobalscope from another context) — extends the lifetime of such events.
... constructor extendable
messageevent() creates a new extendable
messageevent object instance.
... extendable
messageevent.data read only returns the event's data.
...And 7 more matches
ServiceWorkerContainer.startMessages() - Web APIs
the start
messages() method of the serviceworkercontainer interface explicitly starts the flow of
messages being dispatched from a service worker to pages under its control (e.g.
... sent via client.post
message()).
... this can be used to react to sent
messages earlier, even before that page's content has finished loading.
...And 7 more matches
MessageChannel - Web APIs
the
messagechannel interface of the channel messaging api allows us to create a new
message channel and send data through it via its two
messageport properties.
... properties
messagechannel.port1 read only returns port1 of the channel.
...
messagechannel.port2 read only returns port2 of the channel.
...And 6 more matches
Worker.onmessage - Web APIs
the on
message property of the worker interface represents an eventhandler, that is a function to be called when the
message event occurs.
... these events are of type
messageevent and will be called when the worker's parent receives a
message (i.e.
... from the dedicatedworkerglobalscope.post
message method).
...And 6 more matches
nsIFrameMessageListener
content/base/public/nsi
messagemanager.idlscriptable implement this interface in a remote frame handling process to receive
messages from the browser process.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is used when implementing out-of-process handling of frames; the process handling a frame should implement this interface in order to receive
messages.
... method overview void receive
message(); methods receive
message() note: this method is for javascript only.
...And 5 more matches
nsIPushMessage
dom/interfaces/push/nsipushnotifier.idlscriptable a push
message sent to a system subscription.
... inherits from: nsisupports last changed in gecko 46.0 (firefox 46.0 / thunderbird 46.0 / seamonkey 2.43) nsipush
message is the subject of a push-
message observer notification.
... this interface resembles push
messagedata from the push api.
...And 5 more matches
DedicatedWorkerGlobalScope.postMessage() - Web APIs
the post
message() method of the dedicatedworkerglobalscope interface sends a
message to the main thread that spawned it.
... the main scope that spawned the worker can send back information to the thread that spawned it using the worker.post
message method.
... syntax post
message(a
message, transferlist); parameters a
message the object to deliver to the main thread; this will be in the data field in the event delivered to the worker.on
message handler.
...And 5 more matches
MessageChannel() - Web APIs
the
messagechannel() constructor of the
messagechannel interface returns a new
messagechannel object with two new
messageport objects.
... syntax var channel = new
messagechannel(); returns a newly created
messagechannel object.
... example in the following code block, you can see a new channel being created using the
messagechannel.
messagechannel constructor.
...And 5 more matches
XForms Message Element - Archive of obsolete content
introduction used in combination with xml event listeners to display a
message to the user when the specified event occurs (see the spec).
... the
message of the
message element can exist in instance data, in a remote document, or as inline text.
... if more than one source of
message is specified in this element, the order of precedence is: single node binding attributes, linking attributes, inline text.
...And 4 more matches
nsIContentFrameMessageManager
idl file: mozilla-central/source/dom/base/nsi
messagemanager.idl inherits from: nsisync
messagesender this interface provides the environment for scripts that are loaded into content frames using the nsiframescriptloader interface.
... it enables these scripts to receive
messages from the chrome process and send
messages back to the chrome process.
... frame scripts can send either synchronous or asynchronous
messages to the chrome process: for details on these messaging apis see the documentation for the nsicontentframe
messagemanager's parent classes nsisync
messagesender and nsi
messagesender.
...And 4 more matches
Client.postMessage() - Web APIs
the post
message() method of the client interface allows a service worker to send a
message to a client (a window, worker, or sharedworker).
... the
message is received in the "
message" event on navigator.serviceworker.
... syntax client.post
message(
message[, transfer]); client.post
message(
message[, { transfer }]); parameters
message the
message to send to the client.
...And 4 more matches
DedicatedWorkerGlobalScope.onmessage - Web APIs
the on
message property of the dedicatedworkerglobalscope interface represents an eventhandler to be called when the
message event occurs and bubbles through the worker — i.e.
... when a
message is sent to the worker using the worker.post
message method.
... syntax self.on
message = function() { ...
...And 4 more matches
MediaKeyMessageEvent - Web APIs
the mediakey
messageevent interface of the encryptedmediaextensions api contains the content and related data when the content decryption module generates a
message for the session.
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediakey
messageevent" target="_top"><rect x="116" y="1" width="200" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="216" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediakey
messageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor mediak...
...ey
messageevent() creates a new instance of mediakey
messageevent.
...And 4 more matches
MessageChannel.port1 - Web APIs
the port1 read-only property of the
messagechannel interface returns the first port of the
message channel — the port attached to the context that originated the channel.
... syntax channel.port1; value a
messageport object, the first port of the channel, that is the port attached to the context that originated the channel.
... example in the following code block, you can see a new channel being created using the
messagechannel() constructor.
...And 4 more matches
MessageChannel.port2 - Web APIs
the port2 read-only property of the
messagechannel interface returns the second port of the
message channel — the port attached to the context at the other end of the channel, which the
message is initially sent to.
... syntax channel.port2; value a
messageport object representing the second port of the channel, the port attached to the context at the other end of the channel.
... example in the following code block, you can see a new channel being created using the
messagechannel.
messagechannel constructor.
...And 4 more matches
PushMessageData - Web APIs
the push
messagedata interface of the push api provides methods which let you retrieve the push data sent by a server in various formats.
...
messages received through the push api are sent encrypted by push services and then automatically decrypted by browsers before they are made accessible through the methods of the push
messagedata interface.
... methods push
messagedata.arraybuffer() extracts the data as an arraybuffer object.
...And 4 more matches
RTCDataChannel.onmessage - Web APIs
the rtcdatachannel.on
message property stores an eventhandler which specifies a function to be called when the
message event is fired on the channel.
... this event is represented by the
messageevent interface.
... this event is sent to the channel when a
message is received from the other peer.
...And 4 more matches
BroadcastChannel.onmessage - Web APIs
the broadcastchannel.on
message event handler is a property that specifies the function to execute when a
message event, of type
messageevent, is received by this broadcastchannel.
... such an event is sent by the browser with a
message broadcasted to the channel.
... syntax channel.on
message = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
...And 3 more matches
MediaError.message - Web APIs
the read-only property mediaerror.
message returns a domstring which contains a human-readable string offering specific diagnostic details related to the error described by the mediaerror object, or an empty string ("") if no diagnostic information can be determined or provided.
... syntax var error
message = mediaerror.
message; value a domstring providing a detailed, specific explanation of what went wrong and possibly how it might be fixed.
...the error handler simply outputs a
message to a box onscreen describing the error, including both the code and the
message.
...And 3 more matches
ServiceWorkerGlobalScope: message event - Web APIs
the
message event of the serviceworkerglobalscope interface occurs when incoming
messages are received.
... controlled pages can use the serviceworker.post
message() method to send
messages to service workers.
... the service worker can optionally send a response back via the client.post
message(), corresponding to the controlled page.
...And 3 more matches
ServiceWorkerGlobalScope.onmessage - Web APIs
the on
message property of the serviceworkerglobalscope interface is an event handler fired whenever a
message event occurs — when incoming
messages are received.
...for the
message event, service workers use the extendable
messageevent interface which extends the extendableevent interface.
... note:
messages received from service worker contexts (e.g.
...And 3 more matches
nsIMessageWakeupService
content/base/public/nsi
messagewakeupservice.idlscriptable implements the
message manager wakeup service; this lets other components be woken up when specific
message manager
messages arrive.
... the parentprocess
messagemanager is used for this, so
messages send from childprocess
messagemanagers will be heard.
...to indicate a wakeup request in a manifest file, add a line that looks something like this: category wakeup-request nscomponent @mozilla.org/myservice;1,nsimyinterface,getservice,my
message1,my
message2[,..] the category entry value consists of a comma separate string that contains: the contract id for your component (e.g.
...And 2 more matches
BroadcastChannel: message event - Web APIs
the
message event is fired on a broadcastchannel object when a
message arrives on that channel.
... bubbles no cancelable no interface
messageevent event handler property on
message examples live example in this example there's a "sender" <iframe> that broadcasts the contents of a <textarea> when the user clicks a button.
... there are two "receiver" iframes that listen to the broadcast
message and write the result into a <div> element.
...And 2 more matches
ExtendableMessageEvent() - Web APIs
the extendable
messageevent() constructor creates a new extendable
messageevent object instance.
... syntax var extendable
messageevent = new extendable
messageevent(type, init); parameters type a domstring that defines the type of the
message event being created.
... source: the client, serviceworker or
messageport that sent the
message.
...And 2 more matches
MIDIMessageEvent - Web APIs
the midi
messageevent interface of the web midi api represents the event passed to the onmidi
message event handler of the midiinput interface.
... a midi
message event is fired every time a midi
message is sent from a device represented by a midiinput, for example when a midi keyboard key is pressed, a knob is tweaked, or a slider is moved.
... constructor midi
messageevent.midi
messageevent creates a new midi
messageevent object instance.
...And 2 more matches
MediaKeyMessageEvent() - Web APIs
the mediakey
messageevent constructor creates a new mediakey
messageevent object which creates a new instance of mediakey
messageevent.
... syntax var mediakey
messageevent = new mediakey
messageevent(typearg, options) parameters typearg a domstring containing one of may be one of license-request, license-renewal, license-renewal, or individualization-request.
... options options are as follows:
messagetype: a developer-defined
message type that allows applications to differentiate
messages without parsing them.
...And 2 more matches
MessageEvent.ports - Web APIs
the ports read-only property of the
messageevent interface is an array of
messageport objects representing the ports associated with the channel the
message is being sent through (where appropriate, e.g.
... in channel messaging or when sending a
message to a shared worker).
... syntax var myports =
messageevent.ports; value an array of
messageport objects.
...And 2 more matches
RTCDataChannel: message event - Web APIs
the webrtc
message event is sent to the on
message event handler on an rtcdatachannel object when a
message has been received from the remote peer.
... bubbles no cancelable no interface
messageevent event handler property on
message note: the
message event uses as its event object type the
messageevent interface defined by the html specification.
... examples for a given rtcdatachannel, dc, created for a peer connection using its createdatachannel() method, this code sets up a handler for incoming
messages and acts on them by adding the data contained within the
message to the current document as a new <p> (paragraph) element.
...And 2 more matches
ServiceWorkerContainer.onmessage - Web APIs
the on
message property of the serviceworkercontainer interface is an event handler fired whenever a
message event occurs — when incoming
messages are received to the serviceworkercontainer object (e.g., via a client.post
message() call).
... note:
messages received from service worker contexts (e.g.
... as the event object of on
message) are represented by
messageevent objects in modern browsers, for consistency with other web messaging features.
...And 2 more matches
ServiceWorkerMessageEvent.data - Web APIs
service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
... the data read-only property of the serviceworker
messageevent interface returns the event's data.
... syntax var mydata = serviceworker
messageeventinstance.data; value any data type.
...And 2 more matches
ServiceWorkerMessageEvent.lastEventId - Web APIs
service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
... the lasteventid read-only property of the serviceworker
messageevent interface represents, in server-sent events, the last event id of the event source.
... syntax var mylasteventid = serviceworker
messageeventinstance.lasteventid; value a domstring.
...And 2 more matches
ServiceWorkerMessageEvent.origin - Web APIs
service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
... the origin read-only property of the serviceworker
messageevent interface returns the origin of the service worker's environment settings object.
... syntax var myorigin = serviceworker
messageeventinstance.origin; value a domstring.
...And 2 more matches
ServiceWorkerMessageEvent.ports - Web APIs
service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
... the ports read-only property of the serviceworker
messageevent interface returns an array of
messageport objects connected with the
message channel the
message is being sent through.
... syntax var myports = serviceworker
messageeventinstance.ports; value an array of
messageport objects.
...And 2 more matches
ServiceWorkerMessageEvent.source - Web APIs
service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
... the source read-only property of the serviceworker
messageevent returns a reference to the serviceworker object of the associated service worker that sent the
message.
... syntax var mysource = serviceworker
messageeventinstance.source; value a serviceworker or
messageport object.
...And 2 more matches
Error.prototype.message - JavaScript
the
message property is a human-readable description of the error.
...spidermonkey makes extensive use of the
message property for exceptions.
... the
message property combined with the name property is used by the error.prototype.tostring() method to create a string representation of the error.
...And 2 more matches
Message Summary Database - Archive of obsolete content
the mail summary files (.msf) are used to store summary information about
messages and threads in a folder, and some meta information about the folder.
...
message headers the
message header object implements the nsimsgdbhdr interface.
... this includes a set of per-
message flags, the more commonly used headers (e.g., subject, sender, from, to, cc, date, etc), and a few other attributes, e.g., keywords.
...so the db knows which
messages are in a thread, which
message a
message is in reply to, etc.
nsIConsoleMessage
xpcom/base/nsiconsole
message.idlscriptable this interface is a base interface for
messages passed to or from the nsiconsoleservice.
... inherits from: nsisupports last changed in gecko 1.7 implementations may provide an object that can be query interfaced, nsisupports.queryinterface(), to provide more specific
message information.
...attributes attribute type description
message wstring the
message in a string format.
... [binaryname(
messagemoz)] read only.
nsIWorkerMessageEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidomevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void init
messageevent(in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg); attributes attribute type description data domstring the event's data.
... methods init
messageevent() initializes the
message event.
... void init
messageevent( in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg ); parameters atypearg the event type.
... see also using web workers nsiworker
messageport nsiworkerglobalscope nsiworkerscope nsiabstractworker nsiworker ...
nsIWorkerMessagePort
dom/interfaces/threads/nsidomworkers.idlscriptable this interface represents a worker thread's
message port, which is used to allow the worker to post
messages back to its creator.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void post
message(in domstring a
message); methods post
message() posts a
message into the event queue.
... void post
message( in domstring a
message ); parameters a
message the
message to post.
... see also using web workers nsiworker
messageevent nsiworkerglobalscope nsiworkerscope nsiabstractworker nsiworker ...
DOMException.message - Web APIs
the
message read-only property of the domexception interface returns a domstring representing a
message or description associated with the given error name.
... syntax var domexception
message = domexceptioninstance.
message; value a domstring.
... specifications specification status comment web idlthe definition of '
message' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
messagechrome full support yesedge full support 12firefox full support 1ie ?
EventSource.onmessage - Web APIs
the on
message property of the eventsource interface is an eventhandler called when a
message event is received, that is when a
message is coming from the source.
... event objects of on
message event handers are of type
messageevent.
... syntax eventsource.on
message = function examples evtsource.on
message = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "
message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'on
message' in that specification.
ExtendableMessageEvent.data - Web APIs
the data read-only property of the extendable
messageevent interface returns the event's data.
... syntax var mydata = extendable
messageevent.data; value any data type.
... examples when the following code is used inside a service worker to respond to a push
messages by sending the data received via push
messagedata to the main context via a channel
message, the event object of on
message will be a extendable
messageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.post
message(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.post
message(obj); } }); self.on
message = function(e) { console.log(e.data); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendable
messageevent.data' in that specification.
ExtendableMessageEvent.lastEventId - Web APIs
the lasteventid read-only property of the extendable
messageevent interface represents, in server-sent events, the last event id of the event source.
... syntax var mylasteventid = extendable
messageevent.lasteventid; value a domstring.
... examples when the following code is used inside a service worker to respond to a push
messages by sending the data received via push
messagedata to the main context via a channel
message, the event object of on
message will be a extendable
messageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.post
message(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.post
message(obj); } }); self.on
message = function(e) { console.log(e.lasteventid); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendable
messageevent.lasteventid' in that specification.
ExtendableMessageEvent.origin - Web APIs
the origin read-only property of the extendable
messageevent interface returns the origin of the client that sent the
message.
... syntax var myorigin = extendable
messageevent.origin; value a usvstring.
... examples when the following code is used inside a service worker to respond to a push
messages by sending the data received via push
messagedata to the main context via a channel
message, the event object of on
message will be a extendable
messageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.post
message(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.post
message(obj); } }); self.on
message = function(e) { console.log(e.origin); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendable
messageevent.origin' in that specification.
ExtendableMessageEvent.source - Web APIs
the source read-only property of the extendable
messageevent interface returns a reference to the client object from which the
message was sent.
... syntax var mysource = extendable
messageevent.source; value a client, serviceworker or
messageport object.
... examples when the following code is used inside a service worker to respond to a push
messages by sending the data received via push
messagedata to the main context via a channel
message, the event object of on
message will be a extendable
messageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.post
message(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.post
message(obj); } }); self.on
message = function(e) { console.log(e.source); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendable
messageevent.source' in that specification.
MessagePort.close() - Web APIs
the close() method of the
messageport interface disconnects the port, so it is no longer active.
... this stops the flow of
messages to that port.
... example in the following code block, you can see a handle
message handler function, run when a
message is sent back to this document using eventtarget.addeventlistener.
... channel.port1.addeventlistener('
message', handle
message, false); function handle
message(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); you could stop
messages being sent at any time using channel.port1.close(); specifications specification status comment html living standardthe definition of 'close()' in that specification.
NDEFMessage - Web APIs
the ndef
message interface of the web nfc api is an abstract interface that represents
message that can be received or sent to a to compatible nfc devices, e.g.
... constructor ndef
message.ndef
message() returns a new ndef
message containing specified data.
... attributes ndef
message.records read only represents a list of ndef records defining the ndef
message.
... specifications specification status comment web nfc, ndef
message draft initial definition.
SpeechRecognitionError.message - Web APIs
the
message read-only property of the speechrecognitionerror interface returns a
message describing the error in more detail.
... syntax var myerrormsg = event.
message; value a domstring containing more details about the error that was raised.
... note that the spec does not define the exact wording of these
messages — this is up to the implementors to decide upon.
... examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.
message); } ...
SpeechRecognitionErrorEvent.message - Web APIs
the
message read-only property of the speechrecognitionerrorevent interface returns a
message describing the error in more detail.
... syntax var myerrormsg = event.
message; value a domstring containing more details about the error that was raised.
... note that the spec does not define the exact wording of these
messages — this is up to the implementors to decide upon.
... examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.
message); } specifications specification status comment web speech apithe definition of '
message' in that specification.
WebSocket.onmessage - Web APIs
the websocket.on
message property is an eventhandler that is called when a
message is received from the server.
... it is called with a
messageevent.
... syntax awebsocket.on
message = function(event) { console.debug("websocket
message received:", event); }; value an eventlistener.
... specifications specification status comment html living standardthe definition of 'websocket: on
message' in that specification.
WindowEventHandlers.onmessage - Web APIs
the on
message property of the windoweventhandlers mixin is the eventhandler called whenever an object receives a
message event.
... syntax window.addeventlistener('
message', function(event) { ...
... }) window.on
message = function(event) { ...
... } specifications specification status comment html living standardthe definition of 'on
message' in that specification.
Message manager
message managers provide a way for chrome-privileged javascript code to communicate across process boundaries.
... these guides explain how to use
message managers in multiprocess firefox.
... guides
message manager overview frame script loading and lifetime communicating with frame scripts performance best practices frame script environment limitations of frame scripts process scripts api reference nsiframescriptloader nsi
messagelistenermanager nsi
messagebroadcaster nsi
messagesender nsisync
messagesender nsicontentframe
messagemanager nsiprocessscriptloader ...
nsIChromeFrameMessageManager
content/base/public/nsi
messagemanager.idlscriptable handles loading of content in a remote chrome frame.
... 1.0 66 introduced gecko 2.0 inherits from: nsiframe
messagemanager last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void loadframescript(in astring aurl, in boolean aallowdelayedload); void removedelayedframescript(in astring aurl); methods loadframescript() loads a script into the remote frame.
... see also content process event handling nsicontentframe
messagemanager nsiframeloader nsiframe
messagelistener ...
nsIInProcessContentFrameMessageManager
content/base/public/nsiframe
messagemanager.idlnot scriptable ???
... 1.0 66 introduced gecko 2.0 inherits from: nsicontentframe
messagemanager last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsicontent getownercontent(); violates the xpcom interface guidelines methods violates the xpcom interface guidelines getownercontent() nsicontent getownercontent(); parameters none.
...see also content process event handling nsicontentframe
messagemanager ...
DB Views (message lists)
the thread pane (aka
message list) is driven by classes that implement nsimsgdbview and inherit from nsmsgdbview.
... these are the main view classes: nsmsgthreadeddbview - (implementation) nsmsgsearchdbview - (implementation) nsmsgquicksearchdbview - (implementation) nsmsgxfvirtualfolderdbview - (implementation) nsmsggroupview - (implementation) usually, a view object has parallel arrays, which map directly to lines in the
message list: m_keys
message header key m_flags 32 bits, combination of
message header flags and view-only flags (e.g., collapsed) m_level the indentation level when in threaded mode.
...one unique thing about nsmsggroupview is that instead of using the
message database's nsmsgthread objects like the other view classes, it uses an nsmsggroupthread object, which also implements nsimsgthread.
Message Interfaces
nsimsghdr nsimsghdr - this interface describes headers for all mail
messages.
... it can be used to retrieve address, subject and related header information for a mail
message.
... nsimsgdbhdr nsimsgdbhdr - this interface describes headers for mail
messages.
BroadcastChannel.onmessageerror - Web APIs
the on
messageerror event handler of the broadcastchannel interface is an eventlistener, called whenever an
messageevent of type
messageerror is fired on the broadcastchannel instance — that is, when it receives a
message that cannot be deserialized.
... syntax bc.on
messageerror = function() { ...
... }; specifications specification status comment html living standardthe definition of 'on
messageerror' in that specification.
BroadcastChannel.postMessage() - Web APIs
the broadcastchannel.post
message() sends a
message, which can be of any kind of object, to each listener in any browsing context with the same origin.
... the
message is transmitted as a
message event targeted at each broadcastchannel bound to the channel.
... syntax var str = channel.post
message(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.post
message()' in that specification.
DedicatedWorkerGlobalScope: message event - Web APIs
the
message event is fired on a dedicatedworkerglobalscope object when the worker receives a
message from its parent (i.e.
... when the parent sends a
message using worker.post
message()).
... bubbles no cancelable no interface
messageevent event handler property on
message examples this code creates a new worker and sends it a
message using worker.post
message(): const worker = new worker("static/scripts/worker.js"); worker.addeventlistener('
message', (event) => { console.log(`received
message from worker: ${event.data}`) }); the worker can listen for this
message using addeventlistener(): // inside static/scripts/worker.js self.addeventlistener('
message', (event) => { console.log(`received
message from parent: ${event.data}`); }); alternatively, it could listen using the on
message event handler property: // static/scripts/worker.js self.on
message = (event) => { console.log(`received
message from parent: ${e...
DedicatedWorkerGlobalScope.onmessageerror - Web APIs
the on
messageerror event handler of the dedicatedworkerglobalscope interface is an eventlistener, called whenever an
messageevent of type
messageerror is fired on the worker—that is, when it receives a
message that cannot be deserialized.
... syntax on
messageerror = function() { ...
... }; specifications specification status comment html living standardthe definition of 'on
messageerror' in that specification.
EventSource: message event - Web APIs
the
message event of the eventsource api is fired when data is received through an event source.
... bubbles no cancelable no interface
messageevent event handler property eventsource.on
message examples in this basic example, an eventsource is created to receive events from the server; a page with the name sse.php is responsible for generating the events.
... var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.addeventlistener('
message', (e) => { var newelement = document.createelement("li"); newelement.textcontent = "
message: " + e.data; eventlist.appendchild(newelement); }); on
message equivalent evtsource.on
message = (e) => { var newelement = document.createelement("li"); newelement.textcontent = "
message: " + e.data; eventlist.appendchild(newelement); }; specifications specification status html living standardthe definition of '
message event' in that specification.
ExtendableMessageEvent.ports - Web APIs
the ports read-only property of the extendable
messageevent interface returns the array containing the
messageport objects representing the ports of the associated
message channel (the channel the
message is being sent through.) syntax var myports = extendable
messageevent.ports; value an array of
messageport objects.
... examples when the following code is used inside a service worker to respond to a push
messages by sending the data received via push
messagedata to the main context via a channel
message, the event object of on
message will be a extendable
messageevent.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.post
message(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.post
message(obj); } }); self.on
message = function(e) { port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendable
messageevent.ports' in that specification.
GeolocationPositionError.message - Web APIs
the geolocationpositionerror.
message read-only property returns a human-readable domstring describing the details of the error.
... syntax let msg = geolocationpositionerrorinstance.
message value a human-readable domstring describing the details of the error.
... specifications specification status comment geolocation apithe definition of 'geolocationpositionerror.
message' in that specification.
HTMLObjectElement.validationMessage - Web APIs
the validation
message read-only property of the htmlobjectelement interface returns a domstring representing a localized
message that describes the validation constraints that the control does not satisfy (if any).
... syntax var string = htmlobjectelement.validation
message; value a domstring.
... specifications specification status comment html living standardthe definition of 'validation
message' in that specification.
message - Web APIs
the mediakey
messageevent.
message read-only property returns an arraybuffer with a
message from the content decryption module.
...
messages vary by key system.
... syntax var
messagetype = mediakey
messageevent.
messagetype; specifications specification status comment encrypted media extensionsthe definition of '
message' in that specification.
MediaKeySession.onmessage - Web APIs
the on
message property of the mediakeysession is an event handler, fired whenever a mediakey
messageevent occurs, denoting a
message is generated by the content decryption module.
...ssion" target="_top"><rect x="151" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediakeysession</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax mediakeysession.on
message = function(mediakey
messageevent) { ...
... } specifications specification status comment encrypted media extensionsthe definition of 'on
message' in that specification.
MessageEvent.data - Web APIs
the data read-only property of the
messageevent interface represents the data sent by the
message emitter.
... syntax var data =
messageevent.data; value the data sent by the
message emitter; this can be any data type.
... example myworker.on
message = function(e) { result.textcontent = e.data; console.log('
message received from worker'); }; specifications specification status comment html living standardthe definition of '
messageevent: data' in that specification.
MessageEvent.lastEventId - Web APIs
the lasteventid read-only property of the
messageevent interface is a domstring representing a unique id for the event.
... syntax var myid =
messageevent.lasteventid; value a domstring representing the id.
... example myworker.on
message = function(e) { result.textcontent = e.data; console.log('
message received from worker'); console.log(e.lasteventid); }; specifications specification status comment html living standardthe definition of '
messageevent: lasteventid' in that specification.
MessageEvent.origin - Web APIs
the origin read-only property of the
messageevent interface is a usvstring representing the origin of the
message emitter.
... syntax var origin =
messageevent.origin; value a usvstring representing the origin.
... example myworker.on
message = function(e) { result.textcontent = e.data; console.log('
message received from worker'); console.log(e.origin); }; specifications specification status comment html living standardthe definition of '
messageevent: origin' in that specification.
MessageEvent.source - Web APIs
the source read-only property of the
messageevent interface is a
messageeventsource (which can be a windowproxy,
messageport, or serviceworker object) representing the
message emitter.
... syntax let mysource =
messageevent.source; value a
messageeventsource (which can be a windowproxy,
messageport, or serviceworker object) representing the
message emitter.
... example myworker.on
message = function(e) { result.textcontent = e.data; console.log('
message received from worker'); console.log(e.source); }; specifications specification status comment html living standardthe definition of '
messageevent: source' in that specification.
MessagePort.start() - Web APIs
the start() method of the
messageport interface starts the sending of
messages queued on the port.
... this method is only needed when using eventtarget.addeventlistener; it is implied when using
messagechannel.on
message.
... example in the following code block, you can see a handle
message handler function, run when a
message is sent back to this document using on
message: channel.port1.on
message = handle
message; function handle
message(e) { para.innerhtml = e.data; } another option would be to do this using eventtarget.addeventlistener, however, when this method is used, you need to explicitly call start() to begin the flow of
messages to this document: channel.port1.addeventlistener('
message', handle
message, false); function handle
message(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); specifications specification status comment html living sta...
NDEFMessage.records - Web APIs
the records property of ndef
message interface represents a list of ndefrecords defining the ndef
message.
... syntax var recordlist = ndef
message.records; value a list of ndefrecord object that represent data recorded in the
message.
... specifications specification status comment web nfc, dnef
message.records draft initial definition.
OverconstrainedError.message - Web APIs
the
message read-only property of the overconstrainederror interface returns the text supplied in the constructor.
... syntax var
message = overconstrainederror.
message; value a domstring.
... specifications specification status comment media capture and streamsthe definition of '
message' in that specification.
ServiceWorkerContainer: message event - Web APIs
the
message event is used in a page controlled by a service worker to receive
messages from the service worker.
... bubbles no cancelable no interface
messageevent event handler property on
message examples in this example the service worker get the client's id from a fetch event and then sends it a
message using client.post
message: // in the service worker async function
messageclient(clientid) { const client = await clients.get(clientid); client.post
message('hi client!'); } addeventlistener('fetch', (event) => {
messageclient(event.clientid); event.respondwith(() => { // ...
... }); }); the client can receive the
message by listening to the
message event: // in the page being controlled navigator.serviceworker.addeventlistener('
message', (
message) => { console.log(
message); }); specifications specification status service workersthe definition of '
message' in that specification.
WebGLContextEvent.statusMessage - Web APIs
the read-only webglcontextevent.status
message property contains additional event status information, or is an empty string if no additional information is available.
... examples the status
message property can contain a platform dependent string with details of an event.
... var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log('webgl context creation failed:' + e.status
message || 'unknown error'); }, false); specifications specification status comment webgl 1.0the definition of 'webglcontextevent.status
message' in that specification.
WebSocket: message event - Web APIs
the
message event is fired when data is received through a websocket.
... bubbles no cancelable no interface
messageevent event handler property on
message examples // create websocket connection.
... const socket = new websocket('ws://localhost:8080'); // listen for
messages socket.addeventlistener('
message', function (event) { console.log('
message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket
message' in that specification.
Window: message event - Web APIs
the
message event is fired on a window object when the window receives a
message, for example from a call to window.post
message() from another browsing context.
... bubbles no cancelable no interface
messageevent event handler property on
message examples suppose a script sends a
message to a different browsing context, such as another <iframe>, using code like this: const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const window
messagebutton = document.queryselector('#window-
message'); window
messagebutton.addeventlistener('click', () => { targetframe.post
message('hello there', targetorigin); }); the receiver can listen for the
message using addeventlistener() with code like this: window.addeventlistener('
message', (event) => { console.log(`received
message: ${event.data}`); }); alternatively the listener could use the on
message event handler property: w...
...indow.on
message = (event) => { console.log(`received
message: ${event.data}`); }; specifications specification status html living standard living standard ...
WindowEventHandlers.onmessageerror - Web APIs
the on
messageerror event handler of the windoweventhandlers interface is an eventlistener, called whenever an
messageevent of type
messageerror is fired on a window—that is, when it receives a
message that cannot be deserialized.
... syntax window.on
messageerror = function() { ...
... }; specifications specification status comment html living standardthe definition of 'on
messageerror' in that specification.
Worker: message event - Web APIs
the
message event is fired on a worker object when the worker's parent receives a
message from its worker (i.e.
... when the worker sends a
message using dedicatedworkerglobalscope.post
message()).
... bubbles no cancelable no interface
messageevent event handler property on
message examples this code creates a new worker and listens to
messages from it using addeventlistener(): const worker = new worker("static/scripts/worker.js"); worker.addeventlistener('
message', (event) => { console.log(`received
message from worker: ${event.data}`) }); alternatively, it could listen using the on
message event handler property: const worker = new worker("static/scripts/worker.js"); worker.on
message = (event) => { console.log(`received
message from worker: ${event.data}`) }; the worker posts
messages using self.post
message(): // static/scripts/worker.js self.post
message('i\'m alive!'); specifications specification status ...
Worker: messageerror event - Web APIs
the
messageerror event is fired on a worker object when it receives a
message that can't be deserialized.
... bubbles no cancelable no interface
messageevent event handler property on
messageerror examples create a worker, and listen for
message and
messageerror events using addeventlistener(): // inside main.js const worker = new worker("static/scripts/worker.js"); worker.addeventlistener("
message", (event) => { console.error(`received
message from worker: ${event}`); }); worker.addeventlistener("
messageerror", (event) => { console.error(`error receiving
message from worker: ${event}`); }); the same, but using the on
messageerror event handler property: // inside main.js const worker = new worker("static/scripts/worker.js"); worker.on
message = (event) => { console.error(`received
message from worker: ${event}`); }; worker.onmes...
...sageerror = (event) => { console.error(`error receiving
message from worker: ${event}`); }; specifications specification status html living standard living standard ...
Worker.onmessageerror - Web APIs
the on
messageerror event handler of the worker interface is an eventlistener, called whenever an
messageevent of type
messageerror is fired on the worker instance — that is, when it receives a
message that cannot be deserialized.
... syntax worker.on
messageerror = function() { ...
... }; specifications specification status comment html living standardthe definition of 'on
messageerror' in that specification.
<xsl:message> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:
message> element outputs a
message (to the javascript console in ns) and optionally terminates execution of the stylesheet.
... syntax <xsl:
message terminate="yes" | "no" > template </xsl:
message> required attributes none.
...the default value is "no", in which case the
message is output and execution continues.
BroadcastChannel: messageerror event - Web APIs
the
messageerror event is fired on a broadcastchannel object when a
message arrives on the channel that can't be deserialized.
... bubbles no cancelable no interface
messageevent event handler property on
messageerror examples this code uses addeventlistener to listen for
messages and errors: const channel = new broadcastchannel('example-channel'); channel.addeventlistener('
message', (event) => { received.textcontent = event.data; }); channel.addeventlistener('
messageerror', (event) => { console.error(event); }); the same, but using the on
message and on
messageerror event handler properties: const channel = new broadcastchannel('example-channel'); channel.on
message = (event) => { received.textcontent = event.data; }; channel.on
messageerror = (event) => { console.log(event); }; specifications specification status html living standar...
DedicatedWorkerGlobalScope: messageerror event - Web APIs
the
messageerror event is fired on a dedicatedworkerglobalscope object when it receives a
message that can't be deserialized.
... bubbles no cancelable no interface
messageevent event handler property on
messageerror examples listen for
messageerror using addeventlistener(): // inside worker.js self.addeventlistener('
messageerror', (event) => { self.post
message('error receiving
message'); console.error(event); }); the same, but using the on
messageerror event handler property: // inside worker.js self.on
messageerror = (event) => { self.post
message('error receiving
message'); console.error(event); }; specifications specification status html living standard living standard ...
Window: messageerror event - Web APIs
the
messageerror event is fired on a window object when it receives a
message that can't be deserialized.
... bubbles no cancelable no interface
messageevent event handler property on
messageerror examples listen for
messageerror using addeventlistener(): window.addeventlistener('
messageerror', (event) => { console.error(event); }); the same, but using the on
messageerror event handler property: window.on
messageerror = (event) => { console.error(event); }; specifications specification status html living standard living standard ...
PushMessageData.json() - Web APIs
the json()method of the push
messagedata interface extracts push
message data by parsing it as a json string and returning the result.
Index - Web APIs
209 audioworkletnode.port api, audioworkletnode, experimental, property, reference, web audio api, port the read-only port property of the audioworkletnode interface returns the associated
messageport.
... 214 audioworkletprocessor.port api, audio, audioworkletprocessor, experimental, property, reference, web audio api the read-only port property of the audioworkletprocessor interface returns the associated
messageport.
...
messages are broadcasted via a
message event fired at all broadcastchannel objects listening to the channel.
...And 153 more matches
IPDL Tutorial
ipdl, short for "inter-process-communication protocol definition language", is a mozilla-specific language allowing c++ code to pass
messages between processes or threads in an organized and secure way.
... all
messages for multi-process plugins and tabs in firefox are declared in the ipdl language.
... all ipdl
messages are sent between parent and a child end points, called actors.
...And 63 more matches
AsyncTestUtils extended framework
boilerplate add the following code to the top of your test file to import everything you need: load("../../mailnews/resources/loghelper.js"); load("../../mailnews/resources/asynctestutils.js"); load("../../mailnews/resources/
messagegenerator.js"); load("../../mailnews/resources/
messagemodifier.js"); load("../../mailnews/resources/
messageinjection.js"); if the directory where you are adding the tests does not have a head_*.js file that has the two following lines, add them at the top of your test file (before the lines shown above): load("../../mailnews/resources/maildirservice.js"); load("../../mailnews/resources/mailte...
...stutils.js"); at the bottom of the test file, add the following: var tests =[ // list your tests here ]; function run_test() { configure_
message_injection({mode: "local"}); async_run_tests(tests); } asynchronous testing basics why do we need it?
...for example, you would do "yield async_move_
messages(...);" and be done with it.
...And 55 more matches
Signaling and video calling - Web APIs
through this third server, the two devices can locate one another, and exchange negotiation
messages.
...although it's sdp, even this doesn't matter so much: the content of the
message going through the signaling server is, in effect, a black box.
...the server supports several
message types to handle tasks, such as registering new users, setting usernames, and sending public chat
messages.
...And 49 more matches
nsIMsgDBView
sgviewindex index); nsimsgdbview clonedbview(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); void geturisforselection([array, size_is(count)] out string uris, out unsigned long count); void getindicesforselection([array, size_is(count)] out nsmsgviewindex indices, out unsigned long count); void load
messagebymsgkey(in nsmsgkey amsgkey); void load
messagebyviewindex(in nsmsgviewindex aindex); void load
messagebyurl(in string aurl); void reload
message(); void reload
messagewithallparts(); void selectmsgbykey(in nsmsgkey key); void selectfoldermsgbykey(in nsimsgfolder afolder, in nsmsgkey akey); void ondeletecompleted(in boolean succeeded); ...
... keyforfirstselected
message nsmsgkey readonly: the key of the first
message in the current selection.
... viewindexforfirstselectedmsg nsmsgviewindex readonly: the index of the first selected
message.
...And 47 more matches
Mail composition back end
pizzarro <rhp@netscape.com> contents overview sending
messages nsimsgsend sending listener interfaces nsimsgsendlistener nsimsgcopyservicelistener copy operations copy to sent folder drafts templates "send later" sending unsent
messages sending unsent
messages listener quoting sample programs overview i've done considerable work in the past few weeks reorganizing the mail composition back end, so i thought it would be helpful to put together a small doc on the new interfaces and how one can use them.
... the mail composition back end is responsible for the assembly and creation of rfc822
messages to be delivered either via smtp or nntp services.
...included in this functionality is the code to copy the
messages to the appropriate locations after delivery (i.e.
...And 47 more matches
Index
209 mozistorageerror interfaces, storage the mozistorageerror interface represents errors returned by the storage api, offering attributes to obtain the error code as well as a human-readable error
message corresponding to the error that occurred.
... 323 nsialertsservice interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference by default a
message is displayed in a small window that slides up from the bottom of the screen, holds there for a few seconds, then slides down.
... 390 nsichromeframe
messagemanager interfaces, interfaces:scriptable, xpcom, xpcom interface reference loads a script into the remote frame.
...And 45 more matches
nsIMessenger
the nsimessenger interface provides functions for managing the history, undo and redo operations, and for loading, saving, or deleting
messages and attachments in mailnews.
...cstring aurl); void loadurl(in nsidomwindow ptr, in acstring aurl); void launchexternalurl(in acstring aurl); boolean canundo(); boolean canredo(); unsigned long getundotransactiontype(); unsigned long getredotransactiontype(); void undo(in nsimsgwindow msgwindow); void redo(in nsimsgwindow msgwindow); void sendunsent
messages(in nsimsgidentity aidentity, in nsimsgwindow amsgwindow); void setdocumentcharset(in acstring characterset); void saveas(in acstring auri, in boolean aasfile, in nsimsgidentity aidentity, in astring amsgfilename); void openattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring
messageuri, in boolean isexternalattachment); void...
... saveattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring
messageuri, in boolean isexternalattachment); void saveallattachments(in unsigned long count, [array, size_is(count)] in string contenttypearray, [array, size_is(count)] in string urlarray, [array, size_is(count)] in string displaynamearray, [array, size_is(count)] in string
messageuriarray); void saveattachmenttofile(in nsifile afile, in acstring aurl, in acstring a
messageuri, in acstring acontenttype, in nsiurllistener alistener); void detachattachment(in string contenttpe, in string url, in string displayname, in string
messageuri, in boolean savefirst, [optional] in boolean withoutwarning); void detachallattachments(in unsigned long count, [array, size_is(count)] i...
...And 42 more matches
nsIMsgDBHdr
the nsimsgdbhdr interface describes headers for mail
messages.
... inherits from: nsisupports this interface is usually given to you in return to a query from the
message database.
...for instance, msghdrforcurrent
message() will return the currently selected
message's header.
...And 42 more matches
ui/frame - Archive of obsolete content
messages logged from a frame script using the console will not appear in the terminal when you run the add-on using jpm run.
... communicating with frames you can exchange
messages between the main add-on code and scripts loaded into the frame using an api modeled on window.post
message().
...so there are three cases to consider: sending
messages from a frame script to the main add-on code sending
messages from the main add-on code to all instances of a frame, across all browser windows sending
messages from the main add-on code to a single instance of a frame, attached to a specific browser window in all cases, post
message() takes two arguments: the
message itself and a targetorigin.
...And 41 more matches
Using Web Workers - Web APIs
once created, a worker can send
messages to the javascript code that created it by posting
messages to an event handler specified by that code (and vice versa).
... data is sent between workers and the main thread via a system of
messages — both sides send their
messages using the post
message() method, and respond to
messages via the on
message event handler (the
message is contained within the
message event's data attribute.) the data is copied rather than shared.
...all you need to do is call the worker() constructor, specifying the uri of a script to execute in the worker thread (main.js): var myworker = new worker('worker.js'); sending
messages to and from a dedicated worker the magic of workers happens via the post
message() method and the on
message event handler.
...And 40 more matches
Client-side form validation - Learn web development
you'll get
messages such as: "this field is required" (you can't leave this field blank).
... if the information is correctly formatted, the application allows the data to be submitted to the server and (usually) saved in a database; if the information isn't correctly formatted, it gives the user an error
message explaining what needs to be corrected, and lets them try again.
... if the user tries to send the data, the browser will block the form and display an error
message.
...And 32 more matches
nsIMsgFolder
; void rename(in astring name, in nsimsgwindow msgwindow); void renamesubfolders( in nsimsgwindow msgwindow, in nsimsgfolder oldfolder); astring generateuniquesubfoldername(in astring prefix,in nsimsgfolder otherfolder); void updatesummarytotals(in boolean force); void summarychanged(); long getnumunread(in boolean deep); long gettotal
messages(in boolean deep); void clearnew
messages(); void clearrequirescleanup(); void setflag(in unsigned long flag); void clearflag(in unsigned long flag); boolean getflag(in unsigned long flag); void toggleflag(in unsigned long flag); void onflagchange(in unsigned long flag); void setprefflag(); nsimsgfolder getfolderswith...
...flag(in unsigned long flags, in unsigned long resultsize, out unsigned long numfolders); nsisupportsarray getallfolderswithflag(in unsigned long aflag); void getexpansionarray(in nsisupportsarray expansionarray); acstring geturiformsg(in nsimsgdbhdr msghdr); void delete
messages(in nsisupportsarray
messages,in nsimsgwindow msgwindow, in boolean deletestorage, in boolean ismove, in nsimsgcopyservicelistener listener, in boolean allowundo); void copy
messages(in nsimsgfolder srcfolder, in nsisupportsarray
messages,in boolean ismove, in nsimsgwindow msgwindow,in nsimsgcopyservicelistener listener, in boolean isfolder, in boolean allowundo); void copyfolder(in nsimsgfolder srcfolder, in boolean ismovefolder,in nsimsgwindow msgwindow, in nsimsgcopyse...
...rvicelistener listener ); void copyfile
message(in nsifile file, in nsimsgdbhdr msgtoreplace,in boolean isdraft, in unsigned long newmsgflags,in nsimsgwindow msgwindow,in nsimsgcopyservicelistener listener); void acquiresemaphore(in nsisupports semholder); void releasesemaphore(in nsisupports semholder); boolean testsemaphore(in nsisupports semholder); void getnew
messages(in nsimsgwindow awindow, in nsiurllistener alistener); void writetofoldercache(in nsimsgfoldercache foldercache, in boolean deep); long getnumnew
messages(in boolean deep); void setnumnew
messages(in long numnew
messages); acstring generate
messageuri(in nsmsgkey msgkey); void add
messagedispositionstate(in nsimsgdbhdr a
message,in nsmsgdispositio...
...And 30 more matches
dev/panel - Archive of obsolete content
when the panel's created, the framework passes it a debuggee: this is a
messageport object that you can use to exchange json
messages with the browser that the developer tools are currently debugging.
... the
messages follow the remote debugging protocol.
...: const { panel } = require("dev/panel"); const { class } = require("sdk/core/heritage"); const mypanel = class({ extends: panel, label: "my panel", tooltip: "my new devtool", icon: "./my-devtool.png", url: "./my-devtool.html", setup: function(options) { // my setup goes here }, dispose: function() { // my teardown goes here }, onready: function() { // i can send
messages to // the panel document here } }); alternatively, you can use the extend function: const { extend } = require("sdk/core/heritage"); function mypanel() {}; mypanel.prototype = extend(panel.prototype, { label: "my panel", tooltip: "...", ....
...And 28 more matches
HTTP Index - HTTP
though often based on a tcp/ip layer, it can be used on any reliable transport layer, that is, a protocol that doesn't lose
messages silently like udp does.
...it relies on a few basic concepts like the notion of resources and uris, a simple structure of
messages, and a client-server structure for the communication flow.
... 21 cors errors cors, errors, http, https,
messages, same-origin, security, console, troubleshooting cross-origin resource sharing (cors) is a standard that allows a server to relax the same-origin policy.
...And 28 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
35 block cipher mode of operation block cipher mode of operation, cryptography, glossary, security a block cipher mode of operation, usually just called a "mode" in context, specifies how a block cipher should be used to encrypt or decrypt
messages that are longer than the block size.
...challenge-response protocols are one way to fight against replay attacks where an attacker listens to the previous
messages and resends them at a later time to get the same credentials as the original
message.
... 76 cipher suite cryptography, glossary, security a cipher suite is a combination of a key exchange algorithm, authentication method, bulk encryption cipher, and
message authentication code.
...And 27 more matches
Build your own function - Learn web development
active learning: let's build a function the custom function we are going to build will be called display
message().
... it will display a custom
message box on a web page and will act as a customized replacement for a browser's built-in alert() function.
...type the following in your browser's javascript console, on any page you like: alert('this is a
message'); the alert function takes a single argument — the string that is displayed in the alert box.
...And 25 more matches
nsMsgViewCommandType
for example to mark a
message read, you would call: // assuming gdbview is a global nsimsgdbview gdbview.docommand(components.interfaces.nsmsgviewcommandtype.mark
messagesread); mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) constants name value description mark
messagesread 0 marks the selected
messages as read.
... mark
messagesunread 1 mark the selected
messages as unread toggle
messageread 2 toggle the read flag of the selected
messages flag
messages 3 flag the selected
messages.
...And 24 more matches
Communicating with frame scripts
the api is mostly symmetrical, with one major exception: frame scripts can send asynchronous or synchronous
messages to chrome, but chrome can only send asynchronous
messages to content.
... content to chrome the frame script can choose to send synchronous or asynchronous
messages to chrome code.
... asynchronous messaging to send an asynchronous
message the frame script uses the global sendasync
message() function: // frame script sendasync
message("my-addon@me.org:my-e10s-extension-
message"); sendasync
message() takes one mandatory parameter, which is the name of the
message.
...And 22 more matches
Index
when dealing with certificates (x.509), file formats such as pkcs#12 (certificates and keys), pkcs#7 (signed data), and
message formats as cms, we should mention asn.1, which is a syntax for storing structured data in a very efficient (small sized) presentation.
...there are tools for managing nss databases, for dumping or verifying certificates, for registering pkcs#11 modules with a database, for processing cms encrypted/signed
messages, etc.
... 174 hashing - sample 1 html, hashing sample, javascript, nss, web development, hashing the nss same code below computes the hash of a file and saves it to another file, this illustrates the use of nss
message apis.
...And 22 more matches
Communicating using "port" - Archive of obsolete content
to send
messages from one side to the other, use port.emit() to receive
messages sent from the other side, use port.on()
messages are asynchronous: that is, the sender does not wait for a reply from the recipient but just emits the
message and continues processing.
... here's a simple add-on that sends a
message to a content script using port: var tabs = require("sdk/tabs"); var alertcontentscript = "self.port.on('alert', function(
message) {" + " window.alert(
message);" + "})"; tabs.on("ready", function(tab) { worker = tab.attach({ contentscript: alertcontentscript }); worker.port.emit("alert", "
message from the add-on"); }); tabs.open("http://www.mozilla.org"); in total, the port object defines four functions: emit(): emit a
message.
... on(): listen to a
message.
...And 21 more matches
widget - Archive of obsolete content
so implementing a complete solution usually means you have to send
messages between the content script and the main add-on code.
... you can communicate with the script using either the post
message() api or (preferably, usually) the port api.
...but because content scripts can't use the sdk's apis, we'll want the content script to send
messages to the main add-on code, which can then implement the media player functions using the sdk.
...And 21 more matches
sslerr.html
ssl_error_bad_mac_read -12273 "ssl received a record with an incorrect
message authentication code." this usually indicates that the client and server have failed to come to agreement on the set of keys used to encrypt the application data and to check
message integrity.
... ssl_error_bad_mac_alert -12272 "ssl peer reports incorrect
message authentication code." the remote system has reported that it received a
message with a bad
message authentication code from the local system.
...this usually indicates that the client and server have failed to come to agreement on the set of keys used to encrypt the application data and to check
message integrity.
...And 20 more matches
Using channel messaging - Web APIs
the channel messaging api allows two separate scripts running in different browsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, or two documents via a sharedworker) to communicate directly, passing
messages between one another through two-way channels (or pipes) with a port at each end.
...you have to think about whether the origins trust one another, and how the
messages are passed.
...
message channels on the other hand can provide a secure channel that allows you to pass data between different browsing contexts.
...And 20 more matches
Communicating With Other Scripts - Archive of obsolete content
the guide explains how content scripts can communicate with: your main.js file, or any other modules in your add-on other content scripts loaded by your add-on page scripts (that is, scripts embedded in the web page or included using <script> tags) main.js your content scripts can communicate with your add-on's "main.js" (or any other modules you're written for your add-on) by sending it
messages, using either the port.emit() api or the post
message() api.
... see the articles on using post
message() and using port for details.
... content scripts that have been loaded into the same document by different methods, or the same method called more than once, can pass
messages directly to each other using the dom post
message() api or a customevent.
...And 19 more matches
nsIConsoleService
it is used to log various
messages, warnings, and errors and to obtain the logged
messages.
... inherits from: nsisupports last changed in gecko 19 (firefox 19 / thunderbird 19 / seamonkey 2.16) implemented by: @mozilla.org/consoleservice;1 as a service: var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); method overview void get
messagearray([array, size_is(count)] out nsiconsole
message messages, out uint32_t count);obsolete since gecko 19 void get
messagearray([optional] out uint32_t count, [retval, array, size_is(count)] out nsiconsole
message messages); void log
message(in nsiconsole
message message); void logstring
message(in wstring
message); void registerlistener(in nsiconsolelistener listener); void reset(); void unregisterlis...
...tener(in nsiconsolelistener listener); methods get
messagearray() to obtain an array of all logged
messages.
...And 19 more matches
panel - Archive of obsolete content
ng" }, onchange: handlechange }); var mypanel = sdkpanels.panel({ contenturl: self.data.url("panel.html"), onhide: handlehide }); function handlechange(state) { if (state.checked) { mypanel.show({ position: button }); } } function handlehide() { button.state('window', {checked: false}); } updating panel content you can update the panel's content by: sending a
message to a content script that updates the dom in the same document.
...so implementing a complete solution usually means you have to send
messages between the content script and the main add-on code.
... you can communicate with the script using either the post
message() api or (preferably, usually) the port api.
...And 18 more matches
Extending a Protocol
quick start: extending a protocol this tutorial implements a simple ping-pong style ipdl protocol, which sends a
message from the content process (main thread) to the chrome process (ui thread).
... the tutorial is designed for browser engineers who are implementing dom/web apis that need to, for example, send a
message to the os or spin up something off the main thread - so it's biased towards supporting w3c/whatwg dom apis.
... simple
message passing.
...And 18 more matches
Assert.jsm
method overview undefined ok(value,
message); undefined equal(actual, expected,
message); undefined notequal(actual, expected,
message); undefined deepequal(actual, expected,
message); undefined notdeepequal(actual, expected,
message); undefined strictequal(actual, expected,
message); undefined notstrictequal(actual, expected,
message); undefined throws(block, expected,
message...
...); promise rejects(promise, expected,
message); undefined greater(lhs, rhs,
message); undefined greaterorequal(lhs, rhs,
message); undefined less(lhs, rhs,
message); undefined lessorequal(lhs, rhs,
message); undefined setreporter(reporterfunc); undefined report(failed, actual, expected,
message, operator); constructor creates a new assert object.
... this statement is equivalent to assert.equal(true, !!guard,
message_opt);.
...And 18 more matches
Index
13 autoconfig: how to create a configuration file autoconfiguration, thunderbird authoritative definition 14 autoconfiguration in thunderbird moved to autoconfiguration 15 buddy icons in mail seth spitzer mozilla is now able to show icons in the
message header area and the addressbook card pane.
... for the
message pane, the icon we will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for sender email address>.gif when trying to determine the screenname for the sender, we search the addressbook that we are using for collection.
... any new window performance problems that mozilla has are especially painful in mail compose, as we need to create a new compose window on every new mail
message or reply.
...And 18 more matches
context-menu - Archive of obsolete content
to communicate to the menu item associated with the content script, the content script can call the post
message function attached to the global self object, passing it some json-able data.
... the menu item's "
message" event listener will be called with that data.
... var cm = require("sdk/context-menu"); cm.item({ label: "edit image", context: cm.selectorcontext("img"), contentscript: 'self.on("click", function (node, data) {' + ' self.post
message(node.src);' + '});', on
message: function (imgsrc) { openimageeditor(imgsrc); } }); updating a menu item's label each menu item must be created with a label, but you can change its label later using a couple of methods.
...And 17 more matches
test/assert - Archive of obsolete content
methods ok(guard,
message) tests whether an expression evaluates to true.
...
message : string optional
message to log, providing extra information about the test.
... equal(actual, expected,
message) tests shallow, coercive equality with ==: assert.equal(1, 1, "test that one is one"); parameters actual : object the actual result.
...And 17 more matches
Introduction to SSL - Archive of obsolete content
the ssl handshake protocol involves using the ssl record protocol to exchange a series of
messages between an ssl-enabled server and an ssl-enabled client when they first establish an ssl connection.
... this exchange of
messages is designed to facilitate the following actions: authenticate the server to the client.
...to ensure that red hat console can control an ssl-enabled server, the server must enable at least one of the following cipher suites for ssl 3.0: rc4 with 128-bit encryption and md5
message authentication rc4 with 40-bit encryption and md5
message authentication rc2 with 40-bit encryption and md5
message authentication no encryption, md5
message authentication only cipher suites with rsa key exchange table 1 lists the cipher suites supported by ssl that use the rsa key-exchange algorithm.
...And 17 more matches
Concurrency model and the event loop - JavaScript
queue a javascript runtime uses a
message queue, which is a list of
messages to be processed.
... each
message has an associated function which gets called in order to handle the
message.
... at some point during the event loop, the runtime starts handling the
messages on the queue, starting with the oldest one.
...And 17 more matches
Interacting with page scripts - Archive of obsolete content
this guide describes: how to share objects between content scripts and page scripts how to send
messages between content scripts and page scripts sharing objects with page scripts there are two possible cases here: a content script might want to access an object defined by a page script a content script might want to expose an object to a page script access objects defined by page scripts to access page script objects from content scripts, you can use the global unsafewindow object.
...clicking "i will not work" fails, and the following
message is logged: permission denied to access property 'greeting' expose functions to page scripts the structured clone algorithm is a bit more powerful than simple json serialization, but not much: in particular, functions aren't cloned.
... communicating with page scripts there are two different ways a content script can communicate with a page script: using the dom post
message() api using custom dom events using the dom post
message api note that before firefox 31 code in content scripts can't use window to access post
message() and addeventlistener() and instead must use document.defaultview.
...And 16 more matches
Mail event system
for example, when a folder gets a new
message, its total
message count increases.
... the folder pane needs to know that this changed so that it can update the
message count so the user can see it.
... sample control flow here is an example of a possible flow of control when a new
message is added to a folder.
...And 16 more matches
Drawing and Event Handling - Plugins
a windowless plug-in draws itself only in response to a paint
message from the browser.
...(the drawable is provided in the paint
message.
... browser-side methods, called by the plug-in: npn_forceredraw: force a paint
message to a windowless plug-in.
...And 16 more matches
Web Console remoting - Firefox Developer Tools
these can be: page errors, window.console api
messages, network activity, and file activity.
...when navigation stops the following packet is sent: { "from": tabactor, "type": "tabnavigated", "state": "stop", "url": newurl, "title": newtitle, "nativeconsoleapi": true|false } getcached
messages(types, onresponse) the webconsoleclient.getcached
messages(types, onresponse) method sends the following packet to the server: { "to": "conn0.console9", "type": "getcached
messages", "
messagetypes": [ "pageerror", "consoleapi" ] } the getcached
messages packet allows one to retrieve the cached
messages from before the web console was open.
... you can only get cached
messages for page errors and console api calls.
...And 16 more matches
Using server-sent events - Web APIs
for example, assuming the client script is on example.com: const evtsource = new eventsource("//api.example.com/ssedemo.php", { withcredentials: true } ); once you've instantiated your event source, you can begin listening for
messages from the server by attaching a handler for the
message event: evtsource.on
message = function(event) { const newelement = document.createelement("li"); const eventlist = document.getelementbyid("list"); newelement.innerhtml = "
message: " + event.data; eventlist.appendchild(newelement); } this code listens for incoming
messages (that is, notices from the server that do not have an even...
...t field on them) and appends the
message text to a list in the document's html.
... you can also listen for events with addeventlistener(): evtsource.addeventlistener("ping", function(event) { const newelement = document.createelement("li"); const time = json.parse(event.data).time; newelement.innerhtml = "ping at " + time; eventlist.appendchild(newelement); }); this code is similar, except that it will be called automatically whenever the server sends a
message with the event field set to "ping"; it then parses the json in the data field and outputs that information.
...And 16 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
however, despite that flexibility in transport and communication of signaling
messages, there's still a recommended design pattern you should follow when possible, known as perfect negotiation.
... handling incoming
messages on the signaling channel the last piece of the puzzle is code to handle incoming
messages from the signaling server.
... that's implemented here as an on
message event handler on the signaling channel object.
...And 16 more matches
Writing a WebSocket server in C# - Web APIs
networkstream methods: write(byte[] buffer, int offset, int size) writes bytes from buffer, offset and size determine length of
message.
...offset and size determine the length of the
message.
...note that this will block until the first 3 bytes of a
message are available.
...And 16 more matches
Writing WebSocket servers - Web APIs
as usual, it may also give the reason why the handshake failed in the http response body, but the
message may never be displayed (browsers do not display it).
... exchanging data frames either the client or the server can choose to send a
message at any time — that's the magic of websockets.
... | +---------------------------------------------------------------+ the mask bit tells whether the
message is encoded.
...And 16 more matches
An overview of HTTP - HTTP
clients and servers communicate by exchanging individual
messages (as opposed to a stream of data).
... the
messages sent by the client, usually a web browser, are called requests and the
messages sent by the server as an answer are called responses.
...it is never the server (though some mechanisms have been added over the years to simulate server-initiated
messages).
...And 16 more matches
Graceful asynchronous programming with Promises - Learn web development
the code that the video chat application would use might look something like this: function handlecallbutton(evt) { setstatus
message("calling..."); navigator.mediadevices.getusermedia({video: true, audio: true}) .then(chatstream => { selfviewelem.srcobject = chatstream; chatstream.gettracks().foreach(track => mypeerconnection.addtrack(track, chatstream)); setstatus
message("connected"); }).catch(err => { setstatus
message("failed to connect"); }); } this function starts by using a function...
... called setstatus
message() to update a status display with the
message "calling...", indicating that a call is being attempted.
...this uses setstatus
message() to update the status box to indicate that an error occurred.
...And 15 more matches
nsIDBChangeListener
there are a couple of ways to access the
message database: if you have a nsimsgfolder, you can do this like so: somefolder.msgdatabase.addlistener(mylistener); alternately, you can access the
message database through the nsimsgdbview like so: gfolderdisplay.view.dbview.db.addlistener(mylistener); method overview void onhdrflagschanged(in nsimsgdbhdr ahdrchanged, in unsigned long aoldflags, in unsigned long anewflags, in nsidbc...
...ed(in nsidbchangelistener ainstigator); void onjunkscorechanged(in nsidbchangelistener ainstigator); void onhdrpropertychanged(in nsimsgdbhdr ahdrtochange, in unsigned long aoldflags, in prbool aprechange, inout pruint32 astatus, in nsidbchangelistener ainstigator); void onevent(in nsimsgdatabase adb, in string aevent); methods onhdrflagschanged() called when a
message's flags change.
... void onhdrflagschanged(in nsimsgdbhdr ahdrchanged, in unsigned long aoldflags, in unsigned long anewflags, in nsidbchangelistener ainstigator); parameters ahdrchanged the nsimsgdbhdr of the
message that changed.
...And 15 more matches
Content Scripts - Archive of obsolete content
a
message-passing api allows the main code and content scripts to communicate with each other this complete add-on illustrates all of these principles.
... passing configuration options the contentscriptoptions is a json object that is exposed to content scripts as a read-only value under the self.options property: // main.js var tabs = require("sdk/tabs"); tabs.on('ready', function(tab) { tab.attach({ contentscript: 'window.alert(self.options.
message);', contentscriptoptions: {"
message" : "hello world"} }); }); any kind of jsonable value (object, array, string, etc.) can be used here.
...but sometimes you might want to interact with page scripts: you might want to share objects between content scripts and page scripts or to send
messages between them.
...And 14 more matches
Cross Process Object Wrappers
chrome code can load frame scripts into the content process using the
message manager, and can then communicate with them using a
message-passing api.
... to learn more about this, see the documentation on using the
message manager.
... passing cpows from frame scripts frame scripts can send
messages to chrome using one of two global functions: sendasync
message() or sendsync
message().
...And 14 more matches
nsIScriptError
66 introduced gecko 1.0 inherits from: nsiconsole
message last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/scripterror;1.
... method overview void init(in wstring
message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category); void initwithwindowid(in wstring
message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); autf8string tostring(); ...
... error
message astring the error
message in a string format without any context/line number information.
...And 14 more matches
ui/sidebar - Archive of obsolete content
communicating with sidebar scripts you can't directly access your sidebar's content from your main add-on code, but you can send
messages between your main add-on code and scripts loaded into your sidebar.
... on the sidebar end of the conversation, sidebar scripts get a global variable addon that contains a port for sending and receiving
messages.
... on the add-on side, you need to get a worker object for the sidebar before you can send or receive
messages.
...And 13 more matches
Creating annotations - Archive of obsolete content
the matched element is highlighted and has a click handler bound to it which sends a
message to the main add-on code.
... the selector page mod can be switched on and off using a
message from the main add-on code.
... it is initially off: var matchedelement = null; var originalbgcolor = null; var active = false; function resetmatchedelement() { if (matchedelement) { (matchedelement).css('background-color', originalbgcolor); (matchedelement).unbind('click.annotator'); } } self.on('
message', function on
message(activation) { active = activation; if (!active) { resetmatchedelement(); } }); this selector listens for occurrences of the jquery mouseenter event.
...And 13 more matches
nsIJetpack
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 send
message(in astring a
messagename /* [optional] in jsval v1, [optional] in jsval v2, ...
... */); void registerreceiver(in astring a
messagename, in jsval areceiver); void unregisterreceiver(in astring a
messagename, in jsval areceiver); void unregisterreceivers(in astring a
messagename); void evalscript(in astring ascript); nsivariant createhandle(); void destroy(); methods send
message() this method asynchronously sends a
message to the jetpack process.
... void send
message( in astring a
messagename, [optional] in jsval v1, optional [optional] in jsval v2, optional ...
...And 13 more matches
Mail and RDF
overview of mail rdf graph the root resource for all accounts, folders and
messages is the rdf resource named msgaccounts:/.
... from this resource, you can follow a number of arcs to find servers, folders, and finally
messages.
... msgaccounts:/ +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com/inbox | +-- http://home.netscape.com/nc-rdf#total
messages --> "4" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf#
messagechild --> | | imap_
message://alecf@imap.mywork.com/inbox#1 | +-- http://home.netscape.com/nc-rdf#
messagechild --> | | imap_
message://alecf@imap.mywork.com/inbox#2 | +-- http://home.netscape.com/nc-rdf#
messagechild --> ...
...And 13 more matches
Push API - Web APIs
the push api gives web applications the ability to receive
messages pushed to them from a server, whether or not the web app is in the foreground, or even currently loaded, on a user agent.
...see the following articles for more information: cross-site request forgery (csrf) prevention cheat sheet preventing csrf and xsrf attacks for an app to receive push
messages, it has to have an active service worker.
... the resulting pushsubscription includes all the information that the application needs to send a push
message: an endpoint and the encryption key needed for sending data.
...And 13 more matches
Using WebRTC data channels - Web APIs
understanding
message size limits for any data being transmitted over a network, there are size restrictions.
...at the application level—that is, within the user agent's implementation of webrtc on which your code is running—the webrtc implementation implements features to support
messages that are larger than the maximum packet size on the network's transport layer.
... this can complicate things, since you don't necessarily know what the size limits are for various user agents, and how they respond when a larger
message is sent or received.
...And 13 more matches
port - Archive of obsolete content
the port object provides
message sending and receiving api enabling conversations between a content script and the main add-on code.
... port methods emit() the port.emit() function sends a
message from one side to the other.
... it may be called with any number of parameters, but is most likely to be called with a name for the
message and an optional payload.
...And 12 more matches
Frame script loading and lifetime
the script just writes "foo" to the command line: // chrome script var mm = gbrowser.selectedbrowser.
messagemanager; mm.loadframescript('data:,dump("foo\\n")', true); loadframescript() takes two mandatory parameters: a url that points to the frame script you want to load a boolean flag, allowdelayedload note: if the
message manager is a global frame
message manager or a window
message manager, loadframescript() may load the script multiple times, once in each applicable frame.
... to define the mapping between a chrome:// url and a frame script packaged with an extension, use a "chrome.manifest" file to register a chrome url: // chrome.manifest content my-e10s-extension chrome/content/ // chrome script mm.loadframescript("chrome://my-e10s-extension/content/content.js", true); allowdelayedload if the
message manager is a global frame
message manager or a window
message manager then: if allowdelayedload is true, the frame script will be loaded into any new frame, which has opened after the loadframescript() call.
... for example: var mm = window.
messagemanager; mm.loadframescript("chrome://my-e10s-extension/content/frame-script.js", true); the script will be loaded into all tabs currently open in this window, and all new tabs opened afterwards.
...And 12 more matches
PromiseWorker.jsm
summary a promiseworker is a chromeworker except instead of calling post
message() to send a
message, you call post(), which returns a promise.
...this answers the question "when should i use a promiseworker?", and the answer is, whenever you would normally use a chromeworker, but want post
message to return promises.
...let worker = new promiseworker.abstractworker() worker.dispatch = function(method, args = []) { // dispatch a call to method `method` with args `args` return self[method](...args); }; worker.post
message = function(...args) { // post a
message to the main thread self.post
message(...args); }; worker.close = function() { // close the worker self.close(); }; worker.log = function(...args) { // log (or discard)
messages (optional) dump('worker: ' + args.join(' ') + '\n'); }; // connect it to
message port.
...And 12 more matches
nsIMsgDatabase
iew void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void resethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrfor
messageid(in string
messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey key); void addnewhdrtodb(in nsimsgdbhdr newhdr, in boolean notify); nsimsgdbhdr copyhdrfromexistinghdr(in nsmsgkey key, in nsimsgdbhdr existinghdr, in boolean addhdrtodb); void listallkeys(in nsmsgkeyarrayref outputkeys); native code only!
... nsisimpleenumerator enumerate
messages(); nsisimpleenumerator enumeratethreads(); void synccounts; nsimsgthread getthreadcontainingmsghdr(in nsimsgdbhdr msghdr); void markhdrread(in nsimsgdbhdr msghdr, in boolean bread, in nsidbchangelistener instigator); void markhdrreplied(in nsimsgdbhdr msghdr, in boolean breplied, in nsidbchangelistener instigator); void markhdrmarked(in nsimsgdbhdr msghdr, in boolean mark,in nsidbchangelistener instigator); void markmdnneeded(in nsmsgkey key, in boolean bneeded,in nsidbchangelistener instigator); boolean ismdnneeded(in nsmsgkey key); void markmdnsent(in nsmsgkey key, in boolean bneeded, in nsidbchangelistener instigator); boolean ismdnsent(in nsmsgkey key); void markread(in nsmsgkey key, in boolean bread, in nsidbchangelistener instig...
... void delete
messages(in nsmsgkeyarrayptr nsmsgkeys, in nsidbchangelistener instigator); native code only!
...And 12 more matches
nsIPushService
dom/interfaces/push/nsipushservice.idlscriptable a service for components to subscribe and receive push
messages from remote servers.
... passing the system principal exempts the subscription from permission checks and background
messages quotas, which are enforced for service worker subscriptions.
... } ); receiving push
messages subscriptions created from privileged code use xpcom observer notifications instead of service worker events.
...And 12 more matches
nsISmsDatabaseService
nsismsdatabaseservice dom/sms/interfaces/nsismsdatabaseservice.idlscriptable used to store and manage sms text
messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsdatabaseservice;1.
... to create an instance, use: var smsservice = components.classes["@mozilla.org/sms/smsdatabaseservice;1"] .createinstance(components.interfaces.nsismsdatabaseservice); method overview long savereceived
message(in domstring asender, in domstring abody, in unsigned long long adate); long savesent
message(in domstring areceiver, in domstring abody, in unsigned long long adate); void get
message(in long
messageid, in long requestid, [optional] in unsigned long long processid); void delete
message(in long
messageid, in long requestid, [optional] in unsigned long long processid); void create
messagelist(in nsidommozsmsfilter filter, in boolean reverse, in long requestid, [optional] in unsigned long long processid); void getnext
messageinlist(in long listid, in long requestid, [...
...optional] in unsigned long long processid); void clear
messagelist(in long listid); void mark
messageread(in long
messageid, in boolean value, in long requestid, [optional] in unsigned long long processid) methods savereceived
message() void savereceived
message( in domstring asender, in domstring abody, in unsigned long long adate ); parameters asender a domstring with the sender of the text
message.
...And 12 more matches
nsISmsRequestManager
to create an instance, use: var smsrequestmanager = components.classes["@mozilla.org/sms/smsrequestmanager;1"] .createinstance(components.interfaces.nsismsrequestmanager); method overview long addrequest(in nsidommozsmsrequest arequest); long createrequest(in nsidommozsmsmanager amanager, out nsidommozsmsrequest arequest); void notifycreate
messagelist(in long arequestid, in long alistid, in nsidommozsms
message a
message); void notifygetsmsfailed(in long arequestid, in long aerror); void notifygotnext
message(in long arequestid, in nsidommozsms
message a
message); void notifygotsms(in long arequestid, in nsidommozsms
message a
message); void notifymarked
messageread(in long arequestid, in bool aread); void notifymark
messagereadfailed(in ...
...long arequestid, in long aerror); void notifyno
messageinlist(in long arequestid); void notifyread
messagelistfailed(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 nsidommozsms
message a
message); constants all sms related errors that could apply to smsrequest objects.
...notifycreate
messagelist() void notifycreate
messagelist( in long arequestid, in long alistid, in nsidommozsms
message a
message ); parameters arequestid a number representing the id of the request.
...And 12 more matches
NSS tools : cmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic
message syntax (cms)
messages.
... synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic
message syntax (cms)
messages.
...the options and arguments for the cmsutil command are defined as follows: -d decode a
message.
...And 11 more matches
NSS tools : cmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic
message syntax (cms)
messages.
... synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic
message syntax (cms)
messages.
...the options and arguments for the cmsutil command are defined as follows: -d decode a
message.
...And 11 more matches
Web Replay
seek to console
messages errors and logged
messages in the console developer tool can be clicked on to cause the tab to seek to the point in the recording where the error was generated or the
message was logged.
... console error/
messages are marked on the timeline and can be clicked to seek to that point.
... recording a recording content process differs from a normal content process in the following ways: calls to certain functions are intercepted by hooking them (rewriting the machine code at their entry points to call a different function with the same signature), including the function used to dispatch mach
messages.
...And 11 more matches
Browser Console - Firefox Developer Tools
so it logs the same sorts of information as the web console - network requests, javascript, css, and security errors and warnings, and
messages explicitly logged by javascript code.
... you can also start the browser console by launching firefox from the command line and passing the -jsconsole argument: /applications/firefoxaurora.app/contents/macos/firefox-bin -jsconsole the browser console looks like this: you can see that the browser console looks and behaves very much like the web console: most of the window is occupied by a pane that display
messages.
... at the top, a toolbar enables you to filter the
messages that appear.
...And 11 more matches
A simple RTCDataChannel sample - Web APIs
first, we have a couple of buttons for establishing and closing the connection: <button id="connectbutton" name="connectbutton" class="buttonleft"> connect </button> <button id="disconnectbutton" name="disconnectbutton" class="buttonright" disabled> disconnect </button> then there's a box which contains the text input box into which the user can type a
message to transmit, with a button to send the entered text.
... <div class="
messagebox"> <label for="
message">enter a
message: <input type="text" name="
message" id="
message" placeholder="
message text" inputmode="latin" size=60 maxlength=120 disabled> </label> <button id="sendbutton" name="sendbutton" class="buttonright" disabled> send </button> </div> finally, there's the little box into which we'll insert the
messages.
... <div class="
messagebox" id="receivebox"> <p>
messages received:</p> </div> the javascript code while you can just look at the code itself on github, below we'll review the parts of the code that do the heavy lifting.
...And 11 more matches
Jetpack Processes - Archive of obsolete content
privileged apis when script is evaluated in a jetpack process via a call to nsijetpack.evalscript(), the script's global scope is endowed with the following privileged apis: send
message(a
messagename [, v1 [, v2 [, ...]]]) similar to nsijetpack.send
message(), this function asynchronously sends a
message to the chrome process.
... call
message(a
messagename [, v1 [, v2 [, ...]]]) this function is like send
message() but sends the
message synchronously.
... it returns an array whose elements are the return values of each receiver in the chrome process that was triggered by the
message.
...And 10 more matches
Index - Archive of obsolete content
16 communicating using "post
message" add-on sdk no summary!
... 48 notifications add-on sdk, notifications display transient, toaster-style desktop
messages to the user.
... 136 console add-on sdk enables your add-on to log error, warning or informational
messages.
...And 10 more matches
Using workers in extensions - Archive of obsolete content
that file, ticker_worker.js, is shown here: var symbol = ""; function refreshinformation() { if (!symbol) { throw "no symbol set!"; } var fullurl = "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var output = httprequest.responsetext; if (output) { post
message(output.trim()); } httprequest = null; } var httprequest = new xmlhttprequest(); httprequest.open("get", fullurl, true); httprequest.onload = inforeceived; httprequest.send(null); } setinterval(function() { refreshinformation(); }, 10*60*1000); on
message = function(event) { if (event.data) { symbol = event.data.touppercase(); } refreshinformation(); } when the wor...
... then it sets the worker's on
message event handler to a function which looks at the event passed into it, and does one of two things: if there is a data field on the event, the stock symbol being tracked is set to the upper case version of that value.
... when the result is received from xmlhttprequest, instead of immediately updating the displayed information in the status bar, a
message is sent to the main thread using the worker's post
message() method.
...And 10 more matches
nsIMsgWindow
to create an instance, use: msgwindow = components.classes["@mozilla.org/messenger/msgwindow;1"] .createinstance(components.interfaces.nsimsgwindow); in thunderbird the default
message window is stored in the global variable msgwindow.
... method overview void displayhtmlin
messagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to send commands to the ui, such as clearmsgpane.
... msgheadersink nsimsgheadersink this allows the backend code to send
message header information to the ui.
...And 10 more matches
page-worker - Archive of obsolete content
while content scripts can access dom content, they can't access any of the sdk apis, so in many cases you'll need to exchange
messages between the content script and your main add-on code for a complete solution.
...you can communicate with the script using either the post
message() api or (preferably, usually) the port api.
...is add-on loads a page from wikipedia, and runs a content script in it to send all the headers back to the main add-on code: var pageworkers = require("sdk/page-worker"); // this content script sends header titles from the page to the add-on: var script = "var elements = document.queryselectorall('h2 > span'); " + "for (var i = 0; i < elements.length; i++) { " + " post
message(elements[i].textcontent) " + "}"; // create a page worker that loads wikipedia: pageworkers.page({ contenturl: "http://en.wikipedia.org/wiki/internet", contentscript: script, contentscriptwhen: "ready", on
message: function(
message) { console.log(
message); } }); for conciseness, this example creates the content script as a string and uses the contentscript property.
...And 9 more matches
sslfnc.html
ssl_v2_compatible_hello tells the ssl library whether or not to send ssl3 client hello
messages in ssl2-compatible format.
...it is better to allow the ssl handshake to complete and then have your application return an error
message to the client that informs the user of the need for a certificate.
... ssl_v2_compatible_hello tells the ssl library whether or not to send ssl3 client hello
messages in ssl2-compatible format.
...And 9 more matches
NSS Tools cmsutil
using cmsutil newsgroup: mozilla.dev.tech.crypto the cmsutil command-line utility uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic
message syntax (cms)
messages.
...the options and arguments for the cmsutil command are defined as follows: options -ddecode a
message.
... -c encrypt a
message.
...And 9 more matches
Redis Tips
event logging lists, zsets, pubsub queues lists (rpush, blpop, blpoprpush, etc.) priority queues zsets membership sets, bitstrings state hashes heartbeats zsets hit counters zsets
message broadcast pubsub search reverse indexes (never use keys in production) documentation redis has fantastic documentation.
... check this out: publish subscribe unsubscribe psubscribe punsubscribe publish publishes a
message to a channel.
... in one redis-cli, do this: redis1> subscribe
message-channel reading
messages...
...And 9 more matches
nsIWebSocketListener
1.0 66 introduced gecko 8.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void onacknowledge(in nsisupports acontext, in pruint32 asize); void onbinary
messageavailable(in nsisupports acontext, in acstring amsg); void on
messageavailable(in nsisupports acontext, in autf8string amsg); void onserverclose(in nsisupports acontext, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acontext); void onstop(in nsisupports acontext, in nsresult astatuscode); methods onacknowledge() called to ack...
...nowledge a
message sent via nsiwebsocketchannel.sendmsg() or nsiwebsocketchannel.sendbinarymsg().
... onbinary
messageavailable() called when a binary
message has been received.
...And 9 more matches
Mail client architecture overview
the mail reader gecko (xul and html rendering) rdf (dynamic widgets) js (menus, events) libmime mail datasources mail javascript folder/
message management msgdb imap/nntp/pop3 necko (networking) sections in grey refer to modules outside of mail/news the base module the base module provides a generic interface to a set of protocol-independant messaging services.
... this includes management of accounts, folders and
messages.
... the base module consists of the following basic building blocks account management - the account manager is the root object of the server/folder/
message hierarchy.
...And 9 more matches
EventSource - Web APIs
once the connection is opened, incoming
messages from the server are delivered to your code in the form of events.
... if there is an event field in the incoming
message, the triggered event is the same as the event field value.
... if no event field is present, then a generic
message event is fired.
...And 9 more matches
SubtleCrypto.verify() - Web APIs
/* fetch the contents of the "
message" textbox, and encode it in a form we can use for sign operation.
... */ function get
messageencoding() { const
messagebox = document.queryselector(".rsassa-pkcs1 #
message"); let
message =
messagebox.value; let enc = new textencoder(); return enc.encode(
message); } /* fetch the encoded
message-to-sign and verify it against the stored signature.
...*/ async function verify
message(publickey) { const signaturevalue = document.queryselector(".rsassa-pkcs1 .signature-value"); signaturevalue.classlist.remove("valid", "invalid"); let encoded = get
messageencoding(); let result = await window.crypto.subtle.verify( "rsassa-pkcs1-v1_5", publickey, signature, encoded ); signaturevalue.classlist.add(result ?
...And 9 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
it should be a word or short phrase that demonstrates the expected type of data, rather than an explanatory
message.
... setcustomvalidity() sets a custom
message to display if the input element's value isn't valid.
...on form submission, if there is a form control that fails constraint validation, supporting browsers will display an error
message on the first invalid form control; displaying a default
message based on the error type, or a
message set by you.
...And 9 more matches
Content Processes - Archive of obsolete content
the final section explains why the sdk still uses the notion of content scripts and
message passing, even though the multiprocess model for which they were designed never materialized.
...we can, however, pass json
messages between scripts in different processes.
...content scripts differ from scripts that are loaded by the page itself in that they are provided with a messaging api that can be used to send
messages back to the add-on script.
...And 8 more matches
console - Archive of obsolete content
enables your add-on to log error, warning or informational
messages.
... if you have started firefox for your add-on from the command line with jpm run or jpm test then these
messages appear in the command shell you used.
... if the add-on has been installed in firefox, then the
messages appear in the browser console.
...And 8 more matches
Modifying Web Pages Based on URL - Archive of obsolete content
a simple code snippet where content script is supplied as contentscript option and url pattern is given as include option is as follows: // import the page-mod api var pagemod = require("sdk/page-mod"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a
message pagemod.pagemod({ include: "*.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";' }); do as follows: create a new directory and navigate to it.
... for example, if we save the script above under the add-on's data directory in a file called my-script.js: // import the page-mod api var pagemod = require("sdk/page-mod"); // import the self api var self = require("sdk/self"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a
message pagemod.pagemod({ include: "*.org", contentscriptfile: self.data.url("my-script.js") }); or from firefox 34 onwards: // import the page-mod api var pagemod = require("sdk/page-mod"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a
message pagemod.pagemod({ include: "*.org", contentscriptfile: "./my-script.js" ...
... // import the page-mod api var pagemod = require("sdk/page-mod"); // import the self api var self = require("sdk/self"); // create a page mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a
message pagemod.pagemod({ include: "*.org", contentscriptfile: [self.data.url("jquery-1.7.min.js"), self.data.url("my-script.js")] }); you can use both contentscript and contentscriptfile in the same page-mod.
...And 8 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
ref: bug 690370 available functions are (see prefcalls.js file for details): function getprefbranch() function pref(prefname, value) function defaultpref(prefname, value) function lockpref(prefname, value) function unlockpref(prefname) function getpref(prefname) function getldapattributes(host, base, filter, attribs) function getldapvalue(str, key) function displayerror(funcname,
message) function getenv(name) configure autoconfig two directives ask thunderbird to use autoconfig at startup: # cat /usr/lib/thunderbird/defaults/pref/tb-autoconf.js // 20100526 - modification autoconfig jehan.
...lockpref("mail.identity.id1.useremail", mail); lockpref("mail.server.server2.name", mail); lockpref("mail.identity.id1.fullname", cn); //debug with popup error
messages doesn't work anymore :-( !!
...z_ldap_xpcom=1 moz_mail_news= moz_mork=1 moz_morkreader= and set --enable-extensions=pref in mozconfig file, in fedora source rpm it is: [root@b008-02 sources]# grep enable-extensions /root/rpmbuild/sources/thunderbird-mozconfig ac_add_options --enable-extensions=pref it seems worse this time , as even after applying those compilation options mentioned above, i now get the following error
message while stating thunderbird with autoconfig (autoconf.js having pref('general.config.filename','thunderbird.cfg'); ) and thunderbird.cfg calling getldap* functions to retrieve cn and mail address of the current user.
...And 8 more matches
Debugging HTML - Learn web development
here, the error
message is relatively easy to understand — "unterminated double quote string".
...however, error
messages can quickly get more complicated and less easy to interpret as programs get bigger, and even simple cases can look a little intimidating to someone who doesn't know anything about rust.
...these are usually easy to fix as long as you are familiar with the language's syntax and know what the error
messages mean.
...And 8 more matches
Performance
this highlights some performance pitfalls related to frame scripts/
message manager usage and alternative approaches to avoid them.
... do some work on the window } function dosomething(
message) { result = helper(content,
message.data) sendasync
message("my-addon:response-from-child", {something: result}) } add
messagelistener("my-addon:request-from-parent", dosomething) why is this bad?
...do some work on the window } function dosomething(
message) { frameglobal =
message.target result = helper(frameglobal.content,
message.data) frameglobal.sendasync
message("my-addon:response-from-child", {something: result}) } function addframe(frameglobal) { frameglobal.add
messagelistener("my-addon:request-from-parent", dosomething) } javascript modules are per-process singletons and thus all their objects are only initialized once, which make...
...And 8 more matches
nsMsgNavigationType
the nsmsgnavigationtype interface contains constants used for
message navigation in thunderbird.
... for example to move forward a
message, you would call: // assuming gdbview is a global nsimsgdbview var resultid = new object(); var resultindex = new object(); var threadindex = new object(); gdbview.viewnavigate(components.interfaces.nsmsgnavigationtype.next
message, resultid, resultindex, threadindex, true); the nsmsgnavigationtype interface is defined as a global variable in thunderbird: var nsmsgviewcommandtype = components.interfaces.nsmsgviewcommandtype; mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) constants name value description first
message 1 go to the first
message in the view.
...And 8 more matches
Channel Messaging API - Web APIs
the channel messaging api allows two separate scripts running in different browsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, two documents via a sharedworker, or two workers) to communicate directly, passing
messages between one another through two-way channels (or pipes) with a port at each end.
... channel messaging concepts and usage a
message channel is created using the
messagechannel() constructor.
... once created, the two ports of the channel can be accessed through the
messagechannel.port1 and
messagechannel.port2 properties (which both return
messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you send a
message to port2, and transfer the port over to the other browsing context using window.post
message along with two arguments (the
message to send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to.
...And 8 more matches
SubtleCrypto.sign() - Web APIs
these systems all use a digest algorithm to hash the
message to a short fixed size before signing.
... it's different from rsassa-pkcs1-v1_5 in that it incorporates a random salt in the signature operation, so the same
message signed with the same key will not result in the same signature each time.
... hmac the hmac algorithm calculates and verifies hash-based
message authentication codes according to the fips 198-1 standard.
...And 8 more matches
Worker - Web APIs
the worker interface of the web workers api represents a background task that can be created via script, which can send
messages back to its creator.
... worker.on
message an eventlistener called whenever a
messageevent of type
message bubbles through the worker — i.e.
... when a
message is sent to the parent document from the worker via dedicatedworkerglobalscope.post
message.
...And 8 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
er_examples/js/ext-2.1/resources/css/ext-all.css" type="text/css" rel="stylesheet"/> <script src="/jaxer_examples/js/ext-2.1/adapter/ext/ext-base.js"/> <script src="/jaxer_examples/js/ext-2.1/ext-all.js"/> <link href="/jaxer_examples/css/main.css" type="text/css" rel="stylesheet"/> <script runat="both" src="/jaxer_examples/js/validatecomments.js"/> <script> var txt_name; var txt_email; var txt_
message; var btn_comments; var form_comments; ext.onready( function() { // create the name text field txt_name = new ext.form.textfield({ name: "name", fieldlabel: "name", width: 200 }); // create the e-mail text field txt_email = new ext.form.textfield({ name: "email", fieldlabel: "e-mail", width: 200 }); // create the
message text field txt_
message = new ext.form.textarea({ nam...
...e: "
message", fieldlabel: "
message", width: 200 }); // create a button used to send the form details.
... btn_comments = new ext.button({ text: "submit", fieldlabel: "", handler: formhandler }); // create the form panel, attach the inputs form_comments = new ext.form.formpanel({ labelalign: "right", width: 400, title: "comments", items: [ txt_name, txt_email, txt_
message, btn_comments ], renderto: "form-comments" }); }); </script> the code in listing 6 starts by hooking in the ext js library which is used to produce the ui elements of the form.
...And 7 more matches
Accessibility/LiveRegionDevGuide
it is responsible for queuing
messages derived from live region events, where priority is determined by chronological order and the live politeness properties.
...the "purge by timestamp" method will be used to remove old
messages that are no longer deemed relevant while "purge by politeness" is used to satisfy the aria live politeness specification.
...this property, along with an event's time stamp, determine the priority of a
message within the priority queue.
...And 7 more matches
Getting Started with Chat
try to keep
messages as concise as possible.
... when addressing someone directly, try to use name:
message format.
...try to keep your
messages within that subject matter.
...And 7 more matches
nsIMsgThread
imsgdbhdr getchild(in nsmsgkey msgkey); nsimsgdbhdr getchildhdrat(in long index); nsimsgdbhdr getroothdr(out long index); void removechildat(in long index); void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); void markchildread(in boolean bread); nsimsgdbhdr getfirstunreadchild(); nsisimpleenumerator enumerate
messages(in nsmsgkey parent); attributes attribute type description threadkey nsmsgkey unsigned long key designating this thread.
... subject acstring subject of the thread newestmsgdate unsigned long numchildren unsigned long readonly: number of
messages in the thread.
... numunreadchildren unsigned long readonly: number of unread
messages in the thread.
...And 7 more matches
nsISmsService
dom/sms/interfaces/nsismsservice.idlscriptable used to send sms text
messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsservice;1.
... to create an instance, use: var smsservice = components.classes["@mozilla.org/sms/smsservice;1"] .createinstance(components.interfaces.nsismsservice); method overview [implicit_jscontext] nsidommozsms
message createsms
message(in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read ); unsigned short getnumberof
messagesfortext(in domstring text); boolean hassupport(); void send(in domstring number, in domstring
message, in long requestid, [optional] in unsigned long long processid); methods createsms
message() [implicit_jscontext] nsidommozsms
message createsms
message( in long id, in domstring delivery, in domstring sender, in domstring receiver, in do...
...mstring body, in jsval timestamp, in bool read ); parameters id a number representing the id of the
message.
...And 7 more matches
Demo Addon
furthermore, it shows some
messages in the inbox and lists a random attachment.
... to list some
messages of the folder we use: for each (let msghdr in fixiterator(inbox.msgdatabase.enumerate
messages(), ci.nsimsgdbhdr)) { if (++i >= 10 && lastmsghdr != null) break;
messages.push({ author: msghdr.mime2decodedauthor, subject: msghdr.mime2decodedsubject, date: new date(msghdr.date/1000), }); //...
... } to get a collection of
messages in the inbox, we use inbox.msgdatabase.enumerate
messages().
...And 7 more matches
Using the Multiple Accounts API
incoming servers (nsimsgincomingserver): an incoming server represents a remote
message store such as a pop, imap, or nntp server.
... identities (nsimsgidentity): an identity contains all the information necessary to compose and outgoing mail
message.
...- boolean, should we download new messags on biff (true) or just alert user that there is new mail (false) preference: mail.server.server.directory - local platform-specific path to store
messages and folder indexes preference: mail.server.server.name - user-visible name of server the following are specific to imap: preference: mail.server.server.admin_url - administration url for server preference: mail.server.server.using_subscription - boolean, should we use subscriptions?
...And 7 more matches
Using Objective-C from js-ctypes
$ clang -framework appkit test.m && ./a.out class,
message, and selector our task at hand is to convert objective-c syntax to c syntax.
... let's look at the following codelet: [nsspeechsynthesizer alloc] it passes an alloc
message to the nsspeechsynthesizer class, in objective-c syntax.
... register the alloc selector for the
message.
...And 7 more matches
Constraint validation API - Web APIs
validation
message a read-only property that returns an empty string if the element is not a candidate for constraint validation, or if the element's value is valid.
... if the element's value is not valid, it returns a localized validation
message.
... this will be displayed in the ui if the element is the only form control with a validity problem; if a custom error
message is set using setcustomvalidity(), this will be shown.
...And 7 more matches
Event reference
message a
message is received through a websocket.
... storage events change (see non-standard events) storage update events checking downloading error noupdate obsolete updateready value change events broadcast checkboxstatechange hashchange input radiostatechange readystatechange valuechange uncategorized events invalid
message message open show less common and non-standard events abortable fetch events event name fired when abort a dom request is aborted, i.e.
...
message messageevent websocket a
message is received through a websocket.
...And 7 more matches
<input type="email"> - HTML: Hypertext Markup Language
it should be a word or short phrase that demonstrates the expected type of data, rather than an explanatory
message.
...in our simplified form, the user needs to enter their e-mail address and a
message describing the problem they need help with.
...let's see how: body { font: 16px sans-serif; } .emailbox { padding-bottom: 20px; } .
messagebox { padding-bottom: 20px; } label { line-height: 22px; } label::after { content: ":"; } <form> <div class="emailbox"> <label for="emailaddress">your e-mail address</label><br> <input id="emailaddress" type="email" size="64" maxlength="64" required placeholder="username@beststartupever.com" pattern=".+@beststartupever.com" title="please provide only a best sta...
...And 7 more matches
event/target - Archive of obsolete content
const { eventtarget } = require("sdk/event/target"); let target = eventtarget(); for a convenience though optional options arguments may be used, in which case all the function properties with keys like: on
message, onmyevent...
... will be auto registered for associated '
message', 'myevent' events on the created instance.
... adding listeners eventtarget interface defines on method, that can be used to register event listeners on them for the given event type: target.on('
message', function on
message(
message) { // note: `this` pseudo variable is an event `target` unless // intentionally overridden via `.bind()`.
...And 6 more matches
remote/parent - Archive of obsolete content
// remote.js const { process } = require("sdk/remote/child"); process.port.emit("
message-from-remote", "hello from remote"); process.port.on("
message-from-main", function(process,
message) { console.log("main says: " +
message); }); // main.js const { processes, remoterequire } = require("sdk/remote/parent"); remoterequire("./remote.js", module); processes.port.emit("
message-from-main", "hello from main"); processes.port.on("
message-from-remote", function(process,
message) { ...
... console.log("remote says: " +
message); }); child process privileges a module loaded into a child process can't do everything that the same module loaded into the parent process can.
...cess.port.emit("id", processid); }); // main.js const { processes, remoterequire } = require("sdk/remote/parent"); // load "remote.js" into every current and future process remoterequire("./remote.js", module); // for every current and future process processes.forevery(process => { // ask for the process id process.port.emit("fetchid"); // first argument is always the process, then the
message payload process.port.once("id", (process, id) => { console.log("child process is remote:" + process.isremote); console.log("child process id:" + id); }); }); content frame manipulation this demonstrates telling every current frame to link to a specific anchor element: // remote.js const { frames } = require("sdk/remote/child"); // listeners receive the frame the event was for as t...
...And 6 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
any attempt to modify data or substitute a false
message for a legitimate one will be detected.
...for example, the digital signature on an email
message, combined with the certificate that identifies the sender, provide strong evidence that the person identified by that certificate did indeed send that
message.
...using s/mime to sign or encrypt email
messages requires the sender of the
message to have an s/mime certificate.
...And 6 more matches
nsIPushSubscription
dom/interfaces/push/nsipushservice.idlscriptable includes information needed to send a push
message to privileged code.
...sending a post request to this url routes the
message to the instance of firefox that created the subscription.
... a subscription also has a public key and secret; these are used to encrypt
message payloads.
...And 6 more matches
nsIWebProgressListener
ess, in long amaxtotalprogress); 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 a
message); constants state transition flags these flags indicate the various states that requests may transition through as they are being loaded.
...for instance, a load that starts in a window might send progress and status
messages for the new site, but it will not send the onlocationchange until we are sure that we are loading this new page here.
...the status
message is intended to be displayed to the user (for example, in the status bar of the browser).
...And 6 more matches
Gloda examples
see creating a gloda
message query for more examples.
... a) show all
messages in a conversation regardless of the folder in which they are stored, b) search
messages by subject assuming that you have a
message (gloda
message) in the conversation already, this is straight forward using gloda
message.conversation.get
messagescollection() alistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremoved: function _onitemsremoved(aitems, acollection) { }, /* called when our database query com...
...pletes */ onquerycompleted: function _onquerycompleted(conversation_coll) { try { for (var conv in conversation_coll) { //do something with the conversation here alert(conv.subject); } } catch (e) {} } } gloda
message.conversation.get
messagescollection(alistener) alternatively if you need to get a conversation based on the subject, you need to do a query (using the same listener as above).
...And 6 more matches
Finding the code for a feature
here is my (edited) response: nsimsgtagservice is used to store the list of valid tags, so it is not the correct way to tag
messages.
... tags are applied using the
message database property "keyword".
...i know there is a menu command "tag" to tag the
message - how does it do it?
...And 6 more matches
BroadcastChannel - Web APIs
messages are broadcasted via a
message event fired at all broadcastchannel objects listening to the channel.
... event handlers broadcastchannel.on
message an eventhandler property that specifies the function to execute when a
message event is fired on this object.
... broadcastchannel.on
messageerror an eventhandler called when a
messageevent of type
messageerror is fired—that is, when it receives a
message that cannot be deserialized.
...And 6 more matches
DedicatedWorkerGlobalScope - Web APIs
dedicatedworkerglobalscope.on
message is an eventhandler representing the code to be called when the
message event is raised.
... these events are of type
messageevent and will be called when the worker receives a
message from the document that started it (i.e.
... from the worker.post
message method.) dedicatedworkerglobalscope.on
messageerror is an eventhandler representing the code to be called when the
messageerror event is raised.
...And 6 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
the snippet below creates a function that batches multiple
messages into an array, using a microtask to send them as a single object when the context exits.
... const
messagequeue = []; let send
message =
message => {
messagequeue.push(
message); if (
messagequeue.length === 1) { queuemicrotask(() => { const json = json.stringify(
messagequeue);
messagequeue.length = 0; fetch("url-of-receiver", json); }); } }; when send
message() gets called, the specified
message is first pushed onto the
message queue array.
... if the
message we just added to the array is the first one, we enqueue a microtask that will send a batch.
...And 6 more matches
Window - Web APIs
window.
messagemanager returns the
message manager object for this window.
... window.confirm() displays a dialog with a
message that the user needs to respond to.
... window.dump() writes a
message to the console.
...And 6 more matches
content/worker - Archive of obsolete content
it exports the worker trait, which enables content scripts and the add-on code to exchange
messages using the port or post
message apis.
... on
message function functions that will registered as a listener to a '
message' events.
... methods post
message(data) asynchronously emits "
message" events in the enclosed worker, where content script was loaded.
...And 5 more matches
Displaying annotations - Archive of obsolete content
if it finds any it binds functions to that element's mouseenter and mouseleave events to send
messages to the main module, asking it to show or hide the annotation.
... like the selector, the matcher also listens for the window's unload event and on unload sends a detach
message to the main module, so the add-on can clean it up.
... the complete content script is here: self.on('
message', function on
message(annotations) { annotations.foreach( function(annotation) { if(annotation.url == document.location.tostring()) { createanchor(annotation); } }); $('.annotated').css('border', 'solid 3px yellow'); $('.annotated').bind('mouseenter', function(event) { self.port.emit('show', $(this).attr('annotation')); event.stoppropagation(); event.preventdefault(); }); $('.annotated').bind('mouseleave', function() { self.port.emit('hide'); }); }); function createanchor(annotation) { annotationanchorancestor = $('#' + annotation.ancestorid); annotationanchor = $(annotationanchorancestor).parent().find( ':contains(' + annotation.anchortext + ')').last(); $(...
...And 5 more matches
JavaScript Object Management - Archive of obsolete content
modify the hello world extension so that the
message says how many times it has been displayed.
... the
message could say something like "hello!
... this
message has been shown 5 times." keep the counter as a variable in the browseroverlay object, and increment it every time the
message is going to be shown.
...And 5 more matches
Introducing asynchronous JavaScript - Learn web development
we add a click event listener to it so that when the button is clicked: an alert()
message appears.
...let's look at a quick example, from our fetching data from the server article: fetch('products.json').then(function(response) { return response.json(); }).then(function(json) { products = json; initialize(); }).catch(function(err) { console.log('fetch problem: ' + err.
message); }); note: you can find the finished version on github (see the source here, and also see it running live).
...le.log ('starting'); let image; fetch('coffee.jpg').then((response) => { console.log('it worked :)') return response.blob(); }).then((myblob) => { let objecturl = url.createobjecturl(myblob); image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }).catch((error) => { console.log('there has been a problem with your fetch operation: ' + error.
message); }); console.log ('all done!'); the browser will begin executing the code, see the first console.log() statement (starting) and execute it, and then create the image variable.
...And 5 more matches
What went wrong? Troubleshooting JavaScript - Learn web development
types of error generally speaking, when you do something wrong in code, there are two main types of error that you'll come across: syntax errors: these are spelling errors in your code that actually cause the program not to run at all, or stop working part way through — you will usually be provided with some error
messages too.
... these are usually okay to fix, as long as you are familiar with the right tools and know what the error
messages mean!
...these are often harder to fix than syntax errors, as there usually isn't an error
message to direct you to the source of the error.
...And 5 more matches
Working with Svelte stores - Learn web development
objective: learn how to use svelte stores using stores we will create an alert component that shows notifications on screen, which can receive
messages from any component.
... in this case, the alert component is independent from the rest — it is not a parent or child of any other — so the
messages don't fit into the component hierarchy.
...any component will be able to write to this store, and the alert component will subscribe to it and display a
message whenever the store is modified.
...And 5 more matches
Gecko Logging
mozilla logging macros moz_log(module, level,
message) outputs the given
message if the module has the given log level enabled.
... level - the log level of the
message.
...
message - a printf-style
message to output.
...And 5 more matches
Process scripts
for example, if you call the global frame
message manager's loadframescript() function, then the script will be loaded separately into all open tabs.
... you can load a process script by accessing a parent process
message manager and calling its loadprocessscript() function.
... the following code uses the global parent process
message manager, which will load the script into the the chrome process and any child processes: // chrome code let ppmm = cc["@mozilla.org/parentprocess
messagemanager;1"] .getservice(ci.nsiprocessscriptloader); ppmm.loadprocessscript("chrome://whatever/process-script.js", true); ppmm.add
messagelistener("hello", function(msg) { ...
...And 5 more matches
Creating localizable web applications
text
messages don't hardcode english content allow localizers to localize english content, such as: text
messages, number formats, date formats, word order and sentence structure.
...error
messages), or in javascript libraries and scripts.
...bad: <p><?= _("<strong class=\"legal\">design acceptance:</strong> if a design is accepted, we will send the following
message:");?></p> <p><?= _("<strong class=\"legal\">design rejection:</strong> if a design is rejected, we will send the following
message:");?></p> snippet 4.
...And 5 more matches
XPCOM Interface Reference
cklistpromptnsiblocklistservicensiboxobjectnsibrowserboxobjectnsibrowserhistorynsibrowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannelpolicynsicharsetresolvernsichromeframe
messagemanagernsichromeregistrynsiclassinfonsiclipboardnsiclipboardcommandsnsiclipboarddragdrophooklistnsiclipboarddragdrophooksnsiclipboardhelpernsiclipboardownernsicollectionnsicommandcontrollernsicommandlinensicommandlinehandlernsicommandlinerunnernsicomponentmanagernsicomponentregistrarnsicompositionstringsynthesizernsiconsolelistenernsiconsole
messagensiconsoleservicensicontainerboxobjectnsicontentfr...
...ame
messagemanagernsicontentprefnsicontentprefcallback2nsicontentprefobservernsicontentprefservicensicontentprefservice2nsicontentsecuritypolicynsicontentsniffernsicontentviewnsicontentviewmanagernsicontentviewernsicontrollernsicontrollersnsiconverterinputstreamnsiconverteroutputstreamnsicookiensicookie2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsi...
...aviconservicensifeednsifeedcontainernsifeedelementbasensifeedentrynsifeedgeneratornsifeedpersonnsifeedprocessornsifeedprogresslistenernsifeedresultnsifeedresultlistenernsifeedtextconstructnsifilensifileinputstreamnsifileoutputstreamnsifilepickernsifileprotocolhandlernsifilespecnsifilestreamsnsifileurlnsifileutilitiesnsifileviewnsifocusmanagernsiformhistory2nsiframeloadernsiframeloaderownernsiframe
messagelistenernsiframe
messagemanagernsiframescriptloadernsigsettingscollectionnsigsettingsservicensigeolocationprovidernsigeolocationupdatensiglobalhistorynsiglobalhistory2nsiglobalhistory3nsihtmleditornsihttpheaderlistenernsihapticfeedbacknsihttpactivitydistributornsihttpactivityobservernsihttpchannelnsihttpchannelinternalnsihttpheadervisitornsihttpservernsihttpupgradelistenernsiidnservicensiiframeboxo...
...And 5 more matches
Version, UI, and Status Information - Plugins
« previousnext » this chapter describes the functions that allow a plug-in to display a
message on the status line, get agent information, and check on the current version of the plug-in api and the browser.
... displaying a status line
message users are accustomed to checking the ui status line at the bottom of the browser window for updates on the progress of an operation or the url of a link on the page.
... to accomplish this, the plug-in calls the npn_status method to display your
message on the status line.
...And 5 more matches
AesCtrParams - Web APIs
aes is a block cipher, meaning that it splits the
message into blocks and encrypts it a block at a time.
... in ctr mode, every time a block of the
message is encrypted, an extra block of data is mixed in.
... a given counter block value must never be used more than once with the same key: given a
message n blocks long, a different counter block must be used for every block.
...And 5 more matches
Key Values - Web APIs
keyboardevent.key value description virtual keycode windows mac linux android "close" [1] closes the current document or
message.
... appcommand_close gdk_key_close (0x1008ff56) qt::key_close (0x010000ce) keycode_media_close (128) "new" [1] creates a new document or
message.
... appcommand_new gdk_key_new (0x1008ff68) qt::key_new (0x01000120) "open" [1] opens an existing document or
message.
...And 5 more matches
RTCDataChannel - Web APIs
these labels are not required to be unique.maxpacketlifetime read only the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a
message, as set when the data channel was created, or null.maxretransmits read only the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a
message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.negotiated read only the read-only rtcdatachannel property negotiated indic...
...ates whether the rtcdatachannel's connection was negotiated by the web app (true) or by the webrtc layer (false).ordered read only the read-only rtcdatachannel property ordered indicates whether or not the data channel guarantees in-order delivery of
messages; the default is true, which indicates that the data channel is indeed ordered.protocol read only the read-only rtcdatachannel property protocol returns a domstring containing the name of the subprotocol in use.
...when an error occurs on the data channel, the function receives as input an errorevent object describing the error which occurred.on
message the rtcdatachannel.on
message property stores an eventhandler which specifies a function to be called when the
message event is fired on the channel.
...And 5 more matches
Writing WebSocket client applications - Web APIs
the browser may also output to its console a more descriptive error
message as well as a closing code as defined in rfc 6455, section 7.4 through the closeevent.
...to do this, simply call the websocket object's send() method for each
message you want to send: examplesocket.send("here's some text that the server is urgently awaiting!"); you can send data as a string, blob, or arraybuffer.
...for example, a chat program can interact with a server using a protocol implemented using packets of json-encapsulated data: // send text to all users through the server function sendtext() { // construct a msg object containing the data the server needs to process the
message from the chat client.
...And 5 more matches
self - Archive of obsolete content
data is available to the content script in the options property of self: // main.js const tabs = require("sdk/tabs"); tabs.open({ url: "./page.html", onready: function(tab) { tab.attach({ contentscriptfile: "./content-script.js", contentscriptoptions: { a: "blah" } }); } }); // content-script.js alert(self.options.a); port you can use port to receive
messages from, and send
messages to, the main add-on code.
... methods the self object has four methods, which enable the content script to send
messages to, and receive
messages from, the main add-on code.
...the exception is the context-menu module, which still uses post
message.
...And 4 more matches
page-mod - Archive of obsolete content
communicating with content scripts your add-on's "main.js" can't directly access the state of content scripts you load, but you can communicate between your add-on and its content scripts by exchanging
messages.
...the listener is passed a worker object that your add-on can use to send and receive
messages.
...it adds a listener to the getelements
message.
...And 4 more matches
Add a Context Menu Item - Archive of obsolete content
when it's clicked, the selection is sent to the main add-on code, which just logs it: var contextmenu = require("sdk/context-menu"); var menuitem = contextmenu.item({ label: "log selection", context: contextmenu.selectioncontext(), contentscript: 'self.on("click", function () {' + ' var text = window.getselection().tostring();' + ' self.post
message(text);' + '});', on
message: function (selectiontext) { console.log(selectiontext); } }); try it: run the add-on, load a web page, select some text and right-click.
...the constructor in this case takes four options: label, context, contentscript, and on
message.
...in this case the script listens for the user to click on the item, then sends a
message to the add-on containing the selected text.
...And 4 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
listing 9: content for clock.dtd locale\en-us\clock.dtd: <!entity helloworld.clock "clock"> <!entity helloworld.currenttime "current time"> locale\fr-fr\clock.dtd: <!entity helloworld.clock "horloge"> <!entity helloworld.currenttime "heure courante"> replacing user interface
messages within javascript files with properties references it may happen your extension displays some useful
messages such as alerts to the user.
...something like : wrongpass
message=invalid password areyousure
message=are you sure?
..."].getservice(components.interfaces.nsistringbundleservice); var _bundle = gmyextensionbundle.createbundle("chrome://myextension/locale/myextension.properties") you can now use your string substitutes in the .js where they are needed: see examples below if ( password == userpassword ) { oprefs.setboolpref("access.authenticated", true); } else { alert (_bundle.getstringfromname("wrongpass
message")); function clear() { sure = confirm(_bundle.getstringfromname("areyousure
message")); } operations check this brings us to the operations check.
...And 4 more matches
Plug-in Development Overview - Gecko Plugin API Reference
for more information about mime types, see these mime rfcs: rfc-2045: "multipurpose internet mail extensions (mime) part one: format of internet
message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms.
...for example, this description list corresponds to the types in the previous example: string 1: "quicktime video", string 4: "aiff audio", and string 5: "jpeg image format." str#' 126: string 1 can contain a descriptive
message about the plug-in.
... this
message, which is in html format, is displayed by the browser in its "about plug-ins" page.
...And 4 more matches
Frame script environment
the frame script's global is a contentframe
messagemanager, giving it the following environment: content the dom window of the content loaded in the browser.
... add
messagelistener() listen to
messages from chrome.
... remove
messagelistener() stop listening to
messages from chrome.
...And 4 more matches
Frame script environment
the frame script's global is a contentframe
messagemanager, giving it the following environment: content the dom window of the content loaded in the browser may be null (see below) docshell the nsidocshell associated with the browser.
... add
messagelistener() listen to
messages from chrome.
... remove
messagelistener() stop listening to
messages from chrome.
...And 4 more matches
IME handling guide
its
message is one of following values: ecompositionstart this is dispatched at starting a composition.
...mranges should not be empty only with this
message.
... table of event
messages meaning of mdata who sets mdata?
...And 4 more matches
WebChannel.jsm
the webchannel.jsm javascript code module provides an abstraction that uses the
message manager and custom events apis to create a two-way communication channel between chrome and content code for specific origins (using a specific origin passed to the constructor or a lookup with nsipermissionmanager while also ensuring the scheme is https).
... method overview listen(function callback); stoplistening(); send(object
message, eventtarget target); attributes id string webchannel id methods listen() registers the callback for
messages on this channel.
... parameters callback callback function containing function(id,
message, sendercontext) parameters.
...And 4 more matches
nsIMsgIncomingServer
g attr); acstring getcharattribute(in string name); acstring getcharvalue(in string attr); nsilocalfile getfilevalue(in string relpref, in string abspref); nsimsgfilterlist getfilterlist(in nsimsgwindow amsgwindow); long getintattribute(in string name); long getintvalue(in string attr); nsimsgfolder getmsgfolderfromuri(in nsimsgfolder afolderresource, in acstring auri); void getnew
messages(in nsimsgfolder afolder, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); acstring getpasswordwithui(in astring apromptstring, in astring aprompttitle, in nsimsgwindow amsgwindow, out boolean okayvalue); astring getunicharattribute(in string name); astring getunicharvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamechanged(in a...
... canfile
messagesonserver boolean canhavefilters boolean read only.
... cansearch
messages boolean read only.
...And 4 more matches
nsIMsgSearchTerm
illa/ mailnews/ base/ search/ public/ nsimsgsearchterm.idl attributes attrib attribute nsmsgsearchattribvalue attrib; op attribute nsmsgsearchopvalue op; value attribute nsimsgsearchvalue value; booleanand attribute boolean booleanand; arbitraryheader attribute acstring arbitraryheader; hdrproperty /** * not to be confused with arbitraryheader, which is a header in the * rfc822
message.
... this is a property of the nsimsgdbhdr, and may have * nothing to do the
message headers, e.g., gloda-id.
...ty boolean matchpriority(in nsmsgpriorityvalue priority); matchage boolean matchage(in prtime days); matchsize boolean matchsize(in unsigned long size); matchlabel boolean matchlabel(in nsmsglabelvalue alabelvalue); matchjunkstatus boolean matchjunkstatus(in string ajunkscore); matchjunkpercent /* * test search term match for junkpercent * * @param ajunkpercent junkpercent for
message (0-100, 100 is junk) * @return true if matches */ boolean matchjunkpercent(in unsigned long ajunkpercent); matchjunkscoreorigin /* * test search term match for junkscoreorigin * @param ajunkscoreorigin who set junk score?
...And 4 more matches
nsIWorkerScope
1.0 66 introduced gecko 1.9.1 inherits from: nsiworkerglobalscope last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void post
message(in domstring a
message, [optional] in nsiworker
messageport a
messageport); void close(); attributes attribute type description onclose nsidomeventlistener a listener object to be called when the worker stops running.
... on
message nsidomeventlistener a listener object to be called when a
message is posted on the port.
... the
message is in the event's data member.
...And 4 more matches
Cached compose window FAQ
any new window performance problems that mozilla has are especially painful in mail compose, as we need to create a new compose window on every new mail
message or reply.
... to test it start mozilla do new
message.
...(the compose window is now cached) do new
message again.
...And 4 more matches
Plug-in Development Overview - Plugins
for more information about mime types, see these mime rfcs: rfc-2045: "multipurpose internet mail extensions (mime) part one: format of internet
message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms.
...for example, this description list corresponds to the types in the previous example: string 1: "quicktime video", string 4: "aiff audio", and string 5: "jpeg image format." str#' 126: string 1 can contain a descriptive
message about the plug-in.
... this
message, which is in html format, is displayed by the browser in its "about plug-ins" page.
...And 4 more matches
Inspecting web sockets - Firefox Developer Tools
filtering web socket frames to focus on specific
messages, frames can be filtered using the filter at the top of the
messages panel.
... the following filters are available: all displays all
messages (by default, except control
messages).
... sent displays only
messages sent by the browser (by default, except control
messages).
...And 4 more matches
Waterfall - Firefox Developer Tools
event type for example, "click" or "
message".
... worker event in main thread shown when the main thread sends a
message to a worker, or receives a
message from a worker.
... one of: serialize data on the main thread the main thread is serializing a
message to be sent to the worker.
...And 4 more matches
RTCDataChannel.send() - Web APIs
different browsers have different limitations on the size of the
message you can send.
... specifications exist to define how to automatically fragment large
messages, but not all browsers implement them, and those that do have various additional restrictions.
... this will get less complicated over time, but for now, if you have questions, see understanding
message size limits in using webrtc data channels.
...And 4 more matches
SubtleCrypto.deriveKey() - Web APIs
possible values of the array are: encrypt: the key may be used to encrypt
messages.
... decrypt: the key may be used to decrypt
messages.
... sign: the key may be used to sign
messages.
...And 4 more matches
Web NFC API - Web APIs
the web nfc api allows exchanging data over nfc via light-weight nfc data exchange format (ndef)
messages.
... interfaces ndef
message interface that represents ndef
messages that can be received from or sent to a compatible device or tag via ndefreader and ndefwriter objects respectively.
... a
message is composed of metadata and ndef records.
...And 4 more matches
Synchronous and asynchronous requests - Web APIs
if an error occurred, an error
message is displayed.
...*/) { var xhr = new xmlhttprequest(); xhr.callback = callback; xhr.arguments = array.prototype.slice.call(arguments, 2); xhr.onload = xhrsuccess; xhr.onerror = xhrerror; xhr.open("get", url, true); xhr.send(null); } usage: function show
message(
message) { console.log(
message + this.responsetext); } loadfile("
message.txt", show
message, "new
message!\n\n"); the signature of the utility function loadfile declares (i) a target url to read (via an http get request), (ii) a function to execute on successful completion of the xhr operation, and (iii) an arbitrary list of additional arguments that are passed through the xhr object (via t...
...it, in turn, invokes the callback function specified in the invocation of the loadfile function (in this case, the function show
message) which has been assigned to a property of the xhr object (line 11).
...And 4 more matches
<input type="url"> - HTML: Hypertext Markup Language
it should be a word or short phrase that demonstrates the expected type of data, rather than an explanatory
message.
...in our simplified form, the user needs to enter the url of the page that has a problem, and a
message describing what is wrong.
...that's because the title may be displayed or spoken as part of a validation error
message.
...And 4 more matches
HTTP headers - HTTP
end-to-end headers these headers must be transmitted to the final recipient of the
message: the server for a request, or the client for a response.
... if viewport-width occurs in a
message more than once, the last value overrides all previous occurrences.
...if width occurs in a
message more than once, the last value overrides all previous occurrences conditionals last-modified the last modification date of the resource, used to compare several versions of the same resource.
...And 4 more matches
Planned changes to shared memory - JavaScript
there is standardization work ongoing that enables developers to create sharedarraybuffer objects again, but changes are needed in order to be use these across threads (i.e., post
message() for sharedarraybuffer objects throws by default).
... for top-level documents, two headers will need to be set: cross-origin-opener-policy with same-origin as value (protects your origin from attackers) cross-origin-embedder-policy with require-corp as value (protects victims from your origin) with these two headers set, post
message() will no longer throw for sharedarraybuffer objects and shared memory across threads is therefore available.
... unless the two headers mentioned above are set, the various post
message() apis will throw for sharedarraybuffer objects.
...And 4 more matches
notifications - Archive of obsolete content
display transient, toaster-style desktop
messages to the user.
...when the
message is clicked, a string is logged to the console.
... parameters options : object optional options: name type title string a string to display as the
message's title.
...And 3 more matches
Storing annotations - Archive of obsolete content
torid = anchor[1]; this.anchortext = anchor[2]; } now we need to link this code to the annotation editor, so that when the user presses the return key in the editor, we create and store the new annotation: var annotationeditor = panels.panel({ width: 220, height: 220, contenturl: data.url('editor/annotation-editor.html'), contentscriptfile: data.url('editor/annotation-editor.js'), on
message: function(annotationtext) { if (annotationtext) handlenewannotation(annotationtext, this.annotationanchor); annotationeditor.hide(); }, onshow: function() { this.post
message('focus'); } }); listing stored annotations to prove that this works, let's implement the part of the add-on that displays all the previously entered annotations.
... this is implemented as a panel that's shown in response to the widget's right-click
message.
... annotation list content script here's the annotation list's content script: self.on("
message", function on
message(storedannotations) { var annotationlist = $('#annotation-list'); annotationlist.empty(); storedannotations.foreach( function(storedannotation) { var annotationhtml = $('#template .annotation-details').clone(); annotationhtml.find('.url').text(storedannotation.url) .attr('href', storedannotation.url); annotationhtml.find('.url...
...And 3 more matches
Display a Popup - Archive of obsolete content
you can run content scripts in the panel: although the script running in the panel can't directly access your main add-on code, you can exchange
messages between the panel script and the add-on code.
...the main add-on code logs the
message to the console.
...text_entry.on("show", function() { text_entry.port.emit("show"); }); // listen for
messages called "text-entered" coming from // the content script.
...And 3 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
note: if you're using html5's post
message() to send a
message from unprivileged code to privileged code, adding 'true' to the end of your event listener in your privileged chrome code will allow the
message to be received.
... document.addeventlistener("
message", function(e) { yourfunction(e); }, false, true); sending data from chrome to unprivileged document to "answer" the web page (e.g., return code), your extension can set an attribute or attach child elements on the event target element (<myextensiondataelement/> in this example).
...in the following code sample 2 methods are combined: setting an extra attribute in the original event target element, and creating a new event
message with a new event target element.
...And 3 more matches
Handling Preferences - Archive of obsolete content
as the warning
message states, you should be very careful when changing preferences.
...the contents of the file are fairly simple: // amount of
messages shown to the user.
... pref("extensions.xulschoolhello.
message.count", 0); this defines a preference we'll use to keep track of the amount of times we have displayed a greeting
message to the user.
...And 3 more matches
The Essentials of an Extension - Archive of obsolete content
sayhello : function(aevent) { let stringbundle = document.getelementbyid("xulschoolhello-string-bundle"); let
message = stringbundle.getstring("xulschoolhello.greeting.label"); window.alert(
message); } and, finally, this is our function declaration.
...we call the getstring method of the bundle element and get the localized
message to be displayed.
... we then call the window.alert function with the
message, just like we would do in an html document.
...And 3 more matches
User Notifications and Alerts - Archive of obsolete content
notification boxes are very easy to create, and are very customizable: let nb = gbrowser.getnotificationbox(); let acceptbutton = new object(); let declinebutton = new object(); let
message = this._bundle.getstring("xulschoolhello.friend
message.label"); let that = this; acceptbutton.label = this._bundle.getstring("xulschoolhello.acceptbutton.label"); acceptbutton.accesskey = this._bundle.getstring("xulschoolhello.acceptbutton.accesskey"); acceptbutton.popup = null; acceptbutton.callback = function() { that.acceptrequest(); }; // similarly for decline button.
... nb.appendnotification(
message, "xulschoolhello-friend-notification", "chrome://xulschoolhello/skin/friend-notification.png", nb.priority_info_high, [ acceptbutton, declinebutton ]); all browser tabs have a notification box by default, so you don't need to do any overlaying.
...the appendnotification method takes the
message, id, image (32x32), level and buttons.
...And 3 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
<rdf:li> <rdf:seq about="chrome://navigator/content/navigator.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!-- address book --> <rdf:li> <rdf:seq about="chrome://messenger/content/addressbook/addressbook.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!--
message --> <rdf:li> <rdf:seq about="chrome://messenger/content/
messagewindow.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> </rdf:li> <!--
message compose --> <rdf:li> <rdf:seq about="chrome://messenger/content/messengercompose/messengercompose.xul"> <rdf:li>chrome://custombutton/content/button.xul</rdf:li> </rdf:seq> ...
...xul"> <script type="application/javascript" src="chrome://custombutton/content/button.js"/> <!-- browser --> <toolbar id="nav-bar"> <hbox id="nav-bar-buttons"> <toolbarbutton id="custom-button-1"/> </hbox> </toolbar> <!-- address book --> <toolbar id="abtoolbar"> <hbox id="toolbar_button_box"> <toolbarbutton id="custom-button-1" position="8"/> </hbox> </toolbar> <!--
message compose --> <toolbar id="composetoolbar"> <hbox id="toolbar_button_box"> <toolbarbutton id="custom-button-1" position="8"/> </hbox> </toolbar> <!-- mail,
message --> <hbox id="toolbar_button_box"> <toolbarbutton id="custom-button-1" position="15"/> </hbox> <!-- composer --> <toolbar id="edittoolbar"> <toolbarbutton id="custom-button-1" position="18"/> </toolbar> <!-- chat -...
...you should see the pop-up
message.
...And 3 more matches
SSL and TLS - Archive of obsolete content
an ssl/tls session always begins with an exchange of
messages called the ssl handshake, initial communication between the server and client.
... supported cipher suites for rsa cipher suites with the rsa key exchange that are commonly supported include the following: aes and sha
message authentication.
... triple des and sha
message authentication.
...And 3 more matches
Theme changes in Firefox 2 - Archive of obsolete content
if no updates are found, this icon is displayed at the left side of the
message strip that appears across the top of the window.
...s-button:active #forward-button[buttondown="true"] #history-button:active #home-button:active #mail-button #mail-button:active #mail-button[disabled="true"] #mail-button[open="true"] #new-tab-button:active #new-tab-button[checked="true"] #new-window-button:active #new-window-button[checked="true"] #paste-button:active #print-button:active #reload-button:active #stop-button:active .
messagebutton .
messageimage .
messagetext browser
message toolbar[iconsize="small"] #bookmarks-button:active toolbar[iconsize="small"] #copy-button:active toolbar[iconsize="small"] #cut-button:active toolbar[iconsize="small"] #downloads-button:active toolbar[iconsize="small"] #history-button:active toolbar[iconsize="small"] #home-button:active toolbar[iconsize="small"] #mail-button toolbar[icons...
...the following styles must be implemented to support the window that appears when the user browses to a suspected phishing site: #safebrowsing-dim-area-canvas #safebrowsing-page-canvas #safebrowsing-palm-close #safebrowsing-palm-close-container #safebrowsing-palm-google-logo #safebrowsing-palm-
message #safebrowsing-palm-
message-actionbox #safebrowsing-palm-
message-content #safebrowsing-palm-
message-tail #safebrowsing-palm-
message-tail-container #safebrowsing-palm-
message-titlebox .safebrowsing-palm-bigtext .safebrowsing-palm-fixed-width .safebrowsing-palm-paragraph .safebrowsing-palm-smalltext the following styles are used to display, in the url bar, an indicator of whether or not t...
...And 3 more matches
XForms Alert Element - Archive of obsolete content
introduction this
message will be shown when the form control cannot properly bind to instance data or when the instance data value is invalid or out of the specified range of selectable values (see the spec).
... the
message of the alert element can exist in instance data, in a remote document, or as inline text.
... if more than one source of
message is specified in this element, the order of precedence is: single node binding attributes, linking attributes, inline text.
...And 3 more matches
How does the Internet work? - Learn web development
this router has only one job: like a signaler at a railway station, it makes sure that a
message sent from a given computer arrives at the right destination computer.
... to send a
message to computer b, computer a must send the
message to the router, which in turn forwards the
message to computer b and makes sure the
message is not delivered to computer c.
...the next step is to send the
messages from our network to the network we want to reach.
...And 3 more matches
Your first form - Learn web development
we are asking the user for their name, their e-mail and the
message they want to send.
... the input field for the
message is a <textarea>; a multiline text field.
... in terms of html code we need something like the following to implement these form widgets: <form action="/my-handling-form-page" method="post"> <ul> <li> <label for="name">name:</label> <input type="text" id="name" name="user_name"> </li> <li> <label for="mail">e-mail:</label> <input type="email" id="mail" name="user_email"> </li> <li> <label for="msg">
message:</label> <textarea id="msg" name="user_
message"></textarea> </li> </ul> </form> update your form code to look like the above.
...And 3 more matches
JavaScript basics - Learn web development
if values couldn't change, then you couldn't do anything dynamic, like personalize a greeting
message or change an image displayed in an image gallery.
... for example, the alert() function makes a pop-up box appear inside the browser window, but we need to give it a string as an argument to tell the function what
message to display.
... adding a personalized welcome
message next, let's change the page title to a personalized welcome
message when the user first visits the site.
...And 3 more matches
mach
running from the root of the source tree checkout, you should just be able to type: $ ./mach if all is well, you should see a help
message.
... of course, in a random dir you just get a cryptic error
message to improve the experience.
... for full help: $ ./mach help try building the tree: $ ./mach build if you get error
messages, make sure that you have all of the build requisites for your system.
...And 3 more matches
Limitations of chrome scripts
to make the shim unnecessary: factor the code that needs to access content into a separate script, load that script into the content process as a frame script, and communicate between the chrome script and the frame script using the
message-passing apis.
... see the article on using the
message manager.
... the correct way to access the dom window is through a
message manager.
...And 3 more matches
IPDL Best Practices
are you sending the __delete__
message to trigger protocol deletion?
...using ipdl generated structs as data structures outside of ipc serialization/deserialization ipdl generated structures are meant to facilitate serialization/deserialization and
message passing.
...minimize overall use of
messages reducing ipc traffic is a righteous goal.
...And 3 more matches
Localizing with Mercurial
if you see a
message about the version of mercurial (e.g.
...if you see a
message about the version of mercurial (e.g.
...if you see a
message about the version of mercurial (e.g.
...And 3 more matches
gettext
for instance, in php the default keyword for regular
messages is gettext() and _().
... for
messages with plural support, the default keyword is ngettext().
... the string definition in the
messages.po file will look like this: #: file.php:3 #, php-format msgid "%d user likes this." msgid_plural "%d users like this." msgstr[0] "" msgstr[1] "" depending on the localizer's target language and its rules for creating plural forms, there might be another field for translation, e.g.
...And 3 more matches
Observer Notifications
message manager topic subject data description
message-manager-disconnect nsicontentframe
messagemanager null this notification is sent when a
message manager disconnects.
... the subject of the notification is the
message manager that disconnected.
... if you're using a
message manager to communicate with a script that may be running in a different process, you might need to know when the
message manager has disconnected from the other end of the conversation, so you can stop sending it
messages or expecting to receive
messages.
...And 3 more matches
nsIMsgDBViewCommandUpdater
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports in thunderbird this is implemented for different windows in several different places: nsmsgdbviewcommandupdater (for the standalone
message window) nsmsgdbviewcommandupdater (for the threadpane
message window) nsmsgsearchcommandupdater (for search dialogs) method overview void updatecommandstatus(); void display
messagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords); void updatenext
messageafterdelete(); methods updatecommandstatus() called when the number of selected items changes.
... display
messagechanged() called when the displayed
message has changed.
... void display
messagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords ); parameters afolder the folder containing selected
message.
...And 3 more matches
nsIMsgWindowCommands
mailnews/base/public/nsimsgwindow.idlscriptable this interface defines methods used by the back end to update the user interface in a mail or news
message list.
...method overview void selectfolder(in acstring folderuri); void select
message(in acstring
messageuri); void clearmsgpane(); methods selectfolder() this method is called by the backend to change the folder displayed in the
message window.
... select
message() this method is called by the backend to change the displayed
message.
...And 3 more matches
nsIProcessScriptLoader
idl file: mozilla-central/source/dom/base/nsi
messagemanager.idl inherits from: nsisupports this interface is used by parent process
message managers to load scripts into a child process.
...the global object for process scripts is a contentprocess
messagemanager.
... if this function is called on a chrome
messagebroadcaster, : it will load the process script into all child processes.
...And 3 more matches
nsIRadioInterfaceLayer
terfaces.nsiinterfacerequestor) .createinstance(components.interfaces.nsiradiointerfacelayer); method overview void answercall(in unsigned long callindex); void deactivatedatacall(in domstring cid, in domstring reason); void dial(in domstring number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short getnumberof
messagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callindex); void sendsms(in domstring number, in domstring
message, in long requestid, in unsigned long long processid); void setupdatacall(in long radiotech, in ...
...exceptions thrown missing exception missing description getnumberof
messagesfortext() returns the number of multi-part sms needed for a given text (160 characters for one sms).
... unsigned short getnumberof
messagesfortext( in domstring text ); parameters text the body text of an sms.
...And 3 more matches
nsIStringBundleService
ervice, use: var stringbundleservice = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice); method overview nsistringbundle createbundle(in string aurlspec); nsistringbundle createextensiblebundle(in string aregistrykey); void flushbundles(); wstring formatstatus
message(in nsresult astatus, in wstring astatusarg); methods createbundle() nsistringbundle createbundle( in string aurlspec ); parameters aurlspec the url of the properties file to load.
... formatstatus
message() formats a
message string from a status code and status arguments.
... typically used to format a
message received by a nsiprogresseventsink's onstatus method.
...And 3 more matches
XPCOM Interface Reference by grouping
browser autocomplete nsiautocompletecontroller nsiautocompleteinput nsiautocompletesearch console nsiconsolelistener nsiconsole
message nsiconsoleservice document nsidocshell dom device nsidomgeogeolocation nsidomgeoposition nsidomgeopositionaddress nsidomgeopositioncallback nsidomgeopositioncoords nsidomgeopositionerror nsidomgeopositionerrorcallback nsidomgeopositionoptions nsidomglobalpropertyinitializer element nsidomchromewindow nsidomclientrect ...
...essibleeditabletext nsiaccessibleevent nsiaccessiblehyperlink nsiaccessiblehypertext nsiaccessibleimage nsiaccessibleprovider nsiaccessibleretrieval nsiaccessiblerole nsiaccessiblescrolltype nsiaccessibleselectable nsiaccessiblestates nsiaccessibletable nsiaccessibletext nsiaccessibletreecache nsiaccessiblevalue nsiaccessnode nsisync
messagesender script nsiscriptableunescapehtml nsiscriptableunicodeconverter nsiscripterror nsiscripterror2 stylesheet nsistylesheetservice url nsiuri nsiurl util nsidomserializer nsidomxpathevaluator nsidomxpathexception nsidomxpathexpression nsidomxpathresult xslt nsixsltexception nsixsltprocessor downl...
...oad nsidownload nsidownloadmanager nsidownloadprogresslistener element internal nsiworker nsiworkerglobalscope nsiworker
messageevent nsiworker
messageport nsiworkerscope tree nsitreeboxobject nsitreecolumn nsitreecolumns nsitreecontentview nsitreeselection nsitreeview xform nsixformsmodelelement nsixformsnsinstanceelement nsixformsnsmodelelement xmlhttprequest nsixmlhttprequesteventtarget favicon nsifavicondatacallback nsifaviconservice frame nsichromeframe
messagemanager nsiframeloader nsiframeloaderowner nsiframe
messagelistener nsiframe
messagemanager interface nsijsxmlhttprequest jetpack nsijetpack nsijetpackservice ...
...And 3 more matches
customDBHeaders Preference
in addition to the preference outlined in setting up extension development environment, you'll want to add the following preferences: // this allows you to add extra headers while composing
messages user_pref("mail.compose.other.header", "x-superfluous,x-other,x-whatever"); // this enables the preservation of custom headers as incoming mail is processed user_pref( "mailnews.customdbheaders", "x-superfluous,x-other"); important: please pay careful attention to the case of the mailnews.customdbheaders preference.
... because comparisons are case-insensitive, all of the custom headers get set to lowercase when the data gets migrated to the
message database.
... javascript code once again, other tutorials have demonstrated the general javascript code used to populated columns with data from a
message header, so i'm just including my file for reference.
...And 3 more matches
Thunderbird extensions
functions for dealing with
messages (delete, archive, change tags, etc.) are included.
...gloda provides concepts such as conversations,
messages, identities, contacts.
... all these concepts are related : a conversation contains
messages which are linked to identities (from field, to field) which are themselves part of a contact: indeed, a contact has multiple identities.
...And 3 more matches
WebIDL bindings
each new tag requires that a localized string be defined, containing the deprecation
message to display.
... throwtypeerror: allows throwing a typeerror with the given error
message.
... the list of allowed typeerrors and corresponding
messages is in dom/bindings/errors.msg.
...And 3 more matches
Web Console UI Tour - Firefox Developer Tools
funnel: click this icon to filter the
messages that are displayed in the console.
... filter categories: you can click a filter category (such as errors, warnings, css, or xhr) to display just those types of
messages.
... show timestamps: when enabled, timestamps are shown on the left-hand side of each
message row to say when the
messages were logged.
...And 3 more matches
Broadcast Channel API - Web APIs
by creating a broadcastchannel object, you can receive any
messages that are posted to it.
... // connection to a broadcast channel const bc = new broadcastchannel('test_channel'); sending a
message it is enough to call the post
message() method on the created broadcastchannel object, which takes any object as an argument.
... an example string
message: // example of sending of a very simple
message bc.post
message('this is a test
message.'); any kind of object can be sent, not just a domstring.
...And 3 more matches
console - Web APIs
methods console.assert() log a
message and stack trace to console if the first argument is false.
... console.debug() outputs a
message to the console with the log level debug.
... console.error() outputs an error
message.
...And 3 more matches
RTCPeerConnection.createDataChannel() - Web APIs
options optional an rtcdatachannelinit dictionary providing configuration options for the data channel rtcdatachannelinit dictionary the rtcdatachannelinit dictionary provides the following fields, any of which may be included in the object passed as the options parameter in order to configure the data channel to suit your needs: ordered optional indicates whether or not
messages sent on the rtcdatachannel are required to arrive at their destination in the same order in which they were sent (true), or if they're allowed to arrive out-of-order (false).
... maxpacketlifetime optional the maximum number of milliseconds that attempts to transfer a
message may take in unreliable mode.
... maxretransmits optional the maximum number of times the user agent should attempt to retransmit a
message which fails the first time in unreliable mode.
...And 3 more matches
SharedWorker - Web APIs
sharedworker.port read only returns a
messageport object used to communicate with and control the shared worker.
...both scripts contain this: var myworker = new sharedworker('worker.js'); both scripts then access the worker through a
messageport object created using the sharedworker.port property.
... if the on
message event is attached using addeventlistener, the port is manually started using its start() method: myworker.port.start(); when the port is started, both scripts post
messages to the worker and handle
messages sent from it using port.post
message() and port.on
message, respectively: first.onchange = function() { myworker.port.post
message([first.value,second.value]); console.log('
message posted to worker'); } second.onchange = function() { myworker.port.post
message([first.value,second.value]); console.log('
message posted to worker'); } myworker.port.on
message = function(e) { result1.textcontent = e.data; console.log('
message received from worker'); } inside the worker we use the sharedworkerglobalscope.onconnect handler to connect to the same port discussed above.
...And 3 more matches
Web APIs
half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic eckeygenparams eckeyimportparams ecdhkeyderiveparams ecdsaparams effecttiming element elementcssinlinestyle elementtraversal errorevent event eventlistener eventsource eventtarget extendableevent extendable
messageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fileexception filelist filereader filereadersync filerequest filesystem filesystemdirectoryentry filesystemdirectoryreader filesystementry filesystementrysync filesystemfileentry filesystemflags filesystemsync focusevent fontface fontfaceset fontfacesetloadevent formdata formdataentryva...
...rver intersectionobserverentry interventionreportbody k keyboard keyboardevent keyboardlayoutmap keyframeeffect keyframeeffectoptions l largestcontentfulpaint layoutshift layoutshiftattribution linearaccelerationsensor linkstyle localfilesystem localfilesystemsync localmediastream location lock lockmanager lockedfile m midiaccess midiconnectionevent midiinput midiinputmap midi
messageevent midioutputmap mscandidatewindowhide mscandidatewindowshow mscandidatewindowupdate msgestureevent msgraphicstrust msmanipulationevent msrangecollection mssitemodeevent magnetometer mathmlelement mediacapabilities mediacapabilitiesinfo mediaconfiguration mediadecodingconfiguration mediadeviceinfo mediadevices mediaelementaudiosourcenode mediaencodingconfiguration mediaerror media...
...image mediakey
messageevent mediakeysession mediakeystatusmap mediakeysystemaccess mediakeysystemconfiguration mediakeys medialist mediametadata mediapositionstate mediaquerylist mediaquerylistevent mediaquerylistlistener mediarecorder mediarecordererrorevent mediasession mediasessionactiondetails mediasettingsrange mediasource mediastream mediastreamaudiodestinationnode mediastreamaudiosourcenode mediastreamaudiosourceoptions mediastreamconstraints mediastreamevent mediastreamtrack mediastreamtrackaudiosourcenode mediastreamtrackaudiosourceoptions mediastreamtrackevent mediatrackconstraints mediatracksettings mediatracksupportedconstraints merchantvalidationevent
messagechannel
messageevent
messageport metadata mimetype mimetypearray mouseevent mousescrollevent mousewheelevent mutatio...
...And 3 more matches
CORS errors - HTTP
in these pages, we'll look into some common cors error
messages and how to resolve them.
... now try to reproduce the failing transaction and check the console if you are seeing a cors violation error
message.
... it will probably look like this: the text of the error
message will be something similar to the following: cross-origin request blocked: the same origin policy disallows reading the remote resource at https://some-url-here.
...And 3 more matches
HTTP response status codes - HTTP
the meaning of the success depends on the http method: get: the resource has been fetched and is transmitted in the
message body.
... head: the entity headers are in the
message body.
... put or post: the resource describing the result of the action is transmitted in the
message body.
...And 3 more matches
Error - JavaScript
instance properties error.prototype.
message error
message.
...similar to
message.
...you can handle the error using the try...catch construct: try { throw new error('whoops!') } catch (e) { console.error(e.name + ': ' + e.
message) } handling a specific error you can choose to handle only specific error types by testing the error type with the error's constructor property or, if you're writing for modern javascript engines, instanceof keyword: try { foo.bar() } catch (e) { if (e instanceof evalerror) { console.error(e.name + ': ' + e.
message) } else if (e instanceof rangeerror) { console.error(e.name + ':...
...And 3 more matches
event/core - Archive of obsolete content
an event listener may be registered to any event target using the on function: var { on, once, off, emit } = require('sdk/event/core'); var target = { name: 'target' }; on(target, '
message', function listener(event) { console.log('hello ' + event); }); on(target, 'data', console.log); an event of a specific type may be emitted on any event target object using the emit function.
... emit(target, '
message', 'event'); // info: 'hello event' emit(target, 'data', { type: 'data' }, 'second arg'); // info: [object object] 'second arg' registered event listeners may be removed using off function: off(target, '
message'); emit(target, '
message', 'bye'); // info: 'hello bye' sometimes listener only cares about first event of specific type.
...all listeners of the specific type can be easily removed (only two argument must be passed): off(target, '
message'); also, removing all registered listeners is possible (only one argument must be passed): off(target); globals functions on(target, type, listener) registers an event listener that is called every time events of the specified type is emitted on the given event target.
...And 2 more matches
util/deprecate - Archive of obsolete content
globals functions deprecatefunction(fun, msg) dump to the console the error
message given in the second argument, prefixed with "deprecated:", and print the stacktrace; then execute the function passed as first argument and returns its value.
... it does not raise an exception, but just displays the error
message and continues to execute the function.
... parameters fun : function the function to execute after the error
message msg : string the error
message to display returns * : the returned value from fun deprecateusage(msg) dump to the console the error
message given, prefixed with "deprecated:", and print the stacktrace.
...And 2 more matches
Modifying the Page Hosted by a Tab - Archive of obsolete content
l scripts", icon: "./icon-16.png", onclick: function () { tabs.activetab.attach({ contentscriptfile: [self.data.url('first.js'), self.data.url('second.js')] }); } }); communicating with the content scripts your add-on script and content scripts can't directly access each other's variables or call each other's functions, but they can send each other
messages.
... to send a
message from one side to the other, sender calls port.emit() and receiver listens using port.on().
... in the add-on script, tab.attach() returns a worker object containing the port property you use to send
messages to the content script.
...And 2 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
good candidates for inner-browsing include a spell check application, in which the text entered in a web page is checked as it is typed; a webmail application that uses the inner-browsing model to display the separate
messages and
message lists in an integrated way, much like a client mail app; and a stock ticker that spools the information across the web page.
...webmail application the flexibility to easily access and manage all
message headers in mail applications (like netscape mail or eudora) is probably one of the useful features when compared with web-based mail applications.
... in general, when a webmail account has more than a few
messages, clicking 'next page' sends a request to the server.
...And 2 more matches
Property Files - Archive of obsolete content
in addition, you may wish to display a
message which is generated from a script, if, for example, you do not know the exact text to be displayed.
...result
message=%2$s files found in the %1$s directory.
...a line that begins with a hash sign ('#') is treated as a comment: # this is a comment welcome
message=hello, world!
...And 2 more matches
Debugging a XULRunner Application - Archive of obsolete content
if you would like the console
messages to appear in the console you used to launch the application, you can use the gecko console redirector.
... to output
messages to the javascript console there are two ways to output
messages to the js console: components.utils.reporterror(str) will output str as an "error" (i.e.
... jsdump(str) (function defined below) will output str as a "
message" with a speech bubble icon next to it: function jsdump(str) { components.classes['@mozilla.org/consoleservice;1'] .getservice(components.interfaces.nsiconsoleservice) .logstring
message(str); } for more information about the error console see the error console and browser console article.
...And 2 more matches
Extentsions FAQ - Archive of obsolete content
just drag them there from the toolbar customisation window, like you would when adding buttons to the toolbars." option #4 install toolbar control <http://webdesigns.ms11.net/chromeditp.html> asking for help with getting an extension to process windows
messages.
... could someone make an extension for thunderbird that preview upcomeing events and number of new
messages?
... how to attach information using the stringproperties of an imap
message with out changing the properties?
...And 2 more matches
NPN_Status - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary lets a plug-in display a
message on the browser's status line.
... syntax #include <npapi.h> void npn_status(npp instance, const char*
message); parameters the function has the following parameters: instance pointer to the current plug-in instance.
...
message pointer the buffer that contains the status
message string to display.
...And 2 more matches
XForms Help Element - Archive of obsolete content
the help
message will be displayed if the f1 key is pressed while the containing form control has focus or if the containing form control recieves a xforms-help event.
... the
message of the help element can exist in instance data, in a remote document, or as inline text.
... if more than one source of
message is specified in this element, the order of precedence is: single node binding attributes, linking attributes, inline text.
...And 2 more matches
RDF in Fifty Words or Less - Archive of obsolete content
first, rdf is a graph-based model for describing internetresources (like web pages and email
messages), and how these resources relate to one another.
...there are tons of others, including email
messages, usenet news articles (or entire usenet news groups), and search results from your favorite web crawler, just to name a few.
...all the
messages that i've received over night appear.
...And 2 more matches
UI pseudo-classes - Learn web development
for example, if we apply the following css to the above html: input:required { border: 1px solid black; } input:optional { border: 1px solid silver; } the required controls would have a black border, and the optional control will have a silver border, like so: you can also try submitting the form without filling it in, to see the client-side validation error
messages browsers give you by default.
...the issue is really one of semantics — out-of-range is a more specific type of invalid communication, so you might want to provide a different
message for out-of-range inputs, which will be more helpful to users than just saying "invalid".
...our out-of-range.html demo (see also the source code) builds on top of the previous example to provide out-of-range
messages for the numeric inputs, as well as saying whether they are required.
...And 2 more matches
A first splash into JavaScript - Learn web development
if it is correct: display congratulations
message.
... 5 !== 2 + 4 // true 'chris' !== 'bob' // true 5 !== 2 + 3 // false 2 !== '2' // true; number versus string < less than 6 < 10 // true 20 < 10 // false > greater than 6 > 10 // false 20 > 10 // true conditionals returning to our checkguess() function, i think it's safe to say that we don't want it to just spit out a placeholder
message.
...if it is, the player has guessed correctly and the game is won, so we show the player a congratulations
message with a nice green color, clear the contents of the low/high guess information box, and run a function called setgameover(), which we'll discuss later.
...And 2 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
let's start by showing a status
message.
... find the <h2> heading with an id of list-heading and replace the hardcoded number of active and completed tasks with dynamic expressions: <h2 id="list-heading">{completedtodos} out of {totaltodos} items completed</h2> go to the app, and you should see the "2 out of 3 items completed"
message as before, but this time the information is coming from the todos array.
...observe how the numbers in the
message are updated appropriately.
...And 2 more matches
Handling common JavaScript problems - Learn web development
when clicked, each one should alert a
message containing its number (the value of i at the time it was created), however each one reports i as 11, because for loops do all their iterating before nested functions are invoked.
... after the packages have finished installing, try loading up a javascript file: you'll see any issues highlighted with green (for warnings) and red (for errors) circles next to the line numbers, and a separate panel at the bottom provides line numbers, error
messages, and sometimes suggested values or other fixes.
... if you look at the console, you'll see the error
message "uncaught typeerror: can't access property "length", heroes is undefined", and the referenced line number is 49.
...And 2 more matches
Setting up the infrastructure
copy the shell scripts from /addons/trunk/site/app/locale/ to your locale directory: extract-po.sh will be used to extract all english strings from your application's directories specified in source_dirs, merge the resulting template (*.pot) file with the existing (already containing translations)
messages.po files for each locale (if they exist) and merge the new
messages.po files to
messages.mo files.
... compile-mo.sh will only compile all locales'
messages.po files to
message.mo files.
... this is useful when a localizer submits a new version of the
messages.po file.
...And 2 more matches
Bytecode Descriptions
kind is used only to generate an appropriate error
message.
...jsop::calliter is used for implicit calls to @@iterator methods, to ensure error
messages are formatted with jsmsg_not_iterable ("x is not iterable") rather than jsmsg_not_function ("x[symbol.iterator] is not a function").
...msgnumber must be one of the error codes listed in js/src/js.msg; it determines the .
message and [[prototype]] of the new error object.
...And 2 more matches
JSAPI Cookbook
// javascript throw new error("failed to grow " + varietal + ": too many greenflies."); /* jsapi */ js_reporterror(cx, "failed to grow %s: too many greenflies.", varietal); return false; to internationalize your error
messages, and to throw other error types, such as syntaxerror or typeerror, use js_reporterrornumber instead.
...jsapi code can override this by creating the error object directly and passing additional arguments to the constructor: // javascript throw new error(
message, filename, lineno); /* jsapi */ bool throwerror(jscontext *cx, jsobject *global, const char *
message, const char *filename, int32 lineno) { jsstring *
messagestr; jsstring *filenamestr; js::value args[3]; js::value exc;
messagestr = js_newstringcopyz(cx,
message); if (!
messagestr) return false; filenamestr = js_newstringcopyz(cx, filename); ...
... if (!filenamestr) return false; args[0] = string_to_jsval(
messagestr); args[1] = string_to_jsval(filenamestr); args[2] = int_to_jsval(lineno); if (js_callfunctionname(cx, global, "error", 3, args, &exc)) js_setpendingexception(cx, exc); return false; } ...
...And 2 more matches
JS_ReportError
create a formatted error or warning
message to pass to a user-defined error reporting function.
... format const char * format string to convert into an error
message using js_vsmprintf.
... error
message variables to insert into the format string.
...And 2 more matches
Components.utils.reportError
this means you can use components.utils.reporterror to report debugging
messages to the error console, just like dump() can be used to print
messages to the native console.
... however you should use nsiconsoleservice for logging, as it logs the
messages with normal severity, unlike reporterror.
... function mydump(a
message) { var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); consoleservice.logstring
message("my component: " + a
message); } firefox 3: the error console will not display chrome errors by default.
...And 2 more matches
nsIFrameScriptLoader
idl file: mozilla-central/source/dom/base/nsi
messagemanager.idl inherits from: nsisupports this interface is used to load frame scripts.
... if this function is called on a chrome
messagebroadcaster (for example, a global frame
message manager or a window
message manager) then: loadframescript() will load the frame script independently into each applicable frame: every open frame in the given window for the window
message manager, or every frame in every window for the global
message manager if aallowdelayedload is true, then the script will also be loaded into any applicable ...
... if this function is called on a chrome
messagesender: it will load the frame script only into this chrome
messagesender's frame aallowdelayedload should always be true.
...And 2 more matches
nsIMsgIdentity
autoquote boolean should we automatically quote the original
message?
... replyontop long should replies appear above or below the quoted
message.
... (1 - replies appear above the quoted
message.
...And 2 more matches
nsIMsgSendLater
to create an instance, use var msgsendlater = components.classes["@mozilla.org/messengercompose/sendlater;1"] .getservice(components.interfaces.nsimsgsendlater); method overview void sendunsent
messages(in nsimsgidentity identity); void removelistener(in nsimsgsendlaterlistener listener); void addlistener(in nsimsgsendlaterlistener listener); nsimsgfolder getunsent
messagesfolder](in nsimsgidentity identity); attributes attribute type description msgwindow nsimsgwindow methods sendunsent
messages() sends all unsent messag...
... void sendunsent
messages(in nsimsgidentity identity) parameters identity the nsimsgidentity to send unsent
messages for removelistener() remove an event listener from this nsisendmsglater instance void removelistener(in nsimsgsendlaterlistener listener); parameters listener the nsimsgsendlaterlistener to remove.
... getunsent
messagesfolder() get the unsent
messages folder for an identity.
...And 2 more matches
XPCOM reference
in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.nsicookie2 mozilla 1 8 branchnsimsgsearchvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl nsmsg
messageflagsthe nsmsg
messageflags interface describes possible flags for
messages.
... equivalent flags are also defined in nsmsg
messageflags.h.
... nsmsgnavigationtypethe nsmsgnavigationtype interface contains constants used for
message navigation in thunderbird.
...And 2 more matches
Using js-ctypes
components.utils.import("resource://gre/modules/ctypes.jsm"); var lib = ctypes.open("c:\\windows\\system32\\user32.dll"); /* declare the signature of the function we are going to call */ var msgbox = lib.declare("
messageboxw", ctypes.winapi_abi, ctypes.int32_t, ctypes.int32_t, ctypes.jschar.ptr, ctypes.jschar.ptr, ctypes.int32_t); var mb_ok = 0; var ret = msgbox(0, "hello world", "title", mb_ok); lib.close(); in line 3, the user32.dll system library is loaded.
... line 6 declares msgbox() to be a method that calls the windows function
messageboxw.
... about declaring the function how we knew how to declare the function was by going to msdn site and looking at the
messagebox (
messageboxw is just a unicode version of same function) function.
...And 2 more matches
URLs - Plugins
this example uploads a file from the root of the local file system to an ftp server and displays the response in a frame named response: char* mydata = "file:///c\/mydirectory/myfilename"; uint32 mylength = strlen(mydata) + 1; err = npn_posturl(instance, "ftp://fred@ftp.example.com/pub/", "response", mylength, mydata, true); sending mail a plug-in can send an email
message using npn_posturl or npn_posturlnotify.
... the following code sends a mail
message with the default headers from the client machine.
... char* mydata = "\nhi fred, this is a
message from my plug-in!"; uint32 mylength = strlen(mydata) + 1; err = npn_posturlnotify(instance, "mailto:fred@example.com", null, mylength, mydata, false); the example starts by defining the mail
message, mydata, and its length, mylength.
...And 2 more matches
Gecko Plugin API Reference - Plugins
using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying
messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shu...
...n initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins specifying that a plug-in is windowless invalidating the drawing area forcing a paint
message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode ...
...e stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line
message getting agent information getting the current version finding out if a feature exists reloading a plug-in plug-in side plug-in api this chapter describes methods in the plug-in api that are available from the plug-in object.
...And 2 more matches
HTMLObjectElement.setCustomValidity - Web APIs
the setcustomvalidity() method of the htmlobjectelement interface sets a custom validity
message for the element.
... syntax htmlobjectelement.setcustomvalidity(
message); parameters error the
message to use for validity errors.
... examples in this example, we pass the id of an input element, and set different error
messages depending on whether the value is missing, too low or too high.
...And 2 more matches
HTMLObjectElement - Web APIs
htmlobjectelement.standby is a domstring that reflects the standby html attribute, specifying a
message to display while the object loads.
... htmlobjectelement.validation
message read only returns a domstring representing a localized
message that describes the validation constraints that the control does not satisfy (if any).
... htmlobjectelement.setcustomvalidity() sets a custom validity
message for the element.
...And 2 more matches
Capabilities, constraints, and settings - Web APIs
logelement a <div> into which any error
messages or other log-type output will be written.
...if either call to json.parse() throws an exception, handleerror() is called to output the error
message to the log.
... if an error occurs applying either set of constraints, handleerror() is used to output a
message into the log.
...And 2 more matches
RTCDataChannel.binaryType - Web APIs
when a binary
message is received on the data channel, the resulting
message event's
messageevent.data property is an object of the type specified by the binarytype.
... syntax var type = adatachannel.binarytype; adatachannel.binarytype = type; value a domstring that can have one of these values: "blob" received binary
messages' contents will be contained in blob objects.
... "arraybuffer" received binary
messages' contents will be contained in arraybuffer objects.
...And 2 more matches
RTCDataChannel: open event - Web APIs
the webrtc open event is sent to an rtcdatachannel object's onopen event handler when the underlying transport used to send and receive the data channel's
messages is opened or re-opened.
...it enables the
message input box and send button as well as enabling the disconnect button and disabling the connect button.
... finally, the
message input box is focused so the user can immediately begin to type.
...And 2 more matches
ServiceWorkerContainer - Web APIs
message occurs when incoming
messages are received by the serviceworkercontainer object (e.g.
... via a
messageport.post
message() call.) also available via the serviceworkercontainer.on
message property.
... serviceworkercontainer.start
messages() explicitly starts the flow of
messages being dispatched from a service worker to pages under its control (e.g.
...And 2 more matches
ServiceWorkerGlobalScope - Web APIs
an active service worker is automatically restarted to respond to events, such as serviceworkerglobalscope.onfetch or serviceworkerglobalscope.on
message.
...
message occurs when incoming
messages are received.
... controlled pages can use the
messageport.post
message() method to send
messages to service workers.
...And 2 more matches
SharedWorkerGlobalScope.onconnect - Web APIs
the onconnect property of the sharedworkerglobalscope interface is an event handler representing the code to be called when the connect event is raised — that is, when a
messageport connection is opened between the associated sharedworker and the main thread.
...}; examples this example shows a shared worker file — when a connection to the worker occurs from a main thread via a
messageport, the onconnect event handler fires.
... the event object is a
messageevent.
...And 2 more matches
SubtleCrypto.encrypt() - Web APIs
authentication helps protect against chosen-ciphertext attacks, in which an attacker can ask the system to decrypt arbitrary
messages, and use the result to deduce information about the secret key.
... function get
messageencoding() { const
messagebox = document.queryselector(".rsa-oaep #
message"); let
message =
messagebox.value; let enc = new textencoder(); return enc.encode(
message); } function encrypt
message(publickey) { let encoded = get
messageencoding(); return window.crypto.subtle.encrypt( { name: "rsa-oaep" }, publickey, encoded ); } aes-ctr this code fetches the conten...
... function get
messageencoding() { const
messagebox = document.queryselector(".aes-ctr #
message"); let
message =
messagebox.value; let enc = new textencoder(); return enc.encode(
message); } function encrypt
message(key) { let encoded = get
messageencoding(); // counter will be needed for decryption counter = window.crypto.getrandomvalues(new uint8array(16)); return window.crypto.subtle.encrypt( { name: "aes-ctr", counter, length: 64 }, key, encoded ); } let iv = new uint8array(16); let key = new uint8array(16); let data = new uint8array(12345); //crypto functions are wrapped in promises so we have to use await and make sure the fun...
...And 2 more matches
Writing a WebSocket server in Java - Web APIs
here's an implementation split into parts: import java.io.ioexception; import java.io.inputstream; import java.io.outputstream; import java.net.serversocket; import java.net.socket; import java.security.
messagedigest; import java.security.nosuchalgorithmexception; import java.util.base64; import java.util.scanner; import java.util.regex.matcher; import java.util.regex.pattern; public class websocket { public static void main(string[] args) throws ioexception, nosuchalgorithmexception { serversocket server = new serversocket(80); try { system.out.println("server has started on 127.0.0.1:80.\r\nw...
... if (get.find()) { matcher match = pattern.compile("sec-websocket-key: (.*)").matcher(data); match.find(); byte[] response = ("http/1.1 101 switching protocols\r\n" + "connection: upgrade\r\n" + "upgrade: websocket\r\n" + "sec-websocket-accept: " + base64.getencoder().encodetostring(
messagedigest.getinstance("sha-1").digest((match.group(1) + "258eafa5-e914-47da-95ca-c5ab0dc85b11").getbytes("utf-8"))) + "\r\n\r\n").getbytes("utf-8"); out.write(response, 0, response.length); decoding
messages after a successful handshake, client can send
messages to the server, but now these are encoded.
... if we send "abcdef", we get these bytes: 129 134 167 225 225 210 198 131 130 182 194 135 - 129: fin (is this the whole
message?) rsv1 rsv2 rsv3 opcode 1 0 0 0 0x1=0001 fin: you can send your
message in frames, but now keep things simple.
...And 2 more matches
Using the Web Speech API - Web APIs
we simply have a title, instructions paragraph, and a div into which we output diagnostic
messages.
... <h1>speech color changer</h1> <p>tap/click then say a color to change the background color of the app.</p> <div> <p class="output"><em>...diagnostic
messages</em></p> </div> the css provides a very simple responsive styling so that it looks ok across devices.
... for this simple demo, so we are just specifying one (which is actually the default anyway.) recognition.grammars = speechrecognitionlist; recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; starting the speech recognition after grabbing references to the output <div> and the html element (so we can output diagnostic
messages and update the app background color later on), we implement an onclick handler so that when the screen is tapped/clicked, the speech recognition service will start.
...And 2 more matches
window.dump() - Web APIs
window.dump() prints
messages to the (native) console.
... syntax window.dump(
message); dump(
message); parameters
message is the string
message to log.
...the
message passed to dump() is sent to the system console (native console) if the firefox process was started with the -console option.
...And 2 more matches
Cognitive accessibility - Accessibility
rtisements; providing consistent web page layout and navigation; incorporating familiar elements, such as underlined links that are blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; making website authentication as easy as possible without compromising security; and making forms easy to complete, such as with clear error
messages and simple error recovery.
...for example, being able to extend the expiration time on an application requiring an authentication code sent to a mobile device via text
message helps with the following scenarios: people with attention or anxiety disorders.
... input assistance guidelines aim to reduce the likelihood that users, especially those with disabilities, make a mistake, and, if they do make a mistake, increase the likelihood that they see and comprehend the error
message and can successfully fix any errors.
...And 2 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
a set of system
messages that confer accessibility-related events such as focus changes, changes to document content and state changes in ui objects like checkboxes.
... solution: allow microsoft windows to handle wm_getobject
messages for objid_window.
... when the win32 api function accessibleobjectfromwindow() is called, windows sends the window in question a wm_getobject
message requesting an iaccessible for your root object in the window.
...And 2 more matches
Constraint validation - Developer guides
basically, the idea is to trigger javascript on some form field event (like onchange) to calculate whether the constraint is violated, and then to use the method field.setcustomvalidity() to set the result of the validation: an empty string means the constraint is satisfied, and any other string means there is an error and this string is the error
message to display to the user.
... if (constraint.test(zipfield.value)) { // the zip follows the constraint, we use the constraintapi to tell it zipfield.setcustomvalidity(""); } else { // the zip doesn't follow the constraint, we use the constraintapi to // give a
message about the format required for this country zipfield.setcustomvalidity(constraints[country][1]); } } then we link it to the onchange event for the <select> and the oninput event for the <input>: window.onload = function () { document.getelementbyid("country").onchange = checkzip; document.getelementbyid("zip").oninput = checkzip; } you can see a live example of the postal code va...
... visual styling of constraint validation apart from setting constraints, web developers want to control what
messages are displayed to the users and how they are styled.
...And 2 more matches
MIME types (IANA media types) - HTTP
with the exception of multipart/form-data, used in the post method of html forms, and multipart/byteranges, used with 206 partial content to send part of a document, http doesn't handle multipart documents in a special way: the
message is transmitted to the browser (which will likely show a "save as" window if it doesn't know how to display the document).
... there are two multipart types:
message list at iana a
message that encapsulates other
messages.
... this can be used, for instance, to represent an email that includes a forwarded
message as part of its data, or to allow sending very large
messages in chunks as if it were multiple
messages.
...And 2 more matches
Index - HTTP
27 content-range http, http header, reference, response header, header the content-range response http header indicates where in a full body
message a partial
message belongs.
... 57 date general header, http, reference, header the date general http header contains the date and time at which the
message was originated.
... 107 trailer http, reference, header the trailer response header allows the sender to include additional fields at the end of chunked
messages in order to supply metadata that might be dynamically generated while the
message body is sent, such as a
message integrity check, digital signature, or post-processing status.
...And 2 more matches
Trailer - HTTP
the trailer response header allows the sender to include additional fields at the end of chunked
messages in order to supply metadata that might be dynamically generated while the
message body is sent, such as a
message integrity check, digital signature, or post-processing status.
... header type response header forbidden header name yes syntax trailer: header-names directives header-names http header fields which will be present in the trailer part of chunked
messages.
... these header fields are disallowed:
message framing headers (e.g., transfer-encoding and content-length), routing headers (e.g., host), request modifiers (e.g., controls and conditionals, like cache-control, max-forwards, or te), authentication headers (e.g., authorization or set-cookie), or content-encoding, content-type, content-range, and trailer itself.
...And 2 more matches
Control flow and error handling - JavaScript
// create an object type userexception function userexception(
message) { this.
message =
message; this.name = 'userexception'; } // make the exception convert to a pretty string when used as a string // (e.g., by the error console) userexception.prototype.tostring = function() { return `${this.name}: "${this.
message}"`; } // create an instance of the object type and throw it throw new userexception('value too high'); try...catch statement the try...catch s...
...it formats the
message as an error, and adds it to the list of error
messages generated by the page.
... utilizing error objects depending on the type of error, you may be able to use the name and
message properties to get a more refined
message.
...And 2 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
but instead of relying only on user actions, we can do more, using push
messages and notifications to automatically re-engage and deliver new content whenever it is available.
... as mentioned before, to be able to receive push
messages, you have to have a service worker, the basics of which are already explained in the making pwas work offline with service workers article.
... from the server-side, the whole process has to be encrypted with public and private keys for security reasons — allowing everyone to send push
messages unsecured using your app would be a terrible idea.
...And 2 more matches
Cross-domain Content Scripts - Archive of obsolete content
cross-domain iframes the following "main.js" creates a page-worker which loads a local html file called "page.html", attaches a content script called "page.js" to the page, waits for
messages from the script, and logs the payload.
... //main.js var data = require("sdk/self").data; var pageworker = require("sdk/page-worker").page({ contenturl: data.url("page.html"), contentscriptfile: data.url("page-script.js") }); pageworker.on("
message", function(
message) { console.log(
message); }); the "page.html" file embeds an iframe whose content is served from "http://en.m.wikipedia.org/": <!doctype html> <!-- page.html --> <html> <head></head> <body> <iframe id="wikipedia" src="http://en.m.wikipedia.org/"></iframe> </body> </html> the "page-script.js" file locates "today's featured article" and sends its content to "main.js": // page-script.js var iframe = window.document.getelementbyid("wikipedia"); var todaysfeaturedarticle = iframe.contentwindow.document.getelementbyid("mp-tfa...
..."); self.post
message(todaysfeaturedarticle.textcontent); for this to work, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["http://en.m.wikipedia.org/"] } the add-on should successfully retrieve the iframe's content.
... the "main.js": creates a panel whose content is supplied by "panel.html" and adds a content script "panel-script.js" to it sends the panel a "show"
message when it is shown adds a button which shows the panel when it is clicked // main.js var data = require("sdk/self").data; var forecast_panel = require("sdk/panel").panel({ height: 50, contenturl: data.url("panel.html"), contentscriptfile: data.url("panel-script.js") }); forecast_panel.on("show", function(){ forecast_panel.port.emit("show"); }); require("sdk/ui/button/action").actionbutton({ id: "get-forecast", label: "get the f...
Logging - Archive of obsolete content
because dom objects aren't available to the main add-on code, the sdk provides its own global console object with most of the same methods as the dom console, including methods to log error, warning, or informational
messages.
... the console.log() method prints an informational
message: console.log("hello world"); try it out: create a new directory, and navigate to it execute jpm init, accepting all the defaults open "index.js" and add the line above execute jpm run firefox will start, and the following line will appear in the command window you used to execute jpm run: info: hello world!
...the following add-on logs the html content of every tab the user loads, by calling console.log() inside a content script: require("sdk/tabs").on("ready", function(tab) { tab.attach({ contentscript: "console.log(document.body.innerhtml);" }); }); console output if you are running your add-on from the command line (for example, executing jpm run or jpm test) then the console's
messages appear in the command shell you used.
... if you've installed the add-on in firefox then the
messages appear in firefox's browser console.
Custom toolbar button - Archive of obsolete content
you should see the pop-up
message.
... advanced troubleshooting if you have some technical knowledge, then you can use the application's javascript console to see error
messages.
... however, you might see
messages that are unhelpful or confusing, or that come from other parts of the application.
...or use short cut "ctrl + shift + j"
messages in the javascript console can provide information about javascript, xul or css files.
window - Archive of obsolete content
amespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata see also: dom window object methods note the error
message "xml parsing error: undefined entity...<window" can be caused by a missing or unreachable dtd file referenced in the xul file.
... a filename following the system keyword in a doctype declaration may silently fail to load and the only error
message will be an undefined entity error on the next xul element.
...p://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <!-- icon from chrome --> <html:link rel="icon" href="chrome://myextension/content/path/to/favicon.png"/> <!-- from a remote site --> <html:link rel="icon" href="http://www.mozilla.org/favicon.ico"/> since firefox 3.6 the above listed code does not work correctly - it produces the following
message: "warning: xul box for box element contained an inline link child, forcing all its children to be wrapped in a block".
...if it is placed between box tags, window controls are rendered fine, but still there is this error
message.
TCP/IP Security - Archive of obsolete content
other commonly used protocols at the network layer are internet control
message protocol (icmp) and internet group management protocol (igmp).
... one example is secure multipurpose internet mail extensions (s/mime), which is commonly used to encrypt email
messages.
... transport layer protocols such as ssl are most commonly used to provide security for communications with individual http-based applications, although they are also used to provide protection for communication sessions of other types of applications such as smtp, point of presence (pop), internet
message access protocol (imap), and file transfer protocol (ftp).
... the integrity of data can be assured by generating a
message authentication code (mac) value, which is a keyed cryptographic checksum of the data.
Error.description - Archive of obsolete content
remarks the description property contains the error
message string associated with a specific error.
... the description and
message properties provide the same functionality; the descriptionproperty provides backward compatibility; the
message property complies with the ecma standard.
... try { // cause an error: x = y } catch(e) { // prints "[object error]": document.write(e) document.write (" "); // prints 5009: document.write((e.number & 0xffff)) document.write (" "); // prints "'y' is undefined": document.write(e.description); document.write (" "); // prints "'y' is undefined": document.write(e.
message) } requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
... applies to: error object see also number property (error)
message property (error) name property (error) ...
JSException - Archive of obsolete content
constructor summary the netscape.javascript.jsexception class has the following constructors: jsexception deprecated constructors optionally let you specify a detail
message and other information.
... backward compatibility javascript 1.1 through 1.3 jsexception had three public constructors which optionally took a string argument, specifying the detail
message or other information for the exception.
... jsexception constructors, deprecated in javascript 1.4, constructs a jsexception object with an optional detail
message.
...public jsexception(string s, string filename, int lineno, string source, int tokenindex) arguments s the detail
message.
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
networking and communications asynchronous communication is a method of exchanging
messages between two or more parties in which each party receives and processes
messages whenever it's convenient or possible to do so, rather than doing so immediately upon receipt.
... additionally,
messages may be sent without waiting for acknowledgement, with the understanding that if a problem occurs, the recipient will request corrections or otherwise handle the situation.
... for humans, e-mail is an asynchronous communication method; the sender sends an email and the recipient will read and reply to the
message when it's convenient to do so, rather than doing so at once.
... and both sides can continue to send and receive
messages whenever they wish, instead of having to schedule them around each other.
HTML: A good basis for accessibility - Learn web development
you can then press enter/return to follow a focused link or press a button (we've included some javascript to make the buttons alert a
message), or start typing to enter text in a text input.
... <h1>links</h1> <p>this is a link to <a href="https://www.mozilla.org">mozilla</a>.</p> <p>another link, to the <a href="https://developer.mozilla.org">mozilla developer network</a>.</p> <h2>buttons</h2> <p> <button data-
message="this is from the first button">click me!</button> <button data-
message="this is from the second button">click me too!</button> <button data-
message="this is from the third button">and me!</button> </p> <h2>form</h2> <form> <div> <label for="name">fill in your name:</label> <input type="text" id="name" name="name"> </div> <div> <label for="age">enter your age:</label> ...
...for example, you sometimes see buttons marked up using <div>s, for example: <div data-
message="this is from the first button">click me!</div> <div data-
message="this is from the second button">click me too!</div> <div data-
message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that buttons g...
...here we've given our fake <div> buttons the ability to be focused (including via tab) by giving each one the attribute tabindex="0": <div data-
message="this is from the first button" tabindex="0">click me!</div> <div data-
message="this is from the second button" tabindex="0">click me too!</div> <div data-
message="this is from the third button" tabindex="0">and me!</div> basically, the tabindex attribute is primarily intended to allow tabbable elements to have a custom tab order (specified in positive numerical order), instead of just being tabbed through in their default source order.
HTML: A good basis for accessibility - Learn web development
you can then press enter/return to follow a focused link or press a button (we've included some javascript to make the buttons alert a
message), or start typing to enter text in a text input.
... <h1>links</h1> <p>this is a link to <a href="https://www.mozilla.org">mozilla</a>.</p> <p>another link, to the <a href="https://developer.mozilla.org">mozilla developer network</a>.</p> <h2>buttons</h2> <p> <button data-
message="this is from the first button">click me!</button> <button data-
message="this is from the second button">click me too!</button> <button data-
message="this is from the third button">and me!</button> </p> <h2>form</h2> <form> <div> <label for="name">fill in your name:</label> <input type="text" id="name" name="name"> </div> <div> <label for="age">enter your age:</label> ...
...for example, you sometimes see buttons marked up using <div>s, for example: <div data-
message="this is from the first button">click me!</div> <div data-
message="this is from the second button">click me too!</div> <div data-
message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that buttons g...
...here we've given our fake <div> buttons the ability to be focused (including via tab) by giving each one the attribute tabindex="0": <div data-
message="this is from the first button" tabindex="0">click me!</div> <div data-
message="this is from the second button" tabindex="0">click me too!</div> <div data-
message="this is from the third button" tabindex="0">and me!</div> basically, the tabindex attribute is primarily intended to allow tabbable elements to have a custom tab order (specified in positive numerical order), instead of just being tabbed through in their default source order.
How the Web works - Learn web development
the browser needs to find out which server the website lives on, so it can send http
messages to the right place (see below).
... the browser sends an http request
message to the server, asking it to send a copy of the website to the client (you go to the shop and order your goods).
... this
message, and all other data sent between the client and the server, is sent across your internet connection using tcp/ip.
... if the server approves the client's request, the server sends the client a "200 ok"
message, which means "of course you can look at that website!
Introduction to events - Learn web development
these are often used to display information about filling in form fields when they are focused, or displaying an error
message if a form field is filled with an incorrect value.
...when you fill in the details and select the submit button, the natural behavior is for the data to be submitted to a specified page on the server for processing, and the browser to be redirected to a "success
message" page of some kind (or the same page, if another is not specified.) the trouble comes when the user has not submitted the data correctly — as a developer, you want to prevent the submission to the server and give an error
message saying what's wrong and what needs to be done to put things right.
...if they are, we call the preventdefault() function on the event object — which stops the form submission — and then display an error
message in the paragraph below our form to tell the user what's wrong: const form = document.queryselector('form'); const fname = document.getelementbyid('fname'); const lname = document.getelementbyid('lname'); const para = document.queryselector('p'); form.onsubmit = function(e) { if (fname.value === '' || lname.value === '') { e.preventdefault(); para.textcontent = 'you need to fill in bot...
... a good example is a series of list items — if you want each one to pop up a
message when selected, you can set the click event listener on the parent <ul>, and events will bubble from the list items to the <ul>.
Test your skills: Conditionals - Learn web development
we want you to create a conditional that checks whether season contains the string "summer", and if so assigns a string to response that gives the user an appropriate
message about the season.
... you need to create an if...else structure that checks whether the machine is switched on and puts a
message into the response variable if it isn't, telling the user to switch the machine on.
... inside the first, you need to nest an if...else if...else that puts appropriate
messages into the response variable depending on what the value of score is — if the machine is turned on.
... we'd like you to create an if...else structure that checks whether the machine is switched on and puts a
message into the machineresult variable telling the user whether it is on or off.
Client-side storage - Learn web development
in our simple example, we just print a
message to the javascript console.
...eelement('button'); listitem.appendchild(deletebtn); deletebtn.textcontent = 'delete'; // set an event handler so that when the button is clicked, the deleteitem() // function is run deletebtn.onclick = deleteitem; // iterate to the next item in the cursor cursor.continue(); } else { // again, if list item is empty, display a 'no notes stored'
message if(!list.firstchild) { const listitem = document.createelement('li'); listitem.textcontent = 'no notes stored.'; list.appendchild(listitem); } // if there are no more cursor items to iterate through, say so console.log('notes all displayed'); } }; } again, let's break this down: first we empty out the <ul> element's content, before then fi...
...this block checks whether any notes were inserted into the <ul> — if not, it inserts a
message to say no note was stored.
...objectstore.delete(noteid); // report that the data item has been deleted transaction.oncomplete = function() { // delete the parent of the button // which is the list item, so it is no longer displayed e.target.parentnode.parentnode.removechild(e.target.parentnode); console.log('note ' + noteid + ' deleted.'); // again, if list item is empty, display a 'no notes stored'
message if(!list.firstchild) { let listitem = document.createelement('li'); listitem.textcontent = 'no notes stored.'; list.appendchild(listitem); } }; } the first part of this could use some explaining — we retrieve the id of the record to be deleted using number(e.target.parentnode.getattribute('data-note-id')) — recall that the id of the record was saved in a data-no...
Fetching data from the server - Learn web development
the first block that uses fetch can be found at the start of the javascript: fetch('products.json').then(function(response) { return response.json(); }).then(function(json) { let products = json; initialize(products); }).catch(function(err) { console.log('fetch problem: ' + err.
message); }); the fetch() function returns a promise.
... however, a complete website would handle this error more gracefully by displaying a
message on the user's screen and perhaps offering options to remedy the situation, but we don't need anything more than a simple console.log().
...you'll see a
message similar to "network request for produc.json failed with response 404: file not found".
... the properties for getting the status and status
message are the same, but they are found on the request (xhr) object, not the response object.
Useful string methods - Learn web development
filtering greeting
messages in the first exercise we'll start you off simple — we have an array of greeting card
messages, but we want to sort them to list just the christmas
messages.
...) structure, to test each string and only print it in the list if it is a christmas
message.
... first think about how you could test whether the
message in each case is a christmas
message.
... what string is present in all of those
messages, and what method could you use to test whether it is present?
Client-Server Overview - Learn web development
web servers wait for client request
messages, process them when they arrive, and reply to the web browser with an http response
message.
...for example, the http request that is sent when you perform a search on mdn for the term "client server overview" will look a lot like the text shown below (it will not be identical because parts of the
message depend on your browser/setup).
... the format of http
messages is defined in a "web standard" (rfc7230).
... at the end of the
message we see the body content — which contains the actual html returned by the request.
TypeScript support in Svelte - Learn web development
(ts) let timeout ./svelte-todo-typescript/src/components/alert.svelte:11:28 warn: parameter '
message' implicitly has an 'any' type, but a better type may be inferred from usage.
... (ts) change = (
message, ms) => { ./svelte-todo-typescript/src/components/alert.svelte:11:37 warn: parameter 'ms' implicitly has an 'any' type, but a better type may be inferred from usage.
... (ts) (
message, ms) => { you can fix these by specifying the corresponding types, like so: export let ms = 3000 let visible: boolean let timeout: number const on
messagechange = (
message: string, ms: number) => { cleartimeout(timeout) if (!
message) { // hide alert if
message is empty note: there's no need to specify the ms type with export let ms:number = 3000 because typescript is already inferring it from its default value.
...we shouldn't need to store any kind of value — we know that the alert store should contain string
messages, and the todos store should contain an array of todotype, etc.
Handling common HTML and CSS problems - Learn web development
these allows you to paste your code into a window, and it will flag up any errors with crosses, which can then be hovered to get an error
message informing you what the problem is.
... after the packages have finished installing, try loading up an html file and a css file: you'll see any issues highlighted with green (for warnings) and red (for errors) circles next to the line numbers, and a separate panel at the bottom provides line numbers, error
messages, and sometimes suggested values or other fixes.
...hovering the warning triangle will provide a descriptive error
message: other browser devtools have similar features.
...it is often useful to search for specific error
messages if you have them — other developers will be likely to have had the same problems as you.
Setting up your own test automation environment - Learn web development
webdriver will then wait for 2 seconds; the document title is then accessed, and if it is "webdriver - google search", we will return a
message to claim the test is passed.
...ion(title) { if(title === 'webdriver - google search') { console.log('test passed'); } else { console.log('test failed'); } driver.quit(); }); }); } in terminal, make sure you are inside your project folder, then enter the following command: node google_test_multiple if you are using a mac and do decide to test safari, you might get an error
message along the lines of "could not create a session: you must enable the 'allow remote automation' option in safari's develop menu to control safari via webdriver." if you get this, follow the given instruction and try again.
...in this case we get the title of the current page with the gettitle() method, then return a pass or fail
message depending on what its value is.
...is not empty) by using getattribute() to retrieve it's value attribute value, and print a
message to the console if it is not empty.
Accessibility API cross-reference
dial n/a n/a n/a a dialog or
message box.
...is for expandable items that are not expanded, such as folded tree branches or accordions collapsed collapsed collapsed aria-expanded=false different from xul's collapsed="true" attribute which indicates something is hidden this is the default button or menu item default n/a n/a identifies the element that provides an error
message for the object.
... n/a n/a aria-error
message an item that has been expanded, such as a tree item or accordion expanded expanded expanded aria-expanded=true indicates this object allows progressive disclosure of its children.
...the button is inconsistent when it will act on a group of objects (such as a list of mail
messages) that are not in the same state.
Multiprocess on Windows
as you should already know from the prerequisite reading, single threaded apartments receive remote procedure calls (rpcs) from com, via the windows
message queue.
...the windows
message queue carries a lot of baggage for the purposes of maintaining backward compatibility.
... on the other hand, com's multithreaded apartment (mta) uses a much faster ipc mechanism that does not suffer from the same problems as the
message queue.
...unfortunately, crossing apartment boundaries using com incurs the exact same problem as crossing process boundaries: if we directly use com's built in marshaling capabilities to forward an rpc from the mta to the main thread sta, com will still use the sta's
message queue, thus defeating the purpose of using the mta in the first place!
Mozilla’s UAAG evaluation report
(p1) p onmouseover, onmousedown, onmouseup, onmousemove, onclick, ondbclick: no keyboard support onfocus and onblur: cannot be activated with pointer 1.3 provide text
messages.
... (p1) c status line and alert boxes used to convey
messages and alerts guideline 2.
... mozilla exposes the focus via wm_focus system
messages mozilla does not use the system focus drawing routines, because they aren't flexible enough (don't support css) 7.2 respect input configuration conventions.
...(p3) vg a progress bar and status bar
message indicates loading progress the scroll bar indicates how far into the document the current graphical view is the size of the current document is in the page info screen, sometimes it says unavailable guideline 11.
Site Identity Button
if the site identity button on your site shows something you do not expect (for example, an orange warning triangle when you expect a green padlock) you can find out the cause of the problem by looking in the web console in the firefox developer tools: ensure your web console is displaying
messages in the 'security' category force-refresh the page on your site that is causing problems watch for any security
messages that may appear a downgraded security ui will be due to one of these three problems: mixed content - while your page has been served over tls, but subresources loaded for your page have not.
... in this case, expect to see a 'mixed content'
message in the web console.
...look for
messages about weak ciphers (e.g.
... insecure renegotation - older versions of tls had a flaw in the basic design; if your server uses an affected version, the security ui will be downgraded but no web console
message will be displayed.
Downloads.jsm
.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.
... to demonstrate the logging, a new download is started while a
message box is being shown.
... the download is stopped and removed from the list when the
message box is closed, regardless of whether it has been completed or not.
...close the
message to stop."); } finally { yield list.remove(download); yield download.finalize(true); } } finally { yield list.removeview(view); } }).then(null, components.utils.reporterror); conversion from nsidownloadmanager starting in firefox for desktop version 26, the nsidownloadmanager and nsidownload interfaces are not available anymore.
PopupNotifications.jsm
method overview void locationchange(); notification getnotification(id, browser); void remove(notification); notification show(browser, id,
message, anchorid, mainaction, secondaryactions, options); properties attribute type description ispanelopen boolean returns true if the notification panel is currently visible, false if it is not.
... notification show( browser, id,
message, anchorid, mainaction, secondaryactions, options ); parameters browser the xul <xul:browser> element with which the notification is associated.
...
message a string to display in the notification panel.
...the callback code can modify the notification
message/actions if necessary during this notification.
Localizing with Koala
koala will show you a
message if the "hg add" was successful.
...(you could also commit each file individually if you felt like it.) koala will ask you to type in a commit
message.
...a good way of doing that is to ask yourself a question: "if i was a new person to this project and new nothing about the work already done in this repository, would this
message help me understand what changes were made in this revision?".
... type a good commit
message and click "ok".
Phishing: a short definition
as most phishing attacks start with unsolicited email
messages, a clear starting point is improving spam filters, thus reducing the number of fraudulent
messages reaching users.
... verification via text
message if a service supports verification, via sms, it sends a text
message with a one-time pin to the user’s phone number.
...this was chosen as an early second factor 'protocol' as text
messages are widely supported, however, even nist no longer recommends sms verification.
... the ss7 telephony system is vulnerable, making eavesdropping, or rerouting text
messages quite trivial.
JSS Provider Notes
by default, the jss provider carries out all operations except
messagedigest on the internal key storage token, a software token included in jss/nss.
...
messagedigest operations take place by default on the internal crypto token, another internal software token in jss/nss.
...dsakpg.initialize(1024); keypair dsapair = dsakpg.generatekeypair(); supported classes cipher dsaprivatekey dsapublickey keyfactory keygenerator keypairgenerator mac
messagedigest rsaprivatekey rsapublickey secretkeyfactory secretkey securerandom signature what's not supported the following classes don't work very well: keystore: there are many serious problems mapping the jca keystore interface onto nss's model of pkcs #11 modules.
...
messagedigest supported algorithms md5 md2 sha-1 (sha1, sha ) rsaprivatekey notes getmodulus() is not supported because nss does not support extracting data from private keys.
Mozilla-JSS JCA Provider notes
by default, the jss provider carries out all operations except
messagedigest on the internal key storage token, a software token included in jss/nss.
...
messagedigest operations take place by default on the internal crypto token, another internal software token in jss/nss.
...dsakpg.initialize(1024); keypair dsapair = dsakpg.generatekeypair(); supported classes cipher dsaprivatekey dsapublickey keyfactory keygenerator keypairgenerator mac
messagedigest rsaprivatekey rsapublickey secretkeyfactory secretkey securerandom signature cipher supported algorithms notes aes des desede (des3) rc2 rc4 rsa the following modes and padding schemes are supported: algorithm mode padding des ecb nopadding cbc nopadding ...
...
messagedigest supported algorithms md5 md2 sha-1 (sha1, sha) rsaprivatekey notes getmodulus() is not supported because nss does not support extracting data from private keys.
Python binding for NSS
the example and test ssl code sent short
messages and then did a sock.recv(1024).
... we had always received the entire
message in one sock.recv() call because it was so short.
... nsprerror now derived from standardexception, provides: errno (numeric error code) strerror (error description associated with error code) error_
message (optional detailed
message) error_code (alias for errno) error_desc (alias for strerror) certverifyerror derived from nsprerror, extends with: usages (bitmask of returned usages) log (certverifylog object) expose error lookup to sibling modules use macros for bitmask_to...
... exception error
messages now include pr error text if available.
Index
97 jserrorformatstring jsapi reference, reference, référence(2), spidermonkey jserrorformatstring is a struct to represent error
message and type, returned by js_reporterrornumber function.
...first it builds an error
message from the given sprintf-style format string and any additional arguments passed after it.
... the resulting error
message is passed to the context's jserrorreporter callback, if any.
... 434 js_reporterrornumber jsapi reference, needscontent, spidermonkey these functions create a jserrorreport, populate it with an error
message obtained from the given jserrorcallback, and either report it to the current error reporter callback or create an error object and set it as the pending exception.
JS_ReportErrorNumber
errorcallback jserrorcallback callback to fetch the error
message.
.../ const char16_t ** additional arguments for the error
message.
... the number of additional arguments required depends on the error
message, which is determined by the errorcallback.
... description these functions create a jserrorreport, populate it with an error
message obtained from the given jserrorcallback, and either report it to the current error reporter callback or create an error object and set it as the pending exception.
Shell global objects
options is an optional object that may have these properties: isrunonce use the isrunonce compiler option (default: false) noscriptrval use the no-script-rval compiler option (default: false) filename filename for error
messages and debug info linenumber starting line number for error
messages and debug info columnnumber starting column number for error
messages and debug info global global in which to execute the code newcontext if true, create and use a new cx (default: false) catchtermination if true, catch termination (failure without an exception value, as for slow scripts or out-of-memory) and ...
... help([name ...]) display usage and help
messages.
...if present, options may have properties saying how the code should be compiled: noscriptrval use the no-script-rval compiler option (default: false) filename filename for error
messages and debug info linenumber starting line number for error
messages and debug info columnnumber starting column number for error
messages and debug info element if present with value v, convert v to an object o and mark the source as being attached to the dom element o.
... crash([
message]) crashes the process with a moz_crash.
nsIDOMEvent
method overview boolean deserialize(in constipc
messageptr amsg, out voidptr aiter); violates the xpcom interface guidelines void duplicateprivatedata(); native code only!
...reventdefault(); deprecated since gecko 16.0 void initevent(in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg); boolean isdispatchstopped(); violates the xpcom interface guidelines void preventbubble(); obsolete since gecko 24 void preventcapture(); obsolete since gecko 24 void preventdefault(); void serialize(in ipc
messageptr amsg, in boolean aserializeinterfacetype); violates the xpcom interface guidelines void settarget(in nsidomeventtarget atarget); native code only!
... forward 0x08000000 help 0x10000000 back 0x20000000 text 0x40000000 alt_mask 0x00000001 control_mask 0x00000002 shift_mask 0x00000004 meta_mask 0x00000008 methods violates the xpcom interface guidelines deserialize() boolean deserialize( in constipc
messageptr amsg, out voidptr aiter ); parameters amsg aiter return value native code only!duplicateprivatedata void duplicateprivatedata(); parameters none.
... violates the xpcom interface guidelines serialize() void serialize( in ipc
messageptr amsg, in boolean aserializeinterfacetype ); parameters amsg aserializeinterfacetype native code only!settarget void settarget( in nsidomeventtarget atarget ); parameters atarget native code only!settrusted void settrusted( in boolean atrusted ); parameters atrusted stopimmediatepropagation() prevents other event listeners from being triggered and,...
nsIDownloadProgressListener
uritychange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate, in nsidownload adownload); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astateflags, in nsresult astatus, in nsidownload adownload); void onstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring a
message, in nsidownload adownload); obsolete since gecko 1.9.1 attributes attribute type description document nsidomdocument document the document of the download manager frontend.
...the received status
message is intended to be displayed visibly to the user.
... void onstatuschange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring a
message, in nsidownload adownload ); parameters awebprogress the nsiwebprogress instance used by the download manager to monitor downloads.
... a
message a user-readable status
message intended to be displayed visibly on the screen.
nsIMsgFilterCustomAction
* @param actionfolder folder in the filter list * @param filtertype filter type (manual, offlinemail, etc.) * * @return error
message a localized
message to display if invalid * set to null if the actionvalue is valid */ autf8string validateactionvalue(in autf8string actionvalue, in nsimsgfolder actionfolder, in nsmsgfiltertypetype filtertype); /* allow duplicate actions in the same filter list?
...otherwise, be careful * that the action does correct notifications to maintain counts, and correct * manipulations of both imap and local non-database storage of
message * metadata.
... */ /** * apply the custom action to an array of
messages * * @param msghdrs array of nsimsgdbhdr objects of
messages * @param actionvalue user-set value to use in the action * @param copylistener calling method (filtertype manual only) * @param filtertype type of filter being applied * @param msgwindow
message window */ void apply(in nsiarray msghdrs /* nsimsgdbhdr array */, in autf8string actionvalue, in nsimsgcopyservicelistener copylistener, in nsmsgfiltertypetype filtertype, in nsimsgwindow msgwindow); /* does this action start an async action?
... */ readonly attribute boolean isasync; /// does this action need the
message body?
nsIScriptError2
method overview void initwithwindowid(in wstring
message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); attributes attribute type description innerwindowid unsigned long long the inner window id with which the error is associated.
... timestamp long long elapsed time, in milliseconds, from a platform-specific zero time to the time the
message was created.
... methods initwithwindowid() void init( in wstring
message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid ); parameters
message the text of the
message to add to the log.
... category a string indicating what kind of code caused the
message.
nsIUpdatePrompt
showupdateavailable() shows a
message advising the user that an update is available to be downloaded and installed.
... showupdatedownloaded() shows a
message advising the user that an update has been downloaded, and that the user should restart the application in order to install it.
... showupdateerror() displays an error
message telling the user about an update failure, such as a failure to successfully apply a patch.
... showupdateinstalled() shows a
message detailing the update that was just installed successfully.
nsIWorker
method overview void post
message(in domstring a
message, [optional] in nsiworker
messageport a
messageport); attributes attribute type description on
message nsidomeventlistener an object to receive notifications when
messages are received on the worker's
message port.
... methods post
message() used to allow the worker to send a
message back to the web application that created it.
... void post
message( in domstring a
message, in nsiworker
messageport a
messageport optional ); parameters a
message the
message the worker wishes to post back to its creator.
... a
messageport a
message port on which to post the
message; if not specified, the default
message port is used.
nsIXPCException
inherits from: nsiexception last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void initialize(in string a
message, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner); xpcexjsval stealjsval(); native code only!
... methods initialize() void initialize( in string a
message, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner ); parameters a
message aresult aname alocation adata ainner native code only!stealjsval xpcexjsval stealjsval(); parameters none.
...the call signature of the constructor is: components.exception(
message, result, stack, data, inner) all parameters are optional and the appropriate placeholder is 'unknown'.
...
message - a custom
message set by the thrower (defaults to 'exception') result - the nsresult associated with this exception (defaults to components.results.ns_error_failure) stack - the stack chain (defaults to the current stack) data - additional data object of your choice (defaults to null) inner - an inner exception that triggered this, if available ...
Events
compose-send-
message a
message gets sent compose-window-close a compose window gets closed compose-window-init a compose window has been opened compose-window-reopen a cached compose window has been reopened.
... msgcreatedbview onactivecreatedview onactive
messagesloaded the active
messages in the folder have been loaded oncreatedview a folder view has been created, but not yet shown.
... ondisplayingfolder a folder gets displayed onfolderloading a folder is being loaded onleavingfolder a folder is being unloaded, includes deletion onloadingfolder a folder is being loaded onmakeactive a folderdisplaywidget becomes active on
messagecountschanged the counts of the
messages changed on
messagesloaded the
messages in the folder have been loaded on
messagesremovalfailed removing some
messages from the current folder failed on
messagesremoved some
messages of the current
message list have been removed onsearching a folder view derived from a search is being loaded...
...saved searches, virtual folders, a quicksearch onsortchanged the sort method in the
messages list has been changed ...
MailNews fakeserver
an example of such a manipulation is adding a folder or adding
messages.
...it will also properly queue all
messages sent in pipelining mode and will present lines without any eol characters.
...the following comprises the api of the news fakeserver itself: nntpdaemon api name arguments returns notes [constructor] daemon flags n/a flags are defined below addgroup group name (string), is postable nothing adds the group (resetting if it exists) addarticle newsarticle object nothing adds the
message to all groups in the article's group list addarticletogroup newsarticle object, group (string), integral key for group nothing adds the
message to the specified group with the specified key getgroup group name group object group is a map key->article, with the additional properties: flags, keys (array of keys), nextkey (next key to use for new articles) getgroupstats group name array of [si...
... getarticle
message id newsarticle object pretty self-explanatory newsarticle api name arguments returns notes [constructor] text (as a string) n/a initializes all fields headers (property) map of header (lower-case) -> value body (property) text of body
messageid (property)
message id fulltext (property) full text as
message without modification except added headers.
Activity Manager examples
lder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.contexttype = "account"; // group this activity by account process.contextobj = folder.server; // account in question gactivitymanager.addactivity(process); // step 2: showing some progress let percent = 50; process.setprogress(percent, "junk processing 25 of 50
messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces.nsiactivityprocess.state_completed; gactivitymanager.removeactivity(process.id); let event = components.classes["@mozilla.org/activity-event;1"].createinstance(nsiae); // localization is omitted, initiator is omitted event.init(folder.prettiestname + " is processed", ...
...contractid); initiator->setasisupports(reinterpret_cast<nsisupports*>(copyservice)); // subject of the delete operation is the imap folder // wrap it in a nsvariant component nscomptr<nsiwritablevariant> srcfolder = do_createinstance(ns_variant_contractid); srcfolder->setasisupports(reinterpret_cast<nsisupports*>(imapfolder)); copyevent->addsubject(srcfolder); copyevent->init(ns_literal_string("
message copy event"), initiator, ns_literal_string("completed successfully"), pr_now() / pr_usec_per_msec, // start time pr_now() / pr_usec_per_msec); // completion time // do not forget to increase the ref counter if needed copyevent->setundohandler(undohandler); //////////////////////////////////////////////////////////////// //// ad...
...as a result, all junk processing activities (assuming that we process accounts in parallel) dealing with
messages coming from the same sender will be grouped together.
...} sendercontextdisplayhelper.prototype = { getcontextdisplaytext: function(contexttype, contextobj) { // in this particular example we know that contexttype is "sender" // since we also pass the contexttype along with the contextobject // in some cases, one helper can be registered for a group of context types // we know that the context object is the author of the
message // localization is omitted return "
messages coming from " + contextobj.surname + ", " + contextobj.firstname; } } // step 2: register the helper for this context type gactivitymanager.registercontextdisplayhelper("sender", new sendercontextdisplayhelper()); // step 3: create the process ...
Source map errors - Firefox Developer Tools
general source map error reporting if you do see a problem, a
message will appear in the webconsole.
... this
message will show an error
message, the resource url, and the source map url: here, the resource url tells us that bundle.js mentions a source map, and the source map url tells us where to find the source map data (in this case, relative to the resource).
...typical error
messages here are: syntaxerror: json.parse: unexpected character at line 1 column 1 of the json data error: "version" is a required argument original source missing an original source may be missing.
...the
message looks a little different in this case: in this case, the error will also be displayed in the source tab in the debugger: networkerror when attempting to fetch resource a bug in firefox prevents it from loading source maps for web extensions.
Debugger - Firefox Developer Tools
if the uncaught exception hook itself throws an exception,uncaught-hook-exception, spidermonkey throws a new error object,confess-to-debuggee-exception, to the debuggee whose
message blames the debugger, and includes textual descriptions ofuncaught-hook-exception and the originaldebugger-exception.
... if uncaughtexceptionhook’s value is null, spidermonkey throws an exception to the debuggee whose
message blames the debugger, and includes a textual description ofdebugger-exception.
... onerror(frame,report) spidermonkey is about to report an error inframe.report is an object describing the error, with the following properties:
message the fully formatted error
message.
... arguments an array of strings, representing the arguments substituted into the error
message.
Network request list - Firefox Developer Tools
transferred: the number of bytes that were actually transferred to load the resource, or a
message about why the resource was not transferred.
... if the resource was blocked, the
message indicates why it was blocked.
... when you refresh the page, that specific url will be blocked and a
message will be added to the item in the list indicating that it has been blocked by the devtools.
...you can filter by plain text (in which case the text is used to find partial matches; entering "for" will match any
message that contains the word "for") or—as of firefox 75—using regular expressions (by writing the regexp bracketed within slashes; "/.+corp.*/" will look for any occurrence of "corp" which has at least one character before it and may or may not have any characters after it, for example).
Intensive JavaScript - Firefox Developer Tools
the main thread code would look something like this: const iterations = 50; const multiplier = 1000000000; var worker = new worker("js/calculate.js"); function dopointlesscomputationsinworker() { function handleworkercompletion(
message) { if (
message.data.command == "done") { pointlesscomputationsbutton.disabled = false; console.log(
message.data.primes); worker.removeeventlistener("
message", handleworkercompletion); } } worker.addeventlistener("
message", handleworkercompletion, false); worker.post
message({ "multiplier": multiplier, "iterations": iterations }); } the main difference h...
...ere, compared with the original, is that we need to: create a worker send it a
message when we are ready to calculate listen for a
message called "done", which indicates that the worker has finished.
... then we need a new file "calculate.js", that looks like this: self.addeventlistener("
message", go); function go(
message) { var iterations =
message.data.iterations; var multiplier =
message.data.multiplier; primes = calculateprimes(iterations, multiplier); self.post
message({ "command":"done", "primes": primes }); } function calculateprimes(iterations, multiplier) { var primes = []; for (var i = 0; i < iterations; i++) { var candidate = i * (multiplier * math.random()); var isprime = true; for (var c = 2; c <= math.sqrt(candidate); ++c) { if (candidate % c === 0) { // not prime isprime = false; break; } } if (isprime) { primes.push(candidate); } } return primes; } in the worker, we have to li...
...sten for a
message telling us to start, and send a "done"
message back when we are done.
AudioWorkletNode.port - Web APIs
the read-only port property of the audioworkletnode interface returns the associated
messageport.
... syntax audioworkletnodeinstance.port; value the
messageport object that is connecting the audioworkletnode and its associated audioworkletprocessor.
... // ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.on
message = (e) => { console.log(e.data) this.port.post
message('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') // send the
message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.post
message('ping'), 1000) pingpongnode.port.on
message = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination) this will output "ping" and "pong" strings to the console every second.
AudioWorkletProcessor.port - Web APIs
the read-only port property of the audioworkletprocessor interface returns the associated
messageport.
... syntax audioworkletprocessorinstance.port; value the
messageport object that is connecting the audioworkletprocessor and the associated audioworkletnode.
... // ping-pong-processor.js class pingpongprocessor extends audioworkletprocessor { constructor (...args) { super(...args) this.port.on
message = (e) => { console.log(e.data) this.port.post
message('pong') } } process (inputs, outputs, parameters) { return true } } registerprocessor('ping-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') // send the
message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.post
message('ping'), 1000) pingpongnode.port.on
message = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination) this will output "ping" and "pong" strings to the console every second.
DirectoryReaderSync - Web APIs
window.resolvelocalfilesystemurl = window.resolvelocalfilesystemurl || window.webkitresolvelocalfilesystemurl; // create web workers var worker = new worker('worker.js'); worker.on
message = function(e) { var urls = e.data.entries; urls.foreach(function(url, i) { window.resolvelocalfilesystemurl(url, function(fileentry) { // print out file's name.
... console.log(fileentry.name); }); }); }; worker.post
message({'cmd': 'list'}); the following is worker.js code that gets the contents of the directory.
...function onerror(e) { post
message('error: ' + e.tostring()); } self.on
message = function(e) { var data = e.data; // ignore everything else except our 'list' command.
... if (!data.cmd || data.cmd != 'list') { return; } try { var fs = requestfilesystemsync(temporary, 1024*1024 /*1mb*/); getallentries(fs.root.createreader()); self.post
message({entries: paths}); } catch (e) { onerror(e); } }; method overview entrysync readentries () raises (fileexception); method readentries() returns a lost of entries from a specific directory.
HTMLBodyElement - Web APIs
windoweventhandlers.on
message is an eventhandler called whenever an object receives a
message event.
... windoweventhandlers.on
messageerror is an eventhandler called whenever an object receives a
messageerror event.
... living standard technically, the event-related properties onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagechange, onload, on
message, onoffline, ononline, onpopstate, onresize, onstorage, and onunload, have been moved to windoweventhandlers.
... the following properties have been added: onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onload, on
message, onoffline, ononline, onpopstate, onresize, onstorage, and onunload.
HTMLFieldSetElement - Web APIs
htmlfieldsetelement.validation
message a domstring representing a localized
message that describes the validation constraints that the element does not satisfy (if any).
... htmlfieldsetelement.setcustomvalidity() sets a custom validity
message for the field set.
... if this
message is not the empty string, then the field set is suffering from a custom validity error, and does not validate.
... recommendation the following properties have been added: disabled, elements, name, type, valdiation
message, validity, and willvalidate.
HTMLInputElement - Web APIs
validation
message read only string: returns a localized
message that describes the validation constraints that the control does not satisfy (if any).
... setcustomvalidity() sets a custom validity
message for the element.
... if this
message is not the empty string, then the element is suffering from a custom validity error, and does not validate.
... the following properties have been added: autocomplete, autofocus, dirname, files, formaction, formenctype, formmethod, formnovalidate, formtarget, height, indeterminate, labels, list, max, min, multiple, pattern, placeholder, required, selectiondirection, selectionend, selectionstart, step, validation
message, validity, valueasdate, valueasnumber, width, and willvalidate.
HTMLTextAreaElement - Web APIs
validation
message read only string: returns a localized
message that describes the validation constraints that the control does not satisfy (if any).
... setcustomvalidity(domstring) sets a custom validity
message for the element.
... if this
message is not the empty string, then the element is suffering from a custom validity error, and does not validate.
... the following attributes have been added: autofocus, placeholder, dirname, wrap, maxlength, required, textlength, labels, selectionstart, selectionend, selectiondirection, validity, validation
message, and willvalidate.
NDEFWriter.write() - Web APIs
the write() method of ndefwriter interface writes a specified
message to a compatiable nfc tag.
... syntax var sessionpromise = ndefwriter.write(
message, options); parameters
message the
message to be written, either domstring or buffersource or ndef
messageinit.
... return value a promise that resolves with undefined when and if the
message transfer is successfully completed.
... notsupportederror there is no nfc adapter compatible with web nfc, or the available nfc adapter does not support pushing
messages, or connection can not be established.
PaymentValidationErrors - Web APIs
when validation of the paymentresponse returned by the paymentrequest.show() or paymentresponse.retry() methods fails, your code creates a paymentvalidationerrors object to pass into retry() so that the user agent knows what needs to be fixed and what if any error
messages to display to the user.
...error can be provided all by itself to provide only a generic error
message, or in concert with the other properties to serve as an overview while other properties' values gude the user to errors in specific fields in the payment form.
... payer optional a payererrors compliant object which provides appropriate error
messages for any of the fields describing the payer which failed validation.
... shippingaddress optional an addresserrors object which contains error
messages for any of the fields in the shipping address that failed validation.
PushSubscription.getKey() - Web APIs
the getkey() method of the pushsubscription interface returns an arraybuffer representing a client public key, which can then be sent to a server and used in encrypting push
message data.
... auth: an authentication secret, as described in
message encryption for web push.
... example reg.pushmanager.getsubscription() .then(function(subscription) { // enable any ui which subscribes / unsubscribes from // push
messages.
... subbtn.disabled = false; if (!subscription) { console.log('not yet subscribed to push') // we aren't subscribed to push, so set ui // to allow the user to enable push return; } // set your ui to show they have subscribed for // push
messages subbtn.textcontent = 'unsubscribe from push messaging'; ispushenabled = true; // initialize status, which includes setting ui elements for subscribed status // and updating subscribers list via push var endpoint = subscription.endpoint; var key = subscription.getkey('p256dh'); var auth = subscription.getkey('auth'); ...
RTCDataChannel.bufferedAmount - Web APIs
as
messages are actually sent, this value is reduced accordingly.
... closing the data channel doesn't reset this count, even though the user agent purges the queued
messages.
... however, even after closing the channel, attempts to send
messages continue to add to the bufferedamount value, even though the
messages are neither sent nor buffered.
...this event may be used, for example, to implement code which queues more
messages to be sent whenever there's room to buffer them.
RTCDataChannel: error event - Web APIs
", "unrecognized sctp chunk type received", "invalid mandatory parameter", "unrecognized parameters", "no user data (sctp data chunk has no data)", "cookie received while shutting down", "restart of an association with new addresses", "user-initiated abort", "protocol violation" ]; dc.addeventlistener("error", ev => { const err = ev.error; console.error("webrtc error: ", err.
message); // handle specific error detail types switch(err.errordetail) { case "sdp-syntax-error": console.error(" sdp syntax error in line ", err.sdplinenumber); break; case "idp-load-failure": console.error(" identity provider load failure: http error ", err.httprequeststatuscode); break; case "sctp-failure": if (err.sctpcausecod...
...the error's name is rtcerror and the
message is an error string specified by the webrtc layer.
...the
message string is always output, as is information about the source file's name, line number, and column number at which the error occurred.
...for example, an sdp syntax error displays the line number of the error within the sdp, and an sctp error displays a
message corresponding to the sctp cause code.
RTCIceCandidate.usernameFragment - Web APIs
usage notes ice uses the usernamefragment and password to ensure
message integrity.
... example although the webrtc infrastructure will filter out obsolete candidates for you after an ice restart, you can do it yourself if you're trying to absolutely minimize the number of
messages going back and forth.
... when the web app receives a
message from the signaling server that includes a candidate to be added to the rtcpeerconnection, you can (and generally should) simply call addicecandidate().
...the function below, ssnewcandidate(), is called when a
message, signalmsg, arrives from the signaling server that contains an ice candidate to be added to the rtcpeerconnection.
Service Worker API - Web APIs
reacting to push
messages: start up a service worker to send users a
message to tell them new content is available.
... extendable
messageevent the event object of a
message event fired on a service worker (when a channel
message is received on the serviceworkerglobalscope from another context) — extends the lifetime of such events.
... serviceworker
messageevent represents a
message sent to a serviceworkerglobalscope.
...service worker
messages will now use the
messageevent interface, for consistency with other web messaging features.
SharedWorkerGlobalScope: connect event - Web APIs
bubbles no cancelable no interface
messageevent event handler property sharedworkerglobalscope.onconnect examples this example shows a shared worker file — when a connection to the worker occurs from a main thread via a
messageport, the onconnect event handler fires.
... the event object is a
messageevent.
... the connecting port can be referenced through the event object's ports parameter; this reference can have an on
message handler attached to it to handle
messages coming in through the port, and its post
message() method can be used to send
messages back to the main thread using the worker.
... self.onconnect = function(e) { var port = e.ports[0]; port.on
message = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.post
message(workerresult); } port.start(); } for a complete running example, see our basic shared worker example (run shared worker.) addeventlistener equivalent you could also set up an event handler using the addeventlistener() method: self.addeventlistener('connect', function(e) { var port = e.ports[0]; port.on
message = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.post
message(workerresult); } }); specifications specification status html living standardthe definition of 'connect event' in that specification.
Using writable streams - Web APIs
this takes a given
message and writes it into a writable stream, displaying each chunk on the ui as it is written to the stream and also displaying the whole
message on the ui when writing has finished.
...w = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); the write() method contains a promise including code that decodes each written chunk into a format that can be written to the ui.
... writing to actually write content to the stream we call the send
message() function, passing it a
message to be written and the stream to write to: send
message("hello, world.", writablestream); the send
message() definition looks like so: function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.for...
... we also create a new textencoder instance using the relevant constructor to encode the
message into chunks to be put into the stream.
SubtleCrypto.decrypt() - Web APIs
function decrypt
message(privatekey, ciphertext) { return window.crypto.subtle.decrypt( { name: "rsa-oaep" }, privatekey, ciphertext ); } aes-ctr this code decrypts ciphertext using aes in ctr mode.
... function decrypt
message(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-ctr", counter, length: 64 }, key, ciphertext ); } aes-cbc this code decrypts ciphertext using aes in cbc mode.
... function decrypt
message(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-cbc", iv: iv }, key, ciphertext ); } aes-gcm this code decrypts ciphertext using aes in gcm mode.
... function decrypt
message(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-gcm", iv: iv }, key, ciphertext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.decrypt()' in that specification.
SubtleCrypto.digest() - Web APIs
hint: if you are looking here for how to create an keyed-hash
message authentication code (hmac), you need to use the subtlecrypto.sign() instead.
... examples basic example this example encodes a
message, then calculates its sha-256 digest and logs the digest length: const text = 'an obscure body in the s-k system, your majesty.
... the inhabitants refer to it as the planet earth.'; async function digest
message(
message) { const encoder = new textencoder(); const data = encoder.encode(
message); const hash = await crypto.subtle.digest('sha-256', data); return hash; } const digestbuffer = await digest
message(text); console.log(digestbuffer.bytelength); converting a digest to a hex string the digest is returned as an arraybuffer, but for comparison and display digests are often represented as hex strings.
...the inhabitants refer to it as the planet earth.'; async function digest
message(
message) { const msguint8 = new textencoder().encode(
message); // encode as (utf-8) uint8array const hashbuffer = await crypto.subtle.digest('sha-256', msguint8); // hash the
message const hasharray = array.from(new uint8array(hashbuffer)); // convert buffer to byte array const hashhex = hasharray.map(b => b.tostring(16).padstart(2, '0')).join(''); // convert bytes to hex string return hashhex; } const digesthex = await digest
message(text); console.log(digesthex); specifications specification ...
Using DTMF with WebRTC - Web APIs
eringstatechange = handlecallergatheringstatechangeevent; receiverpc = new rtcpeerconnection(); receiverpc.onicecandidate = handlereceivericeevent; if (hasaddtrack) { receiverpc.ontrack = handlereceivertrackevent; } else { receiverpc.onaddstream = handlereceiveraddstreamevent; } navigator.mediadevices.getusermedia(mediaconstraints) .then(gotstream) .catch(err => log(err.
message)); } after creating the rtcpeerconnection for the caller (callerpc), we look to see if it has an addtrack() method.
... return receiverpc.createanswer(); }) .then(function(answer) { log("setting receiver's local description to " + answer.sdp); return receiverpc.setlocaldescription(answer); }) .then(function() { log("setting caller's remote description to match"); return callerpc.setremotedescription(receiverpc.localdescription); }) .catch(err => log("error during negotiation: " + err.
message)); } since the various methods involved in negotiating the connection return promises, we can chain them together like this: call callerpc.createoffer() to get an offer.
... if at any time an error occurs, the catch() clause outputs an error
message to the log.
...when you click the "dial" button, you should see a series of logging
messages output, then the dialing will begin.
WebSocket - Web APIs
websocket.on
message an event listener to be called when a
message is received from the server.
...
message fired when data is received through a websocket.
... also available via the on
message property.
...const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', function (event) { socket.send('hello server!'); }); // listen for
messages socket.addeventlistener('
message', function (event) { console.log('
message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket' in that specification.
<input type="search"> - HTML: Hypertext Markup Language
it should be a word or short phrase that demonstrates the expected type of data, rather than an explanatory
message.
...ss="validity"></span> </div> </form> input { margin-right: 10px; } input:invalid ~ span:after { content: '✖'; padding-left: 5px; position: absolute; } input:valid ~ span:after { content: '✓'; padding-left: 5px; position: absolute; } this renders like so: in addition, if you try to submit the form with no search term entered into it, the browser will show a
message.
... the following example is from firefox: different
messages will be shown when you try to submit the form with different types of invalid data contained inside the inputs; see the below examples.
...span class="validity"></span> </div> </form> input { margin-right: 10px; } input:invalid ~ span:after { content: '✖'; padding-left: 5px; position: absolute; } input:valid ~ span:after { content: '✓'; padding-left: 5px; position: absolute; } this renders like so: if you try to submit the form with less than 4 characters, you'll be given an appropriate error
message (which differs between browsers).
200 OK - HTTP
the meaning of a success depends on the http request method: get: the resource has been fetched and is transmitted in the
message body.
... head: the entity headers are in the
message body.
... post: the resource describing the result of the action is transmitted in the
message body.
... trace: the
message body contains the request
message as received by the server.
HTTP
though often based on a tcp/ip layer, it can be used on any reliable transport layer, that is, a protocol that doesn't lose
messages silently like udp does.
... http
messages describes the type and structure of the different kind of
messages of http/1.x and http/2.
... http headers http
message headers are used to describe a resource, or the behavior of the server or the client.
...iana also maintains a registry of proposed new http
message headers.
Closures - JavaScript
no matter what field you focus on, the
message about your age will be displayed.
... consider the following case: function myobject(name,
message) { this.name = name.tostring(); this.
message =
message.tostring(); this.getname = function() { return this.name; }; this.get
message = function() { return this.
message; }; } because the previous code does not take advantage of the benefits of using closures in this particular instance, we could instead rewrite it to avoid using closure as follows: function myobject(name, me...
...ssage) { this.name = name.tostring(); this.
message =
message.tostring(); } myobject.prototype = { getname: function() { return this.name; }, get
message: function() { return this.
message; } }; however, redefining the prototype is not recommended.
... the following example instead appends to the existing prototype: function myobject(name,
message) { this.name = name.tostring(); this.
message =
message.tostring(); } myobject.prototype.getname = function() { return this.name; }; myobject.prototype.get
message = function() { return this.
message; }; in the two previous examples, the inherited prototype can be shared by all objects and the method definitions need not occur at every object creation.
constructor - JavaScript
if your class is a base class, the default constructor is empty: constructor() {} if your class is a derived class, the default constructor calls the parent constructor, passing along any arguments that were provided: constructor(...args) { super(...args); } that enables code like this to work: class validationerror extends error { printcustomer
message() { return `validation failed :-( (details: ${this.
message})`; } } try { throw new validationerror("not a valid phone number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // this is error instead of validationerror!
... console.log(error.printcustomer
message()); } else { console.log('unknown error', error); throw error; } } the validationerror class doesn't need an explicit constructor, because it doesn't need to do any custom initialization.
...for example: class validationerror extends error { constructor(
message) { super(
message); // call parent class constructor this.name = 'validationerror'; this.code = '42'; } printcustomer
message() { return `validation failed :-( (details: ${this.
message}, code: ${this.code})`; } } try { throw new validationerror("not a valid phone number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // now this is validationerror!
... console.log(error.printcustomer
message()); } else { console.log('unknown error', error); throw error; } } there can be only one special method with the name "constructor" in a class.
ReferenceError - JavaScript
instance properties referenceerror.prototype.
message error
message.
... although ecma-262 specifies that referenceerror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... examples catching a referenceerror try { let a = undefinedvariable } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.
message) // "undefinedvariable is not defined" console.log(e.name) // "referenceerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 6 console.log(e.stack) // "@scratchpad/2:2:7\n" } creating a referenceerror try { throw new...
... referenceerror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.
message) // "hello" console.log(e.name) // "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'referenceerror' in that specification.
TypeError - JavaScript
instance properties typeerror.prototype.
message error
message.
... although ecma-262 specifies that typeerror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.
message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e)...
... { console.log(e instanceof typeerror) // true console.log(e.
message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'typeerror' in that specification.
URIError - JavaScript
instance properties urierror.prototype.
message error
message.
... although ecma-262 specifies that urierror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... examples catching an urierror try { decodeuricomponent('%') } catch (e) { console.log(e instanceof urierror) // true console.log(e.
message) // "malformed uri sequence" console.log(e.name) // "urierror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating an urierror try { throw new urierror('hello', 'somefile.js', 10) } catch (e) { con...
...sole.log(e instanceof urierror) // true console.log(e.
message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'urierror' in that specification.
WebAssembly.instantiate() - JavaScript
this module can be instantiated again, shared via post
message() or cached in indexeddb.
... second overload example the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compilestreaming() method and then sends it to a worker using post
message().
... var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.post
message(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; on
message = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'instantiate()' in that specification.
throw - JavaScript
each of the following throws an exception: throw 'error2'; // generates an exception with a string value throw 42; // generates an exception with the value 42 throw true; // generates an exception with the value true throw new error('required'); // generates an error object with the
message of required also note that the throw statement is affected by automatic semicolon insertion (asi) as no line terminator between the throw keyword and the expression is allowed.
... function userexception(
message) { this.
message =
message; this.name = 'userexception'; } function getmonthname(mo) { mo = mo - 1; // adjust month number for array index (1 = jan, 12 = dec) var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; if (months[mo] !== undefined) { return months[mo]; } else { throw new userexception('invalidmonthno'); } } try { // statements to try var mymonth = 15; // 15 is out of bound to raise the exception var monthname = getmonthn...
...ame(mymonth); } catch (e) { monthname = 'unknown'; console.error(e.
message, e.name); // pass exception object to err handler } another example of throwing an object the following example tests an input string for a u.s.
...t(zip)) { // zip code value will be the first match in the string this.value = zip.match(pattern)[0]; this.valueof = function() { return this.value }; this.tostring = function() { return string(this.value) }; } else { throw new zipcodeformatexception(zip); } } function zipcodeformatexception(value) { this.value = value; this.
message = 'does not conform to the expected format for a zip code'; this.tostring = function() { return this.value + this.
message; }; } /* * this could be in a script that validates address data * for us addresses.
<maction> - MathML
possible values are: statusline: if there is a click on the expression or the reader moves the pointer over it, the
message is sent to the browser's status line.
... the syntax is: <maction actiontype="statusline"> expression
message </maction>.
... tooltip: when the pointer moves over the expression, a tooltip box with a
message is displayed near the expression.
... the syntax is: <maction actiontype="tooltip"> expression
message </maction>.
Porting the Library Detector - Archive of obsolete content
ll just run when it's loaded, collect the array of library names, and post it back to main.js: function testlibraries() { var win = unsafewindow; var librarylist = []; for(var i in ld_tests) { var passed = ld_tests[i].test(win); if (passed) { var libraryinfo = { name: i, version: passed.version }; librarylist.push(libraryinfo); } } self.post
message(librarylist); } testlibraries(); main.js responds to that
message by fetching the tab corresponding to that worker using worker.tab, and adding the array of library names to that tab's libraries property: pagemod.pagemod({ include: "*", contentscriptwhen: 'end', contentscriptfile: (data.url('library-detector.js')), onattach: function(worker) { worker.on('
message', function(library...
...this means we'll need two additional content scripts: one in the widget's context, which listens for icon mouseover events and sends a
message to main.js containing the name of the corresponding library: function setlibraryinfo(element) { self.port.emit('setlibraryinfo', element.target.title); } var elements = document.getelementsbytagname('img'); for (var i = 0; i < elements.length; i++) { elements[i].addeventlistener('mouseover', setlibraryinfo, false); } one in the panel, which updates the panel's content with the libr...
...ary information: self.on("
message", function(libraryinfo) { window.document.body.innerhtml = libraryinfo; }); finally main.js relays the library information from the widget to the panel: widget.port.on('setlibraryinfo', function(libraryinfo) { widget.panel.post
message(libraryinfo); }); ...
tabs - Archive of obsolete content
scripts in a tab you can attach a content script to the page hosted in a tab, and use that to access and manipulate the page's content (see the modifying the page hosted by a tab tutorial): var tabs = require("sdk/tabs"); tabs.on('activate', function(tab) { var worker = tab.attach({ contentscript: 'self.port.emit("html", document.body.innerhtml);' }); worker.port.on("html", function(
message) { console.log(
message) }) }); note that tab.attach is tab-centric: if the user navigates to a new page in the same tab, then the worker and content scripts will be reattached to the new page.
...le: // main.js const tabs = require("sdk/tabs"); tabs.open({ url: "./page.html", onready: function(tab) { tab.attach({ contentscriptfile: "./content-script.js", contentscriptoptions: { a: "blah" } }); } }); the values are accessible to content scripts via the self.options property: // content-script.js alert(self.options.a); on
message function a function called when the content worker receives a
message from content scripts.
... listeners are passed a single argument, the
message posted from the content script.
jpm - Archive of obsolete content
jpm usage is: jpm [command] [options] jpm supports the following global options: -h, --help - show a help
message and exit -v, --version - print the jpm version number --addon-dir - directory for your source code, defaulting to the current directory installation jpm is distributed with the node package manager npm.
... to test your installation, run: /usr/bin/env node -v if you get an error
message saying /usr/bin/env: node: no such file or directory and you have installed nodejs through a package manager, nodejs may have been installed under a different executable name.
...this means that if you want to see the output from console.log()
messages, you have to tweak a setting.
Implementing the widget - Archive of obsolete content
because the widget's click event does not distinguish left and right mouse clicks, we'll use a content script to capture the click events and send the corresponding
message back to our add-on.
... the widget's content script the widget's content script just listens for left- and right- mouse clicks and posts the corresponding
message to the add-on code: this.addeventlistener('click', function(event) { if(event.button == 0 && event.shiftkey == false) self.port.emit('left-click'); if(event.button == 2 || (event.button == 0 && event.shiftkey == true)) self.port.emit('right-click'); event.preventdefault(); }, true); save this in your data/widget directory as widget.js.
...it creates the widget and responds to
messages from the widget's content script by toggling its activation state.
On page load - Archive of obsolete content
application uri to overlay firefox chrome://browser/content/browser.xul thunderbird chrome://messenger/content/messenger.xul navigator from seamonkey chrome://navigator/content/navigator.xul attaching a script attach a script to your overlay (see "attaching a script to an overlay") that adds a load event listener to appcontent element (browsers) or
messagepane (mail): window.addeventlistener("load", function load(event){ window.removeeventlistener("load", load, false); //remove listener, no longer needed myextension.init(); },false); var myextension = { init: function() { var appcontent = document.getelementbyid("appcontent"); // browser if(appcontent){ appcontent.addeventlistener("domcontentloaded", myextension.onpagelo...
...ad, true); } var
messagepane = document.getelementbyid("
messagepane"); // mail if(
messagepane){
messagepane.addeventlistener("load", function(event) { myextension.onpageload(event); }, true); } }, onpageload: function(aevent) { var doc = aevent.originaltarget; // doc is document that triggered "onload" event // do something with the loaded page.
...to attach to the unload event in above example you can use the "pagehide" event like this: appcontent.addeventlistener("pagehide", myextension.onpageunload, false); for appcontent and similarly for
messagepane
messagepane.addeventlistener("pagehide", myextension.onpageunload, false); and add your code to onpageunload method.
Preferences - Archive of obsolete content
let's say you want to make the default value for the extensions.myext.welcome
message preference localizable.
... you should do the following: add this line to some .properties file (for all of your locales), say to chrome://myext/locale/defaults.properties: extensions.myext.welcome
message=localized default value add the default value for extensions.myext.welcome
message, pointing to that properties file, by adding the following line to your file with default preferences (see below).
... pref("extensions.myext.welcome
message", "chrome://myext/locale/defaults.properties"); read the preference with getcomplexvalue, passing nsipreflocalizedstring as atype: var prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); var branch = prefs.getbranch("extensions.myext."); var value = branch.getcomplexvalue("welcome
message", components.interfaces.nsipreflocalizedstring).data; the code in step 3 will read the default value from chrome://myext/locale/defaults.properties when no user value is set, and will behave exactly the same as if nsisupportsstring was passed as atype otherwise.
Adding windows and dialogs - Archive of obsolete content
all it does is display a text
message that the user can read and then click the ok button to dismiss it.
... we have been using the window.alert function to open alert
messages in our examples so far, but that's not the right way to do it.
... if you use window.alert, the alert window will have the title [javascript application], indicating that the source of the
message is not well defined.
Index of archived content - Archive of obsolete content
oznotification add-ons add-on sdk builder guides content scripts communicating with other scripts communicating using "port" communicating using "post
message" cross-domain content scripts interacting with page scripts loading content scripts reddit example port self contributor's guide classes and inheritance content processes getting...
... ui selection jspage statusbar statusbar litmus tests mac os x build prerequisites/fink makefile.mozextension.2
message summary database metro browser chrome tests microsummary topics microsummary xml grammar reference migrate apps from internet explorer to mozilla modularization techniques monitoring downloads mozilla application framework mozilla application f...
... developing mozilla xforms implementation status mozilla xforms specials mozilla xforms user interface xforms alert element xforms group element xforms help element xforms hint element xforms input element xforms label element xforms
message element xforms output element xforms range element xforms repeat element xforms secret element xforms select element xforms select1 element xforms submit element xforms switch module xforms textarea element xforms trigger element xforms upload e...
Adding the structure - Archive of obsolete content
statusbarpanel> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel class="statusbarpanel-iconic" id="security-button" onclick="browserpageinfo(null, 'securitytab')"/> </statusbar> the statusbar xul element defines a horizontal status bar where informative
messages about an application's state can be displayed.
... it can contain both text
messages (i.e.
... "done" in mozilla when a document finishes loading) and graphical
messages (f.e.
Basics - Archive of obsolete content
log(stringstring)this method writes a notification
message to the console.
... stringthe
message to add to the consolestring console.log("hello world!"); arn()this method does stuff.
... titlethe head of the notification
message.string bodythe
messagestringfalse iconthe url of an .ico file.string jetpack.notifications.show("hello world");var mybody = " my first
message body on jetpack";var myicon = "http://www.mozilla.com/favicon.ico";jetpack.notifications.show({title: "my first
message on jetpack", body: mybody, icon: myicon}); class tabs in this class you can find information about the tabs in your firefox window.
Frequently Asked Questions - Archive of obsolete content
why does mozilla show an "xml parsing error"
message instead of svg?
... this is an xml debugging
message to help xml authors correct errors in their xml documents.
... mozilla will show this
message when there's an xml well formedness error in the file it tried to load.
Using cross commit - Archive of obsolete content
using the script quick overview there are a couple of common ways to use cross-commit: land something simultaneously on the trunk and mozilla_1_8_branch # modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on trunk and branch at once # make sure to use -m "commit
message" when doing so tools/cross-commit -m "fix some sort of security bug" layout/base/nscaret.h land something on two other branches that has already landed on the trunk # update to the first branch you want to land on cvs update -rmozilla_1_8_branch layout/base/nscaret.h # modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on all the branches at once # ma...
...ke sure to use -m "commit
message" when doing so tools/cross-commit --moz18 --branch mozilla_1_8_0_branch -m "fix some sort of security bug" layout/base/nscaret.h notes note that you must use a -m option with a cvs checkin
message.
... otherwise cross-commit will end up waiting forever for you to type a cvs checkin
message in an editor that it never shows you!
alert - Archive of obsolete content
summary the alert function displays a modal dialog box with a
message representing the input.
... method of install object syntax void alert ( string
message ); parameters the
message parameter is displayed as a string in the dialog box.
... if
message is not a string, then it is converted into one and displayed.
Index - Archive of obsolete content
this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new
messages.
... 906
message-icon xul reference, xul_style_classes no summary!
... 1144 notification xul elements, xul reference the notification is used to display an informative
message.
Mozilla release FAQ - Archive of obsolete content
regarding shells, i would like to recommend the following: if you are using unix, use bash-family shells for the build because of the better control over redirection (in case you want to log errors and
messages) if you are using win32, using the default shell cmd.exe (as opposed to 4dos or 4nt) will probably yield better results.
...has (at least) the following new features: xml support a highly configurable appearance (courtesy of xul) publicly available source code :) http compression exists on more platforms mathml support (somewhat limited at the moment) a significantly faster rendering engine better html support (css 1 and partial css 2, dom 1 and partial dom 2) plug-in jvm support tabbed browsing
message filtering an irc client why is the animated icon different?
...you can find the binaries at mozilla.org's binaries page on win32, it fails to build, with the
message '.\win32' unexpected you didn't properly set the environment variables -- you must not include a space at the end of the set statements (be careful if you are cut'n'pasting).
NPAPI plugin developer guide - Archive of obsolete content
using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying
messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shu...
...n initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins specifying that a plug-in is windowless invalidating the drawing area forcing a paint
message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode ...
...e stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line
message getting agent information getting the current version finding out if a feature exists reloading a plug-in ...
NPN_InvalidateRect - Archive of obsolete content
npn_invalidaterect() causes the npp_handleevent() method to pass an update event or a paint
message to the plug-in.
... after calling this method, the plug-in receives a paint
message asynchronously.
...to immediately send a paint
message, the plug-in can call npn_forceredraw() after calling this method.
NPN_InvalidateRegion - Archive of obsolete content
npn_invalidateregion() causes the npp_handleevent() method to pass an update event or a paint
message to the plug-in.
... if a plug-in calls this method, it receives a paint
message later.
...to force a paint
message, the plug-in can call npn_forceredraw() after calling this method.
Encryption and Decryption - Archive of obsolete content
thus, as long as the symmetric key is kept secret by the two parties using it to encrypt communications, each party can be sure that it is communicating with the other as long as the decrypted
messages continue to make sense.
...a person with an unauthorized symmetric key not only can decrypt
messages sent with that key, but can encrypt new
messages and send them as if they came from one of the two parties who were originally using the key.
...client software such as firefox can then use your public key to confirm that the
message was signed with your private key and that it hasn't been tampered with since being signed.
Vulnerabilities - Archive of obsolete content
for example, email client software may contain a feature that renders html content in email
messages.
... an attacker could craft a fraudulent email
message that contains hyperlinks that, when rendered in html, appear to the recipient to be benign but actually take the recipient to a malicious web site when they are clicked on.
...however, an attacker could generate false arp
messages to poison a system’s arp table and thereby launch a denial-of-service or a man-in-the-middle attack.
Error.number - Archive of obsolete content
var x = y; } catch(e) { document.write ("error code: "); document.write (e.number & 0xffff) document.write ("<br />"); document.write ("facility code: ") document.write(e.number>>16 & 0x1fff) document.write ("<br />"); document.write ("error
message: ") document.write (e.
message) } example the output of this code is as follows.
... error code: 5009 facility code: 10 error
message: 'y' is undefined requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
... applies to: error object see also description property (error)
message property (error) name property (error) ...
LiveConnect Overview - Archive of obsolete content
the javascript interpreter generates an error
message that is converted into an instance of jsexception.
...the interpreter generates an error
message, the java handler catches the
message, and the doit method returns an instance of netscape.javascript.jsexception.
...backward compatibility in javascript 1.3 and earlier versions, the jsexception class had three public constructors which optionally took a string argument, specifying the detail
message or other information for the exception.
XForms Hint Element - Archive of obsolete content
the
message of the hint element can exist in instance data, in a remote document, or as inline text.
... if more than one source of
message is specified in this element, the order of precedence is: single node binding attributes, linking attributes, inline text.
... representations is represented by a tooltip window that contains the hint element's
message.
Desktop gamepad controls - Game development
var
message = 'gamepad connected!
... press y for controls'; var textgamepad = this.add.text(
message, ...); textgamepad.visible = false; } in the update() function, which is executed every frame, we can wait until the controller is actually connected, so the proper text can be shown.
... on-screen instructions when the game is started, some introductory text is shown that shows you available controls — we are already detecting if the game is launched on desktop or mobile then showing a relevant
message for the device, but we can go even further, to allow for the presence of a gamepad: create() { // ...
Extra lives - Game development
if yes, then the player still has some lives left and can continue to play — they will see the life lost
message, the ball and paddle positions will be reset on screen and on the next input (click or touch) the
message will be hidden and the ball will start to move again.
... when the number of available lives reaches zero, the game is over and the game over alert
message will be shown.
...in our case, on every outofbounds event the ballleavescreen will be executed, but when the ball leaves the screen we only want to remove the
message from the screen once.
Cryptographic hash function - MDN Web Docs Glossary: Definitions of Web-related terms
a cryptographic hash function, also sometimes called a digest function, is a cryptographic primitive transforming a
message of arbitrary size into a
message of fixed size, called a digest.
... cryptographic hash functions are used for authentication, digital signatures, and
message authentication codes.
... to be used for cryptography, a hash function must have these qualities: quick to compute (because they are generated frequently) not invertible (each digest could come from a very large number of
messages, and only brute-force can generate a
message that leads to a given digest) tamper-resistant (any change to a
message leads to a different digest) collision-resistant (it should be impossible to find two different
messages that produce the same digest) cryptographic hash functions such as md5 and sha-1 are considered broken, as attacks have been found that significantly reduce their collision resistance.
Digest - MDN Web Docs Glossary: Definitions of Web-related terms
a digest is a small value generated by a hash function from a whole
message.
... ideally, a digest is quick to calculate, irreversible, and unpredictable, and therefore indicates whether someone has tampered with a given
message.
... a digest can be used to perform several tasks: in non-cryptographic applications (e.g., the index of hash tables, or a fingerprint used to detect duplicate data or to uniquely identify files) verify
message integrity (a tampered
message will have a different hash) store passwords so that they can't be retrieved, but can still be checked (to do this securely, you also need to salt the password.) generate pseudo-random numbers generate keys it is critical to choose the proper hash function for your use case to avoid collisions and predictability.
Public-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
anyone could encrypt a
message to the owner of the private key, but only the owner of the private key could decrypt it.
... however, they are typically much slower than symmetric algorithms and the size of
message they can encrypt is proportional to the size of the key, so they do not scale well for long
messages.
... as a result, it's common for an encryption system to use a symmetric algorithm to encrypt the
message, then a public-key system to encrypt the symmetric key.
Signature (security) - MDN Web Docs Glossary: Definitions of Web-related terms
a signature, or digital signature, is a protocol showing that a
message is authentic.
... from the hash of a given
message, the signing process first generates a digital signature linked to the signing entity, using the entity's private key.
... on receiving the
message, the verification process authenticates the sender - uses the sender's public key to decrypt the signature and recover the hash, which can only be created with the sender's private key, and checks
message integrity - compares the hash with a newly calculated one from the received document (the two hashes will differ if the document has been tampered with) the system fails if the private key is compromised or the recipient is deceitfully given the wrong public key.
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
tcp uses a three-way handshake (aka tcp-handshake, three
message handshake, and/or syn-syn-ack) to set up a tcp/ip connection over an ip based network.
... the three
messages transmitted by tcp to negotiate and start a tcp session are nicknamed syn, syn-ack, and ack for synchronize, synchronize-acknowledgement, and acknowledge respectively.
... the three
message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as http browser requests.
Transmission Control Protocol (TCP) - MDN Web Docs Glossary: Definitions of Web-related terms
tcp handshake the tcp three-way handshake, also called the tcp-handshake, three
message handshake, and/or syn-syn-ack, is the method used by tcp to set up a tcp/ip connection over an ip-based network.
... the three
messages transmitted by tcp to negotiate and start a tcp session are nicknamed syn, syn-ack, ack for synchronize, synchronize-acknowledgement, and acknowledge.
... the three
message mechanism is designed for the two computers that want to pass information back and forth and can negotiate the parameters of the connection before transmitting data such as http browser requests.
Hash - MDN Web Docs Glossary: Definitions of Web-related terms
the hash function takes a variable length
message input and produces a fixed-length hash output.
... it is commonly in the form of a 128-bit "fingerprint" or "
message digest".
...this provides the basis for hmac's, which provide
message authentication.
CSS and JavaScript accessibility best practices - Learn web development
here you'll see a simple form; when you try to submit the form with one or both fields left empty, the submit fails, and an error
message box appears to tell you what is wrong.
...orm.onsubmit = validate; function validate(e) { errorlist.innerhtml = ''; for(let i = 0; i < formitems.length; i++) { const testitem = formitems[i]; if(testitem.input.value === '') { errorfield.style.left = '360px'; createlink(testitem); } } if(errorlist.innerhtml !== '') { e.preventdefault(); } } note: in this example, we are hiding and showing the error
message box using absolute positioning rather than another method such as visibility or display, because it doesn't interfere with the screen reader being able to read content from it.
...if there are errors (if(errorlist.innerhtml !== '')) then we stop the form submitting (using preventdefault()), and display any error
messages that have been created (see below).
WAI-ARIA basics - Learn web development
at the end of this section we showed that we have included some aria attributes on the error
message box that displays any validation errors when you try to submit the form: <div class="errors" role="alert" aria-relevant="all"> <ul> </ul> </div> role="alert" automatically turns the element it is applied to into a live region, so changes to it are read out; it also semantically identifies it as an alert
message (important time/context sensitive information), and represents a better, more ...
...wai-aria does include aria-valuemin and aria-valuemax properties to specify min and max values, but these currently don't seem very well supported; a better supported feature is the html5 placeholder attribute, which can contain a
message that is shown in the input when no value is entered, and is read out by a number of screenreaders.
...make a local copy of fake-div-buttons.html, and add role="button" to each button <div>, for example: <div data-
message="this is from the first button" tabindex="0" role="button">click me!</div> now when you try this using a screenreader, you'll have buttons be reported using phrases like "click me!, button" — much better.
Test your skills: Form validation - Learn web development
try submitting your form — it should refuse to submit until the above constaints are followed, and give suitable error
messages.
...we would like you to use the constraint validation api, plus some form validation attributes, to program some custom error
messages.
...if it doesn't look like an email address or is too short, provide the user with appropriate custom error
messages.
Making asynchronous programming easier with async and await - Learn web development
status: ${response.status}`); } else { return response.blob(); } }) .then(myblob => { let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.
message); }); by now, you should have a reasonable understanding of promises and how they work, but let's convert this to use async/await to see how much simpler it makes things: async function myfetch() { let response = await fetch('coffee.jpg'); if (!response.ok) { throw new error(`http error!
... status: ${response.status}`); } else { let myblob = await response.blob(); let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); } } myfetch() .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.
message); }); it makes code much simpler and easier to understand — no more .then() blocks everywhere!
...ob = await response.blob(); let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); } } catch(e) { console.log(e); } } myfetch(); the catch() {} block is passed an error object, which we've called e; we can now log that to the console, and it will give us a detailed error
message showing where in the code the error was thrown.
Choosing the right approach - Learn web development
single delayed operation repeating operation multiple sequential operations multiple simultaneous operations yes yes (recursive timeouts) yes (nested timeouts) no code example here the browser will wait two seconds before executing the anonymous function, then will display the alert
message (see it running live, and see the source code): let mygreeting = settimeout(function() { alert('hello, mr.
...splays it inside an <img> element; see it live also, and see also the source code: fetch('coffee.jpg') .then(response => response.blob()) .then(myblob => { let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.
message); }); pitfalls promise chains can be complex and hard to parse.
...the function return fetch(url).then(response => { // depending on what type of file is being fetched, use the relevant function to decode its contents if(type === 'blob') { return response.blob(); } else if(type === 'text') { return response.text(); } }) .catch(e => { console.log(`there has been a problem with your fetch operation for resource "${url}": ` + e.
message); }); } // call the fetchanddecode() method to fetch the images and the text, and store their promises in variables let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', 'text'); // use promise.all() to run code only when all three function calls have resolved promise.all([coffee, tea, description]).
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
in the following example, the browser will wait two seconds before executing the anonymous function, then will display the alert
message (see it running live, and see the source code): let mygreeting = settimeout(function() { alert('hello, mr.
...after that time, a
message will appear saying "players go!!" — once this happens, the first player to press their control button will win the game.
... when e.key is "a", display a
message to say that player 1 won, and when e.key is "l", display a
message to say player 2 won.
Storing the information you need — Variables - Learn web development
the second line displays a welcome
message that includes their name, taken from the variable value.
... you may not fully understand the syntax we are using (yet!), but you should be able to get the idea — if we didn't have variables available, we'd have to implement a giant code block that checked what the entered name was, and then display the appropriate
message for any name.
...if they don't exist, you'll get an error
message — try typing in scoobydoo; note: don't confuse a variable that exists but has no defined value with a variable that doesn't exist at all — they are very different things.
Introduction to the server side - Learn web development
web servers wait for client request
messages, process them when they arrive, and reply to the web browser with an http response
message.
... a few examples include: facebook and twitter send emails and sms
messages to notify you of new communications.
... a web server might send warning
messages to site administrators alerting them to low memory on the server, or suspicious user activity.
Adding a new event
add event
messages you need to add event
messages which are stored by widgetevent::
message.
... all
messages are defined by macro in "
messages" section of basicevents.h.
... eventnamelist.h defines mapping between dom event name, internal event
message, event handler attribute owner and internal event class.
Chrome registration
each line is parsed individually; if the line is parsable the chrome registry takes the action identified by that line, otherwise the chrome registry ignores that line (and prints a warning
message in the runtime error console).
...if the above example had a packagename of camelcasepackage, you would get an error
message similar to "no chrome registered for chrome://camelcasepackage/path/to/files".
...if not, you would get a
message in the error console that the appversion flag was not recognized.
Command line options
each
message option follows the syntax field=value, for example: to=foo@nowhere.net subject=cool page attachment=www.mozilla.org attachment='file:///c:/test.txt' body=check this page or also in thunderbird 52 and newer: body=c:\path\to\file.txt separate multiple
message options by comma (,), for example: "to=foo@nowhere.net,subject=cool page" .
... -compose
message_options start with mail composer.
... miscellaneous -attach-console write
messages for the debugging console into the window which launched the application instead of opening a new window for the debugging
messages.
Creating a Language Pack
$ make wget-en-us en_us_binary_url=http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora if you're building on mac 64 bit, you'll need to change the command slightly: $ make wget-en-us en_us_binary_url=http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora moz_pkg_platform=mac at some point, you should see the following success
message: downloaded http://ftp.mozilla.org/pub/mozilla.o....en-us.mac.dmg to /users/your_id/mozilla/vc/firefox/browser/locales/../../dist/firefox-3.6b5pre.en-us.mac.dmg the en-us binary has been downloaded.
... at the end of the process, you should see the following success
message.
... $ make merge-x-testing locale_mergedir=$(pwd)/mergedir $ make installers-x-testing locale_mergedir=$(pwd)/mergedir at the end of the process, you should see the following success
message.
Eclipse CDT
it also used to be necessary to add the following two lines to your mozconfig to make the compiler output errors all on a single line, but that may not be needed anymore: export cflags="-f
message-length=0" export cppflags="-f
message-length=0" debugging to create a debug configuration, open the project properties window, and select "run/debug settings" on the left.
... problem occurred (java heap space) if eclipse becomes glacially slow or hangs and then you get this error
message, see the increasing memory limits section above.
... resource is out of sync with the file system if you get the
message "resource is out of sync with the file system", then you didn't set the "refresh" options above in the initial workspace preferences section.
Listening to events on all tabs
the status
message is intended to be displayed to the user (e.g., in the status bar of the browser).
... void onstatuschange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsresult astatus, prunichar *a
message ); parameters abrowser the browser that fired the notification.
... a
message localized text corresponding to astatus.
Limitations of frame scripts
examples of apis add-on authors should avoid in frame scripts: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via
message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) xul and browser ui anything that tries to touch the browser ui or anything to do with xul is likely to not work in the content process.
... if you want a chrome window: send a
message from the content process using the
message manager.
... the target property of the object passed into the
message handler in the chrome process is the xul <browser> receiving the
message, and you can get the chrome window from that (note: i'm not really sure how...).
Limitations of frame scripts
for example: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via
message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) file: uris, see bug 1187099 <...> xul and browser ui anything that tries to touch the browser ui or anything to do with xul is likely not to work in the content process.
... if you want a chrome window: send a
message from the content process using the
message manager.
... the target property of the object passed into the
message handler in the chrome process is the xul <browser> receiving the
message, and you can get the chrome window from that (i'm not sure how).
IPDL Type Serialization
types are serialized and deserialized from an ipc::
message type declared in ipc_
message.h.
... each type specializes ipc::paramtraits as follows: namespace ipc { template <> struct paramtraits<mytype> { typedef mytype paramtype; static void write(
message* amsg, const paramtype& aparam) { // implement serialization here } static bool read(const
message* amsg, void** aiter, paramtype* aresult) { // implement deserialization here.
...most structures can be serialized in this manner: struct examplestruct { int i; nscstring j; int k[4]; }; namespace ipc { template <> struct paramtraits<examplestruct> { typedef examplestruct paramtype; static void write(
message* amsg, const paramtype& aparam) { writeparam(amsg, aparam.i); writeparam(amsg, aparam.j); for (int i = 0; i < 4; ++i) writeparam(amsg, aparam.k[i]); } static bool read(const
message* amsg, void** aiter, paramtype* aresult) { if (!readparam(amsg, aiter, &(aresult->i)) || !readparam(amsg, aiter, &(aresult->j))) return false; for (int i = 0; i < 4; +...
Log.jsm
the log.jsm javascript code module (formerly named log4moz.js) provides a log4j style api for logging log
messages to various endpoints, such as the browser console or a file on disk.
...log.addappender(new log.dumpappender(new log.basicformatter())); // log some
messages log.error("oh noes!!
... dumpappender(); length: 1 keys of prototype: doappend(); fileappender(); length: 2 keys of prototype: doappend(); reset(); formatter(); length: 0 keys of prototype: format(); log
message(); length: 4 keys of prototype: leveldesc logger(); length: 2 keys of prototype: addappender(); level logstructured(); name parent removeappender(); updateappenders(); ...
NetUtil.jsm
exceptions thrown this method throws an exception with the
message "must have a source and a sink" if either asource or asink is null.
... exceptions thrown this method throws an exception with the
message "must have a source and a callback" if either asource or acallback is null.
... exceptions thrown this method throws an exception with the
message "must have a non-null string spec or nsifile object" and result code ns_error_invalid_arg if aspec is null.
Webapps.jsm
amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: function() loadandupdateapps: function() updatedatastore: function(aid, aorigin, amanifesturl, amanifest) _registersystem
messagesforentrypoint: function(amanifest, aapp, aentrypoint) _registerinterappconnectionsforentrypoint: function(amanifest, aapp,) _registersystem
messages: function(amanifest, aapp) _registerinterappconnections: function(amanifest, aapp) _createactivitiestoregister: function(amanifest, aapp, aentrypoint, arunupdate) _registeractivitiesforapps: function(aappstoregister, arunupdate) _registeractivit...
...ies: function(amanifest, aapp, arunupdate) _createactivitiestounregister: function(amanifest, aapp, aentrypoint) _unregisteractivitiesforapps: function(aappstounregister) _unregisteractivities: function(amanifest, aapp) _processmanifestforids: function(aids, arunupdate) observe: function(asubject, atopic, adata) add
messagelistener: function(amsgnames, aapp, amm) remove
messagelistener: function(amsgnames, amm) format
message: function(adata) receive
message: function(a
message) getappinfo: function getappinfo(aappid) broadcast
message: function broadcast
message(amsgname, acontent) registerupdatehandler: function(ahandler) unregisterupdatehandler: function(ahandler) notifyupdatehandlers: function(aapp, amanifest, azippath) _getappdir: function(aid) _writefile: function(apath, adata) do...
...calidbystoreid: function(astoreid) getappbylocalid: function(alocalid) getmanifesturlbylocalid: function(alocalid) getapplocalidbymanifesturl: function(amanifesturl) getcoreappsbasepath: function() getwebappsbasepath: function() _islaunchable: function(aapp) _notifycategoryandobservers: function(subject, topic, data, msg) registerbrowserelementparentforapp: function(amsg, amn) receiveapp
message: function(appid,
message) _clearprivatedata: function(appid, browseronly, msg) _sendprogressevent: function() updatestatechanged: function appobs_update(aupdate, astate) applicationcacheavailable: function appobs_cacheavail(aapplicationcache) ...
Localization Use Cases
in order to construct a grammatically-correct and naturally-sounding
message, we must know the gender of the subject.
...<brandshortname "boot2gecko" _gender:"neutral"> now we can translate crash-banner-os2 into polish without sounding like a robot: <crashbanneros2[brandshortname::_gender] { masculine: "{{ brandshortname }} uległ awarii", feminine: "{{ brandshortname }} uległa awarii", neutral: "{{ brandshortname }} uległo awarii" }> this will give us, depending on the current branding, the following
messages: firefox os uległ awarii boot2gecko uległo awarii isolation let's look at how the settings app formats sizes.
... in the javascript code, the developer needs to pass sizeinfo.unit instead of a localized value: function showformatedsize(element, l10nid, size) { // … element.textcontent = document.l10n.get(l10nid, { size: sizeinfo.size, unit: sizeinfo.unit }); } and then use the $unit variable verbatim in the english
message: <availablesize "{{ $size }} {{ $unit }} available"> in french, the localizer can then use the value of $unit to match it against a translated abbreviation, like so: <_unitedemesure { b: "o", kb: "ko", mb: "mo", gb: "go", tb: "to" }> <availablesize "il reste {{ $size }} {{ _unitedemesure[unit] }}"> similarly, other local variables could be used to provide better and more natural...
MailNews automated testing
message synthesis: create
messages by specifying what properties the
messages should have.
...
message injection: inject synthesized
messages via local or imap (using a fake server).
...
message manipulation: mark
messages as read, tag them, untag them, move them to other folders, trash them, etc.
NSS_3.12_release_notes.html
bug 406647: libpkix does not use user defined revocation checkers bug 407064: pkix_pl_ldapcertstore_buildcrllist should not fail if a crl fails to be decoded bug 421216: libpkix test nss_thread leaks a test certificate bug 301259: signtool usage
message is unhelpful bug 389781: nss should be built size-optimized in browser builds on linux, windows, and mac bug 90426: use of obsolete typedefs in public nss headers bug 113323: the first argument to pk11_findcertfromnickname should be const.
...917: crlutil should init nss read-only for some options bug 350948: freebl macro change can give 1% improvement in rsa performance on amd64 bug 352439: reference leaks in modutil bug 369144: certutil needs option to generate subjectkeyid extension bug 391771: pk11_config_name and pk11_config_strings leaked on shutdown bug 401194: crash in lg_findobjects on win64 bug 405652: in the tls clienthello
message the gmt_unix_time is incorrect bug 424917: performance regression with studio 12 compiler bug 391770: ocsp_global.monitor is leaked on shutdown bug 403687: move pkix functions to certvfypkix.c, turn off ev_test_hack bug 428105: cert_setocsptimeout is not defined in any public header file bug 213359: enhance pk12util to extract certs from p12 file bug 329067: nss encodes cert distinguished name at...
...s -v -u option bug 175741: strict aliasing bugs in mozilla/dbm bug 210584: cert_asciitoname doesn't accept all valid values bug 298540: vfychain usage option should be improved and documented bug 323570: make dbck debug mode work with softoken bug 371470: vfychain needs option to verify for specific date bug 387621: certutil's random noise generator isn't very efficient bug 390185: signtool error
message wrongly uses the term database bug 391651: need config.mk file for windows vista bug 396322: fix secutil's code and nss tools that print public keys bug 417641: miscellaneous minor nss bugs bug 334914: hopefully useless null check of out it in jar_find_next bug 95323: ckfw should support cipher operations.
NSS Sample Code Sample_1_Hashing
this program illustrates the use of nss
message apis.
..._fprintf(out, "%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * prints a usage
message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htyp...
...it illustrates the use of nss
message * apis.
Hashing - sample 1
the nss same code below computes the hash of a file and saves it to another file, this illustrates the use of nss
message apis.
...fprintf(out, "%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * prints a usage
message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htyp...
...it illustrates the use of nss
message * apis.
NSS Tools
source, documentation, tasks/plans cmsutil 1.0 performs basic cms operations such as encrypting, decrypting, and signing
messages.
... source, documentation, tasks/plans sslstrength ssl strength documentation ssltap 3.2 proxy requests for an ssl server and display the contents of the
messages exchanged between the client and server.
... the ssltap tool does not decrypt data, but it shows things like the type of ssl
message (clienthello, serverhello, etc) and connection data (protocol version, cipher suite, etc).
NSS Tools ssltap
the tool cannot and does not decrypt any encrypted
message data.
... type = 14 (server_hello_done) length = 0 (0x000000) }}]--> [sslrecord { 0: 16 03 00 00 44 |....d type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { 0: 10 00 00 40 |...@ type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } }}]--> [sslrecord { 0: 14 03 00 00 01 |.....
...rt.001' } } } type = 12 (server_key_exchange) length = 202 (0x0000ca) type = 14 (server_hello_done) length = 0 (0x000000) }}]--> [sslrecord { type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } }}]--> [sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1)}sslrecord { type = 22 (handshake) version = { 3,0 } length = 56 (0x38) < encrypted >}]<-- [sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1)}]<-- [sslrecord { type = 22 (handshake) version = { 3,0 } length = ...
NSS tools : signtool
note that versions 1.1 and later of netscape signing tool correctly recognizes the codebase attribute, allows paths to be expressed for the class and src attributes instead of filenames only, processes link tags and parses html correctly, and offers clearer error
messages.
...a value of -1 suppresses most
messages, but not error
messages.
... outfile name of a file to which output and error
messages will be redirected.
SpiderMonkey Internals
a look at the places where jsshell.msg is used in js.cpp shows how error
messages can be handled in jsapi applications.
... these
messages can be localized at compile time by replacing the .msg file; or, with a little modification to the source, at run time.
... js.msg spidermonkey error
messages.
Introduction to the JavaScript shell
-w, --warnings enables warning
messages.
... -w, --nowarnings disables warning
messages.
...for example, if you want to display a
message when line 6 of a function, dosomething() is executed, you can enter the following: trap(dosomething, line2pc(dosomething, 6), "print('line 6!\n')"); note: when a trap is set, the corresponding bytecode in the program is replaced with a trap bytecode until you use untrap() to remove the trap.
JSErrorFormatString
this article covers features introduced in spidermonkey 17 represent error
message and type.
... argcount uint16_t the number of arguments to expand in the formatted error
message.
... description jserrorformatstring is a struct to represent error
message and type, returned by js_reporterrornumber function.
JS_SetErrorReporter
callback syntax typedef void (* jserrorreporter)(jscontext *cx, const char *
message, jserrorreport *report); name type description cx jscontext * the context in which the error happened.
...
message const char * an error
message.
...tted: class myrequest { public: void execute() { auto rt = js_newruntime(memlimit); js_setruntimeprivate(rt, this); js_seterrorreporter(rt, &myrequest::dispatcherror); // execute js } void onerror(const std::string& error) { // handle error } static void dispatcherror( jscontext* ctx, const char*
message, jserrorreport* report) { auto rt = js_getruntime(ctx); auto rt_userdata = js_getruntimeprivate(rt); if (rt_userdata) { auto req = static_cast<myrequest*>(rt_userdata); req->onerror(
message); } } }; see also mxr id search for js_geterrorreporter mxr id search for js_seterrorreporter bug 1277278 - js_seterrorreporter...
WebReplayRoadmap
seeing
messages in the console provides a simple and intuitive view into the order in which events have happened.
... in a recording tab, however, this will update the console with
messages for every time the location has ever been hit.
... these
messages will show up on the timeline and can be seeked to in the same way as other console
messages.
XForms Accessibility
alert this
message will be shown when the form control cannot properly bind to instance data or when the instance data value is invalid or out of the specified range of selectable values (see the spec, the docs).
...
message used in combination with event listeners to display a
message to the user when the specified event occurs (see the spec, the docs).
... the
message element has role_alert role.
nsIAlertsService
1.0 66 introduced gecko 1.7 inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) by default a
message is displayed in a small window that slides up from the bottom of the screen, holds there for a few seconds, then slides down.
...ice); try { alertsservice.showalertnotification("chrome://mozapps/skin/downloads/downloadicon.png", "alert title", "alert text goes here.", false, "", null, ""); } catch (e) { // this can fail on mac os x } listening for callbacks you can be notified when the notification window disappears or the user clicks on the
message by passing an object implementing nsiobserver as the alertlistener parameter: var listener = { observe: function(subject, topic, data) { alert("subject=" + subject + ", topic=" + topic + ", data=" + data); } } var alertsservice = components.classes["@mozilla.org/alerts-service;1"].
...strecentwindow('navigator:firefox'), 'focus firefox', 'will now focus fireox and then focus the tab'); } else if (atopic == 'alertshow') { console.log('just showed notification'); } else if (atopic == 'alertfinished') { console.log('just alertfinished') } } }; as.showalertnotification('chrome://branding/content/icon64.png', 'stackoverflow - new
messages', 'there are ## new
messages.
nsIAuthPrompt
text the text of the prompt
message dialog box.
... text the text of the prompt
message dialog box.
... text the text of the prompt
message dialog box.
nsIConsoleListener
xpcom/base/nsiconsolelistener.idlscriptable this interface allows you to listen for
messages sent to the console.
... inherits from: nsisupports last changed in gecko 1.7 method overview void observe(in nsiconsole
message a
message); methods observe() called by the nsiconsoleservice when a
message is posted to the console.
... listeners must first be attached to the service using nsiconsoleservice.registerlistener() void observe( in nsiconsole
message a
message ); parameters a
message the nsiconsole
message being posted.
nsIDBFolderInfo
as a service: var dbfolderinfo = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsidbfolderinfo); method overview long andflags(in long flags); void changeexpungedbytes(in long delta); void changenum
messages(in long delta); void changenumunread
messages(in long delta); boolean getbooleanproperty(in string propertyname, in boolean defaultvalue); void getcharacterset(out acstring charset, out boolean overriden); void getcharactersetoverride(out boolean charactersetoverride); obsolete since gecko 1.8 string getcharptrcharact...
...key expungedbytes long flags long folderdate unsigned long foldername string foldersize unsigned long highwater nsmsgkey imaphierarchyseparator wchar imaptotalpending
messages long imapuidvalidity long imapunreadpending
messages long knownartsset string locale astring mailboxname astring num
messages long numunread
messages long sortorde...
...gs() long andflags( in long flags ); parameters flags missing description return value missing description exceptions thrown missing exception missing description changeexpungedbytes() void changeexpungedbytes( in long delta ); parameters delta missing description exceptions thrown missing exception missing description changenum
messages() void changenum
messages( in long delta ); parameters delta missing description exceptions thrown missing exception missing description changenumunread
messages() void changenumunread
messages( in long delta ); parameters delta missing description exceptions thrown missing exception missing description getbooleanproperty() boole...
nsIDocShell
void setcurrenturi(in nsiuri auri); void suspendrefreshuris(); void tabtotreeowner(in boolean forward, out boolean tookfocus); attributes attribute type description allowauth boolean certain dochshells (like the
message pane) should not throw up auth dialogs because it can act as a password trojan.
... app_type_mail 1 this is the value of the apptype attribute used by thunderbird and seamonkey to indicate that email
messages are displayed in this window.
... app_type_editor 2 this is the value of the apptype attribute used by thunderbird and seamonkey to indicate that email
messages or web pages are composed in this window.
nsIFaviconService
this might be done at any time on a timer, so you should not let the
message loop run between calls or your icon may get deleted.
...this will make the notifications more efficient since the icon will already have data when the set favicon observer
messages goes out.
...this will make the notifications more efficient since the icon will already have data when the set favicon observer
messages goes out.
nsIMsgCompFields
« xpcom api reference summary the nsimsgcompfields interface provides properties for an composition of an outgoing
message.
...(bug 68784)
messageid char * needtocheckcharset prbool indicates whether we need to check if the current documentcharset can represent all the characters in the
message body.
... header methods void setheader(char* name, char* value); references this interface is the type of the following properties: nsimsgcompose.compfields, nsimsgcomposeparams.composefields this interface is passed as an argument to the following methods: nsimsgcomposesecure.begincryptoencapsulation, nsimsgcomposesecure.requirescryptoencapsulation, nsimsgsend.createandsend
message, nsimsgsend.send
messagefile, nsismimejshelper.getnocertaddresses, nsismimejshelper.getrecipientcertsinfo ...
nsIToolkit
widget/public/nsitoolkit.idlnot scriptable this interface is used to initialize a
message pump.
...void init( in prthread athread ); parameters athread the thread passed in runs the
message pump.
... null can be passed in, in which case a new thread gets created and a
message pump will run in that thread.
nsIWebSocketChannel
received
messages are fed to the socket listener as they arrive.
... sendbinarymsg() sends a binary
message to the websocket peer.
... sendmsg() sends a text
message to the websocket peer.
nsMsgFolderFlagType
const nsmsgfolderflagtype sentmail = 0x00000200; /// whether this is the folder in which unfinised, unsent
messages are saved for later editing.
... const nsmsgfolderflagtype drafts = 0x00000400; /// whether this is the folder in which
messages are queued for later delivery.
...flagtype createdoffline = 0x02000000; /// this imap folder cannot have children :-( const nsmsgfolderflagtype imapnoinferiors = 0x04000000; /// this folder configured for offline use const nsmsgfolderflagtype offline = 0x08000000; /// this folder has offline events to play back const nsmsgfolderflagtype offlineevents = 0x10000000; /// this folder is checked for new
messages const nsmsgfolderflagtype checknew = 0x20000000; /// this folder is for spam
messages const nsmsgfolderflagtype junk = 0x40000000; /// this folder is in favorites view const nsmsgfolderflagtype favorite = 0x80000000; /// special-use folders const nsmsgfolderflagtype specialuse = inbox|drafts|trash|sentmail| t...
nsPIPromptService
this is the
message text of the dialog.
...etitle
message the value is 3.
... this is the heading of the
message.
Weak reference
after all, the observable must send
messages to each observer, notifying it of the appropriate state changes.
... nsresult addobserver( nsiobserver* ); nsresult notifyobservers( nsi
message* ); // ...
... nsresult nsobservable::addobserver( nsiobserver* aobserver ) { mobserver = getter_addrefs( ns_getweakreference(aobserver) ); // ...or append this to the list of observers return ns_ok; } nsresult nsobservable::notifyobservers( nsi
message* a
message ) { nscomptr<nsiobserver> observer = do_queryreferent(mobserver); if ( observer ) observer->notice
message(a
message); else mobserver = 0; // or remove this observer from the list, he's gone away return ns_ok; } // ...
MailNews Protocols
imap,pop3, and nntp are "incoming" protocols, i.e., we retrieve
messages from a server, and represent them as folders to the user.
...the service classes usually have their own interface, but they also implement nsimsg
messageservice.
...the
message search code also has protocol-specific code to handle searching on the server, or local mailbox.
Main Windows
its main focus is on handling the folderpane, threadpane, and the
message preview sections shown above.
... mailoverlay.xul a really small overlay that only adds a few “new
message” and “new card” commands to the menus, along with their associated javascript.
...
messagewindow.xul
messagewindow.xul is shown when a
message is opened.
Styling the Folder Pane
hasunread
messages-true afolder.getnumunread(false) > 0 indicates that the folder (but not subfolders) has unread
messages.
... biffstate-biffstate afolder.biffstate == nsimsgfolder.nsmsgbiffstate_<name> indicates whether or not the folder has new
messages.
... new
messages-true afolder.hasnew
messages subfoldershaveunread
messages-true afolder.getnumunread(true) > afolder.getnumunread(false) indicates whether or not subfolders have unread
messages.
Set a logpoint - Firefox Developer Tools
logpoints print a
message to the console panel instead of pausing code execution.
... when execution hits a logpoint, the
message you have defined is logged to the console.
... you can make it easier to see the
message by opening a split console under the debugger.
Migrating from Firebug - Firefox Developer Tools
filter log
messages firebug offers two ways to filter log
messages, via the options menu and via the filter buttons within the toolbar.
... persist logs in firebug you can click the persist button within the toolbar to keep the logged
messages between page navigations and reloads.
... server logs firebug extensions like firephp allow to log server-side
messages to the firebug console.
Network request details - Firefox Developer Tools
the tabs at the top of this pane enable you to switch between the following pages: headers
messages (only for websocket items) cookies params response cache timings security (only for secure pages) stack trace (only when the request has a stack trace, e.g.
...(see referrer-policy for a description of possible values) blocking: if the request is to a site that is associated with a known tracker, an icon and a
message are shown; otherwise, this field is not shown.
...if the response is html, js, or css, it will be shown as text: if the response is json, it will be shown as an inspectable object: if the response is an image, the tab displays a preview: for network responses that are initiated by a websocket connection, the details pane shows any associated
messages.
Work with animations - Firefox Developer Tools
you'll get a
message of "all animation properties are optimized." the expanded animation information now includes a lightning bolt icon next to the properties whose animation has been optimized via the compositor.
...you'll get a
message of "some animation properties are optimized." properties whose animation is not being optimized, but could be if you improved your code, are now given a dotted underline — see transform in the screenshot below.
...in this case, the
message is "animations of 'transform' cannot be run on the compositor when geometric properties are animated on the same element at the same time." edit @keyframes any @keyframes rules associated with the currently selected element are displayed in the rules view and are editable: edit timing functions when you create a css animation you can specify a timing function: this determines the rate at which the animation progresses.
AbstractWorker - Web APIs
this code snippet demonstrates the creation of a new worker using the worker() constructor; it also shows how to then send a
message to the worker.
... var myworker = new worker('worker.js'); first.onchange = function() { myworker.post
message([first.value, second.value]); console.log('
message posted to worker'); } the worker's code is loaded from the file "worker.js".
... this code assumes that there's an <input> element represented by first; an event handler for the change event is established so that when the user changes the value of first, a
message is posted to the worker to let it know.
Using the Beacon API - Web APIs
this code snippet is for the global context: function worker_send(url, data) { // create the worker object var myworker = new worker("worker-using.js"); // send the worker the url and data to beacon myworker.post
message([url, data]); // set up a
message handler to receive the success/fail
message from the worker myworker.on
message = function(event) { var msg = event.data; // log worker's send status console.log("worker reply: sendbeacon() status = " + msg); }; } this code snippet is for the worker (worker-using.js): on
message = function(event) { var msg = event.data; // split the url an...
...d data from the
message var url = msg[0]; var data = msg[1]; // if the browser supports worker sendbeacon(), then send the beacon; otherwise // return failure
message to the global context if (self.navigator.sendbeacon) { var status = self.navigator.sendbeacon(url, data); post
message(status ?
... "success" : "fail"); } else { post
message("worker: self.navigator.sendbeacon is unsupported"); } } see also beacon api (overview) beacon standard beacon caniuse data ...
CloseEvent - Web APIs
1007 invalid frame payload data the endpoint is terminating the connection because a
message was received that contained inconsistent data (e.g., non-utf-8 data within a text
message).
... 1008 policy violation the endpoint is terminating the connection because it received a
message that violates its policy.
... 1009
message too big the endpoint is terminating the connection because a data frame was received that is too large.
console.assert() - Web APIs
the console.assert() method writes an error
message to the console if the assertion is false.
... syntax console.assert(assertion, obj1 [, obj2, ..., objn]); console.assert(assertion, msg [, subst1, ..., substn]); // c-like
message formatting parameters assertion any boolean expression.
... if the assertion is false, the
message is written to the console.
CryptoKey - Web APIs
possible values for array elements are: "encrypt": the key may be used to encrypt
messages.
... "decrypt": the key may be used to decrypt
messages.
... "sign": the key may be used to sign
messages.
Element.innerHTML - Web APIs
example this example uses innerhtml to create a mechanism for logging
messages into a box on a web page.
... { var logelem = document.queryselector(".log"); var time = new date(); var timestr = time.tolocaletimestring(); logelem.innerhtml += timestr + ": " + msg + "<br/>"; } log("logging mouse events inside this container..."); the log() function creates the log output by getting the current time from a date object using tolocaletimestring(), and building a string with the timestamp and the
message text.
... then the
message is appended to the box with the class "log".
GlobalEventHandlers.onerror - Web APIs
window.onerror window.onerror = function(
message, source, lineno, colno, error) { ...
... }; function parameters:
message: error
message (string).
... window.onerror = function (msg, url, lineno, columnno, error) { var string = msg.tolowercase(); var substring = "script error"; if (string.indexof(substring) > -1){ alert('script error: see browser console for detail'); } else { var
message = [ '
message: ' + msg, 'url: ' + url, 'line: ' + lineno, 'column: ' + columnno, 'error object: ' + json.stringify(error) ].join(' - '); alert(
message); } return false; }; when using the inline html markup (<body onerror="alert('an error occurred')">), the html specification requires arguments passed to onerror to be named event, source, lineno, colno, ...
HTMLKeygenElement - Web APIs
validation
message read only is a domstring representing a localized
message that describes the validation constraints that the control does not satisfy (if any).
... setcustomvalidity(in domstring error) void sets a custom validity
message for the element.
... if this
message is not the empty string, then the element is suffering from a custom validity error, and does not validate.
HTMLOutputElement - Web APIs
htmloutputelement.validation
messageread only a domstring representing a localized
message that describes the validation constraints that the control does not satisfy (if any).
... htmloutputelement.setcustomvalidity() sets a custom validity
message for the element.
... if this
message is not the empty string, then the element is suffering from a custom validity error, and does not validate.
HTMLSelectElement - Web APIs
htmlselectelement.validation
messageread only a domstring representing a localized
message that describes the validation constraints that the control does not satisfy (if any).
... htmlselectelement.setcustomvalidity() sets the custom validity
message for the selection element to the specified
message.
... it adds the autofocus, form, required, labels, selectedoptions, willvalidate, validity and validation
message properties.
Checking when a deadline is due - Web APIs
if not, we drop a
message into our developer notifications pane (see the bottom left of the app ui) to tell the user what is going on, and exit out of the function.
...the next few lines open the database transaction and provide
messages to notify the user if this was successful or failed.then an objectstore is created into which the new item is added.
... request.onsuccess = function(event) { note.innerhtml += '<li>new item added to database.</li>'; title.value = ''; hours.value = null; minutes.value = null; day.value = 01; month.value = 'january'; year.value = 2020; }; } this next section creates a log
message to say the new item addition is successful, and resets the form so it's ready for the next task to be entered.
InterventionReportBody - Web APIs
message a string containing a human-readable description of the intervention, including information such how the intervention could be avoided.
... this typically matches the
message a browser will display in its devtools console when an intervention is imposed, if one is available.
... examples let options = { types: ['intervention'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; console.log(firstreport.type); // intervention console.log(firstreport.body.id); console.log(firstreport.body.
message); console.log(firstreport.body.sourcefile); console.log(firstreport.body.linenumber); console.log(firstreport.body.columnnumber); }, options); specifications specification status comment reporting apithe definition of 'interventionreportbody' in that specification.
MediaDevices.getUserMedia() - Web APIs
the error is an object of type overconstrainederror, and has a constraint property whose string value is the name of a constraint which was impossible to meet, and a
message property containing a human-readable string explaining the problem.
...var constraints = { audio: true, video: { width: 1280, height: 720 } }; navigator.mediadevices.getusermedia(constraints) .then(function(mediastream) { var video = document.queryselector('video'); video.srcobject = mediastream; video.onloadedmetadata = function(e) { video.play(); }; }) .catch(function(err) { console.log(err.name + ": " + err.
message); }); // always check for errors at the end.
... video.src = window.url.createobjecturl(stream); } video.onloadedmetadata = function(e) { video.play(); }; }) .catch(function(err) { console.log(err.name + ": " + err.
message); }); frame rate lower frame-rates may be desirable in some cases, like webrtc transmissions with bandwidth restrictions.
MediaKeySession - Web APIs
the mediakeysession interface of the encryptedmediaextensions api represents a context for
message exchange with a content decryption module (cdm).
... mediakeysession.on
message sets the eventhandler called when the content decryption module has generated a
message for the session.
... mediakeysession.update() returns a promise after loading
messages and licenses to the cdm.
PaymentDetailsUpdate - Web APIs
error optional a domstring specifying an error
message to present to the user.
... when calling updatewith(), including error in the updated data causes the user agent to display the text as a general error
message.
... shippingaddresserrors optional an addresserrors object which includes an error
message for each property of the shipping address that could not be validated.
PaymentRequestUpdateEvent.updateWith() - Web APIs
error optional a domstring specifying an error
message to present to the user.
... when calling updatewith(), including error in the updated data causes the user agent to display the text as a general error
message.
... shippingaddresserrors optional an addresserrors object which includes an error
message for each property of the shipping address that could not be validated.
PaymentResponse.retry() - Web APIs
error can be provided all by itself to provide only a generic error
message, or in concert with the other properties to serve as an overview while other properties' values gude the user to errors in specific fields in the payment form.
... payer optional a payererrors compliant object which provides appropriate error
messages for any of the fields describing the payer which failed validation.
... shippingaddress optional an addresserrors object which contains error
messages for any of the fields in the shipping address that failed validation.
PushEvent.data - Web APIs
the data read-only property of the pushevent interface returns a reference to a push
messagedata object containing data sent to the pushsubscription.
... syntax var mypushdata = pushevent.data; value a push
messagedata object.
... self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var
message = data.
message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = new notification(title, { body:
message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html')...
PushEvent - Web APIs
the pushevent interface of the push api represents a push
message that has been received.
...additional properties: pushevent.data read only returns a reference to a push
messagedata object containing data sent to the pushsubscription.
... self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var
message = data.
message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = new self.notification(title, { body:
message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/someth...
PushManager.getSubscription() - Web APIs
(no live demo is available.) // we need the service worker registration to check for a subscription navigator.serviceworker.ready.then(function(serviceworkerregistration) { // do we already have a push
message subscription?
... serviceworkerregistration.pushmanager.getsubscription() .then(function(subscription) { // enable any ui which subscribes / unsubscribes from // push
messages.
...ed = false; if (!subscription) { // we aren’t subscribed to push, so set ui // to allow the user to enable push return; } // keep your server in sync with the latest subscriptionid sendsubscriptiontoserver(subscription); showcurlcommand(subscription); // set your ui to show they have subscribed for // push
messages pushbutton.textcontent = 'disable push
messages'; ispushenabled = true; }) .catch(function(err) { window.demo.debug.log('error during getsubscription()', err); }); }); specifications specification status comment push apithe definition of 'getsubscription()' in that specification.
RTCDataChannel.maxPacketLifeTime - Web APIs
the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a
message, as set when the data channel was created, or null.
... this limits how long the browser can continue to attempt to transmit and retransmit the
message before giving up.
... syntax var lifetime = adatachannel.maxpacketlifetime; value the number of milliseconds over which the browser may continue to attempt to transmit the
message until it either succeeds or gives up.
RTCDataChannel.onopen - Web APIs
the rtcdatachannel.onopen property is an eventhandler which specifies a function to be called when the open event is fired; this is a simple event which is sent when the data channel's underlying data transport—the link over which the rtcdatachannel's
messages flow—is established or re-established.
...it then establishes an open event handler which updates some user interface elements to prepare them for being used to send
messages over the data channel.
... let dc = mypeerconnection.createdatachannel("
message channel"); dc.onopen = function(event) { let
messagebox = document.getelementbyid("
messagebox"); let sendbutton = document.getelementbyid("sendbutton");
messagebox.disabled = false;
messagebox.focus(); sendbutton.disabled = false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onopen' in that specification.
RTCError - Web APIs
constructor rtcerror() creates and returns a new rtcerror object initialized with the properties of the provided rtcerrorinit dictionary and, optionally, a string to use as the value of the error's
message property.
... datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdplinenumber; let err
message = error.
message; let alert
message = `a syntax error occurred interpreting line ${errline} of the sdp: ${err
message}`; showmyalert
message("data channel error", alert
message); } else { terminatemyconnection(); } }); if the error is an sdp syntax error—indicated by its errordetail property being sdp-syntax-error—, a
message string is constructed to present the error
message an...
...this
message is then displayed using a function called showmyalert
message(), which stands in for whatever output mechanism this code might use.
RTCPeerConnection: icecandidate event - Web APIs
this is a more reliable approach than looking at the individual ice
messages for one indicating that the ice session is finished.
... examples this example creates a simple handler for the icecandidate event that uses a function called send
message() to create and send a reply to the remote peer through the signaling server.
... first, an example using addeventlistener(): pc.addeventlistener("icecandidate", ev => { if (ev.candidate) { send
message({ type: "new-ice-candidate", candidate: event.candidate }); } }, false); you can also set the onicecandidate event handler property directly: pc.onicecandidate = ev => { if (ev.candidate) { send
message({ type: "new-ice-candidate", candidate: event.candidate }); } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'icecandidate' in that specification.
RTCPeerConnection: negotiationneeded event - Web APIs
pc.addeventlistener("negotiationneeded", ev => { pc.createoffer() .then(offer => return pc.setlocaldescription(offer)) .then(() => sendsignaling
message({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }, false); after creating the offer, the local end is configured by calling rtcpeerconnection.setlocaldescription(); then a signaling
message is created and sent to the remote peer through the signaling server, to share that offer with the other peer.
... the other peer should recognize this
message and follow up by creating its own rtcpeerconnection, setting the remote description with setremotedescription(), and then creating an answer to send back to the offering peer.
... you can also set an event handler for the negotiationneeded event by assigning the event handler function to the rtcpeerconnection.onnegotiationneeded property: pc.onnegotiationneeded = ev => { pc.createoffer() .then(offer => return pc.setlocaldescription(offer)) .then(() => sendsignaling
message({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }; for a more detailed example, see starting negotiation in signaling and video calling.
ServiceWorkerGlobalScope.onpush - Web APIs
the serviceworkerglobalscope.onpush event of the serviceworkerglobalscope interface is fired whenever a push
message is received by a service worker via a push server.
...the data payload of the push
message is available in the event object's data property (pushevent.data, which contains a push
messagedata object.) self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var
message = data.
message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = ...
...new notification(title, { body:
message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'onpush' in that specification.
ServiceWorkerGlobalScope: push event - Web APIs
the push event is sent to a service worker's global scope (represented by the serviceworkerglobalscope interface) when the service worker has received a push
message.
... bubbles no cancelable no interface pushevent event handler property onpush example this example sets up a handler for push events that takes json data, parses it, and dispatches the
message for handling based on information contained within the
message.
... self.addeventlistener("push", event => { let
message = event.data.json(); switch(
message.type) { case "init": doinit(); break; case "shutdown": doshutdown(); break; } }, false); specifications specification status comment push apithe definition of 'push' in that specification.
SharedWorker.port - Web APIs
the port property of the sharedworker interface returns a
messageport object used to communicate and control the shared worker.
... syntax myworker.port; value a
messageport object.
...multiple scripts can then access the worker through a
messageport object accessed using the sharedworker.port property — the port is started using its start() method: var myworker = new sharedworker('worker.js'); myworker.port.start(); for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification.
SpeechRecognitionError - Web APIs
the speechrecognitionerror interface of the web speech api represents error
messages from the recognition service.
... speechrecognitionerror.
message read only returns a
message describing the error in more detail.
... examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.
message); } ...
SpeechRecognitionErrorEvent - Web APIs
the speechrecognitionerrorevent interface of the web speech api represents error
messages from the recognition service.
... speechrecognitionerrorevent.
message read only returns a
message describing the error in more detail.
... examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.
message); } specifications specification status comment web speech apithe definition of 'speechrecognitionerrorevent' in that specification.
SubtleCrypto.generateKey() - Web APIs
possible values for array elements are: encrypt: the key may be used to encrypt
messages.
... decrypt: the key may be used to decrypt
messages.
... sign: the key may be used to sign
messages.
SubtleCrypto.importKey() - Web APIs
possible array values are: encrypt: the key may be used to encrypt
messages.
... decrypt: the key may be used to decrypt
messages.
... sign: the key may be used to sign
messages.
SubtleCrypto.unwrapKey() - Web APIs
possible values of the array are: encrypt: the key may be used to encrypt
messages.
... decrypt: the key may be used to decrypt
messages.
... sign: the key may be used to sign
messages.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
return value a domstring that contains diagnostic
messages, warning
messages, and other information about the last compile operation.
... examples checking compilation
messages /* load shader source code.
...*/ gl.compileshader(shader); var
message = gl.getshaderinfolog(shader); if (
message.length > 0) { /*
message may be an error or a warning */ throw
message; } specifications specification status comment webgl 1.0the definition of 'getshaderinfolog' in that specification.
WebRTC API - Web APIs
message a
message has been received on the data channel.
... the event is of type
messageevent.
... see also mediadevices mediastreamevent mediastreamconstraints mediastreamtrack
messageevent mediastream media capture and streams api firefox multistream and renegotiation for jitsi videobridge peering through the webrtc fog with socketpeer inside the party bus: building a web app with multiple live video streams + interactive graphics web media technologies ...
Window.setImmediate() - Web APIs
the feature can be emulated in a few different ways: post
message can be used to trigger an immediate but yielding callback.
... do note that internet explorer 8 includes a synchronous version of post
message, which means it cannot be used as a fallback.
...
messagechannel can be used reliably inside of web workers whereas the semantics of post
message mean it cannot be used there.
WorkerGlobalScope.dump() - Web APIs
the dump() method of the workerglobalscope interface allows you to write a
message to stdout — i.e.
... syntax dump('my
message\n'); parameters a domstring containing the
message you want to send.
... next, run a worker containing the following line: dump('test\n'); this should result in a "test"
message being output to the terminal.
WritableStream.WritableStream() - Web APIs
it then calls a function called send
message(), passing the newly created stream and a string.
... const list = document.queryselector('ul'); function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sin...
...w = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); send
message("hello, world.", writablestream); you can find the full code in our simple writer example.
WritableStream.getWriter() - Web APIs
it then calls a function called send
message(), passing the newly created stream and a string.
... const list = document.queryselector('ul'); function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sin...
...w = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); send
message("hello, world.", writablestream); you can find the full code in our simple writer example.
WritableStream - Web APIs
it then calls a function called send
message(), passing the newly created stream and a string.
... const list = document.queryselector('ul'); function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sin...
...w = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); send
message("hello, world.", writablestream); you can find the full code in our simple writer example.
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
it then calls a function called send
message(), passing the newly created stream and a string.
... const list = document.queryselector('ul'); function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sin...
...w = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); send
message("hello, world.", writablestream); you can find the full code in our simple writer example.
WritableStreamDefaultWriter.close() - Web APIs
it then calls a function called send
message(), passing the newly created stream and a string.
... const list = document.queryselector('ul'); function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sin...
...w = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); send
message("hello, world.", writablestream); you can find the full code in our simple writer example.
WritableStreamDefaultWriter.write() - Web APIs
it then calls a function called send
message(), passing the newly created stream and a string.
... const list = document.queryselector('ul'); function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sin...
...w = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); send
message("hello, world.", writablestream); you can find the full code in our simple writer example.
WritableStreamDefaultWriter - Web APIs
it then calls a function called send
message(), passing the newly created stream and a string.
... const list = document.queryselector('ul'); function send
message(
message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(
message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chun...
...16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += decoded; resolve(); }); }, close() { var listitem = document.createelement('li'); listitem.textcontent = "[
message received] " + result; list.appendchild(listitem); }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); send
message("hello, world.", writablestream); you can find the full code in our simple writer example.
Alerts - Accessibility
tact details</legend> <label for="name">your name (required):</label> <input name="name" id="name" aria-required="true"/> <br /> <label for="email">e-mail address (required):</label> <input name="email" id="email" aria-required="true"/> <br /> <label for="website">website (optional):</label> <input name="website" id="website"/> </fieldset> <label for="
message">please enter your
message (required):</label> <br /> <textarea name="
message" id="
message" rows="5" cols="80" aria-required="true"></textarea> <br /> <input type="submit" name="submit" value="send
message"/> <input type="reset" name="reset" value="reset form"/> </form> checking for validity and notifying the user form validations consists of several steps: chec...
...this method takes three parameters: the id of the input that is to be validated, the term to search for to ensure validity, and the error
message to be inserted into the alert.
... it will call the addalert function to add the alert with the provided error
message.
Understandable - Accessibility
when an error is detected, an intuitive error
message should be shown next to the form input that is at fault to help the user correct their inputs.
...such suggestions should be displayed usefully in context, just like error
messages (see 3.3.1).
... checking data — as covered in 3.3.1, a combination of client-side and server-side validation should be used to detect errors and display helpful
messages to the user to allow them to correct their inputs.
font - CSS: Cascading Style Sheets
if font is specified as a system keyword, it must be one of: caption, icon, menu,
message-box, small-caption, status-bar.
...
message-box the system font used in dialog boxes.
...<'font-family'> ] | caption | icon | menu |
message-box | small-caption | status-barwhere <font-variant-css21> = [ normal | small-caps ] examples setting font properties /* set the font size to 12px and the line height to 14px.
<input type="text"> - HTML: Hypertext Markup Language
it should be a word or short phrase that demonstrates the expected type of data, rather than an explanatory
message.
...n> </div> </form> div { margin-bottom: 10px; position: relative; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; } this renders like so: if you try to submit the form with no search term entered into it, the browser will show an error
message.
...ton> </div> </form> div { margin-bottom: 10px; position: relative; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; } this renders like so: if you try to submit the form with less than 4 characters, you'll be given an appropriate error
message (which differs between browsers).
Basics of HTTP - HTTP
http is an extensible protocol that relies on concepts like resources and uniform resource identifiers (uris), simple
message structure, and client-server communication flow.
... http
messages http
messages transmitted during requests or responses have a very clear structure.
... frame and
message structure in http/2 http/2 encapsulates and represents http/1.x
messages in a binary frame.
Connection management in HTTP/1.x - HTTP
several
messages must be exchanged between the client and the server.
...without knowing these, important
messages may be delayed behind unimportant ones.
...theoretically, performance could also be improved if two http requests were to be packed into the same tcp
message.
Expect - HTTP
expect: 100-continue directives 100-continue informs recipients that the client is about to send a (presumably large)
message body in this request and wishes to receive a 100 (continue) interim response.
... examples large
message body a client sends a request with a expect header and waits for the server to respond before sending the
message body.
... put /somewhere/fun http/1.1 host: origin.example.com content-type: video/h264 content-length: 1234567890987 expect: 100-continue the server now checks the request headers and may respond with a 100 (continue) response to instruct the client to go ahead and send the
message body, or it will send a 417 (expectation failed) status if any of the expectations cannot be met.
Host - HTTP
a host header field must be sent in all http/1.1 request
messages.
... a 400 (bad request) status code may be sent to any http/1.1 request
message that lacks a host header field or that contains more than one.
... examples host: developer.cdn.mozilla.net specifications specification title rfc 7230, section 5.4: host hypertext transfer protocol (http/1.1):
message syntax and routing ...
Transfer-Encoding - HTTP
transfer-encoding is a hop-by-hop header, that is applied to a
message between two nodes, not to a resource itself.
... when present on a response to a head request that has no body, it indicates the value that would have applied to the corresponding get
message.
...a chunked response looks like this: http/1.1 200 ok content-type: text/plain transfer-encoding: chunked 7\r\n mozilla\r\n 9\r\n developer\r\n 7\r\n network\r\n 0\r\n \r\n specifications specification title rfc 7230, section 3.3.1: transfer-encoding hypertext transfer protocol (http/1.1):
message syntax and routing ...
AggregateError() constructor - JavaScript
syntax new aggregateerror(errors[,
message]) parameters errors an iterable of errors, may not actually be error instances.
...
messageoptional an optional human-readable description of the aggregate error.
... examples creating an aggregateerror try { throw new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.
message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] } specifications specification promise.anythe definition of 'aggregateerror()' in that specification.
EvalError - JavaScript
instance properties evalerror.prototype.
message error
message.
... although ecma-262 specifies that evalerror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.
message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'evalerror' in that...
Promise.prototype.then() - JavaScript
print helpful
messages about how the code in this section will be run // before the string is actually processed by the mocked asynchronous code in the // previous then block.
... promise.resolve() .then(() => { // makes .then() return a rejected promise throw new error('oh no!'); }) .then(() => { console.log('not called.'); }, error => { console.error('onrejected function called: ' + error.
message); }); in all other cases, a resolving promise is returned.
... promise.resolve() .then(() => { // makes .then() return a rejected promise throw new error('oh no!'); }) .catch(error => { console.error('onrejected function called: ' + error.
message); }) .then(() => { console.log("i am always called even if the prior then's promise rejects"); }); you can also use chaining to implement one function with a promise-based api on top of another such function.
Promise - JavaScript
}, 250) }) myfirstpromise.then((success
message) => { // success
message is whatever we passed in the resolve(...) function above.
... // it doesn't have to be a string, but if it is only a succeed
message, it probably will be.
..." + success
message) }); example with diverse situations this example shows diverse techniques for using promise capabilities, and diverse situations that can occur.
Proxy - JavaScript
for example, this code defines a simple target with just two properties, and an even simpler handler with no properties: const target = {
message1: "hello",
message2: "everyone" }; const handler1 = {}; const proxy1 = new proxy(target, handler1); because the handler is empty, this proxy behaves just like the original target: console.log(proxy1.
message1); // hello console.log(proxy1.
message2); // everyone to customise the proxy, we define functions on the handler object: const target = {
message1: "hello",
message2: "everyone" ...
...the very simple trap in handler2 above redefines all property accessors: console.log(proxy2.
message1); // world console.log(proxy2.
message2); // world with the help of the reflect class we can give some accessors the original behavior and redefine others: const target = {
message1: "hello",
message2: "everyone" }; const handler3 = { get: function (target, prop, receiver) { if (prop === "
message2") { return "world"; } return reflect.get(...arguments); }, }; const pr...
...oxy3 = new proxy(target, handler3); console.log(proxy3.
message1); // hello console.log(proxy3.
message2); // world constructor proxy() creates a new proxy object.
ReferenceError() constructor - JavaScript
syntax new referenceerror([
message[, filename[, linenumber]]]) parameters
message optional optional.
... examples catching a referenceerror try { let a = undefinedvariable } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.
message) // "undefinedvariable is not defined" console.log(e.name) // "referenceerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 6 console.log(e.stack) // "@scratchpad/2:2:7\n" } creating a referenceerror try { throw new referenceerror('h...
...ello', 'somefile.js', 10) } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.
message) // "hello" console.log(e.name) // "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
SharedArrayBuffer - JavaScript
description allocating and sharing memory to share memory using sharedarraybuffer objects from one agent in the cluster to another (an agent is either the web page’s main program or one of its web workers), post
message and structured cloning is used.
... var sab = new sharedarraybuffer(1024); worker.post
message(sab); updating and synchronizing shared memory with atomic operations shared memory can be created and updated simultaneously in workers or the main thread.
...with a few security measures, post
message() will no longer throw for sharedarraybuffer objects and shared memory across threads will be available: as a baseline requirement, your document needs to be in a secure context.
SyntaxError - JavaScript
instance properties syntaxerror.prototype.
message error
message.
... although ecma-262 specifies that syntaxerror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.
message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 10); } catch (e) { console.error(e instanceof syntaxerror); // true console.error(e.
message); // hello console.error(e.name); // syn...
TypeError() constructor - JavaScript
syntax new typeerror([
message[, filename[, linenumber]]]) parameters
message optional optional.
...the line number of the code that caused the exception examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.
message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // tru...
...e console.log(e.
message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
URIError() constructor - JavaScript
syntax new urierror([
message[, filename[, linenumber]]]) parameters
message optional optional.
... examples catching an urierror try { decodeuricomponent('%') } catch (e) { console.log(e instanceof urierror) // true console.log(e.
message) // "malformed uri sequence" console.log(e.name) // "urierror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating an urierror try { throw new urierror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof urierro...
...r) // true console.log(e.
message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
WebAssembly.CompileError - JavaScript
instance properties webassembly.compileerror.prototype.
message error
message.
... although ecma-262 specifies that urierror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... examples creating a new compileerror instance the following snippet creates a new compileerror instance, and logs its details to the console: try { throw new webassembly.compileerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof compileerror); // true console.log(e.
message); // "hello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly jav...
WebAssembly.LinkError - JavaScript
instance properties webassembly.linkerror.prototype.
message error
message.
... although ecma-262 specifies that urierror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... examples creating a new linkerror instance the following snippet creates a new linkerror instance, and logs its details to the console: try { throw new webassembly.linkerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof linkerror); // true console.log(e.
message); // "hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javasc...
WebAssembly.Module.exports() - JavaScript
examples using exports the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compilestreaming() method and then sends it to a worker using post
message().
... var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.post
message(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; on
message = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); var exports = webassembly.module.exports(mod); console.log(exports[0]); }; the exports[0] output looks like this: { name: "exported_func", kind: "function" } specifications specification webassemb...
WebAssembly.Module - JavaScript
examples sending a compiled module to a worker the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compilestreaming() method and then sends the resulting module instance to a worker using post
message().
... var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.post
message(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; on
message = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification.
WebAssembly.RuntimeError - JavaScript
instance properties webassembly.runtimeerror.prototype.
message error
message.
... although ecma-262 specifies that urierror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
... examples creating a new runtimeerror instance the following snippet creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.
message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly jav...
switch - JavaScript
take a look at this example: const action = 'say_hello'; switch (action) { case 'say_hello': let
message = 'hello'; console.log(
message); break; case 'say_hi': let
message = 'hi'; console.log(
message); break; default: console.log('empty action received.'); break; } this example will output the error uncaught syntaxerror: identifier '
message' has already been declared which you were not probably expecting.
... this is because the first let
message = 'hello'; conflicts with second let statement let
message = 'hi'; even they're within their own separate case clauses case 'say_hello': and case 'say_hi':.
... we can easily fix this by wrapping our case clauses with brackets: const action = 'say_hello'; switch (action) { case 'say_hello': { // added brackets let
message = 'hello'; console.log(
message); break; } // added brackets case 'say_hi': { // added brackets let
message = 'hi'; console.log(
message); break; } // added brackets default: { // added brackets console.log('empty action received.'); break; } // added brackets } this code will now output hello in the console as it should, without any errors at all.
try...catch - JavaScript
openmyfile(); try { // tie up a resource writemyfile(thedata); } finally { closemyfile(); // always close the resource } examples nested try-blocks first, let's see what happens with this: try { try { throw new error('oops'); } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.
message); } // output: // "finally" // "outer" "oops" now, if we already caught the exception in the inner try-block by adding a catch-block try { try { throw new error('oops'); } catch (ex) { console.error('inner', ex.
message); } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.
message); } // output: // "inner" "oops" // "finally" and now, let...
... try { try { throw new error('oops'); } catch (ex) { console.error('inner', ex.
message); throw ex; } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.
message); } // output: // "inner" "oops" // "finally" // "outer" "oops" any given exception will be caught only once by the nearest enclosing catch-block unless it is rethrown.
...this includes exceptions thrown inside of the catch-block: (function() { try { try { throw new error('oops'); } catch (ex) { console.error('inner', ex.
message); throw ex; } finally { console.log('finally'); return; } } catch (ex) { console.error('outer', ex.
message); } })(); // output: // "inner" "oops" // "finally" the outer "oops" is not thrown because of the return in the finally-block.
ui - Archive of obsolete content
this document can refer to bundled css and javascript files, and your main add-on can communicate with a frame script using
message passing.
...this document can refer to bundled css and javascript files, and your main add-on can communicate with a frame script using
message passing.
content/symbiont - Archive of obsolete content
usage a symbiont loads the specified contenturl and content scripts into a frame, and sets up an asynchronous channel between the content scripts and the add-on code, enabling them to exchange
messages using the port or post
message apis.
...it inherits functions to load and configure content scripts from the loader, and functions to exchange
messages between content scripts and the main add-on code from the worker.
platform/xpcom - Archive of obsolete content
this example implements a logging service that just appends a timestamp to all logged
messages.
..., xpcom users can access the service using the getservice() api: var { class } = require('sdk/core/heritage'); var { unknown, service } = require('sdk/platform/xpcom'); var { cc, ci } = require('chrome'); var contractid = '@me.org/timestampedlogger'; // implement the service by subclassing unknown var timestampedlogger = class({ extends: unknown, get wrappedjsobject() this, log: function(
message) { console.log(new date().gettime() + ' : ' +
message); } }); // register the service using the contract id var service = service({ contract: contractid, component: timestampedlogger }); // access the service using getservice() var wrapper = cc[contractid].getservice(ci.nsisupports); var logger = wrapper.wrappedjsobject; logger.log('a timestamped
message'); by default, services are r...
Getting started (cfx) - Archive of obsolete content
to build an xpi, just execute the command cfx xpi from the add-on's directory: cfx xpi you should see a
message like: exporting extension to my-addon.xpi.
...this means that if you want to see output from console.log()
messages, you'll have to tweak a setting.
Alerts and Notifications - Archive of obsolete content
var
message = 'another pop-up blocked'; var box = gbrowser.getnotificationbox(); var notification = box.getnotificationwithvalue('popup-blocked'); if (notification) { notification.label =
message; } else { var buttons = [{ label: 'button', accesskey: 'b', popup: 'blockedpopupoptions', callback: null }]; let priority = box.priority_warning_medium; box.appen...
...dnotification(
message, 'popup-blocked', 'chrome://browser/skin/info.png', priority, buttons); } ...
Examples and demos from articles - Archive of obsolete content
do something if current document has changed since last visit here is a possible example of how to show an alert
message when current document changes.
... do something if an external page has changed since last visit here is a possible example of how to show an alert
message when an external page changes.
JavaScript Debugger Service - Archive of obsolete content
jsd.scripthook = { onscriptcreated: function(script) { // your function here }, onscriptdestroyed: function(script) { // your function here } }; jsd.errorhook = { onerror: function(
message, filename, lineno, colno, flags, errnum, exc) { // your function here } }; // triggered when jsd.errorhook[onerror] returns false jsd.debughook = { onexecute: function(frame, type, rv) { // your function here } }; jsd.enumeratescripts({ // the enumeratescript method will be called once for every script jsd knows about enumeratescript: function(script) { // your function here } })...
... jsd.errorhook = { onerror: function(
message, filename, lineno, colno, flags, errnum, exc) { dump(
message + "@" + filename + "@" + lineno + "@" + colno + "@" + errnum + "\n"); // check
message type var jsdierrorhook = components.interfaces.jsdierrorhook; var
messagetype; if (flags & jsdierrorhook.report_error)
messagetype = "error"; if (flags & jsdierrorhook.report_warning)
messagetype = "warning"; if (flags & jsdierrorhook.report_exception)
messagetype = "uncaught-exception"; if (flags & jsdierrorhook.report_strict)
messagetype += "-strict"; dump(
messagetype + "\n"); return false; // trigger debugho...
Miscellaneous - Archive of obsolete content
these properties can be accessed from javascript in the following manner: var common = { _bundle: components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice) .createbundle("chrome://myext/locale/myext.properties"), getlocalized
message: function(msg) { return this._bundle.getstringfromname(msg); } }; alert(common.getlocalized
message("invalid.url")) another similar alternative (using both getstringfromname and formatstringfromname), is: var fcbundle = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice) .createbu...
...ndle("chrome://myext/locale/myext.properties"); function getstr(msg, args){ //get localised
message if (args){ args = array.prototype.slice.call(arguments, 1); return fcbundle.formatstringfromname(msg,args,args.length); } else { return fcbundle.getstringfromname(msg); } } /* usage */ alert(getstr("invalid.url", "http://bad/url/", "3")); //for
message with parameters alert(getstr("invalid.url")); //for
message without parameters getting postdata of a webpage first, you need to get the browser you want, and its historysession.
How to convert an overlay extension to restartless - Archive of obsolete content
st = components.constructor("@mozilla.org/xmlextras/xmlhttprequest;1", "nsixmlhttprequest"); here's how to load a file using it: function loadfile(url,type,returnresult) { var request = new xmlhttprequest(); request.open("get", url, true); // async=true request.responsetype = type; request.onerror = function(event) { logerror
message("error attempting to load: " + url); returnresult(null); }; request.onload = function(event) { if (request.response) returnresult(request.response); else request.onerror(event); }; request.send(); } loadfile("chrome://myaddon/content/filename.ext",datatype,function(data) { /* do stuff with data */ }); note: when using xmlhttpreq...
...even though it says that the default type is "text", firefox will attempt to autodetect and fail, resulting in an error
message in the console.
Install Manifests - Archive of obsolete content
if any value matches the application's build parameters, it will be installed; if not, the user will get an appropriate error
message.
...if the add-on specified by the <em:id> tag is not installed or has an incompatible version, the extension manager will disable your extension and show the
message "requires additional items".
Appendix D: Loading Scripts - Archive of obsolete content
chromeworkers also have access to ctypes and a limited number of thread safe xpcom classes, but are otherwise limited to simple computation based on data passed via
messages and xmlhttprequests.
... disadvantages limited scoping: as data from the main thread may only be accessed via json
message passing, there are significant difficulties in performing many operations in worker scopes.
Local Storage - Archive of obsolete content
and then logging is done with any of the following methods, depending on the kind of
message being logged: this._logger.fatal("this is a fatal
message."); this._logger.error("this is an error
message."); this._logger.warn("this is a warning
message."); this._logger.info("this is an info
message."); this._logger.config("this is a config
message."); this._logger.debug("this is a debug
message."); this._logger.trace("this is a trace
message."); you can filter the output of the global log...
...this impacts performance and fills the log with useless
messages.
Observer Notifications - Archive of obsolete content
« previousnext » sometimes you need your code to send a
message to other parts of your code.
...but given that chrome is window-dependent and non-chrome objects are not, it's tricky to send a
message to the chrome.
XPCOM Objects - Archive of obsolete content
keeps track of how many times the * hello world
message has been shown.
... if (!this._singletonobj) { this._singletonobj =
messagecounter; } return this._singletonobj.queryinterface(aiid); } }; if we wanted a class that can be instantiated, instead of a singleton service, the factory would look like this: var counterfactory = { createinstance: function(aouter, aiid) { if (aouter != null) { throw cr.ns_error_no_aggregation; } return (new counter()).queryinterface(aiid); } }; the ins...
Session store API - Archive of obsolete content
ata when tabs are restored, you can install a listener like this: function myextensionhandlerestore(aevent) { var tab = event.originaltarget; /* the tab being restored */ var uri = tab.linkedbrowser.contentdocument.location; /* the tab's uri */ components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) .logstring
message("restoring tab: " + uri); }; document.addeventlistener("sstabrestoring", myextensionhandlerestore, false); simply replace the contents of the function myextensionhandlerestore() with whatever you need to do when the tab is restored.
... in this example, nsiconsoleservice is used to display a
message to the console.
Promises - Archive of obsolete content
a task example like the following: components.utils.import("resource://gre/modules/task.jsm"); task.spawn(function* () { var response = yield request("login", { username: user, password: password }); if (response.
messages) { try { yield publish({ username: user,
messages: response.
messages }); } catch (e) { self.reporterror("publication failed", e); } } }); can be converted to a pure promise-based equivalent as such: request("login", { username: user, password: password }) .then(response => { if (response.
messages) return publis...
...h({ username: user,
messages: response.
messages }); }) .then(null, (e) => { self.reporterror("publication failed", e); }); file io file io in add-ons should be done via the os.file api, which provides a simple, but powerful, interface for reading, writing, and manipulating both text and binary files.
Install.js - Archive of obsolete content
['classic', 'modern'] extpostinstall
message: null, // set to null for no post-install
message // --- editable items end --- profileinstall: true, silentinstall: false, install: function() { var jarname = this.extshortname + '.jar'; var profiledir = install.getfolder('profile', 'chrome'); // parse http arguments this.parsearguments(); // check if extension is already installed in profile if (file.exists(install.ge...
... // register skins for (var skin in this.extskinnames) { var regpath = 'skin/' + this.extskinnames[skin] + '/' + this.extshortname + '/'; install.registerchrome(install.skin | installtype, jarpath, regpath); } // perform install var err = install.performinstall(); if (err == install.success || err == install.reboot_needed) { if (!this.silentinstall && this.extpostinstall
message) { install.alert(this.extpostinstall
message); } } else { this.handleerror(err); return; } }, parsearguments: function() { // can't use string handling in install, so use if statement instead var args = install.arguments; if (args == 'p=0') { this.profileinstall = false; this.silentinstall = true; } else if (args == 'p=1') { this.profileinstall =...
Source code directories overview - Archive of obsolete content
it includes all the code for managing mail, reading newsgroup
messages, importing other mail formats, composing new
messages and so on.
...for example, if this code determines that the content is a mail
message, it looks up the appropriate listener (probably netscape messenger) and passes the mail
message to it for display.
Dehydra Function Reference - Archive of obsolete content
require() example require({strict:true, gczeal:2}) if (require().werror) print("werror is set") warning([code,] msg [, loc]) print a warning
message using the gcc warning mechanism.
... error(msg [, loc]) print an error
message using the gcc error mechanism.
popChallengeResponse - Archive of obsolete content
resultstring = crypto.popchallengeresponse("challengestring"); argument description "challengestring" a base-64 encoded cmmf popodeckeychallcontent
message.
... the resultstring will either be a base-64 encoded popodeckeyrespcontent
message, or one of the following error strings: error string description "error:invalidparameter:xxx" the parameter xxx was an invalid value.
Mozilla Crypto FAQ - Archive of obsolete content
also note that the nss developers are creating code for support of s/mime secure
messages; however full s/mime support within mozilla will require further development, and may not be available until after the mozilla 1.0 release.
... as noted above, the psm code implements ssl and (in the future) s/mime support for mozilla by taking advantage of generic high-level mozilla public apis used to add new protocols and
message formats.
New Security Model for Web Services - Archive of obsolete content
using a soap header for verification soap
messages have a distinct processing model allowing a header to be added that the recipient is required to understand and accept, which identifies the untrusted source of a script making a request.
... unfortunately, this does not prevent soap
messages from being sent to non-soap addresses, which is a big enough problem that the verification cannot stand alone to guarantee that untrusted service requests are always properly rejected by services that should be firewall-protected.
RDF Datasource How-To - Archive of obsolete content
an "imap datasource" would use the imap protocol to translate your mail server's inbox as a collection of statements like "
message number 126's subject is 'make money fast on the internet'" and "
message number 126 was sent by 'spammer128@hotmail.com'".
...by combining statements from the imap datasource and address book datasource, above, we'd be able to identify the sender of "
message 126" as an "important friend".
Tamarin mercurial commit hook - Archive of obsolete content
if you choose to abort the commit, the commit
message will be saved to .hg/commit.save.
... this allows you to reuse the commit
message after fixing the issue by using the -l (--logfile) option: hg commit -l /reporoot/.hg/commit.save notes at the moment this is a local-only hook and is not enforced on the server.
Venkman Introduction - Archive of obsolete content
for these lines, the interactive session view will display an error
message explaining why the breakpoint could not be set.
...if no loaded files match the file pattern or line number, an error
message is printed to the console and the command fails.
Methods - Archive of obsolete content
alert displays an alert dialog box with a
message and an ok button.
... confirm displays a confirm dialog box with the specified
message and ok and cancel buttons.
statustext - Archive of obsolete content
example <!-- sets the status
message when mouse is over buttons --> <button label="connect" statustext="connect to remote server" onmouseover="setstatus
message(this)" onmouseout="clearstatus
message()"/> <button label="ping" statustext="ping the server" onmouseover="setstatus
message(this)" onmouseout="clearstatus
message()"/> <statusbar> <statusbarpanel id="mystatuspanel" label="" flex="1"/> <spacer flex="1"/> </statu...
...sbar> <script> function setstatus
message(obj){ document.getelementbyid('mystatuspanel').label = obj.getattribute('statustext'); } function clearstatus
message(obj){ document.getelementbyid('mystatuspanel').label = ''; } </script> see also statusbar and statusbarpanel ...
Template Logging - Archive of obsolete content
for references, the value of the template's id and ref attributes are provided in each logged
message.
...to summarize, the following forms of
message may be logged: new active result for query 1 matching rule 2 a new data result has been added.
Complete - Archive of obsolete content
the problem with this approach is that when changes in an application do make the extension fail, users might have bad experiences ranging from error
messages that they cannot understand to crashes and data loss.
...how a text sting gets localized when you press button 1 you see an
message in english or french, depending on your application's locale.
Document Object Model - Archive of obsolete content
for example, the following code will display the text '
message' in an alert twice.
... function gettext(){ return "
message"; } alert(gettext()); alert(window.gettext()); thus, if you want to access variables or call a function declared in a script used by another window, you just need to access it using the other window's window object.
Introduction to RDF - Archive of obsolete content
resource description framework we can use the tree elements to display a set of data, such as bookmarks or mail
messages.
...this is how mozilla works when it reads data such as bookmarks, the history or mail
messages.
Trees - Archive of obsolete content
some examples of trees include the list of
messages in a mail application, or the bookmarks window in mozilla.
...this could be used to create a list of mail
messages.
The Implementation of the Application Object Model - Archive of obsolete content
for example, the traditional bookmarks tree view could contain anything from mail
messages to local files to maps of other sites.
...(example: deletion of an imap
message causing the icon to change to a red x in the tree view.) some change has been made in the composite data source that is the equivalent of a local annotation to the xul file.
image - Archive of obsolete content
attributes onerror, onload, src, validate properties accessibletype, src style classes alert-icon, error-icon,
message-icon, question-icon examples <image src='firefoxlogo.png' width='135' height='130'/> attributes onerror type: script code this event is sent to an image element when an error occurs loading the image.
...
message-icon class that adds a
message box icon.
2006-10-27 - Archive of obsolete content
calling tb with a specific
message to be displayed there's a new question by guenter about calling tb from an external program (eg.
... firefox) to display a
message.
NPEvent - Archive of obsolete content
syntax microsoft windows typedef struct _npevent { uint16 event; uint32 wparam; uint32 lparam; } npevent; mac os typedef eventrecord npevent; type eventrecord = record { what: integer;
message: longint; when: longint; where: point; modifiers: integer; end; xwindows typedef xevent npevent; fields npevent on microsoft windows the data structure has the following fields: event one of the following event types: wm_paint wm_lbuttondown wm_lbuttonup wm_lbuttondblclk wm_rbuttondown wm_rbuttonup wm_rbuttondblclk wm_mbuttondown wm_mbuttonup wm_mbuttondblclk wm_mousemove wm...
...
message longint.
NPN_ForceRedraw - Archive of obsolete content
description once a region of a windowless plugin has been invalidated with npn_invalidaterect() or npn_invalidateregion(), a plug-in can call npn_forceredraw() to force a paint
message.
... this causes a synchronous update event or paint
message for the plug-in.
NPN_SetException - Archive of obsolete content
syntax #include <npruntime.h> void npn_setexception(npobject *npobj, const nputf8 *
message); parameters the function has the following parameters: <tt>npobj</tt> the object on which the exception occurred.
... <tt>
message</tt> a utf-8 string describing the error that occurred.
Common Firefox theme issues and solutions - Archive of obsolete content
source file: chrome://global/skin/media/videocontrols.css the solution to this issue is to add the following name space to the second line of the file right after, and in addition to, the existing @namespace: @namespace html url("http://www.w3.org/1999/xhtml"); you can generate the error console
message by going to mozilla's mission page.
... if you are using the extension console² you can easily filter out content related
messages to see just chrome issues.
Implementation Status - Archive of obsolete content
297083; 343443; 8.3.4 help supported 8.3.5 hint partial problems with hints in xul-hosted documents and ephemeral
message positioning 349667; 8.3.6 alert supported 9.
...32231; 10.12 refresh partial is dispatching events instead of calling directly 332231; 10.13 reset supported 10.14 load partial no xforms-link-error generated if @src invalid 333782; 10.15 send supported 10.16
message partial output inside
message doesn't work correctly 366886; 10.17 conditional execution of xforms actions supported 10.18 iteration of xforms actions supported 11.
Mozilla XForms User Interface - Archive of obsolete content
alert this
message will be shown when the form control cannot properly bind to instance data or when the instance data value is invalid or out of the specified range of selectable values (see the spec).
...
message used in combination with event listeners to display a
message to the user when the specified event occurs (see the spec).
WebRTC data channels - Game development
reliable channels guarantee that
messages you send arrive at the other peer and in the same order in which they're sent.
... unreliable channels make no such guarantees;
messages aren't guaranteed to arrive in any particular order and, in fact, aren't guaranteed to arrive at all.
Track the score and win - Game development
.x+brickwidth && y > b.y && y < b.y+brickheight) { dy = -dy; b.status = 0; score++; } } } } } calling drawscore() from the draw() function keeps the score up to date with every new frame — add the following line inside draw(), just below the drawpaddle() call: drawscore(); displaying a winning
message when all bricks have been destroyed collecting the points works well, but you won't be adding them forever — what about when all the bricks have been destroyed?
... it's the main purpose of the game after all, so you should display a winning
message if all available points have been collected.
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
a cipher suite is a combination of a key exchange algorithm, authentication method, bulk encryption cipher, and
message authentication code.
... a typical cipher suite looks like ecdhe_rsa_with_aes_128_gcm_sha256 or ecdhe-rsa-aes128-gcm-sha256, indicating: ecdhe (elliptic curve diffie-hellman ephemeral) for key exchange rsa for authentication aes-128 as the cipher, with galois/counter mode (gcm) as the block cipher mode of operation sha-256 as the hash-based
message authentication code (hmac) learn more mozilla recommended cipher suite choices for tls ...
First-class Function - MDN Web Docs Glossary: Definitions of Web-related terms
example | pass a function as an argument javascript function sayhello() { return "hello, "; } function greeting(hello
message, name) { console.log(hello
message() + name); } // pass `sayhello` as an argument to `greeting` function greeting(sayhello, "javascript!"); we are passing our sayhello() function as an argument to the greeting() function, this explains how we are treating the function as a value.
...
message.
IRC - MDN Web Docs Glossary: Definitions of Web-related terms
irc (internet relay chat) is a worldwide chat system requiring an internet connection and an irc client, which sends and receives
messages via the irc server.
...the irc server broadcasts
messages to everyone connected to one of many irc channels (each with their own id).
Key - MDN Web Docs Glossary: Definitions of Web-related terms
encrypted
messages should remain secure even if everything about the cryptosystem, except for the key, is public knowledge.
...the public key is able to encrypt
messages that only the corresponding private key is able to decrypt, and vice versa.
How do you upload your files to a web server? - Learn web development
respectively, these are a log of
messages showing the connection status between your computer and the sftp server, and a live log of every interaction between your sftp client and the server.
...a basic command looks like so: rsync [-options] source user@x.x.x.x:destination -options is a dash followed by a one or more letters, for example -v for verbose error
messages, and -b to make backups.
What is a web server? - Learn web development
the web server must answer every http request, at least with an error
message.
... if neither process is possible, the web server returns an error
message to the browser, most commonly 404 not found.
Styling web forms - Learn web development
<form> <h1>to: mozilla</h1> <div id="from"> <label for="name">from:</label> <input type="text" id="name" name="user_name"> </div> <div id="reply"> <label for="mail">reply:</label> <input type="email" id="mail" name="user_email"> </div> <div id="
message"> <label for="msg">your
message:</label> <textarea id="msg" name="user_
message"></textarea> </div> <div class="button"> <button type="submit">send your
message</button> </div> </form> add the above code into the body of your html.
...using this we can easily position our elements, including the title and all the form elements: h1 { font : 1em "typewriter", monospace; align-self : end; } #
message { grid-row: 1 / 5; } #from, #reply { display: flex; } labels and controls now we can start working on the form elements themselves.
Creating hyperlinks - Learn web development
e-mail links it's possible to create links or buttons that, when clicked, open a new outgoing email
message rather than linking to a resource or page.
...the most commonly used of these are "subject", "cc", and "body" (which is not a true header field, but allows you to specify a short content
message for the new email).
General asynchronous programming concepts - Learn web development
new date(); mydate = date } console.log(mydate); let pelem = document.createelement('p'); pelem.textcontent = 'this is a newly-added paragraph.'; document.body.appendchild(pelem); }); when running the example, open your javascript console then click the button — you'll notice that the paragraph does not appear until after the dates have finished being calculated and the console
message has been logged.
... a "click me for alert" button that when clicked shows an alert
message.
Function return values - Learn web development
(in these cases, our reference pages list the return value as void or undefined.) for example, in the display
message() function we built in the previous article, no specific value is returned when the function is invoked.
...if the entered value is not a number, an error
message is printed to the paragraph.
Handling text — strings in JavaScript - Learn web development
html provides structure and meaning to our text, css allows us to precisely style it, and javascript contains a number of features for manipulating strings, creating custom welcome
messages and prompts, showing the right text labels when needed, sorting terms into the desired order, and much more.
... the fourth one includes uses a ternary operator to check whether the score is above a certain mark and print a pass or fail
message depending on the result.
Website security - Learn web development
dos defenses usually work by identifying and blocking "bad" traffic while allowing legitimate
messages through.
... a few key
messages almost all of the security exploits in the previous sections are successful when the web application trusts data from the browser.
Learn web development
if you have questions regarding topics you'd like to see covered or feel are missing, drop us a
message on our discourse forum.
...for example, if you were in the parent directory: cd learning-area update the repository using the following command: git pull contact us if you want to get in touch with us about anything, the best way is to drop us a
message on our discourse forum.
Gecko info for Windows accessibility vendors
in addition, if it is a role_alert, a screen reader should treat it as a
message box -- that is, to read the entire contents.
...ent_menuend role_scrollbar not supported n/a role_grip not supported n/a role_sound not supported n/a role_cursor not supported n/a role_caret supported for caret fires event_show, event_hide, event_locationchange role_alert xul: <browser
message> dhtml: role="wairole:alert" fires event_alert role_window supported automatically by ms windows role_client xul: <browser> html: <frame> or <iframe> role_menupopup dhtml: role="wairole:menu" fires event_menupopupstart, event_menupopupend ...
Debugging OpenGL
if an opengl error occurred when executing the call, an error
message is output.
...with this enabled,
messages are printed before and after every opengl call.
HTTP logging
use 'sync' if your browser crashes or hangs by default, http logging buffers
messages and only periodically writes them to disk (this is more efficient and also makes logging less likely to interfere with race conditions, etc).
... this will cause each log
message to be immediately written (and fflush()'d), which is likely to give us more information about your crash.
Eclipse CDT Manual Setup
select "general > workspace" and select "refresh using native hooks or polling" and "refresh on access" to prevent eclipse giving you annoying "resource is out of sync"
messages when files change from under it due to mercurial or other external activity.
...click on the little green button beside this
message to open the "progress" tab, and keep an eye on the "refreshing workspace" item as you continue with the steps below.
Reviewer Checklist
compatibility version files, databases,
messages tag
messages with ids to disambiguate callers.
... documentation the commit
message should describe what the patch is changing (not be a copy of the bug summary).
Multiprocess Firefox
this page is an informal index of leftovers, mostly revolving around the
message manager and the related cross process object wrappers.
...
message manager a complete guide to the objects used to communicate between chrome code and web content.
Blocked: All storage access requests
message firefox: cookieblockedall=request to access cookies or storage on “x” was blocked because we are blocking all storage access requests.
... the permission can be changed or removed by: going to preferences > content blocking in the custom content blocking section, selecting a value other than all cookies for the cookies item if the resource that is being blocked doesn't need authentication, you can fix the warning
message by adding a crossorigin="anonymous" attribute to your element.
Blocked: All third-party storage access requests
message firefox: cookieblockedforeign=request to access cookies or storage on “x” was blocked because we are blocking all third-party storage access requests and content blocking is enabled.
... the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the cookies checkbox if the resource that is being blocked doesn't need authentication, you can fix the warning
message by adding a crossorigin="anonymous" attribute to the relevant element.
Blocked: Storage access requests from trackers
message firefox: cookieblockedtracker=request to access cookies or storage on “x” was blocked because it came from a tracker and content blocking is enabled.
... the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the tracker checkbox if the blocked resource doesn't need authentication, you can fix the warning
message by adding a crossorigin="anonymous" attribute to the relevant element.
mozbrowsershowmodalprompt
message a domstring representing the value passed to the window.alert(), window.confirm(), or window.prompt() methods within the browser <iframe>'s content.
... obsolete properties of details msg_name a string representing the type of
message.
ChromeWorker
to use a post
message with callback version of chromeworker that features promises, see promiseworker.
... promiseworker github :: promiseworker - shows how to uses promises as an twist on post
message feature of chromeworker ...
Embedding Tips
hint, add a native
message processing loop after the call to saveuri that terminates when onstatechange indicates persistence has finished..
... how do i display my own
message, alert and prompt boxes?
Creating a New Protocol
building the new protocol to build the new protocol declaration and generate headers, make in ipc/ipdl: make -c objdir/ipc/ipdl if there are any protocol-level errors, the ipdl compiler will print the relevant error
messages and stop.
...it must implement abstract methods for receiving the appropriate
messages on each side.
IPC Protocol Definition Language (IPDL)
ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass
messages between processes or threads in an organized and secure way.
... all
messages for multi-process plugins and tabs in firefox are declared in the ipdl language.
Services.jsm
ervice cache nsicacheservice cache service cache2 nsicachestorageservice cache storage service clipboard nsiclipboard clipboard console nsiconsoleservice error console service contentprefs nsicontentprefservice content preferences service cookies nsicookiemanager2 cookie manager 2 service cpmm nsi
messagesender child process
message manager4 crashmanager crashmanager.jsm dirsvc nsidirectoryservice nsiproperties directory service domstoragemanager nsidomstoragemanager dom storage manager domrequest nsidomrequestservice domrequest service downloads nsidownloadmanager download manager droppedlinkhandler ns...
...sieventlistenerservice event listener service etld nsieffectivetldservice effectivetld service focus nsifocusmanager focus manager io nsiioservice nsiioservice2 i/o service locale nsilocaleservice locale service logins nsiloginmanager password manager service metro nsiwinmetroutils 2 mm nsi
messagebroadcaster nsiframescriptloader global frame
message manager3 obs nsiobserverservice observer service perms nsipermissionmanager permission manager service ppmm nsi
messagebroadcaster nsiprocessscriptloader global parent process
message manager3 prefs nsiprefbranch nsiprefbranch2 nsiprefservice preferences service ...
Sqlite.jsm
each object has the properties result and
message.
... result is a numeric error code and
message is a string description of the problem.
Application Translation with Mercurial
we also create a commit
message which will describe the changes in the patch and later get used when the patched gets checked in ('added') to the official repository with the localized files.
... for the commit
message, we have to use the -m command line flag, hg qref -m "firefox 29: localize missing string in aboutprivatebrowsing.dtd" you can change the commit
message in the mercurial queue every time by calling hg qref again.
Index
for instance, in php the default keyword for regular
messages is gettext() and _().
... for
messages with plural support, the default keyword is ngettext().
Release phase
next, try issuing the following command: $ ssh hg.mozilla.org if ssh is working fine, you should see the following
message: no interactive shells allowed here!
... if you don't see this
message, try running the same command in a more verbose mode (with the debugging information): $ ssh -vvv hg.mozilla.org this should tell you why your connection is not succeeding.
SVN for Localizers
make you sure you're checking out the repository with https:// make sure you're adding a commit
message when running svn commit.
... commits with an empty
message will be rejected.
Leak And Bloat Tests
startup main mail window open address book and
message composition windows close address book and
message composition windows quit the application future improvements will be discussed on the discussion page of the mozilla wiki.
...defined profile, see below): common/mailnewstestprefs.js python scripts (used to set up the profile and run the test): bloat/setupbloattest.py bloat/runtest.py common/setupcommonmailnews.py pre-defined profile initial setup: one pop3 account (mails tbd) one identity one smtp server defined (not used) future requirements/possibilities: one address book where pab has ~1000 entries large
message folders imap nntp server and subscribed newsgroup.
NSPR LOG MODULES
level is a numeric value between 0 and 5, with the values having the following meanings: 0 = pr_log_none: nothing should be logged 1 = pr_log_always: important; intended to always be logged 2 = pr_log_error: errors 3 = pr_log_warning: warnings 4 = pr_log_debug: debug
messages, notices 5: everything!
... this ensures that all log
messages are flushed to the operating system as they are written, but may slow the program down.
An overview of NSS Internals
when dealing with certificates (x.509), file formats such as pkcs#12 (certificates and keys), pkcs#7 (signed data), and
message formats as cms, we should mention asn.1, which is a syntax for storing structured data in a very efficient (small sized) presentation.
...there are tools for managing nss databases, for dumping or verifying certificates, for registering pkcs#11 modules with a database, for processing cms encrypted/signed
messages, etc.
NSS 3.52 release notes
bug 1623374 - support new pkcs #11 v3.0
message interface for aes-gcm and chachapoly.
... bug 1623374 - support new pkcs #11 v3.0
message interface for aes-gcm and chachapoly.
NSS API Guidelines
high cert lib/certhigh ocsp.h, ocspt.h crmf provides functions, and data types, to handle certificate management
message format (cmmf) and certificate request
message format (crmf, see rfc 2511) data.
...for example, pkcs #7 is used to encrypt certificate data to exchange between applications, or to encrypt s/mime
message data.
NSS Sample Code Sample1
we will add
message protection (encryption and macing) examples to this program in the future.
... the adminstrator // may do this by checking that the key was received in a signed email //
message, or by checking a digest value with the adminstrator of the // secondary host.
EncDecMAC using token object - sample 3
encdecmac using token object example: <h2 id="nss_sample_code_3_hashing.">nss sample code 3: enc/dec/mac using token object id.</h2> <p class="summary">computes the hash of a file and saves it to another file, illustrates the use of nss
message apis.</p> <pre class="brush: cpp"> /* this source code form is subject to the terms of the mozilla public * license, v.
...aid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage
message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); fprintf(stderr, "%-20s specify db directory path\n\n", "-d "); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p...
sample1
02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* prints a usage
message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algt...
...it illustrates the use of nss
message apis.
PKCS11 FAQ
for instance if you are decrypting an s/mime
message and you have unwrapped the des key with the private key provided by a given token, nss attempts to use that token to provide the des encryption.
...if you do this, nss applications display an appropriate error
message for the user.
PKCS11 Implement
signing tokens include a signing certificate and are used to sign objects or
messages or to perform ssl authentication.
... they cannot be used for encrypted s/mime, because they can't decrypt
messages.
FC_Digest
pusdigestlen [in, out] pointer to the maximum size of the output buffer, replaced by the length of the
message digest if the operation is successful.
... description fc_digest digests a
message in a single operation according to the attributes of the previous call to fc_digestinit.
FC_DigestInit
name fc_digestinit - initialize a
message-digest operation.
... description fc_digestinit initializes a
message-digest operation.
FC_DigestUpdate
one or more blocks may be part of the
message digest operation.
... the digest for the entire
message is returned by a call to fc_digestfinal.
NSS functions
nss_cmsencrypteddata_getcontentinfo mxr 3.2 and later nss_cmsenvelopeddata_addrecipient mxr 3.2 and later nss_cmsenvelopeddata_create mxr 3.2 and later nss_cmsenvelopeddata_destroy mxr 3.2 and later nss_cmsenvelopeddata_getcontentinfo mxr 3.2 and later nss_cms
message_contentlevel mxr 3.2 and later nss_cms
message_contentlevelcount mxr 3.2 and later nss_cms
message_copy mxr 3.2 and later nss_cms
message_create mxr 3.2 and later nss_cms
message_createfromder mxr 3.2 and later nss_cms
message_destroy mxr 3.2 and later...
... nss_cms
message_getcontent mxr 3.2 and later nss_cms
message_getcontentinfo mxr 3.2 and later nss_cms
message_isencrypted mxr 3.4.1 and later nss_cms
message_issigned mxr 3.4 and later nss_cmsrecipientinfo_create mxr 3.2 and later nss_cmsrecipientinfo_createfromder mxr 3.8 and later nss_cmsrecipientinfo_createnew mxr 3.8 and later nss_cmsrecipientinfo_createwithsubjkeyid mxr 3.7 and later nss_cmsrecipientinfo_createwithsubjkeyidfromcert mxr 3.7 and later nss_cmsrecipientinfo_destroy mxr 3.2 and later nss_cmsr...
NSS tools : ssltab
type = 14 (server_hello_done) length = 0 (0x000000) } } ] --> [ sslrecord { 0: 16 03 00 00 44 |....d type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { 0: 10 00 00 40 |...@ type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } } } ] --> [ sslrecord { 0: 14 03 00 00 01 |.....
...) certificatechain { chainlength = 706 (0x02c2) certificate { size = 703 (0x02bf) data = { saved in file 'cert.001' } } } type = 12 (server_key_exchange) length = 202 (0x0000ca) type = 14 (server_hello_done) length = 0 (0x000000) } } ] --> [ sslrecord { type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } } } ] --> [ sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1) } sslrecord { type = 22 (handshake) version = { 3,0 } length = 56 (0x38) > encrypted > } ] >-- [ sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1) } ] >-- [ sslrecord { type = 22 (handshake) version = { 3,0 } length = 56 (0x38) > encrypted > } ] --> [ sslrecord { type = ...
NSS tools : ssltap
type = 14 (server_hello_done) length = 0 (0x000000) } } ] --> [ sslrecord { 0: 16 03 00 00 44 |....d type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { 0: 10 00 00 40 |...@ type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } } } ] --> [ sslrecord { 0: 14 03 00 00 01 |.....
...) certificatechain { chainlength = 706 (0x02c2) certificate { size = 703 (0x02bf) data = { saved in file 'cert.001' } } } type = 12 (server_key_exchange) length = 202 (0x0000ca) type = 14 (server_hello_done) length = 0 (0x000000) } } ] --> [ sslrecord { type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } } } ] --> [ sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1) } sslrecord { type = 22 (handshake) version = { 3,0 } length = 56 (0x38) > encrypted > } ] >-- [ sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1) } ] >-- [ sslrecord { type = 22 (handshake) version = { 3,0 } length = 56 (0x38) > encrypted > } ] --> [ sslrecord { type = ...
S/MIME functions
nss_cmsencrypteddata_getcontentinfo mxr 3.2 and later nss_cmsenvelopeddata_addrecipient mxr 3.2 and later nss_cmsenvelopeddata_create mxr 3.2 and later nss_cmsenvelopeddata_destroy mxr 3.2 and later nss_cmsenvelopeddata_getcontentinfo mxr 3.2 and later nss_cms
message_contentlevel mxr 3.2 and later nss_cms
message_contentlevelcount mxr 3.2 and later nss_cms
message_copy mxr 3.2 and later nss_cms
message_create mxr 3.2 and later nss_cms
message_createfromder mxr 3.2 and later nss_cms
message_destroy mxr 3.2 and later...
... nss_cms
message_getcontent mxr 3.2 and later nss_cms
message_getcontentinfo mxr 3.2 and later nss_cms
message_isencrypted mxr 3.4.1 and later nss_cms
message_issigned mxr 3.4 and later nss_cmsrecipientinfo_create mxr 3.2 and later nss_cmsrecipientinfo_createfromder mxr 3.8 and later nss_cmsrecipientinfo_createnew mxr 3.8 and later nss_cmsrecipientinfo_createwithsubjkeyid mxr 3.7 and later nss_cmsrecipientinfo_createwithsubjkeyidfromcert mxr 3.7 and later nss_cmsrecipientinfo_destroy mxr 3.2 and later nss_cmsr...
NSS_3.12.3_release_notes.html
bug 426413: audit
messages need distinct types bug 438870: free freebl hashing code of dependencies on nspr and libutil bug 439115: db merge allows nickname conflicts in merged db bug 439199: sse2 instructions for bignum are not implemented on windows 32-bit bug 441321: tolerate incorrect encoding of dsa signatures in ssl 3.0 handshakes bug 444404: libpkix reports unknown issuer for nearly all certificate errors...
... bug 473357: ssltap incorrectly parses handshake
messages that span record boundaries bug 473365: incompatible argument in pkix_validate.c.
NSS tools : ssltap
_hello_done) length = 0 (0x000000) } } ] --> [ sslrecord { 0: 16 03 00 00 44 |....d type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { 0: 10 00 00 40 |...@ type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } } } ] --> [ sslrecord { 0: 14 03 00 00 01 |.....
... } type = 12 (server_key_exchange) length = 202 (0x0000ca) type = 14 (server_hello_done) length = 0 (0x000000) } } ] --> [ sslrecord { type = 22 (handshake) version = { 3,0 } length = 68 (0x44) handshake { type = 16 (client_key_exchange) length = 64 (0x000040) clientkeyexchange {
message = {...} } } } ] --> [ sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1) } sslrecord { type = 22 (handshake) version = { 3,0 } length = 56 (0x38) > encrypted > } ] >-- [ sslrecord { type = 20 (change_cipher_spec) version = { 3,0 } length = 1 (0x1) } ] >-- [ sslrecord { typ...
JSAPI User Guide
void reporterror(jscontext *cx, const char *
message, jserrorreport *report) { fprintf(stderr, "%s:%u:%s\n", report->filename ?
... report->filename : "[no filename]", (unsigned int) report->lineno,
message); } int run(jscontext *cx) { // enter a request before running anything in the context.
JS::Compile
used to report filename or url in error
messages.
...this information is included in error
messages if an error occurs during compilation..
JS::CreateError
syntax // added in spidermonkey 45 bool js::createerror(jscontext *cx, jsexntype type, handleobject stack, handlestring filename, uint32_t linenumber, uint32_t columnnumber, jserrorreport *report, handlestring
message, mutablehandlevalue rval); // obsolete since jsapi 39 bool js::createerror(jscontext *cx, jsexntype type, handlestring stack, handlestring filename, uint32_t linenumber, uint32_t columnnumber, jserrorreport *report, handlestring
message, mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...
message js::handlestring the value of error.prototype.
message.
JS::Evaluate
used to report filename or url in error
messages.
...this information is used in
messages if an error occurs during compilation.
JSErrorReport
uc
message const char16_t * the default unicode error
message.
...
messageargs const char16_t ** arguments for the error
message.
JS_CompileFunction
used to report filename or url in error
messages.
...this information is used in error
messages if an error occurs during compilation.
JS_CompileFunctionForPrincipals
used to report filename or url in error
messages.
...this information is passed in
messages if an error occurs during compilation.
JS_CompileScriptForPrincipals
used to report filename or url in error
messages.
...this information is included in error
messages if an error occurs during compilation.
JS_EvaluateScript
used to report filename or url in error
messages.
...this information is used in
messages if an error occurs during compilation.
JS_EvaluateScriptForPrincipals
used to report filename or url in error
messages.
...this information is used in
messages if an error occurs during compilation.
Mork
the header is: // <!-- <mdb:mork:z v="1.4"/> --> this file is therefore version 1.4 of the zany mork format for the
message database.
...for example, the
message summary format files use a table for each thread, where the meta-rows represent information about the thread in general.
An Overview of XPCOM
xpcom not only supports component software development, it also provides much of the functionality that a development platform provides, such as: component management file abstraction object
message passing memory management we will discuss the above items in detail in the coming chapters, but for now, it can be useful to think of xpcom as a platform for component development, in which features such as those listed above are provided.
...these services include a cross platform file abstraction which provides uniform and powerful access to files, directory services which maintain the location of application- and system-specific locations, memory management to ensure everyone uses the same memory allocator, and an event notification system that allows passing of simple
messages.
Starting WebLock
using them is a good way for objects to pass
messages to each other without the objects having explicit knowledge of one another.
...the nsiobserver is a generic interface for passing
messages between two or more objects without defining a specific frozen interface, and it's one of the ways in which extensibility is built into xpcom.
mozIStorageError
the mozistorageerror interface represents errors returned by the storage api, offering attributes to obtain the error code as well as a human-readable error
message corresponding to the error that occurred.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports attributes attribute type description
message autf8string a human readable error string with details; this may be null if no details are available.
nsIAccessibleRole
the role is used by xul:browser
message, role="alert", xforms:
message.
... role_dialog 18 represents a dialog box or
message box.
nsIDOMGeoPositionError
message domstring human readable error
message.
... gecko 1.9.2 note the
message attribute was removed in gecko 1.9.2 (firefox 3.6).
nsIDOMMozNetworkStatsManager
when total data usage reaches threshold bytes, a "networkstats-alarm" system
message is sent to the application, where the optional parameter data must be a cloneable object.
... return value an alarm object with the same fields as that in the system
message; alarmid, network, threshold, and data.
nsIDOMWindowInternal
void alert(in domstring text) boolean confirm(in domstring text) domstring prompt([optional] in domstring a
message, [optional] in domstring ainitial, [optional] in domstring atitle, [optional] in unsigned long asavepassword) void focus() void blur() void back() void forward() void home() void stop() void print() void moveto(in long xpos, in long ypos) void moveby(in long xdif, in long ydif) void resizeto(in long width, i...
...an casesensitive, [optional] in boolean backwards, [optional] in boolean wraparound, [optional] in boolean wholeword, [optional] in boolean searchinframes, [optional] in boolean showdialog) domstring atob(in domstring aasciistring) domstring btoa(in domstring abase64data) nsivariant showmodaldialog(in nsivariant aargs, [optional] in domstring aoptions) void post
message(in domstring
message, in domstring targetorigin) attributes attribute type description window nsidomwindowinternal readonly: the window object itself.
nsIDOMWindowUtils
adeltaz, in unsigned long adeltamode, in long amodifiers, in long alineorpagedeltax, in long alineorpagedeltay, in unsigned long aoptions); void sendnativekeyevent(in long anativekeyboardlayout, in long anativekeycode, in long amodifierflags, in astring acharacters, in astring aunmodifiedcharacters); void sendnativemouseevent(in long ascreenx, in long ascreeny, in long anative
message, in long amodifierflags, in nsidomelement aelement); nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long aoffset, in unsigned long alength, in long ax, in long ay); obsolete since gecko 31.0 nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long aoffset, in unsigned long alength, in long ax, in long ay, [...
... void sendnativemouseevent( in long ascreenx, in long ascreeny, in long anative
message, in long amodifierflags, in nsidomelement aelement ); parameters ascreenx ascreeny anative
message amodifierflags aelement sendquerycontentevent() synthesize a query content event.
nsIDebug
void assertion( in string astr, in string aexpr, in string afile, in long aline ); parameters astr assertion
message.
...void warning( in string astr, in string afile, in long aline ); parameters astr warning
message.
nsIDocumentLoader
void createdocumentloader(out nsidocumentloader aninstance); obsolete since gecko 1.8 void destroy(); obsolete since gecko 1.8 void fireonlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri); obsolete since gecko 1.8 void fireonstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring a
message); obsolete since gecko 1.8 void getcontentviewercontainer(in nsisupports adocumentid, out nsicontentviewercontainer aresult); native code only!
...hange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri ); parameters awebprogress arequest auri fireonstatuschange() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void fireonstatuschange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring a
message ); parameters awebprogress arequest astatus a
message native code only!getcontentviewercontainer obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0)this feature is obsolete.
nsIDragService
void firedrageventatsource(in unsigned long amsg); obsolete since gecko 43 void firedrageventatsource(in mozilla::event
message aevent
message); native code only!
... [noscript] void firedrageventatsource( in mozilla::event
message aevent
message ); parameters aevent
message one of the event
messages between edragdropeventfirst and edragdropeventlast defined in widget/event
messagelist.h getcurrentsession() returns the current nsidragsession.
nsIEditorMailSupport
acitation the "mid" url of the source
message.
...void inserttextwithquotations( in domstring astringtoinsert ); parameters astringtoinsert the string to be inserted pasteascitedquotation() paste a string as quoted text, whose representation is dependent on the editor type, replacing the selected text (if any) void pasteascitedquotation( in astring acitation, in long aselectiontype ); parameters acitation the "mid" url of the source
message.
nsIException
message string a custom
message set by the thrower.
... [binaryname(
messagemoz)] read only.
nsIFrameLoader
messagemanager nsichromeframe
messagemanager the
message manager handling
messages for this frame.
... see also content process event handling nsiframeloaderowner nsiframe
messagelistener nsichromeframe
messagemanager nsidomwindowutils ...
nsIMimeConverter
notaphish
message indicates whether phisihing filters have been run on a
message yet.
...thunderbird provides a utility function which performs this for the currently selected
message: markcurrent
messageasread().
nsIMsgCustomColumnHandler
astring getsortstringforrow(in nsimsgdbhdr ahdr); parameters ahdr the
message's nsimsgdbhdr.
... unsigned long getsortlongforrow(in nsimsgdbhdr ahdr); parameters ahdr the
message's nsimsgdbhdr.
nsIMsgProtocolInfo
cangetincoming
messages boolean true if junk ui actions should be enabled for the account type.
... canget
messages boolean true if "get
messages" ui actions should be enabled for the account type.
nsIMsgSearchCustomTerm
*/ readonly attribute astring name; needsbody /// does this term need the
message body?
...gth object to hold array length * * @return array of operators */ void getavailableoperators(in nsmsgsearchscopevalue scope, out unsigned long length, [retval, array, size_is(length)] out nsmsgsearchopvalue operators); match /** * apply the custom search term to a
message * * @param msghdr header database reference representing the
message * @param searchvalue user-set value to use in the search * @param searchop search operator (contains, ishigherthan, etc.) * * @return true if the term matches the
message, else false */ boolean match(in nsimsgdbhdr msghdr, in autf8string search...
nsIMsgSearchValue
attribute astring str; attribute nsmsgpriorityvalue priority; attribute prtime date; // see nsmsg
messageflags.idl and nsmsgfolderflags.idl attribute unsigned long status; attribute unsigned long size; attribute nsmsgkey msgkey; attribute long age; // in days attribute nsimsgfolder folder; attribute nsmsglabelvalue label; attribute nsmsgjunkstatus junkstatus; /* * junkpercent is set by the
message filter plugin, and is approximately * proportional...
... to the probability that a
message is junk.
nsIProgressEventSink
onstatus() called to notify the event sink with a status
message for the given request.
... astatusarg status code argument to be used with the string bundle service to convert the status
message into localized, human readable text.
nsITransportSecurityInfo
netwerk/socket/nsitransportsecurityinfo.idlscriptable this interface provides information about transport security, including the security state and any error
message for the connection.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) attributes attribute type description error
message wstring error
message on connection failure.
nsIUpdate
if the update is a security update, a more seriously-worded user interface
message is used to present the update to the user.
... statustext astring an optional
message associated with the update.
nsIMsgSearchValue
attribute astring str; attribute nsmsgpriorityvalue priority; attribute prtime date; // see nsmsg
messageflags.idl and nsmsgfolderflags.idl attribute unsigned long status; attribute unsigned long size; attribute nsmsgkey msgkey; attribute long age; // in days attribute nsimsgfolder folder; attribute nsmsglabelvalue label; attribute nsmsgjunkstatus junkstatus; /* * junkpercent is set by the
message filter plugin, and is approximately * proportional...
... to the probability that a
message is junk.
Buddy icons in mail
seth spitzer mozilla is now able to show icons in the
message header area and the addressbook card pane.
... for the
message pane, the icon we will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for sender email address>.gif when trying to determine the screenname for the sender, we search the addressbook that we are using for collection.
MailNews Filters
for new incoming
messages, the protocol specific object that handles new
messages calls nsimsgfilterlist::applyfilterstohdr and passes itself in as nsimsgfilterhitnotify interface to handle filter hits.
...for each new header, we evaluate the filter criteria and apply the actions synchronously, including moving a
message to an other local folder, and advance to the next header.
Mailbox
the mailbox protocol is used to read
messages from a local folder berkeley mailbox.
...this may seem like a lot of infrastructure just to read
messages from a flat file, but it allows us to do it asynchronously, and to have reading local
messages fit into the same kind of mechanisms that reading nntp and imap
messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
Spam filtering
to analyze a
message for spam, we need the entire
message, not just the headers.
... the purge code is implemented as a search of the "junk" folder, looking for "old"
message that have the proper junk status.
Filter Incoming Mail
filter incoming mail to filter incoming mail, the first step is to detect new
messages inconming.
...by example, setting it to lower case subject = subject.tolocalelowercase(); // then we rebuild a subject objet by rencoding the string // and assign it to the
message headers and we're done amsghdr.subject = mimeconvert.encodemimepartiistr_utf8(subject, false, "utf-8", 0, 72); } } }; function init() { var notificationservice = components.classes["@mozilla.org/messenger/msgnotificationservice;1"] .getservice(components.interfaces.nsimsgfoldernotificationservice); notificationservice.addlistener(newmaillistener, notificationservice.msga...
Tips and Tricks from the newsgroups
on in its own tab run shell scripts from an extension (for example, to create a symlink) get extension metadata call java from thunderbird extensions (also an example here, written for firefox but compatible with thunderbird 3.x) define a custom protocol handler to call an external program save attachment and send it repeat image display using css sprites
messages use reminderfox to open a
message in the default thunderbird
message window (when
messageuri, folderuri and gdbview are unknown) determine whether a
message has been flagged as junk imap: getting
message key of copied
message by nsimsgcopyservice::copyfile
message access the plain text content of the email body get information about attachment without selecting
message repeat image di...
...splay using css sprites scan for new
messages at startup and manually scan a folder initiated by user force listeners to run consecutively to prevent pop
messages from getting garbled during
message retrieval ...
Using popup notifications
a popup notification can include a text
message, a button action, and zero or more additional actions provided in a drop-down menu accessed through the notification's button.
... components.utils.import('resource://gre/modules/popupnotifications.jsm'); var notify = new popupnotifications(gbrowser, document.getelementbyid("notification-popup"), document.getelementbyid("notification-popup-box")); var notification = notify.show( // browser gbrowser.selectedbrowser, // popup id "pdes-popup", //
message "hi, there!, i'm gonna show you something today!!", // anchor id null, // main action { label: "click here", accesskey: "d", callback: function() { // you can call your function here } }, // secondary action null, // options { // alternative way to set the popup icon popupiconurl: "chrome://popupnotifications/skin/mozlogo.png" } ); settimeout(function(){ notification.
Using COM from js-ctypes
#include <sapi.h> struct myispvoicevtbl; struct myispvoice { struct myispvoicevtbl* lpvtbl; }; struct myispvoicevtbl { /* start inherit from iunknown */ void* queryinterface; void* addref; ulong (__stdcall *release)(struct myispvoice*); /* end inherit from iunknown */ /* start inherit from ispnotifysource */ void* setnotifysink; void* setnotifywindow
message; void* setnotifycallbackfunction; void* setnotifycallbackinterface; void* setnotifywin32event; void* waitfornotifyevent; void* getnotifyeventhandle; /* end inherit from ispnotifysource */ /* start inherit from ispeventsource */ void* setinterest; void* getevents; void* getinfo; /* end inherit from ispeventsource */ /* start ispvoice */ void* set...
...ctypes.voidptr_t }, { 'addref': ctypes.voidptr_t }, { 'release': ctypes.functiontype(callback_abi, ulong, // return [ ispvoice.ptr ]).ptr }, // end inherit from iunknown // start inherit from ispnotifysource // can set to ctypes.voidptr_t if arent going to use it { 'setnotifysink': ctypes.voidptr_t }, { 'setnotifywindow
message': ctypes.voidptr_t }, { 'setnotifycallbackfunction': ctypes.voidptr_t }, { 'setnotifycallbackinterface': ctypes.voidptr_t }, { 'setnotifywin32event': ctypes.voidptr_t }, { 'waitfornotifyevent': ctypes.voidptr_t }, { 'getnotifyeventhandle': ctypes.voidptr_t }, // end inherit from ispnotifysource // start inherit from ispeventsource { 'setinterest': ctypes.voidptr_t ...
Mozilla
introduction to layout in mozilla ipc protocol definition language (ipdl) ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass
messages between processes or threads in an organized and secure way.
... all
messages for multi-process plugins and tabs in firefox are declared in the ipdl language.
Browser Side Plug-in API - Plugins
npn_forceredraw forces a paint
message for a windowless plug-in.
... npn_status displays a
message on the status line of the browser window.
Deprecated tools - Firefox Developer Tools
once we have decided to remove the panel, we will provide a warning
message, and finally, we will remove the panel from the codebase.
... you may see a warning
message, as in the following image, when trying to activate a deprecated panel: in addition, if you open the panel for one of these tools, you will also see a warning
message about its removal.
Index - Firefox Developer Tools
logpoints print a
message to the console panel instead of pausing code execution.
...within that context they then construct a number of audio nodes, including: 146 web console debugging, guide, security, tools, web development, web development:tools, l10n:priority, web console the web console: 147 console
messages most of the web console is occupied by the
message display pane: 148 invoke getters from autocomplete no summary!
Tips - Firefox Developer Tools
check "enable persistent logs" in the settings to keep logged
messages from before even after navigation.
... check "enable timestamps" in the settings to show timestamps besides the logged
messages.
Web Console - Firefox Developer Tools
the web console: logs information associated with a web page: network requests, javascript, css, security errors and warnings as well as error, warning and informational
messages explicitly logged by javascript code running in the page context enables you to interact with a web page by executing javascript expressions in the context of the page user interface of the web console parts of the web console ui.
... console
messages details of the
messages that the console logs.
about:debugging - Firefox Developer Tools
note: if the version of firefox on your remote device is more than one major version older than the version running on your computer, you may see a
message like the following: in firefox 76 and above, the
message can look like the following: see connection for firefox for android 68 for more information.
... service workers not compatible a warning
message is displayed at the top of the this firefox tab if service workers are incompatible with the current browser configuration, and therefore cannot be used or debugged.
Firefox Developer Tools
web console see
messages logged by a web page and interact with the page using javascript.
... browser console see
messages logged by the browser itself and by add-ons, and run javascript code in the browser's scope.
AddressErrors - Web APIs
that's done by removing all shipping options currently set on the request, then set up an object named shippingaddresserrors which contains a country property which is an error
message describing why the stated country isn't being permitted as a value.
... then a paymentdetailsupdate object is created with its error set to a generic
message about address errors and with the reset of the object's values taken from shippingaddresserrors, and, using "...defaultpaymentdetails" as the final entry in the object, the remeainder of the properties' values are taken from defaultpaymentdetails.
Client.type - Web APIs
a document) function send
message(
message) { return new promise(function(resolve, reject) { // note that this is the serviceworker.post
message version navigator.serviceworker.controller.post
message(
message); window.serviceworker.on
message = function(e) { resolve(e.data); }; }); } // controlling service worker self.addeventlistener("
message", function(e) { // e.source is a client object e.source.post
message("hello!
... your
message was: " + e.data); // let's also post the type value back to the client e.source.post
message(e.source.type); }); specifications specification status comment service workersthe definition of 'type' in that specification.
ClipboardItem - Web APIs
async function writeclipimg() { try { const imgurl = '/myimage.png'; const data = await fetch(imgurl); const blob = await data.blob(); await navigator.clipboard.write([ new clipboarditem({ [blob.type]: blob }) ]); console.log('fetched image copied.'); } catch(err) { console.error(err.name, err.
message); } } reading from the clipboard here we're returning all items on the clipboard via the clipboard.read() method.
... async function getclipboardcontents() { try { const clipboarditems = await navigator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.
message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
console.debug() - Web APIs
the console method debug() outputs a
message to the web console at the "debug" log level.
... the
message is only displayed to the user if the console is configured to display debug output.
Console.group() - Web APIs
this indents following console
messages by an additional level, until console.groupend() is called.
... using groups in the console requires gecko 9.0(firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) you can use nested groups to help organize your output by visually associating related
messages.
console.log() - Web APIs
the console method log() outputs a
message to the web console.
... the
message may be a single string (with optional substitution values), or it may be any one or more javascript objects.
ContentIndex - Web APIs
png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.
message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves items within the content index and iterates over each entry, building a list for the interface.
...ync function createreadinglist() { // access our service worker registration const registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if there are no entries, display a
message const
message = document.createelement('p');
message.innertext = 'you currently have no articles saved for offline reading.' readinglistelem.append(
message); } else { // if entries are present, display in a list of links to the content const listelem = document.createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); ...
Content Index API - Web APIs
png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.
message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves items within the content index and iterates over each entry, building a list for the interface.
...ync function createreadinglist() { // access our service worker registration const registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if there are no entries, display a
message const
message = document.createelement('p');
message.innertext = 'you currently have no articles saved for offline reading.' readinglistelem.append(
message); } else { // if entries are present, display in a list of links to the content const listelem = document.createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); ...
DOMException() - Web APIs
the domexception() constructor returns a domexception object with a specified
message and name.
... syntax var domexception = new domexception(); var domexception = new domexception(
message); var domexception = new domexception(
message, name); parameters
message optional a description of the exception.
DOMException - Web APIs
constructor domexception() returns a domexception object with a specified
message and name.
... domexception.
message read only returns a domstring representing a
message or description associated with the given error name.
DeprecationReportBody - Web APIs
message a string containing a human-readable description of the deprecation, including information such as what newer feature has superceded it, if any.
... this typically matches the
message a browser will display in its devtools console when a deprecated feature is used, if one is available.
Element.requestFullscreen() - Web APIs
function togglefullscreen() { let elem = document.queryselector("video"); if (!document.fullscreenelement) { elem.requestfullscreen().catch(err => { alert(`error attempting to enable full-screen mode: ${err.
message} (${err.name})`); }); } else { document.exitfullscreen(); } } if the document isn't already in full-screen mode—detected by looking to see if document.fullscreenelement has a value—we call the video's requestfullscreen() method.
... we don't need to do anything special if successful, but if the request fails, our promise's catch() handler presents an alert with an appropriate error
message.
Encrypted Media Extensions API - Web APIs
interfaces mediakey
messageevent contains the content and related data when the content decryption module (cdm) generates a
message for the session.
... mediakeysession represents a context for
message exchange with a content decryption module (cdm).
EventSource() - Web APIs
syntax eventsource = new eventsource(url, configuration); parameters url a usvstring that represents the location of the remote resource serving the events/
messages.
... examples var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.on
message = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "
message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
FileSystemEntry.isDirectory - Web APIs
if the entry is neither, an error handler is called with an appropriate
message.
... if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerror
message("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isdirectory' in that specification.
FileSystemEntry.isFile - Web APIs
if the entry is neither, an error handler is called with an appropriate
message.
... if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerror
message("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isfile' in that specification.
Using the Geolocation API - Web APIs
this object type contains two properties, a code indicating what type of error has been returned, and a human-readable
message that describes what the error code means.
... you could use it like so: function errorcallback(error) { alert(`error(${error.code}): ${error.
message}`); }; examples in the following example the geolocation api is used to retrieve the user's latitude and longitude.
HTMLButtonElement - Web APIs
htmlbuttonelement.validation
message read only is a domstring representing the localized
message that describes the validation constraints that the control does not satisfy (if any).
... the following attributes have been added: autofocus, formaction, formenctype, formmethod, formnovalidate, formtarget, labels, validity, validation
message, and willvalidate.
HTMLCanvasElement: webglcontextcreationerror event - Web APIs
this event has a webglcontextevent.status
message property, which can contain a platform dependent string with more information about the failure.
... bubbles yes cancelable yes interface webglcontextevent event handler property none example var canvas = document.getelementbyid('canvas'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log(e.status
message || 'unknown error'); }, false); var gl = canvas.getcontext('webgl'); // logs status
message or "unknown error" if unable to create webgl context specifications specification status comment webgl 1.0the definition of 'webglcontextcreationerror' in that specification.
HTMLElement: transitioncancel event - Web APIs
d'); }); the same, but using the ontransitioncancel property instead of addeventlistener(): const transition = document.queryselector('.transition'); transition.ontransitioncancel = () => { console.log('transition canceled'); }; live example in the following example, we have a simple <div> element, styled with a transition that includes a delay: <div class="transition"></div> <div class="
message"></div> .transition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform background; transition-duration: 2s; transition-delay: 2s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to this, we'll add some javascript to indicate that the transitionstart, transitionrun, transitioncancel and transitionend events f...
... const
message = document.queryselector('.
message'); const el = document.queryselector('.transition'); el.addeventlistener('transitionrun', function() {
message.textcontent = 'transitionrun fired'; }); el.addeventlistener('transitionstart', function() {
message.textcontent = 'transitionstart fired'; }); el.addeventlistener('transitioncancel', function() {
message.textcontent = 'transitioncancel fired'; }); el.addeventlistener('transitionend', function() {
message.textcontent = 'transitionend fired'; }); the transitioncancel event is fired if the transition is cancelled ...
HTMLElement: transitionend event - Web APIs
=> { console.log('transition ended'); }); the same, but using the ontransitionend: const transition = document.queryselector('.transition'); transition.ontransitionend = () => { console.log('transition ended'); }; live example in the following example, we have a simple <div> element, styled with a transition that includes a delay: <div class="transition">hover over me</div> <div class="
message"></div> .transition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform background; transition-duration: 2s; transition-delay: 1s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to this, we'll add some javascript to indicate that the transitionstart, transitionrun, transitioncancel and transitionend events f...
... const
message = document.queryselector('.
message'); const el = document.queryselector('.transition'); el.addeventlistener('transitionrun', function() {
message.textcontent = 'transitionrun fired'; }); el.addeventlistener('transitionstart', function() {
message.textcontent = 'transitionstart fired'; }); el.addeventlistener('transitioncancel', function() {
message.textcontent = 'transitioncancel fired'; }); el.addeventlistener('transitionend', function() {
message.textcontent = 'transitionend fired'; }); the transitionend event is fired in both directions: when the box f...
HTMLElement: transitionrun event - Web APIs
ame, but using the ontransitionrun property instead of addeventlistener(): el.ontransitionrun = () => { console.log('transition started running, and will start transitioning when the transition delay has expired'); }; live example in the following example, we have a simple <div> element, styled with a transition that includes a delay: <div class="transition">hover over me</div> <div class="
message"></div> .transition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform, background; transition-duration: 2s; transition-delay: 1s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to this, we'll add some javascript to indicate where the transitionstart and transitionrun events fire.
... const el = document.queryselector('.transition'); const
message = document.queryselector('.
message'); el.addeventlistener('transitionrun', function() {
message.textcontent = 'transitionrun fired'; }); el.addeventlistener('transitionstart', function() {
message.textcontent = 'transitionstart fired'; }); el.addeventlistener('transitionend', function() {
message.textcontent = 'transitionend fired'; }); the difference is that: transitionrun fires when the transition is created (i.e.
HTMLElement: transitionstart event - Web APIs
nstart', () => { console.log('started transitioning'); }); the same, but using the ontransitionstart property instead of addeventlistener(): element.ontransitionrun = () => { console.log('started transitioning'); }; live example in the following example, we have a simple <div> element, styled with a transition that includes a delay: <div class="transition">hover over me</div> <div class="
message"></div> .transition { width: 100px; height: 100px; background: rgba(255,0,0,1); transition-property: transform, background; transition-duration: 2s; transition-delay: 1s; } .transition:hover { transform: rotate(90deg); background: rgba(255,0,0,0); } to this, we'll add some javascript to indicate where the transitionstart and transitionrun events fire.
... const transition = document.queryselector('.transition'); const
message = document.queryselector('.
message'); transition.addeventlistener('transitionrun', function() {
message.textcontent = 'transitionrun fired'; }); transition.addeventlistener('transitionstart', function() {
message.textcontent = 'transitionstart fired'; }); transition.addeventlistener('transitionend', function() {
message.textcontent = 'transitionend fired'; }); the difference is that: transitionrun fires when the transition is created (i.e.
HTMLSelectElement.setCustomValidity() - Web APIs
the htmlselectelement.setcustomvalidity() method sets the custom validity
message for the selection element to the specified
message.
... syntax selectelt.setcustomvalidity(string); parameters string is the domstring containing the error
message.
KeyboardEvent.key - Web APIs
adding-left: 20px; padding-right: 20px; } .fx > div:first-child { width: 30%; } .flex { -webkit-flex: 1; flex: 1; } #test-target { display: block; width: 100%; margin-bottom: 10px; } javascript let textarea = document.getelementbyid('test-target'), consolelog = document.getelementbyid('console-log'), btnclearconsole = document.getelementbyid('btn-clear-console'); function log
message(
message) { document.getelementbyid("console-log").innerhtml +=
message + "<br>"; } textarea.addeventlistener('keydown', (e) => { if (!e.repeat) log
message(`key "${e.key}" pressed [event: keydown]`); else log
message(`key "${e.key}" repeating [event: keydown]`); }); textarea.addeventlistener('beforeinput', (e) => { log
message(`key "${e.data}" about to be input [event: beforeinp...
...ut]`); }); textarea.addeventlistener('input', (e) => { log
message(`key "${e.data}" input [event: input]`); }); textarea.addeventlistener('keyup', (e) => { log
message(`key "${e.key}" released [event: keyup]`); }); btnclearconsole.addeventlistener('click', (e) => { let child = consolelog.firstchild; while (child) { consolelog.removechild(child); child = consolelog.firstchild; } }); result note: on browsers that don't fully implement the inputevent interface which is used for the beforeinput and input events, you may get incorrect output on those lines of the log output.
MIDIInput - Web APIs
use the midiinput interface of the web midi api to access and pass
messages to a midi input port.
... event handlers midiinput.onmidi
message when the current port receives a midi
message it triggers a call to this event handler.
MediaError.code - Web APIs
to get a text string with specific diagnostic information, see mediaerror.
message.
...the error handler simply outputs a
message var obj = document.createelement('video'); obj.onerror = function() {console.log("error with media: " + obj.error.code);} obj.src="https://example.com/blahblah.mp4"; specifications specification status comment html living standardthe definition of 'mediaerror.code' in that specification.
MediaError - Web APIs
a mediaerror object describes the error in general terms using a numeric code categorizing the kind of error, and a
message, which provides specific diagnostics about what went wrong.
... mediaerror.
message a domstring object containing a human-readable string which provides specific diagnostic information to help the reader understand the error condition which occurred; specifically, it isn't simply a summary of what the error code means, but actual diagnostic information to help in understanding what exactly went wrong.
MediaKeys - Web APIs
methods mediakeys.createsession() returns a new mediakeysession object, which represents a context for
message exchange with a content decryption module (cdm).
... mediakeys.setservercertificate() returns a promise to a server certificate to be used to encrypt
messages to the license server.
MediaRecorder.onwarning - Web APIs
mediarecorder.onwarning = function(e) { console.log("a warning has been raised: " + e.
message); } ...
... properties
message contains information about the error that occurred.
MediaStreamConstraints.audio - Web APIs
let audioelement = document.getelementbyid("audio"); let logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ audio: true }).then(stream => audioelement.srcobject = stream) .catch(err => log(err.name + ": " + err.
message)); }, false); here we see an event handler for a click event which uses getusermedia() to obtain an audio-only stream with no specific constraints, then attaches the resulting stream to an <audio> element once the stream is returned.
...; let logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ audio: { samplesize: 8, echocancellation: true } }).then(stream => audioelement.srcobject = stream) .catch(err => log(err.name + ": " + err.
message)); }, false); here we see an event handler for a click event which calls getusermedia(), specifying a set of audio constraints requesting that echo cancellation be enabled and that, if possible, the sample rate be 8 bits per sample instead of the more common 16 bits (possibly as a bandwidth saving measure).
MediaStreamConstraints.video - Web APIs
let videoelement = document.getelementbyid("video"); let logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ video: true }).then(stream => videoelement.srcobject = stream) .catch(err => log(err.name + ": " + err.
message)); }, false); here we see an event handler for a click event which uses getusermedia() to obtain a video-only stream with no specific constraints, then attaches the resulting stream to a <video> element once the stream is returned.
...= document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ video: { width: 160, height: 120, framerate: 15 } }).then(stream => videoelement.srcobject = stream) .catch(err => log(err.name + ": " + err.
message)); }, false); here we see an event handler for a click event which calls getusermedia(), specifying a set of video constraints that indicate a preference for a video track whose dimensions are as close as possible to 160x120 pixels, and whose frame rate is as close to 15 frames per second as possible.
Transcoding assets for Media Source Extensions - Web APIs
.mp4 splitting media file (video) video_01250.mp4 splitting media file (video) video_01625.mp4 splitting media file (video) video_02000.mp4 $ tree -l 2 output output ├── audio │ └── und ├── stream.mpd └── video ├── 1 ├── 2 ├── 3 ├── 4 └── 5 8 directories, 1 file note: mp4-dash-encode.py does not display ffmpeg error
messages.
... note: if "invalid duration specification for force_key_frames: 'expr:eq(mod(n" is displayed as an error
message, modify mp4-dash-encode.py and remove two "'" from "-force_key_frames 'expr:eq(mod(n,%d),0)'".
Using the Notifications API - Web APIs
examples one of the most obvious use cases for web notifications is a web-based mail or irc application that needs to notify the user when a new
message is received, even if the user is doing something else with another application.
... replacing existing notifications it is usually undesirable for a user to receive a lot of notifications in a short space of time — for example, what if a messenger application notified a user for each incoming
message, and they were being sent a lot?
OffscreenCanvas - Web APIs
main.js (main thread code): var htmlcanvas = document.getelementbyid("canvas"); var offscreen = htmlcanvas.transfercontroltooffscreen(); var worker = new worker("offscreencanvas.js"); worker.post
message({canvas: offscreen}, [offscreen]); offscreencanvas.js (worker code): on
message = function(evt) { var canvas = evt.data.canvas; var gl = canvas.getcontext("webgl"); // ...
...}; you can also use requestanimationframe in workers on
message = function(evt) { const canvas = evt.data.canvas; const gl = canvas.getcontext("webgl"); function render(time) { // ...
PaymentDetailsUpdate.error - Web APIs
the paymentdetailsupdate dictionary's error property is a human-readable domstring which provides an error
message to be displayed if the specified information doesn't offer any valid shipping options.
... this
message can be used to explain to the user why they cannot submit their payment as currently specified—whether that's because the selected products cannot be shipped to their region or because their address is not served by any of the shipping companies you use.
PerformanceResourceTiming.decodedBodySize - Web APIs
the decodedbodysize read-only property returns the size (in octets) received from the fetch (http or cache) of the
message body, after removing any applied content-codings.
... syntax resource.decodedbodysize; return value the size (in octets) received from the fetch (http or cache) of the
message body, after removing any applied content-codings.
Permissions.query() - Web APIs
uservisibleonly: (push only, not supported in firefox — see the browser support section below) indicates whether you want to show a notification for every
message or be able to send silent push notifications.
... sysex: (midi only) indicates whether you need and/or receive system exclusive
messages.
Permissions.revoke() - Web APIs
uservisibleonly: (push only, not supported in firefox — see the browser compatibility section below) indicates whether you want to show a notification for every
message or be able to send silent push notifications.
... sysex: (midi only) indicates whether you need and/or receive system exclusive
messages.
PushManager.permissionState() - Web APIs
it can have the following properties: uservisibleonly: a boolean indicating that the returned push subscription will only be used for
messages whose effect is made visible to the user.
... applicationserverkey: a public key your push server will use to send
messages to client apps via a push server.
PushManager.subscribe() - Web APIs
it can have the following properties: uservisibleonly: a boolean indicating that the returned push subscription will only be used for
messages whose effect is made visible to the user.
...if specified, all
messages from your application server must use the vapid authentication scheme, and include a jwt signed with the corresponding private key.
PushSubscription.endpoint - Web APIs
the endpoint takes the form of a custom url pointing to a push server, which can be used to send a push
message to the particular service worker instance that subscribed to the push service.
... example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.subscribe({uservisibleonly: true}).then(function(subscription) { console.log(subscription.endpoint); // at this point you would most likely send the subscription // endpoint to your server, save it, then use it to send a // push
message at a later date }) }) specifications specification status comment push apithe definition of 'endpoint' in that specification.
PushSubscription.options - Web APIs
syntax var options = pushsubscription.options value an read-only options object containing the following values: uservisibleonly: a boolean, indicating that the returned push subscription will only be used for
messages whose effect is made visible to the user.
... applicationserverkey: a public key your push server will use to send
messages to client apps via a push server.
RTCDataChannel.close() - Web APIs
the transport layer deals with any buffered
messages; the protocol layer decides whether to send them or discard them.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); dc.on
message = function (event) { console.log("received: " + event.data); dc.close(); // we decided to close after the first received
message }; dc.onopen = function () { console.log("datachannel open"); }; dc.onclose = function ( console.log("datachannel close"); }; // now negotiate the connection and so forth...
RTCDataChannel: close event - Web APIs
dc.addeventlistener("close", ev => {
messageinputbox.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; }, false); all this code does in response to receiving the close event is to disable an input box and its "send" button, and to enable the button used to start a call (while disabling the one that ends a call).
... you can also use the onclose event handler property to set a handler for close events: dc.onclose = ev => {
messageinputbox.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'close' in that specification.
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a
message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.
... syntax var tries = adatachannel.maxretransmits; value the maximum number of times the browser will try to retransmit a
message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called.
RTCDataChannel.onclose - Web APIs
this way, the
message entry field and the send button are only enabled for use when the connection is actually open.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel("
messagechannel")}}; dc.onopen = function(event) { document.getelementbyid("
messagebox").disabled = false; document.getelementbyid("sendbutton").disabled = false; }; dc.onclose = function(event) { document.getelementbyid("
messagebox").disabled = true; document.getelementbyid("sendbutton").disabled = true; } /* now negotiate the connection, etc...
RTCDataChannel.onerror - Web APIs
the error handler passes information about the error to a ui library's alert box function to present an error
message to the user.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel("playercontrol"); dc.onerror = function(event) { myuilibrary.doalertbox({ 'network error', // alert title 'the error "' + event.
message + '" occurred while handling player control network
messages.', event.filename, event.lineno, event.colno }); } /* ...
RTCDataChannel.protocol - Web APIs
the ability for each channel to have a defined subprotocol lets your app, for example, use json objects as
messages on one channel while another channel is plaintext and another is raw binary or even some other format.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel", { protocol: "json" }); function handlechannel
message(datachannel, msg) { switch(datachannel.protocol) { case "json": /* process json data */ break; case "raw": /* process raw binary data */ break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.protocol' in that specification.
RTCDataChannel.readyState - Web APIs
it is no longer possible to queue new
messages to be sent, but previously queued
messages may still be send or received before entering the "closed" state.
... example var datachannel = peerconnection.createdatachannel("file transfer"); var sendqueue = []; function send
message(msg) { switch(datachannel.readystate) { case "connecting": console.log("connection not open; queueing: " + msg); sendqueue.push(msg); break; case "open": sendqueue.foreach((msg) => datachannel.send(msg)); break; case "closing": console.log("attempted to send
message while closing: " + msg); break; case "closed": console.log("error!
RTCErrorEvent.error - Web APIs
datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdplinenumber; let err
message = error.
message; let alert
message = `a syntax error occurred interpreting line ${errline} of the sdp: ${err
message}`; showmyalert
message("data channel error", alert
message); } else { terminatemyconnection(); } }); if the error is an sdp syntax error—indicated by its errordetail property being sdp-syntax-error—, a
message string is constructed to present the error
message an...
...this
message is then displayed using a function called showmyalert
message(), which stands in for whatever output mechanism this code might use.
RTCIceCandidateInit.candidate - Web APIs
if your client-side signaling layer builds and transmits a json string including the candidate to the remote peer, the remote peer might handle receiving that json
message like this: function goticecandidate
message(msg) { var icecandidate = new rtcicecandidate({ candidate: msg.candidate; }); pc.addicecandidate(icecandidate).catch({ /* handle error */ }); } it's helpful to note that for backward compatibility with older versions of the webrtc specification, the rtcicecandidate() constructor accepts the value of candidate as its only input, in...
...that usage would change the above sample to look like this: function goticecandidate
message(msg) { var icecandidate = new rtcicecandidate(msg.candidate); pc.addicecandidate(icecandidate).catch({ /* handle error */ }); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.candidate' in that specification.
RTCPeerConnection.addIceCandidate() - Web APIs
syntax apromise = pc.addicecandidate(candidate); addicecandidate(candidate, successcallback, failurecallback); parameters candidate optional an object conforming to the rtcicecandidateinit dictionary, or an rtcicecandidate object; the contents of the object should be constructed from a
message received over the signaling channel, describing a newly received ice candidate that's ready to be delivered to the local ice agent.
... // this example assumes that the other peer is using a signaling channel as follows: // // pc.onicecandidate = event => { // if (event.candidate) { // signalingchannel.send(json.stringify({ice: event.candidate})); // "ice" is arbitrary // } else { // // all ice candidates have been sent // } // } signalingchannel.on
message = receivedstring => { const
message = json.parse(receivedstring); if (
message.ice) { // a typical value of ice here might look something like this: // // {candidate: "candidate:0 1 udp 2122154243 192.168.1.9 53421 typ host", sdpmid: "0", ...} // // pass the whole thing to addicecandidate: pc.addicecandidate(
message.ice).catch(e => { console.log("failure during a...
RTCPeerConnection.createAnswer() - Web APIs
this code comes from the handler for the
message sent to carry an offer to another peer across the signaling channel.
...in this case, a websocket connection is used to send a json
message with a type field with the value "video-answer" to the other peer, carrying the answer to the device which sent the offer to connect.
RTCPeerConnection: datachannel event - Web APIs
pc.addeventlistener("datachannel", ev => { receivechannel = ev.channel; receivechannel.on
message = myhandle
message; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; }, false); receivechannel is set to the value of the event's channel property, which specifies the rtcdatachannel object representing the data channel linking the remote peer to the local one.
... this same code can also instead use the rtcpeerconnection interface's ondatachannel event handler property, like this: pc.ondatachannel = ev => { receivechannel = ev.channel; receivechannel.on
message = myhandle
message; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'datachannel' in that specification.
RTCPeerConnection.onicecandidate - Web APIs
this happens whenever the local ice agent needs to deliver a
message to the other peer through the signaling server.
...this
message should not be sent to the remote peer.
RTCPeerConnectionIceErrorEvent.address - Web APIs
examples this example creates a handler for icecandidateerror events which creates human readable
messages describing the local network interface for the connection as well as the ice server that was being used to try to open the connection, then calls a function to display those as well as the event's errortext property's contents.
... pc.addeventlistener("icecandidateerror", (event) => { let networkinfo = `[local interface: ${event.address}:${event.port}`; let iceserverinfo = `[ice server: ${event.url}`; show
message(errortext, iceserverinfo, networkinfo); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceerrorevent.address' in that specification.
RTCRtpStreamStats.pliCount - Web APIs
a pli
message is used by video decoders (running on the receiving end of the stream) to notify the encoder (the sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost.
...however, the primary purpose of this
message is to allow the sender to consider techniques to mitigate network performance issues.
RTCSctpTransport - Web APIs
possibly the most useful property on this interface is its max
messagesize property, which you can use to determine the upper limit on the size of
messages you can send over a data channel on the peer connection.
... rtcsctptransport.max
messagesizeread only an integer value indicating the maximum size, in bytes, of a
message which can be sent using the rtcdatachannel.send() method.
RTCSessionDescription - Web APIs
example signalingchannel.on
message = function (evt) { if (!pc) start(false); var
message = json.parse(evt.data); if (
message.sdp) pc.setremotedescription(new rtcsessiondescription(
message), function () { // if we received an offer, we need to answer if (pc.remotedescription.type == "offer") pc.createanswer(localdesccreated, logerror); }, logerror); el...
...se pc.addicecandidate(new rtcicecandidate(
message.candidate), function () {}, logerror); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription' in that specification.
Response.redirected - Web APIs
in the code below, a textual
message is inserted into an element when a redirect occurred during the fetch operation.
... fetch("awesome-picture.jpg").then(function(response) { let elem = document.getelementbyid("warning-
message-box"); if (response.redirected) { elem.innerhtml = "unexpected redirect"; } else { elem.innerhtml = ""; } return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); document.getelementbyid("img-element-id").src = imgobjecturl; }); disallowing redirects because using redirected to manually filter out redirects can allow forgery of redirects, you should instead set the redirect mode to "error" in the init parameter when calling fetch(), like this: fetch("awesome-picture.jpg", { red...
Using the Screen Capture API - Web APIs
video: { cursor: "always" }, audio: false }; // set event listeners for the start and stop buttons startelem.addeventlistener("click", function(evt) { startcapture(); }, false); stopelem.addeventlistener("click", function(evt) { stopcapture(); }, false); logging content to make logging of errors and other issues easy, this example overrides certain console methods to output their
messages to the <pre> block whose id is log.
... if any of that fails, the catch() clause outputs an error
message to the log box.
Server-sent events - Web APIs
with server-sent events, it's possible for a server to send new data to a web page at any time, by pushing
messages to the web page.
... these incoming
messages can be treated as events + data inside the web page.
SharedWorkerGlobalScope - Web APIs
sharedworkerglobalscope.onconnect is an eventhandler representing the code to be called when the connect event is raised — that is, when a
messageport connection is opened between the associated sharedworker and the main thread.
... workerglobalscope.dump() allows you to write a
message to stdout — i.e.
Transferable - Web APIs
this interface does not define any method or property; it is merely a tag indicating objects that can be used in specific conditions, such as being transfered to a worker using the worker.post
message() method.
... the arraybuffer,
messageport, imagebitmap and offscreencanvas types implement this interface.
A basic 2D WebGL animation example - Web APIs
if an error occurrs while linking the program, the error
message is logged to console.
...note the use of a template literal string to insert the correct shader type string into the
message that gets generated.
Boilerplate 1 - Web APIs
specifically, the html has a <p> element that contains some descriptive text about the page and may also hold error
messages; a <canvas> element; and optionally a <button>.
...in case of error, it displays an error
message and returns null.
WebGL best practices - Web APIs
every webgl error is reported in the web console as a javascript warning with a descriptive
message.
... after too many errors (32 in firefox), webgl stops generating descriptive
messages, which really hinders debugging.
Lifetime of a WebRTC session - Web APIs
information exchanged during signaling there are three basic types of information that need to be exchanged during signaling: control
messages used to set up, open, and close the communication channel, and to handle errors.
... each peer connects to an agreed-upon signaling server, such as a websocket server they both know how to exchange
messages with.
The WebSocket API (WebSockets) - Web APIs
with this api, you can send
messages to a server and receive event-driven responses without having to poll the server for a reply.
...
messageevent the event sent by the websocket object when a
message is received from the server.
Web Audio API - Web APIs
audioworkletnode the audioworkletnode interface represents an audionode that is embedded into an audio graph and can pass
messages to the corresponding audioworkletprocessor.
... audioworkletprocessor the audioworkletprocessor interface represents audio processing code running in a audioworkletglobalscope that generates, processes, or analyses audio directly, and can pass
messages to the corresponding audioworkletnode.
Web Workers API - Web APIs
data is sent between workers and the main thread via a system of
messages — both sides send their
messages using the post
message() method, and respond to
messages via the on
message event handler (the
message is contained within the
message event's data property).
... worker represents a running worker thread, allowing you to pass
messages to the running worker code.
Window.alert() - Web APIs
syntax window.alert(
message); parameters
message optional a string you want to display in the alert dialog, or, alternatively, an object that is converted into a string and displayed.
... example window.alert("hello world!"); alert("hello world!"); both produce: notes the alert dialog should be used for
messages which do not require any response on the part of the user, other than the acknowledgement of the
message.
Window.confirm() - Web APIs
the window.confirm() method displays a modal dialog with an optional
message and two buttons: ok and cancel.
... syntax result = window.confirm(
message); parameters
message a string you want to display in the alert dialog.
Window.open() - Web APIs
will create a new window or will re-use an already opened one" >promote firefox adoption</a></p> <p><a href="http://www.mozilla.org/support/firefox/faq" target="singlesecondarywindowname" onclick="openrequestedsinglepopup(this.href); return false;" title="this link will create a new window or will re-use an already opened one" >firefox faq</a></p> faq how can i prevent the confirmation
message asking the user whether they want to close the window?
...the javascript console in mozilla-based browsers will report the warning
message: "scripts may not close windows that were not opened by script." otherwise the history of urls visited during the browser session would be lost.
Window.prompt() - Web APIs
the window.prompt() displays a dialog with an optional
message prompting the user to input some text.
... syntax result = window.prompt(
message, default); parameters
message optional a string of text to display to the user.
WindowEventHandlers - Web APIs
windoweventhandlers.on
message is an eventhandler representing the code to be called when the
message event is raised.
... windoweventhandlers.on
messageerror is an eventhandler representing the code to be called when the
messageerror event is raised.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
you'll see a
message popping up in a second.
... var alarm = { remind: function(a
message) { alert(a
message); this.timeoutid = undefined; }, setup: function() { if (typeof this.timeoutid === 'number') { this.cancel(); } this.timeoutid = window.settimeout(function(msg) { this.remind(msg); }.bind(this), 1000, 'wake up!'); }, cancel: function() { window.cleartimeout(this.timeoutid); } }; window.onclick = function() { alarm.setup(); }; notes passing an invalid id to cleartimeout() silently does nothing; no exception is thrown.
XMLHttpRequest - Web APIs
if your communication needs to involve receiving event data or
message data from a server, consider using server-sent events through the eventsource interface.
...unlike xmlhttprequest.status, this includes the entire text of the response
message ("200 ok", for example).
Using the alert role - Accessibility
the alert role is used to communicate an important and usually time-sensitive
message to the user.
... assistive technology products should listen for such an event and notify the user accordingly: screen readers may interrupt current output (whether it's speech or braille) and immediately announce or display the alert
message.
Using the alertdialog role - Accessibility
note: this role should only be used for alert
messages that have associated interactive controls.
... examples example 1: a basic alert dialog the code snippet below shows how to mark up an alert dialog that only provides a
message and an ok button.
Using ARIA: Roles, states, and properties - Accessibility
ation row rowgroup rowheader separator table term textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-error
message aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-readonly aria-required aria-selected aria-sort aria-valuemax aria-valuemin aria-valuenow aria-valuetext live region attributes aria-live aria-relevant aria-atomic aria-busy drag & drop attribu...
...tes aria-dropeffect aria-dragged relationship attributes aria-activedescendant aria-colcount aria-colindex aria-colspan aria-controls aria-describedby aria-details aria-error
message aria-flowto aria-labelledby aria-owns aria-posinset aria-rowcount aria-rowindex aria-rowspan aria-setsize microsoftedge-specific properties x-ms-aria-flowfrom ...
ARIA: alert role - Accessibility
the alert role is added to the node containing an alert
message, not the element causing the alert to be triggered.
...it is perfect for situations such as when a user fills out a form and javascript is used to add an error
message - the alert would immediately read out the
message.
ARIA: document role - Accessibility
however, when the keyboard focus is set on the starting heading on a single conversation that contains the subject of the conversation, the screen reader user can use the reading mode commands to read through the
messages, expand or collapse them, and manipulate them.
... once focus returns to the
message list either by activating the back button or pressing an asociated keystroke, direct application interaction mode is invoked again, and the user can move to a different conversation in the list with the arrow keys.
Accessibility documentation index - Accessibility
15 using the alert role aria, accessibility, advanced, css, example, html, needscontent, alert, alert role, alertrole, alerts, assitive technology, role configuration, wcag1.2.1, wcag3.3.1 the alert role is used to communicate an important and usually time-sensitive
message to the user.
... 103 understandable accessibility, help, language, navigation, principle 3, text, understandable, wcag, web content accessibility guidelines, abbreviations, consistency, error
messages, form validation, labels, slang this article provides practical advice on how to write your web content so that it conforms to the success criteria outlined in the understandable principle of the web content accessibility guidelines (wcag) 2.0 and 2.1.
Robust - Accessibility
4.1.3 status
messages (aa) added in 2.1 assistive technology users are made aware of new status
messages added to the page.
... understanding status
messages note: also see the wcag description for guideline 4.1: compatible: maximize compatibility with current and future user agents, including assistive technologies.
Ajax - Developer guides
with server-sent events, it's possible for a server to send new data to a web page at any time, by pushing
messages to the web page.
... these incoming
messages can be treated as events + data inside the web page.
<input type="file"> - HTML: Hypertext Markup Language
if so, print a
message into the preview <div> stating that no files have been selected.
... if the file type is invalid, we display a
message inside a list item telling the user that they need to select a different file type.
<input type="number"> - HTML: Hypertext Markup Language
it should be a word or short phrase that demonstrates the expected type of data, rather than an explanatory
message.
.../label> <input id="balloons" type="number" name="balloons" step="10" min="0" max="100" required> <span class="validity"></span> </div> <div> <input type="submit"> </div> </form> try submitting the form with different invalid values entered — e.g., no value; a value below 0 or above 100; a value that is not a multiple of 10; or a non-numerical value — and see how the error
messages the browser gives you differ with different ones.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
<noframes> can be used to present a
message explaining that the user's browser doesn't support frames, but ideally should be used to present an alternate form of the site that doesn't use frames but still offers the same or similar functionality.
...in addition, <noframes> is used to present an explanatory
message if the user agent doesn't support frames.
Using the application cache - HTML: Hypertext Markup Language
as of firefox 44+, when appcache is used to provide offline support for a page, a warning
message displays in the console advising developers to use service workers instead (bug 1204581).
...the notification bar displays a
message such as: this website (example.com) is asking to store data on your computer for offline use.
Evolution of HTTP - HTTP
ssl 1.0 was never released outside the company, but ssl 2.0 and its successor ssl 3.0 allowed for the creation of e-commerce web sites by encrypting and guaranteeing the authenticity of the
messages exchanged between the server and client.
... since 2005, the set of apis available to web pages greatly increased and several of these apis created extensions, mostly new specific http headers, to the http protocol for specific purposes: server-sent events, where the server can push occasional
messages to the browser.
Identifying resources on the Web - HTTP
urn:isbn:9780141036144 urn:ietf:rfc:7230 the two urns correspond to the book nineteen eighty-four by george orwell, the ietf specification 7230, hypertext transfer protocol (http/1.1):
message syntax and routing.
... examples https://developer.mozilla.org/docs/learn tel:+1-816-555-1212 git@github.com:mdn/browser-compat-data.git ftp://example.org/resource.txt urn:isbn:9780141036144 mailto:help@supercyberhelpdesk.info specifications specification title rfc 7230, section 2.7: uniform resource identifiers hypertext transfer protocol (http/1.1):
message syntax and routing ...
Compression in HTTP - HTTP
end-to-end compression refers to a compression of the body of a
message that is done by the server and will last unchanged until it reaches the client.
... hop-by-hop compression hop-by-hop compression, though similar to end-to-end compression, differs by one fundamental element: the compression doesn't happen on the resource in the server, creating a specific representation that is then transmitted, but on the body of the
message between any two nodes on the path between the client and the server.
Content negotiation - HTTP
compressing http
messages is one of the most important ways to improve the performance of a web site, it shrinks the size of the data transmitted and makes better use of the available bandwidth; browsers always send this header and the server should be configured to abide to it and to use compression.
...this is not too problematic with few headers, but with the eventual multiplications of them, the
message size would lead to a decrease in performance.
Content-Disposition - HTTP
the content-disposition header is defined in the larger context of mime
messages for e-mail, but only a subset of the possible parameters apply to http forms and post requests.
...--boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifications specification title rfc 7578 returning values from forms: multipart/form-data rfc 6266 use of the content-disposition header field in the hypertext transfer protocol (http) rfc 2183 communicating presentation information in internet
messages: the content-disposition header field ...
CSP: report-uri - HTTP
$current_domain; http_response_code(204); // http 204 no content $json_data = file_get_contents('php://input'); // we pretty print the json before adding it to the log file if ($json_data = json_decode($json_data)) { $json_data = json_encode($json_data, json_pretty_print | json_unescaped_slashes); if (!file_exists($log_file)) { // send an email $
message = "the following content-security-policy violation occurred on " .
... $log_file; mail($email_address, $email_subject, $
message, 'content-type: text/plain;charset=utf-8'); } else if (filesize($log_file) > $log_file_size_limit) { exit(0); } file_put_contents($log_file, $json_data, file_append | lock_ex); } specifications specification status comment content security policy level 3the definition of 'report-uri' in that specification.
Keep-Alive - HTTP
note that timeouts longer than the tcp timeout may be ignored if no keep-alive tcp
message is set at the transport level.
...g: gzip content-type: text/html; charset=utf-8 date: thu, 11 aug 2016 15:23:13 gmt keep-alive: timeout=5, max=1000 last-modified: mon, 25 jul 2016 04:32:39 gmt server: apache (body) specifications specification title http keep-alive header keep-alive header (ietf internet draft) rfc 7230, appendix a.1.2: keep-alive hypertext transfer protocol (http/1.1):
message syntax and routing ...
Large-Allocation - HTTP
examples large-allocation: 0 large-allocation: 500 troubleshooting errors the large-allocation header throws warnings or error
messages when used incorrectly.
... this
message means that the browser saw the large-allocation header, and was able to reload the page into a new process which should have more available contiguous memory.
Via - HTTP
it is used for tracking
message forwards, avoiding request loops, and identifying the protocol capabilities of senders along the request/response chain.
... examples via: 1.1 vegur via: http/1.1 gwa via: 1.0 fred, 1.1 p.example.net specifications specification title rfc 7230, section 5.7.1: via hypertext transfer protocol (http/1.1):
message syntax and routing ...
Warning - HTTP
the warning general http header contains information about possible problems with the status of the
message.
... warning header fields can in general be applied to any
message, however some warn-codes are specific to caches and can only be applied to response
messages.
TRACE - HTTP
the http trace method performs a
message loop-back test along the path to the target resource, providing a useful debugging mechanism.
... the final recipient of the request should reflect the
message received, excluding some fields described below, back to the client as the
message body of a 200 (ok) response with a content-type of
message/http.
HTTP range requests - HTTP
http range requests allow to send only a portion of an http
message from a server to a client.
...the content-range response header indicates where in the full resource this partial
message belongs.
Redirections in HTTP - HTTP
if you serve the response as the result of this request, a simple press of the reload button will resend the request (possibly after a confirmation
message).
...in this case, browsers will detect it and display an error
message.
HTTP resources and specifications - HTTP
specification title status rfc 7230 hypertext transfer protocol (http/1.1):
message syntax and routing proposed standard rfc 7231 hypertext transfer protocol (http/1.1): semantics and content proposed standard rfc 7232 hypertext transfer protocol (http/1.1): conditional requests proposed standard rfc 7233 hypertext transfer protocol (http/1.1): range requests proposed standard rfc 7234 hypertext transfer protocol (http/...
...l (http) keep-alive header informational (expired) draft spec http client hints ietf draft rfc 7578 returning values from forms: multipart/form-data proposed standard rfc 6266 use of the content-disposition header field in the hypertext transfer protocol (http) proposed standard rfc 2183 communicating presentation information in internet
messages: the content-disposition header field only a subset of syntax of the content-disposition header can be used in the context of http
messages.
Private class fields - JavaScript
class classwithprivatemethod { #privatemethod() { return 'hello world' } getprivate
message() { return this.#privatemethod() } } const instance = new classwithprivatemethod() console.log(instance.getprivate
message()) // expected output: "hello worl​d" private instance methods may be generator, async, or async generator functions.
... private getters and setters are also possible: class classwithprivateaccessor { #
message get #decorated
message() { return `✨${this.#
message}✨` } set #decorated
message(msg) { this.#
message = msg } constructor() { this.#decorated
message = 'hello world' console.log(this.#decorated
message) } } new classwithprivateaccessor(); // expected output: "✨hello worl​d✨" specifications specification public and private instance fieldsthe definition of 'fielddefinition' in that specification.
JavaScript error reference - JavaScript
each error is an object based upon the error object, and has a name and a
message.
... list of errors in this list, each page is listed by name (the type of error) and
message (a more detailed human-readable error
message).
AggregateError - JavaScript
instance properties aggregateerror.prototype.
message error
message, defaults to "".
... examples catching an aggregateerror promise.any([ promise.reject(new error("some error")), ]).catch(e => { console.log(e instanceof aggregateerror); // true console.log(e.
message); // "all promises rejected" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] }); creating an aggregateerror try { throw new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.
message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some err...
Error.prototype.toString() - JavaScript
'error' : string(name); var msg = this.
message; msg = (msg === undefined) ?
... '' : string(msg); if (name === '') { return msg; } if (msg === '') { return name; } return name + ': ' + msg; }; examples using tostring() var e = new error('fatal error'); console.log(e.tostring()); // 'error: fatal error' e.name = undefined; console.log(e.tostring()); // 'error: fatal error' e.name = ''; console.log(e.tostring()); // 'fatal error' e.
message = undefined; console.log(e.tostring()); // '' e.name = 'hello'; console.log(e.tostring()); // 'hello' specifications specification ecmascript (ecma-262)the definition of 'error.prototype.tostring' in that specification.
EvalError() constructor - JavaScript
syntax new evalerror([
message[, filename[, linenumber]]]) parameters
message optional.
... creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.
message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constr...
Promise.all() - JavaScript
it rejects immediately upon any of the input promises rejecting or non-promises throwing an error, and will reject with this first rejection
message / error.
... var p3 = new promise((resolve, reject) => { settimeout(() => resolve('three'), 3000); }); var p4 = new promise((resolve, reject) => { settimeout(() => resolve('four'), 4000); }); var p5 = new promise((resolve, reject) => { reject(new error('reject')); }); // using .catch: promise.all([p1, p2, p3, p4, p5]) .then(values => { console.log(values); }) .catch(error => { console.error(error.
message) }); //from console: //"reject" it is possible to change this behaviour by handling possible rejections: var p1 = new promise((resolve, reject) => { settimeout(() => resolve('p1_delayed_resolution'), 1000); }); var p2 = new promise((resolve, reject) => { reject(new error('p2_immediate_rejection')); }); promise.all([ p1.catch(error => { return error }), p2.catch(error => { return er...
RangeError - JavaScript
instance properties rangeerror.prototype.
message error
message.
... although ecma-262 specifies that rangeerror should provide its own
message property, in spidermonkey, it inherits error.prototype.
message.
SyntaxError() constructor - JavaScript
syntax new syntaxerror([
message[, filename[, linenumber]]]) parameters
message optional human-readable description of the error filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.
message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 1...
...0); } catch (e) { console.error(e instanceof syntaxerror); // true console.error(e.
message); // hello console.error(e.name); // syntaxerror console.error(e.filename); // somefile.js console.error(e.linenumber); // 10 console.error(e.columnnumber); // 0 console.error(e.stack); // @debugger eval code:3:9 } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
WebAssembly.CompileError() constructor - JavaScript
syntax new webassembly.compileerror(
message, filename, linenumber) parameters
message optional human-readable description of the error.
... examples creating a new compileerror instance the following snippet creates a new compileerror instance, and logs its details to the console: try { throw new webassembly.compileerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof compileerror); // true console.log(e.
message); // "hello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly jav...
WebAssembly.LinkError() constructor - JavaScript
syntax new webassembly.linkerror(
message, filename, linenumber) parameters
message optional human-readable description of the error.
... examples creating a new linkerror instance the following snippet creates a new linkerror instance, and logs its details to the console: try { throw new webassembly.linkerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof linkerror); // true console.log(e.
message); // "hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javasc...
WebAssembly.RuntimeError() constructor - JavaScript
syntax new webassembly.runtimeerror(
message, filename, linenumber) parameters
message optional human-readable description of the error.
... examples creating a new runtimeerror instance the following snippet creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.
message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly jav...
WebAssembly.compile() - JavaScript
examples using compile the following example compiles the loaded simple.wasm byte code using the compile() function and then sends it to a worker using post
message().
... var worker = new worker("wasm_worker.js"); fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => webassembly.compile(bytes) ).then(mod => worker.post
message(mod) ); note: you'll probably want to use webassembly.compilestreaming() in most cases, as it is more efficient than compile().
Optional chaining (?.) - JavaScript
do something with the data } catch (err) { if (onerror) { // testing if onerror really exists onerror(err.
message); } } } // using optional chaining with function calls function dosomething(oncontent, onerror) { try { // ...
... do something with the data } catch (err) { onerror?.(err.
message); // no exception if onerror is undefined } } optional chaining with expressions you can also use the optional chaining operator when accessing properties with an expression using the bracket notation of the property accessor: let nestedprop = obj?.['prop' + 'name']; optional chaining not valid on the left-hand side of an assignment let object = {}; object?.property = 1; // uncaught syntaxerror: invalid left-hand side in assignment array item access with optional chaining let arrayitem = arr?.[42]; examples basic example this example looks for the value of the name property for the member bar in a map when there is no such member.
<merror> - MathML
the mathml <merror> element is used to display contents as error
messages.
... in firefox this error
message is rendered similar to the typical xml error
message.
MathML documentation index - MathML
13 <merror> mathml, mathml reference, mathml:element, mathml:general layout schemata the mathml <merror> element is used to display contents as error
messages.
... in firefox this error
message is rendered similar to the typical xml error
message.
Codecs used by WebRTC - Web media technologies
however, if this isn't signaled as supported in the sdp, then it's encouraged that browsers support display orientation sei
messages, though not required.
...avc implementations for webrtc are required to support the special "filler payload" and "full frame freeze" sei
messages; these are used to support switching among multiple input streams seamlessly.
OpenSearch description format
if the error
message isn't be helpful, the following tips could help you find the problem.
... the xmlns attribute is important — without it you could get the error
message "firefox could not download the search plugin".
Populating the page: how browsers work - Web Performance
tcp's three way handshaking technique is often referred to as "syn-syn-ack"—or more accurately syn, syn-ack, ack—because there are three
messages transmitted by tcp to negotiate and start a tcp session between two computers.
... yes, this means three more
messages back and forth between each server, and the request has yet to be made.
Scripting - SVG: Scalable Vector Graphics
function myrect(x,y,w,h,
message){ this.
message=
message this.rect=document.createelementns("http://www.w3.org/2000/svg","rect") this.rect.setattributens(null,"x",x) this.rect.setattributens(null,"y",y) this.rect.setattributens(null,"width",w) this.rect.setattributens(null,"height",h) document.documentelement.appendchild(this.rect) this.rect.addeventlistener("click",this,false) this.handleevent= function(evt){ sw...
...itch (evt.type){ case "click": alert(this.
message) break; } } } inter-document scripting: referencing embedded svg when using svg within html, adobe's svg viewer 3.0 automatically includes a window property called svgdocument that points to the svg document.
Mixed content - Web security
for example, an attacker could replace an image served over http with an inappropriate image or
message to the user.
... warnings in web console the firefox web console displays a mixed content warning
message in the net pane when a page on your website has this issue.
Same-origin policy - Web security
to communicate between documents from different origins, use window.post
message.
... window the following cross-origin access to these window properties is allowed: methods window.blur window.close window.focus window.post
message attributes window.closed read only.
XML introduction - XML: Extensible Markup Language
example <?xml version="1.0" encoding="utf-8"?> <
message> <warning> hello world <!--missing </warning> --> </
message> now let's look at a corrected version of that same document: <?xml version="1.0" encoding="utf-8"?> <
message> <warning> hello world </warning> </
message> a document that contains an undefined tag is invalid.
...please refresh and try again."> ]> <body> <
message> &warning; </
message> </body> you can also use numeric character references to specify special characters; for example, © is the "©" symbol.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
<xsl:apply-imports><xsl:apply-templates><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:
message><xsl:namespace-alias><xsl:number><xsl:otherwise><xsl:output><xsl:param><xsl:preserve-space><xsl:processing-instruction><xsl:sort><xsl:strip-space><xsl:stylesheet><xsl:template><xsl:text><xsl:transform><xsl:value-of><xsl:variable><xsl:when><xsl:with-param> <xsl:apply-imports> <xsl:apply-templates> <xsl:attribute> <xsl:attribute-set> <xsl:call-template> <xsl:choose> <xsl:comment> <xsl:cop...
...y> <xsl:copy-of> <xsl:decimal-format> <xsl:element> <xsl:fallback> (not supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <xsl:include> <xsl:key> <xsl:
message> <xsl:namespace-alias> (not supported) <xsl:number> (partially supported) <xsl:otherwise> <xsl:output> (partially supported) <xsl:param> <xsl:preserve-space> <xsl:processing-instruction> <xsl:sort> <xsl:strip-space> <xsl:stylesheet> (partially supported) <xsl:template> <xsl:text> (partially supported) <xsl:transform> <xsl:value-of> (partially supported) <xsl:variable> <xsl:when> <xsl:with-param> ...
Navigator.mozNotification - Archive of obsolete content
method overview notification createnotification(in domstring title, in domstring description, in domstring iconurl optional); methods createnotification() creates and returns a notification object that can be used to display the specified
message with an optional url.
XUL Migration Guide - Archive of obsolete content
but the sdk makes a distinction between: add-on scripts, which can use the sdk apis, but are not able to interact with web pages content scripts, which can access web pages, but do not have access to the sdk's apis content scripts and add-on scripts communicate by sending each other json
messages: in fact, the ability to communicate with the add-on scripts is the only extra privilege a content script is granted over a normal remote web page script.
core/namespace - Archive of obsolete content
} widget.prototype = object.create(view.prototype); widget.prototype.post
message = function post
message(
message) { let { sandbox } = sandboxes(this); sandbox.post
message(json.stringify(json.parse(
message))); ...
lang/functional - Archive of obsolete content
g/functional"); let setup = once(function (env) { // initializing important things console.log("successfully initialized " + env); return 1; // assume success and return 1 }); setup('dev'); // returns 1 // prints "successfully initialized dev" // future attempts to call this function just return the cached // value that was returned previously setup('production'); // returns 1 // no print
message is displayed since the function isn't executed parameters fn : function the function that will be executed only once inside the once wrapper.
remote/child - Archive of obsolete content
communicating with the parent process to communicate with the parent process, the process, frames, and frame objects in sdk/remote/child have a port object that you can use to receive
messages from, and send
messages to, code in the parent.
cfx - Archive of obsolete content
cfx supports the following global options: -h, --help - show a help
message and exit -v, --verbose - enable lots of output "command-specific options" are documented alongside the commands.
jpm-mobile - Archive of obsolete content
jpm usage is: jpm-mobile [command] [options] jpm supports the following global options: -h, --help - show a help
message and exit -v, --version - print the jpm version number installation jpm-mobile is distributed using the node package manager npm, so to get jpm-mobile you need to have npm installed, if you haven't already.
Modifying a XUL Interface - Archive of obsolete content
note: if you're creating the checkbox dynamically and it's not yet added to the dom, you must use setattribute("checked", "false") instead, because the xbl isn't initiated yet.) example 6 : source view <button label="change" oncommand="this.nextsibling.checked = !this.nextsibling.checked;"/> <checkbox label="check for
messages"/> radio buttons may be selected as well using properties, however since only one in a group may be selected at a time, the others must all be unchecked when one is checked.
More Menu Features - Archive of obsolete content
the example below creates a simple submenu inside the file menu example 1 : source view <toolbox flex="1"> <menubar id="sample-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menu id="new-menu" label="new"> <menupopup id="new-popup"> <menuitem label="window"/> <menuitem label="
message"/> </menupopup> </menu> <menuitem label="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="exit"/> </menupopup> </menu> </menubar> </toolbox> adding a menu to our find files example let's add a menu to the find files dialog.
Styling a Tree - Archive of obsolete content
set the property on a row or cell, as in the following example: <treerow properties="makeitblue"> css selectors for the tree the style sheet can take this property and use it to change the appearance of the row for unread
messages or labels.
XUL Parser in Python/source - Archive of obsolete content
def strip(snip): t = re.sub('http://.*?\s', '', snip) return t class xulparser(xmllib.xmlparser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self,
message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: l...
browser - Archive of obsolete content
ibutes autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesecurity, droppedlinkhandler, homepage, showcaret, src, type properties accessibletype, cangoback, cangoforward, contentdocument, contentprincipal, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer,
messagemanager, preferences, securityui, sessionhistory, webbrowserfind, webnavigation, webprogress methods addprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, swapdocshells examples <!-- shows mozilla homepage inside a groupbox --> <groupbox flex="1"> <caption label="mozilla homepage"/> <browser type="...
description - Archive of obsolete content
</description> this is a long section of text that will not word wrap <description value="this is a long section of text that will not word wrap"> </description> this is a long section of dynamically controlled text that will word wrap <description id="desc" style="width: 300px"></description> document.getelementbyid('desc').textcontent = "this is a long section of dynamic
message text that will word wrap"; attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute.
panel - Archive of obsolete content
<panel id="thepanel"> <hbox align="start"> <image src="warning.png"/> <vbox> <description value="you have 6 new
messages."/> <hbox> <button label="read mail"/> <button label="new
message"/> </hbox> </vbox> </hbox> </panel> <description value="6 new
messages" popup="thepanel"/> attributes backdrag type: boolean setting the backdrag attribute on a xul panel lets the user move the panel by clicking and dragging anywhere on its background area.
NSS 3.44 release notes
cert_decodecertpackage() crash with netscape certificate sequences 1533616 - sdb_getattributevaluenolock should make at most one sql query, rather than one for each attribute 1531236 - provide accessor for certcertificate.dercert 1536734 - lib/freebl/crypto_primitives.c assumes a big endian machine 1532384 - in nss test certificates, use @example.com (not @bogus.com) 1538479 - post-handshake
messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc...
NSS 3.47 release notes
tls exporter in tstclnt and selfserv bug 1581024 - heap overflow in nss utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle invald tag sizes for ckm_aes_gcm bug 1576295 - check all bounds when encrypting with seed_cbc bug 1580286 - nss rejects tls 1.2 records with large padding with sha384 hmac bug 1577448 - create additional nested s/mime test
messages for thunderbird bug 1399095 - allow nss-try to be used to test nspr changes bug 1267894 - libssl should allow selecting the order of cipher suites in clienthello bug 1581507 - fix unportable grep expression in test scripts bug 1234830 - [cid 1242894][cid 1242852] unused values bug 1580126 - fix build failure on aarch64_be while building freebl/gcm bug 1385039 - build nspr tests as part of ...
NSS 3.49 release notes
in pk11install_platform_generate bug 1602288 - fix build failure due to missing posix signal.h bug 1588714 - implement checkarmsupport for win64/aarch64 bug 1585189 - nss database uses 3des instead of aes to encrypt db entries bug 1603257 - fix ubsan issue in softoken ckm_nss_chacha20_ctr initialization bug 1590001 - additional hrr tests (cve-2019-17023) bug 1600144 - treat clienthello with
message_seq of 1 as a second clienthello bug 1603027 - test that esni is regenerated after helloretryrequest bug 1593167 - intermittent mis-reporting potential security risk sec_error_unknown_issuer bug 1535787 - fix automation/release/nss-release-helper.py on macos bug 1594933 - disable building dbm by default bug 1562548 - improve gcm perfomance on aarch32 this bugzilla query returns all the bug...
Enc Dec MAC Output Public Key as CSR
*/ #ifndef port_errortostring #ifndef sec_error_base #define sec_error_base (-0x2000) #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif #endif /* * print usage
message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -s -r -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'g' for generating rsa keypair for wrapping\n\n", "g"); fprintf(stderr, "%-20s specify 'e' for encrypt operation\n\n", "e"); fprintf(stderr, "%-20s spe...
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
/* sample 6 commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* * print usage
message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> ...
Encrypt Decrypt_MAC_Using Token
-" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage
message and exit.
NSS Sample Code Sample_2_Initialization of NSS
sample code 1 /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prprf.h> /* nss headers */ #include <nss.h> #include <pk11func.h> #include "util.h" /* print a usage
message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\n",...
NSS Sample Code Sample_3_Basic Encryption and MACing
--" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* print a usage
message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c <a|b> -d <dbdirpath> [-z <noisefilename>] " "[-p <dbpwd> | -f <dbpwdfile>] -i <ipfilename> -o <opfilename>\n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c <a|b>"); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n"...
Initialize NSS database - sample 2
/* * print a usage
message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d [-p ]" " [-f ]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d "); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p "); fprintf(stderr, "%-15s specify a password file\n\n", "-f "); exit(-1); } /* * initslotpassword */ char * initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; s...
sample2
port_errortostring #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif /* sample 6 commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* * print usage
message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ",...
nss tech note3
this
message attempts to answer that question, and to document nss's approach to validating certificates for certain purposes.
Overview of NSS
ietf
message specification (based on the popular internet mime standard) that provides a consistent way to send and receive signed and encrypted mime data.
FC_DigestKey
the digest for the entire
message is returned by a call to fc_digestfinal.
nsMsgSearchAttrib
nsmsgsearchattribvalue priority = 4; /* mail only */ const nsmsgsearchattribvalue msgstatus = 5; const nsmsgsearchattribvalue to = 6; const nsmsgsearchattribvalue cc = 7; const nsmsgsearchattribvalue toorcc = 8; const nsmsgsearchattribvalue alladdresses = 9; const nsmsgsearchattribvalue location = 10; /* result list only */ const nsmsgsearchattribvalue
messagekey = 11; /*
message result elems */ const nsmsgsearchattribvalue ageindays = 12; const nsmsgsearchattribvalue folderinfo = 13; /* for "view thread context" from result */ const nsmsgsearchattribvalue size = 14; const nsmsgsearchattribvalue anytext = 15; const nsmsgsearchattribvalue keywords = 16; // keywords are the internal representation of tags.
nsMsgSearchTerm
%{c++ #define is_string_attribute(_a) \ (!(_a == nsmsgsearchattrib::priority || _a == nsmsgsearchattrib::date || \ _a == nsmsgsearchattrib::msgstatus || _a == nsmsgsearchattrib::
messagekey || \ _a == nsmsgsearchattrib::size || _a == nsmsgsearchattrib::ageindays || \ _a == nsmsgsearchattrib::folderinfo || _a == nsmsgsearchattrib::location || \ _a == nsmsgsearchattrib::label || _a == nsmsgsearchattrib::junkstatus || \ _a == nsmsgsearchattrib::folderflag || _a == nsmsgsearchattrib::uint32hdrproperty || \ _a == nsmsgsearchattrib::junkpercent || _a == nsmsgsearchattrib...
Setting HTTP request headers
var headername = "x-hello"; var headervalue = "world"; function log(text) { // var consoleservice = components.classes["@mozilla.org/consoleservice;1"].getservice(components.interfaces.nsiconsoleservice); // consoleservice.logstring
message(text); } function myhttplistener() { } myhttplistener.prototype = { observe: function(subject, topic, data) { if (topic == "http-on-modify-request") { log("----------------------------> (" + subject + ") mod request"); var httpchannel = subject.queryinterface(components.interfaces.nsihttpchannel); httpchannel.setrequestheader(headername, headervalue, f...
Warnings
sort operations this warning
message will say something about the number of sort operations that have occurred for a sql statement.
Storage
bind a statement, your javascript should look something like this to execute a statement asynchronously: statement.executeasync({ handleresult: function(aresultset) { for (let row = aresultset.getnextrow(); row; row = aresultset.getnextrow()) { let value = row.getresultbyname("column_name"); } }, handleerror: function(aerror) { print("error: " + aerror.
message); }, handlecompletion: function(areason) { if (areason != components.interfaces.mozistoragestatementcallback.reason_finished) print("query canceled or aborted!"); } }); the call to executeasync takes an object that implements mozistoragestatementcallback.
The Valgrind Test Job
understanding errors for each problem that valgrind finds, it emits a
message describing the problem, along with a stack trace indicating where the problem occurs.
Address book sync client design
* called only once, at the beginning of a sync transaction * */ void onstartoperation(in print32 atransactionid, in pruint32 amsgsize); /** * notify the observer that progress as occurred for the ab sync operation */ void onprogress(in print32 atransactionid, in pruint32 aprogress, in pruint32 aprogressmax); /** * notify the observer with a status
message for sync operation */ void onstatus(in print32 atransactionid, in wstring amsg); /** * notify the observer that the ab sync operation has been completed.
LDAP Support
in such a scenario, it may be hard to tell which person you really want to send the
message to.
Mailnews and Mail code review requirements
the procedure to use these is to be sure to: include "rs=simple-orange-fix" or "rs=orange-debugging" in the first line of the commit
message paste a link to the pushed commit with the rubber stamp in the bug make sure you pasted a link to any try-server pushes of the patch in the bug rs=simple-orange-fix requirements: the patch is fixing an intermittent orange test failure.
The libmime module
| | |--- mimemultipartparallel | | | | | |--- mimemultipartalternative | | | | | |--- mimemultipartrelated | | | | | |--- mimemultipartappledouble | | | | | |--- mimesunattachment | | | | | |--- mimemultipartsigned (abstract) | | | |--- mime
message | | | |--- mimeuntypedtext | |--- mimeleaf (abstract) | | | |--- mimeinlinetext (abstract) | | | | | |--- mimeinlinetextplain | | | | | |--- mimeinlinetexthtml | | | | | |--- mimeinlinetextrichtext | | | | | | | |--- mimeinlinetextenriched ...
Creating a Custom Column
getcelltext() is the text that is displayed to the user while getsort*forrow() is what is used internally when sorting by your column a simple implementation objects in javascript are just "advanced" variables, so an implementation of the nsimsgcustomcolumnhandler interface looks like: var columnhandler = { getcelltext: function(row, col) { //get the
message's header so that we can extract the reply to field var hdr = gdbview.getmsghdrat(row); return hdr.getstringproperty("replyto"); }, getsortstringforrow: function(hdr) {return hdr.getstringproperty("replyto");}, isstring: function() {return true;}, getcellproperties: function(row, col, props){}, getrowproperties: function(row, props){}, getimagesrc: ...
Access Thunderbird Window Areas
var foldertree = getfoldertree(); var searchinput = getsearchinput(); var
messagepane = get
messagepane(); var
messagepaneframe = get
messagepaneframe(); var mailtoolbox = getmailtoolbox(); var currentmsgfolder = getloadedmsgfolder(); see the msgmail3panewindow.js for other helper methods ...
Add Option to Context Menu
for thunderbird 2 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="
messagepanecontext"> <menuitem id="my_option" label="my option concise and cool label" oncommand="alert('hi')"/> </menupopup> </overlay> for thunderbird 3 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <popup id="mailcontext"> <menuitem id="my_option" label="my option concise an...
Use SQLite
sql queries on the client side, using in-memory (blob) storage of 2mb: var db = opendatabase('mydb', '1.0', 'test db', 2 * 1024 * 1024); var msg; db.transaction(function (tx) { tx.executesql('create table if not exists logs (id unique, log)'); tx.executesql('insert into logs (id, log) values (1, "foobar")'); tx.executesql('insert into logs (id, log) values (2, "logmsg")'); msg = '<p>log
message created and row inserted.</p>'; document.queryselector('#status').innerhtml = msg; }); db.transaction(function (tx) { tx.executesql('select * from logs', [], function (tx, results) { var len = results.rows.length, i; msg = "<p>found rows: " + len + "</p>"; document.queryselector('#status').innerhtml += msg; for (i = 0; i < len; i++){ msg = "<p><b>" + results.rows.item(i).l...
Using Service Workers - Web APIs
note: as of firefox 44, when appcache is used to provide offline support for a page a warning
message is now displayed in the console advising developers to use service workers instead (bug 1204581.) service workers should finally fix these issues.
SharedWorker() - Web APIs
examples the following code snippet shows creation of a sharedworker object using the sharedworker() constructor and subsequent usage of the object: var myworker = new sharedworker('worker.js'); myworker.port.start(); first.onchange = function() { myworker.port.post
message([first.value,second.value]); console.log('
message posted to worker'); } second.onchange = function() { myworker.port.post
message([first.value,second.value]); console.log('
message posted to worker'); } myworker.port.on
message = function(e) { result1.textcontent = e.data; console.log('
message received from worker'); } for a full example, see our basic shared worker example (run shared ...
SpeechRecognitionError.error - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.
message); } ...
SpeechRecognitionErrorEvent.error - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.
message); } specifications specification status comment web speech apithe definition of 'error' in that specification.
SubmitEvent.submitter - Web APIs
let form = document.queryselector("form"); form.addeventlistener("submit", (event) => { let submitter = event.submitter; let handler = submitter.id; if (handler) { processorder(form, handler); } else { showalert
message("an unknown or unaccepted payment type was selected.
SubmitEvent - Web APIs
let form = document.queryselector("form"); form.addeventlistener("submit", (event) => { let submitter = event.submitter; let handler = submitter.id; if (handler) { processorder(form, handler); } else { showalert
message("an unknown or unaccepted payment type was selected.
TrackEvent - Web APIs
xt"; } else { trackkind = "unknown"; } switch(event.type) { case "addtrack": console.log("added a " + trackkind + " track"); break; case "removetrack": console.log("removed a " + trackkind + " track"); break; } } the event handler uses the javascript instanceof operator to determine which type of track the event occurred on, then outputs to console a
message indicating what kind of track it is and whether it's being added to or removed from the element.
URL API - Web APIs
you can also look up the values of individual parameters with the urlsearchparams object's get() method: let addr = new url("https://mysite.com/login?user=someguy&page=news"); try { loginuser(addr.searchparams.get("user")); gotopage(addr.searchparams.get("page")); } catch(err) { showerror
message(err); } for example, in the above snippet, the username and target page are taken from the query and passed to appropriate functions that are used by the site's code to log in and route the user to their desired destination within the site.
ValidityState - Web APIs
customerror read only a boolean indicating whether the element's custom validity
message has been set to a non-empty string by calling the element's setcustomvalidity() method.
WakeLock.request() - Web APIs
const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.
message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'request()' in that specification.
WakeLock - Web APIs
const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.
message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelock' in that specification.
WebGLRenderingContext.makeXRCompatible() - Web APIs
*/ outputcanvas.addeventlistener("webglcontextrestored", (event) => { loadsceneresources(currentscene); }); async function onstartedxrsession(xrsession) { try { await gl.makexrcompatible(); } catch(err) { switch(err) { case aborterror: showsimple
messagebox("unable to transfer the game to your xr headset.", "cancel"); break; case invalidstateerror: showsimple
messagebox("you don't appear to have a compatible xr headset available.", "cancel"); break; default: handlefatalerror(err); break; } xrsession.end(); } } async function handlestartbuttonclick(event) { if (event.target.classlist.
Basic form hints - Accessibility
the form entry would look something like this: var validate = function () { var emailelement = document.getelementbyid(emailfieldid); var valid = emailvalid(formdata.email); // returns true if valid, false otherwise emailelement.setattribute("aria-invalid", !valid); setelementbordercolour(emailelement, valid); // sets the border to red if second arg is false }; providing helpful error
messages read how to use aria alerts to enhance forms.
Forms - Accessibility
the following pages provide various techniques for improving the accessibility of web forms: basic form hints: adding hints and descriptions for invalid or required fields alerts: using alerts to provide client-side validation error
messages multi-part labels: enabling complex form labels with a control inside each label see also the yahoo!
ARIA - Accessibility
for example, aria enables accessible navigation landmarks in html4, javascript widgets, form hints and error
messages, live content updates, and more.
Coordinate systems - CSS: Cascading Style Sheets
whenever the mouse enters, moves around inside, or exits the inner box, the corresponding event is handled by updating a set of informational
messages within the box, listing out the current mouse coordinates in each of the four available coordinate systems.
animation - CSS: Cascading Style Sheets
alue_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <number>)<step-timing-function> = step-start | step-end | steps(<integer>[, <step-position>]?)where <step-position> = jump-start | jump-end | jump-none | jump-both | start | end examples cylon eye <div class="view_port"> <div class="polling_
message"> listening for dispatches </div> <div class="cylon_eye"></div> </div> .polling_
message { color: white; float: left; margin-right: 2%; } .view_port { background-color: black; height: 25px; width: 100%; overflow: hidden; } .cylon_eye { background-color: red; background-image: linear-gradient(to right, rgba(0, 0, 0, .9) 25%, rgba(0, 0, 0, .1) 50%, rgb...
overscroll-behavior-y - CSS: Cascading Style Sheets
formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing an underlying element from scrolling vertically .
messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } see overscroll-behavior for a full example and explanation.
overscroll-behavior - CSS: Cascading Style Sheets
this can be stopped using overscroll-behavior-y (overscroll-behavior would also work) on the chat window, like this: .
messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } we also wanted to get rid of the standard overscroll effects when the contacts are scrolled to the top or bottom (e.g.
Creating a cross-browser video player - Developer guides
when a video goes into fullscreen mode, it usually displays a
message indicating that the user can press the esc key to exit fullscreen mode, so the code also needs to listen for relevant events in order to call the setfullscreendata() function to ensure the control styling is correct: document.addeventlistener('fullscreenchange', function(e) { setfullscreendata(!!(document.fullscreen || document.fullscreenelement)); }); document.addeventlistener('webkitfullscr...
Audio and Video Delivery - Developer guides
der.start(); recorder.onerror = function(e) { throw e.error || new error(e.name); // e.name is ff non-spec } recorder.onstop = function(e) { var audio = document.createelement('audio'); audio.src = window.url.createobjecturl(new blob(data)); } settimeout(function() { rec.stop(); }, 5000); }) .catch(function onerror(error) { console.log(error.
message); }); see mediarecorder api for more details.
Index - Developer guides
if you need to slightly alter the site’s
message for mobile users, but want to reap the benefits of a responsive design, a hybrid approach may be your best bet.
A hybrid approach - Developer guides
if you need to slightly alter the site’s
message for mobile users, but want to reap the benefits of a responsive design, a hybrid approach may be your best bet.
Parsing and serializing XML - Developer guides
parsing strings into dom trees this example converts an xml fragment in a string into a dom tree using a domparser: var smystring = '<a id="a"><b id="b">hey!</b></a>'; var oparser = new domparser(); var odom = oparser.parsefromstring(smystring, "application/xml"); // print the name of the root element or error
message console.log(odom.documentelement.nodename == "parsererror" ?
Default parameters - JavaScript
function callsomething(thing = something()) { return thing } let numberoftimescalled = 0 function something() { numberoftimescalled += 1 return numberoftimescalled } callsomething() // 1 callsomething() // 2 earlier parameters are available to later default parameters parameters defined earlier (to the left) are available to later default parameters: function greet(name, greeting,
message = greeting + ' ' + name) { return [name, greeting,
message] } greet('david', 'hi') // ["david", "hi", "hi david"] greet('david', 'hi', 'happy birthday!') // ["david", "hi", "happy birthday!"] this functionality can be approximated like this, which demonstrates how many edge cases are handled: function go() { return ':p' } function withdefaults(a, b = 5, c = b, d = go...
Error.prototype.stack - JavaScript
html> <meta charset="utf-8"> <title>stack trace example</title> <body> <script> function trace() { try { throw new error('myerror'); } catch(e) { alert(e.stack); } } function b() { trace(); } function a() { b(3, 4, '\n\n', undefined, {}); } a('first call, firstarg'); </script> assuming the above markup is saved as c:\example.html on a windows file system it produces an alert
message box with the following text: starting with firefox 30 and later containing the column number: trace@file:///c:/example.html:9:17 b@file:///c:/example.html:16:13 a@file:///c:/example.html:19:13 @file:///c:/example.html:21:9 firefox 14 to firefox 29: trace@file:///c:/example.html:9 b@file:///c:/example.html:16 a@file:///c:/example.html:19 @file:///c:/example.html:21 firefox 13 and earlier woul...
Error.prototype.name - JavaScript
the name property, in addition to the
message property, is used by the error.prototype.tostring() method to create a string representation of the error.
Object.create() - JavaScript
for example: a simple common debugging function: // display top-level property name:value pairs of given object function showproperties(obj){ for(var prop in obj){ console.log(prop + ": " + obj[prop] + "\n" ); } } not such simple results: (especially if silent error-trapping had hidden the error
messages) ob={}; ob.po=oco; ob.pn=ocn; // create a compound object using the test objects from above as property values > showproperties( ob ) // display top-level properties - po: [object object] - error: cannot convert object to primitive value note that only first property gets shown.
Promise.any() - JavaScript
status: ${response.status}`); } else { return response.blob(); } }) } let coffee = fetchanddecode('coffee.jpg'); let tea = fetchanddecode('tea.jpg'); promise.any([coffee, tea]).then(value => { let objecturl = url.createobjecturl(value); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }) .catch(e => { console.log(e.
message); }); specifications specification promise.any ...
Promise.prototype.catch() - JavaScript
examples using and chaining the catch method var p1 = new promise(function(resolve, reject) { resolve('success'); }); p1.then(function(value) { console.log(value); // "success!" throw new error('oh, no!'); }).catch(function(e) { console.error(e.
message); // "oh, no!" }).then(function(){ console.log('after a catch the chain is restored'); }, function () { console.log('not fired due to the catch'); }); // the following behaves the same as above p1.then(function(value) { console.log(value); // "success!" return promise.reject('oh, no!'); }).catch(function(e) { console.error(e); // "oh, no!" }).then(function(){ console.log('after a cat...
Promise.race() - JavaScript
e); // "three" // p3 is faster, so it fulfills }, function(reason) { // not called }); var p5 = new promise(function(resolve, reject) { settimeout(() => resolve('five'), 500); }); var p6 = new promise(function(resolve, reject) { settimeout(() => reject(new error('six')), 100); }); promise.race([p5, p6]) .then(function(value) { // not called }, function(error) { console.log(error.
message); // "six" // p6 is faster, so it rejects }); specifications specification ecmascript (ecma-262)the definition of 'promise.race' in that specification.
RegExp.prototype.exec() - JavaScript
using exec() with regexp literals you can also use exec() without creating a regexp object explicitly: let matches = /(hello \s+)/.exec('this is a hello world!'); console.log(matches[1]); this will log a
message containing 'hello world!'.
RegExp.prototype.test() - JavaScript
const str = 'hello world!'; const result = /^hello/.test(str); console.log(result); // true the following example logs a
message which depends on the success of the test: function testinput(re, str) { let midstring; if (re.test(str)) { midstring = 'contains'; } else { midstring = 'does not contain'; } console.log(`${str} ${midstring} ${re.source}`); } using test() on a regex with the "global" flag when a regex has the global flag set, test() will advance the lastindex of the regex.
String.prototype.split() - JavaScript
after splitting the string, the function logs
messages indicating the original string (before the split), the separator used, the number of elements in the array, and the individual array elements.
Nullish coalescing operator (??) - JavaScript
let count = 0; let text = ""; let qty = count || 42; let
message = text || "hi!"; console.log(qty); // 42 and not 0 console.log(
message); // "hi!" and not "" the nullish coalescing operator avoids this pitfall by only returning the second operand when the first one evaluates to either null or undefined (but no other falsy values): let mytext = ''; // an empty string (which is also a falsy value) let notfalsytext = mytext || 'hello world'; console.log(n...
async function - JavaScript
this runs 2 seconds after 1., immediately after 2., since fast is already resolved } function concurrentpromise() { console.log('==concurrent start with promise.all==') return promise.all([resolveafter2seconds(), resolveafter1second()]).then((
messages) => { console.log(
messages[0]) // slow console.log(
messages[1]) // fast }) } async function parallel() { console.log('==parallel with await promise.all==') // start 2 "jobs" in parallel and wait for both of them to complete await promise.all([ (async()=>console.log(await resolveafter2seconds()))(), (async()=>console.log(await resolveafter1second()))() ]) } sequen...
import - JavaScript
const main = document.queryselector("main"); for (const link of document.queryselectorall("nav > a")) { link.addeventlistener("click", e => { e.preventdefault(); import('/modules/my-module.js') .then(module => { module.loadpageinto(main); }) .catch(err => { main.textcontent = err.
message; }); }); } specifications specification ecmascript (ecma-262)the definition of 'imports' in that specification.
Authoring MathML - MathML
gecko-based instant messaging clients can integrate a javascript-based text-to-mathml converter (mentioned below) and then render the mathml expressions generated from the (plaintext) instant
messages.
MathML element reference - MathML
mathml presentation elements a to z math <math> (top-level element) a <maction> (binded actions to sub-expressions) <maligngroup> (alignment group) <malignmark> (alignment points) e <menclose> (enclosed contents) <merror> (enclosed syntax error
messages) f <mfenced> (parentheses) <mfrac> (fraction) g <mglyph> (displaying non-standard symbols) i <mi> (identifier) l <mlabeledtr> (labeled row in a table or a matrix) <mlongdiv> (long division notation) m <mmultiscripts> (prescripts and tensor indices) n <mn> (number) o <mo> (operator) <mover> (overscript) p <mpadded> (space around content) <mphantom> (i...
Optimizing startup performance - Web Performance
while you can use web workers to run even very large, long-duration chunks of javascript code asynchronously, there's a huge caveat that: workers don't have access to webgl or audio, and they can't send synchronous
messages to the main thread, so you can't even proxy those apis to the main thread.
The building blocks of responsive design - Progressive web apps (PWAs)
if you want a solution that works across general web apps, you could use the screen orientation api, and/or provide a
message asking the user to rotate their screen if they are using the wrong orientation (for example, if window.innerwidth is larger than window.innerheight, assume the game is landscape mode and show a "please rotate"
message.) viewport one last problem to mention for our example app is concerned with mobile browsers and media queries.
Progressive web apps (PWAs)
but instead of relying only on user actions, we can do more, using push
messages and notifications to automatically re-engage and deliver new content whenever it is available.introduction to progressive web appsthis article provides an introduction to progressive web apps (pwas), discussing what they are and the advantages they offer over regular web apps.making pwas work offline with service workersin this article we took a simple look at how you can make your pwa work offl...
<a> - SVG: Scalable Vector Graphics
necap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<circle> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<ellipse> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<foreignObject> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<g> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<line> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<marker> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<path> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<polygon> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<polyline> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<rect> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<svg> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<symbol> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<text> - SVG: Scalable Vector Graphics
ay, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<textPath> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<tspan> - SVG: Scalable Vector Graphics
ay, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
<use> - SVG: Scalable Vector Graphics
troke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-error
message, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-s...
SVG In HTML Introduction - SVG: Scalable Vector Graphics
(another style rule makes an error
message appear.) this approach has the following points in its favor: we have taken a regular html form that could have been part of an existing web site, and added an attractive, interactive background the approach is backwards compatible to browsers that do not support svg; simply, no background appears in them it's very simple and performs very well the picture dynamically sizes itself to the r...
How to fix a website with blocked mixed content - Web security
in any case, the best way to know if something is broken in firefox is to download the latest firefox edition, open different pages on your website with the web console open (enable the "security"
messages) and see if anything related to mixed content is reported.