Name Description Size
ArrayBufferUtils.jsm JavaScript ArrayBuffers are missing a variety of useful methods which are provided by this module. 1757
BigInteger.jsm 23849
CLib.jsm 1611
NormalizedMap.jsm A Map that automatically normalizes keys before accessing the values. The constructor takes two parameters: aNormalize: A function which takes a string and returns the "normalized" version of it. aIterable: A iterable to prefill the map with, keys will be normalized. Returns a Map object that will automatically run aNormalize on any operations involving keys. 1598
OTR.jsm 38543
OTRHelpers.jsm 1142
OTRLib.jsm 30470
OTRUI.jsm probably imconv 25567
ToLocaleFormat.jsm 6516
hiddenWindow.jsm 771
imContentSink.jsm Structure of a ruleset: A ruleset is a JS object containing 3 sub-objects: attrs, tags and styles. - attrs: an object containing a list of attributes allowed for all tags. example: attrs: { 'style': true } - tags: an object with the allowed tags. each tag can allow specific attributes. example: 'a': {'href': true} each attribute can have a function returning a boolean indicating if the attribute is accepted. example: 'href': aValue => aValue == 'about:blank' - styles: an object with the allowed CSS style rule. example: 'font-size': true FIXME: make this accept functions to filter the CSS values too. See the 3 examples of rulesets below. 10681
imServices.jsm 1288
imSmileys.jsm Skip text nodes that contain the href in the child text node. We must check both the testNode.textContent and the since they cover different cases: textContent: The URL is split over multiple nodes for some reason data: The URL is not the only content in the link, skip only the one node Check the class name to skip any autolinked nodes from mozTXTToHTMLConv. 7021
imStatusUtils.jsm 1876
imTextboxUtils.jsm 3936
imThemes.jsm 34075
imXPCOMUtils.jsm Creates an nsIScriptError instance and logs it. @param aModule string identifying the module within which the error occurred. @param aLevel the error level as defined in imIDebugMessage. @param aMessage the error message string. @param aOriginalError (optional) JS Error object containing the location where the actual error occurred. Its error message is appended to aMessage. 8393
jsProtoHelper.jsm Convert a socket's nsITransportSecurityInfo into a prplIAccount connection error. Store the nsITransportSecurityInfo and the connection location on the account so the certificate exception dialog can access the information. 31417 722
socket.jsm Combines a lot of the Mozilla networking interfaces into a sane interface for simple(r) use of sockets code. This implements nsIServerSocketListener, nsIStreamListener, nsIRequestObserver, nsITransportEventSink and nsIProtocolProxyCallback. This uses nsIRoutedSocketTransportService, nsIServerSocket, nsIThreadManager, nsIBinaryInputStream, nsIScriptableInputStream, nsIInputStreamPump, nsIProxyService, nsIProxyInfo. High-level methods: connect(<originHost>, <originPort>[, ("starttls" | "ssl" | "udp") [, <proxy>[, <host>, <port>]]]) disconnect() sendData(String <data>[, <logged data>]) sendString(String <data>[, <encoding>[, <logged data>]]) sendBinaryData(<arraybuffer data>) startTLS() resetPingTimer() cancelDisconnectTimer() High-level properties: binaryMode delimiter inputSegmentSize outputSegmentSize proxyFlags connectTimeout (default is no timeout) readWriteTimeout (default is no timeout) disconnected secInfo Users should "subclass" this object, i.e. set their .__proto__ to be it. And then implement: onConnection() onConnectionHeard() onConnectionTimedOut() onConnectionReset() onBadCertificate(boolean aIsSslError, AString aNSSErrorMessage) onConnectionClosed() onDataReceived(String <data>) <length handled> = onBinaryDataReceived(ArrayBuffer <data>) onTransportStatus(nsISocketTransport <transport>, nsresult <status>, unsigned long <progress>, unsigned long <progress max>) sendPing() LOG(<message>) DEBUG(<message>) Optional features: The ping functionality: Included in the socket object is a higher level "ping" messaging system, which is commonly used in instant messaging protocols. The ping functionality works by calling a user defined method, sendPing(), if resetPingTimer() is not called after two minutes. If no ping response is received after 30 seconds, the socket will disconnect. Thus, a socket using this functionality should: 1. Implement sendPing() to send an appropriate ping message for the protocol. 2. Call resetPingTimer() to start the ping messages. 3. Call resetPingTimer() each time a message is received (i.e. the socket is known to still be alive). 4. Call cancelDisconnectTimer() when a ping response is received. 22891
test 4