basic-element-base
Advanced tools
Comparing version 0.7.4 to 0.7.5
{ | ||
"name": "basic-element-base", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"description": "A sample general-purpose base class for defining custom elements that mixes in some common features: template stamping into a shadow root, automatic node finding, and marshalling between attributes and properties.", | ||
@@ -16,3 +16,3 @@ "homepage": "https://component.kitchen", | ||
"dependencies": { | ||
"basic-component-mixins": "^0.7.4" | ||
"basic-component-mixins": "^0.7.5" | ||
}, | ||
@@ -19,0 +19,0 @@ "browserify": { |
@@ -0,1 +1,2 @@ | ||
# API Documentation | ||
<a name="ElementBase"></a> | ||
@@ -16,3 +17,72 @@ ## ElementBase | ||
**Kind**: global class | ||
**Mixes**: <code>AttributeMarshalling</code>, <code>Composable</code>, <code>DistributedChildren</code>, <code>ShadowElementReferences</code>, <code>ShadowTemplate</code> | ||
**Kind**: global class | ||
**Mixes**: <code>[AttributeMarshalling](../basic-component-mixins/docs/AttributeMarshalling.md)</code> | ||
, <code>[Composable](../basic-component-mixins/docs/Composable.md)</code> | ||
, <code>[DistributedChildren](../basic-component-mixins/docs/DistributedChildren.md)</code> | ||
, <code>[ShadowElementReferences](../basic-component-mixins/docs/ShadowElementReferences.md)</code> | ||
, <code>[ShadowTemplate](../basic-component-mixins/docs/ShadowTemplate.md)</code> | ||
* [ElementBase](#ElementBase) | ||
* [.compose(...mixins)](#Composable.compose) | ||
* [.distributedChildNodes](#DistributedChildren+distributedChildNodes) : <code>Array.<Node></code> | ||
* [.distributedChildren](#DistributedChildren+distributedChildren) : <code>Array.<HTMLElement></code> | ||
* [.distributedTextContent](#DistributedChildren+distributedTextContent) : <code>string</code> | ||
<a name="Composable.compose"></a> | ||
### ElementBase.compose(...mixins) | ||
Apply a set of mixin functions or mixin objects to the present class and | ||
return the new class. | ||
Instead of writing: | ||
let MyClass = Mixin1(Mixin2(Mixin3(Mixin4(Mixin5(BaseClass))))); | ||
You can write: | ||
let MyClass = Composable(BaseClass).compose( | ||
Mixin1, | ||
Mixin2, | ||
Mixin3, | ||
Mixin4, | ||
Mixin5 | ||
); | ||
This function can also take mixin objects. A mixin object is just a | ||
shorthand for a mixin function that creates a new subclass with the given | ||
members. The mixin object's members are *not* copied directly onto the | ||
prototype of the base class, as with traditional mixins. | ||
In addition to providing syntactic sugar, this mixin can be used to | ||
define a class in ES5, which lacks ES6's `class` keyword. | ||
**Kind**: static method of <code>[ElementBase](#ElementBase)</code>. Defined by <code>[Composable](../basic-component-mixins/docs/Composable.md)</code> mixin. | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| ...mixins | <code>mixins</code> | A set of mixin functions or objects to apply. | | ||
<a name="DistributedChildren+distributedChildNodes"></a> | ||
### elementBase.distributedChildNodes : <code>Array.<Node></code> | ||
An in-order collection of child nodes, expanding any slot elements. Like | ||
the standard childNodes property, this includes text nodes. | ||
**Kind**: instance property of <code>[ElementBase](#ElementBase)</code>. Defined by <code>[DistributedChildren](../basic-component-mixins/docs/DistributedChildren.md)</code> mixin. | ||
<a name="DistributedChildren+distributedChildren"></a> | ||
### elementBase.distributedChildren : <code>Array.<HTMLElement></code> | ||
An in-order collection of children, expanding any slot elements. Like the | ||
standard children property, this skips text nodes. | ||
**Kind**: instance property of <code>[ElementBase](#ElementBase)</code>. Defined by <code>[DistributedChildren](../basic-component-mixins/docs/DistributedChildren.md)</code> mixin. | ||
<a name="DistributedChildren+distributedTextContent"></a> | ||
### elementBase.distributedTextContent : <code>string</code> | ||
The concatenated text content of all child nodes, expanding any slot | ||
elements. | ||
**Kind**: instance property of <code>[ElementBase](#ElementBase)</code>. Defined by <code>[DistributedChildren](../basic-component-mixins/docs/DistributedChildren.md)</code> mixin. | ||
<a name="$"></a> | ||
## $ : <code>object</code> | ||
The collection of references to the elements with IDs in a component's | ||
Shadow DOM subtree. | ||
**Kind**: global variable |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76931
88