docs/api/module-CoreElement.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: CoreElement</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: CoreElement</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description">Useful utility functions for creating web components.</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core-element_CoreElement.js.html">core-element/CoreElement.js</a>, <a href="core-element_CoreElement.js.html#line5">line 5</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="module-CoreElement-CoreElement.html">CoreElement</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="~customTag"><span class="type-signature">(inner) </span>customTag<span class="signature">(tag, elementClass)</span><span class="type-signature"></span></h4>
<div class="description">
Registers the class to the specified custom tag name. The tag name must contain a dash.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>tag</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the custom tag</td>
</tr>
<tr>
<td class="name"><code>elementClass</code></td>
<td class="type">
<span class="param-type">HTMLElement</span>
</td>
<td class="description last">the class to register the tag with</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core-element_CoreElement.js.html">core-element/CoreElement.js</a>, <a href="core-element_CoreElement.js.html#line211">line 211</a>
</li></ul></dd>
</dl>
<h4 class="name" id="~shadowRoot"><span class="type-signature">(inner) </span>shadowRoot<span class="signature">(element, childNode)</span><span class="type-signature"></span></h4>
<div class="description">
Attaches the shadow DOM to the passed-in element. If using CoreElement, this is already
handled by the constructor if passed-in the tempate DOM node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>element</code></td>
<td class="type">
<span class="param-type">HTMLElement</span>
</td>
<td class="description last">the element root to attach the shadow DOM to</td>
</tr>
<tr>
<td class="name"><code>childNode</code></td>
<td class="type">
<span class="param-type">Node</span>
</td>
<td class="description last">the child of the shadow root to append</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core-element_CoreElement.js.html">core-element/CoreElement.js</a>, <a href="core-element_CoreElement.js.html#line219">line 219</a>
</li></ul></dd>
</dl>
<h4 class="name" id="~templateNode"><span class="type-signature">(inner) </span>templateNode<span class="signature">(templateString, styleString)</span><span class="type-signature"></span></h4>
<div class="description">
Creates a template DOM node that contains the parsed HTML and style string.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>templateString</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the html content</td>
</tr>
<tr>
<td class="name"><code>styleString</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the style content</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core-element_CoreElement.js.html">core-element/CoreElement.js</a>, <a href="core-element_CoreElement.js.html#line203">line 203</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-CoreElement.html">CoreElement</a></li></ul><h3>Classes</h3><ul><li><a href="CoreByeElement.html">CoreByeElement</a></li><li><a href="CoreGreetElement.html">CoreGreetElement</a></li><li><a href="CoreHelloElement.html">CoreHelloElement</a></li><li><a href="CoreLinkElement.html">CoreLinkElement</a></li><li><a href="CoreSliderElement.html">CoreSliderElement</a></li><li><a href="CoreTooltipElement.html">CoreTooltipElement</a></li><li><a href="module-CoreElement-CoreElement.html">CoreElement</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.2</a> on Thu Jun 13 2019 18:17:43 GMT-0700 (Pacific Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>