Obtaining the nodes with content defined by the user.
Parameters:
Name | Type | Description |
---|---|---|
node |
HTMLElement |
- Source:
Returns:
- Type
- HTMLElement
Examples
<x-element>test</x-element>
import contentNode from 'xblocks-core/dom/contentNode';
console.log(contentNode(document.querySelector('x-element')));
// test
<x-element>
<script type="text/x-template">test</script>
other content
</x-element>
import contentNode from 'xblocks-core/dom/contentNode';
console.log(contentNode(document.querySelector('x-element')));
// test