[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/js/dist/ -> element.js (summary)

(no description)

File Size: 1176 lines (48 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 24 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _defineProperty()
  _objectSpread()
  _objectWithoutProperties()
  _objectWithoutPropertiesLoose()
  _typeof2()
  _typeof()
  RawHTML()
  concatChildren()
  switchChildrenNodeName()
  hasPrefix()
  isInternalAttribute()
  getNormalAttributeValue()
  getNormalAttributeName()
  getNormalStylePropertyName()
  getNormalStylePropertyValue()
  renderElement()
  renderNativeComponent()
  renderComponent()
  renderChildren()
  renderAttributes()
  renderStyle()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

_defineProperty(obj, key, value)   X-Ref
No description

_objectSpread(target)   X-Ref
No description

_objectWithoutProperties(source, excluded)   X-Ref
No description

_objectWithoutPropertiesLoose(source, excluded)   X-Ref
No description

_typeof2(obj)   X-Ref
No description

_typeof(obj)   X-Ref
No description

RawHTML(_ref)   X-Ref
Component used as equivalent of Fragment with unescaped HTML, in cases where
it is desirable to render dangerous HTML without needing a wrapper element.
To preserve additional props, a `div` wrapper _will_ be created if any props
aside from `children` are passed.

return: {WPElement} Dangerously-rendering element.
param: {string} props.children HTML to render.

concatChildren()   X-Ref
Concatenate two or more React children objects.

return: {Array} The concatenated value.
param: {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.

switchChildrenNodeName(children, nodeName)   X-Ref
Switches the nodeName of all the elements in the children object.

return: {?Object} The updated children object.
param: {?Object} children Children object.
param: {string}  nodeName Node name.

hasPrefix(string, prefixes)   X-Ref
Returns true if the specified string is prefixed by one of an array of
possible prefixes.

return: {boolean} Whether string has prefix.
param: {string}   string   String to check.
param: {string[]} prefixes Possible prefixes.

isInternalAttribute(attribute)   X-Ref
Returns true if the given prop name should be ignored in attributes
serialization, or false otherwise.

return: {boolean} Whether attribute should be ignored.
param: {string} attribute Attribute to check.

getNormalAttributeValue(attribute, value)   X-Ref
Returns the normal form of the element's attribute value for HTML.

return: {string} Normalized attribute value.
param: {string} attribute Attribute name.
param: {*}      value     Non-normalized attribute value.

getNormalAttributeName(attribute)   X-Ref
Returns the normal form of the element's attribute name for HTML.

return: {string} Normalized attribute name.
param: {string} attribute Non-normalized attribute name.

getNormalStylePropertyName(property)   X-Ref
Returns the normal form of the style property name for HTML.

- Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color'
- Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor'
- Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform'

return: {string} Normalized property name.
param: {string} property Property name.

getNormalStylePropertyValue(property, value)   X-Ref
Returns the normal form of the style property value for HTML. Appends a
default pixel unit if numeric, not a unitless property, and not zero.

return: {*} Normalized property value.
param: {string} property Property name.
param: {*}      value    Non-normalized property value.

renderElement(element, context)   X-Ref
Serializes a React element to string.

return: {string} Serialized element.
param: {WPElement} element       Element to serialize.
param: {?Object}   context       Context object.
param: {?Object}   legacyContext Legacy context object.

renderNativeComponent(type, props, context)   X-Ref
Serializes a native component type to string.

return: {string} Serialized element.
param: {?string} type          Native component type to serialize, or null if
param: {Object}  props         Props object.
param: {?Object} context       Context object.
param: {?Object} legacyContext Legacy context object.

renderComponent(Component, props, context)   X-Ref
Serializes a non-native component type to string.

return: {string} Serialized element
param: {Function} Component     Component type to serialize.
param: {Object}   props         Props object.
param: {?Object}  context       Context object.
param: {?Object}  legacyContext Legacy context object.

renderChildren(children, context)   X-Ref
Serializes an array of children to string.

return: {string} Serialized children.
param: {Array}   children      Children to serialize.
param: {?Object} context       Context object.
param: {?Object} legacyContext Legacy context object.

renderAttributes(props)   X-Ref
Renders a props object as a string of HTML attributes.

return: {string} Attributes string.
param: {Object} props Props object.

renderStyle(style)   X-Ref
Renders a style object as a string attribute value.

return: {string} Style attribute value.
param: {Object} style Style object.



Generated: Mon Jan 7 01:00:05 2019 Cross-referenced by PHPXref 0.7.1