Global

Members

runtime

Copyright (c) 2014-present, Facebook, Inc.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Source:

Methods

_addEvent(el, type, handler, capturingopt) → {void}

Attach event in a cross-browser fashion.

Parameters:
Name Type Attributes Description
el Element

DOM element to which to attach the event

type string

The DOM event (without 'on') to attach to the element

handler EventListener

The event handler to attach to the element

capturing boolean <optional>

Whether or not the event should be capturing (W3C-browsers only); default is false; NOT IN USE

Source:
Returns:
Type
void

_applyAnyStylesheet(node) → {void}

Apply styles if this is a style tag.

Parameters:
Name Type Description
node Node

The element to check whether it is a style tag

Source:
Returns:
Type
void

_createSafeReference(type, prefix, arg) → {Text}

Creates a text node of the result of resolving an entity or character reference.

Parameters:
Name Type Description
type 'entity' | 'decimal' | 'hexadecimal'

Type of reference

prefix string

Text to prefix immediately after the "&"

arg string

The body of the reference

Source:
Returns:

The text node of the resolved reference

Type
Text

_getHTMLNodeName(node) → {string}

Retrieve the (lower-cased) HTML name of a node.

Parameters:
Name Type Description
node Node

The HTML node

Source:
Returns:

The lower-cased node name

Type
string

_isNullish(o) → {boolean}

Parameters:
Name Type Description
o any
Source:
Returns:
Type
boolean

_upperCase(n0, n1) → {string}

Parameters:
Name Type Description
n0 string

Whole expression match (including "-")

n1 string

Lower-case letter match

Source:
Returns:

Uppercased letter

Type
string

checkPluginValue(elem, att, attVal, opts) → {void}

Parameters:
Name Type Description
elem Element
att string
attVal string
opts JamilihOptions
Source:
Returns:
Type
void

getMatchingPlugin(opts, item) → {JamilihPlugin}

Parameters:
Name Type Description
opts JamilihOptions
item string
Source:
Returns:
Type
JamilihPlugin

glue(jmlArray, glu) → {Element}

Does not run Jamilih so can be further processed.

Parameters:
Name Type Description
jmlArray JamilihArray
glu string | JamilihArray | Element
Source:
Returns:
Type
Element

jml(…args) → {JamilihReturn}

Creates an XHTML or HTML element (XHTML is preferred, but only in browsers that support); any element after element can be omitted, and any subsequent type or types added afterwards.

Parameters:
Name Type Attributes Description
args JamilihArray <repeatable>
Source:
Returns:

The newly created (and possibly already appended) element or array of elements

Type
JamilihReturn

module:jQueryPluginDBox($, stringsopt) → {external:jQuery}

Parameters:
Name Type Attributes Description
$ external:jQuery
strings PlainObject <optional>
Properties
Name Type Attributes Description
ok PlainObject <optional>
cancel PlainObject <optional>
Source:
Returns:
Type
external:jQuery

(async) processResults(url) → {Promise.<void>}

Shows results after query submission.

Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise.<void>

touchHandler(ev) → {void}

Parameters:
Name Type Description
ev Event
Source:
Returns:
Type
void

Type Definitions

appender(childJML) → {void}

Parameters:
Name Type Description
childJML string | JamilihArray
Source:
Returns:
Type
void

ArbitraryCallbackResult

This should only be used when the return result from a callback is not known as to type.

Type:
  • any
Source:

ArbitraryModule

Type:
  • object
Source:

ArbitraryObject

This should only be used for objects known to be potentially arbitrary in form. For those whose determination has not yet been made, simply use type object (or type ? if it may also be a primitive).

Type:
  • object
Source:

ArgumentsArray

This should only be used for arrays known to be potentially arbitrary in form and representing arguments for passing around.

Type:
Source:

AttributeArray

Type:
Properties:
Name Type Description
0 string

The key

1 string

The value

Source:

ChildrenToJMLCallback(childNodeJML, i) → {void}

Parameters:
Name Type Description
childNodeJML JamilihArray | Jamilih
i Integer
Source:
Returns:
Type
void

Float

Type:
  • number
Source:

GenericArray

This should only be used for arrays known to be potentially arbitrary in form. For those whose determination has not yet been made, simply use type Array.

Type:
  • Array
Source:

GenericCallback(…args) → {ArbitraryCallbackResult}

Parameters:
Name Type Attributes Description
args any <repeatable>

Signature dependent on the function

Source:
Returns:

Return dependent on the function

Type
ArbitraryCallbackResult

ImageLibMessage

Contains the SVG to insert.

Type:
Properties:
Name Type Description
namespace "imagelib"

Required to distinguish from any other messages of app.

href string

Set to same value as previous ImageLibMetaMessage id.

data string

The response (as an SVG string or URL)

Source:

ImageLibMetaMessage

Used for setting meta-data before images are retrieved.

Type:
Properties:
Name Type Attributes Description
namespace "imagelib"

Required to distinguish from any other messages of app.

name string

If the subsequent response is an SVG string or if preview_url is present, will be used as the title for the preview image. When an SVG string is present, will default to the first <title>'s contents or "(SVG #)" if none is present. Otherwise, if preview_url is present, will default to the empty string. Though name may be falsy, it is always expected to be present for meta messages.

id string

Identifier (the expected href for a subsequent response message); used for ensuring the subsequent response can be tied to this ImageLibMetaMessage object.

preview_url string <optional>

When import mode is multiple, used to set an image source along with the name/title. If the subsequent response is an SVG string and there is no preview_url, the default will just be to show the name/title. If the response is not an SVG string, the default will be to show that response (i.e., the URL).

entry string

Set automatically with div holding retrieving message (until ready to delete)

Source:
To Do:
  • Should use a separate Map instead of `entry`

Integer

Type:
Source:

JamilihAppender(childJML) → {void}

Parameters:
Name Type Description
childJML JamilihArray
Source:
Returns:
Type
void

JamilihArray

Type:
Properties:
Name Type Attributes Description
0 string

The element to create (by lower-case name)

1 JamilihAttributes <optional>

Attributes to add with the key as the attribute name and value as the attribute value; important for IE where the input element's type cannot be added later after already added to the page

Source:

JamilihAttributes

Type:
Source:

JamilihOptions

Type:
Properties:
Name Type Description
$state "root" | "attributeValue" | "fragment" | "children" | "fragmentChildren"
Source:

JamilihReturn

Type:
  • Element | DocumentFragment
Source:

JSON

Type:
Source:

MapAndElementArray

Type:
Properties:
Name Type Description
0 JamilihWeakMap | JamilihMap
1 Element
Source:

PlainObject

This should only be used for objects known to be potentially arbitrary in form, but not of a special type. For those whose determination has not yet been made, simply use type object.

Type:
Source: