Permalink
Browse files

fix(Component.onInit): Fix for issue #6

  • Loading branch information...
calebdwilliams committed Aug 30, 2018
1 parent 65dcf78 commit 1edd4cf50e8c185928d9a08a247662f92c191d48
@@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">83.38% </span>
<span class="strong">83.6% </span>
<span class="quiet">Statements</span>
<span class='fraction'>311/373</span>
<span class='fraction'>311/372</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">69.48% </span>
<span class="strong">69.42% </span>
<span class="quiet">Branches</span>
<span class='fraction'>148/213</span>
<span class='fraction'>143/206</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">88.1% </span>
<span class="strong">88.64% </span>
<span class="quiet">Functions</span>
<span class='fraction'>37/42</span>
<span class='fraction'>39/44</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.47% </span>
<span class="strong">85.71% </span>
<span class="quiet">Lines</span>
<span class='fraction'>300/351</span>
<span class='fraction'>300/350</span>
</div>
</div>
</div>
@@ -60,15 +60,15 @@ <h1>
</thead>
<tbody><tr>
<td class="file high" data-value="src/"><a href="src/index.html">src/</a></td>
<td data-value="83.38" class="pic high"><div class="chart"><div class="cover-fill" style="width: 83%;"></div><div class="cover-empty" style="width:17%;"></div></div></td>
<td data-value="83.38" class="pct high">83.38%</td>
<td data-value="373" class="abs high">311/373</td>
<td data-value="69.48" class="pct medium">69.48%</td>
<td data-value="213" class="abs medium">148/213</td>
<td data-value="88.1" class="pct high">88.1%</td>
<td data-value="42" class="abs high">37/42</td>
<td data-value="85.47" class="pct high">85.47%</td>
<td data-value="351" class="abs high">300/351</td>
<td data-value="83.6" class="pic high"><div class="chart"><div class="cover-fill" style="width: 83%;"></div><div class="cover-empty" style="width:17%;"></div></div></td>
<td data-value="83.6" class="pct high">83.6%</td>
<td data-value="372" class="abs high">311/372</td>
<td data-value="69.42" class="pct medium">69.42%</td>
<td data-value="206" class="abs medium">143/206</td>
<td data-value="88.64" class="pct high">88.64%</td>
<td data-value="44" class="abs high">39/44</td>
<td data-value="85.71" class="pct high">85.71%</td>
<td data-value="350" class="abs high">300/350</td>
</tr>

</tbody>
@@ -77,7 +77,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Aug 27 2018 21:44:15 GMT-0500 (CDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Aug 29 2018 19:33:26 GMT-0500 (CDT)
</div>
</div>
<script src="prettify.js"></script>
@@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">83.38% </span>
<span class="strong">83.6% </span>
<span class="quiet">Statements</span>
<span class='fraction'>311/373</span>
<span class='fraction'>311/372</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">69.48% </span>
<span class="strong">69.42% </span>
<span class="quiet">Branches</span>
<span class='fraction'>148/213</span>
<span class='fraction'>143/206</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">88.1% </span>
<span class="strong">88.64% </span>
<span class="quiet">Functions</span>
<span class='fraction'>37/42</span>
<span class='fraction'>39/44</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.47% </span>
<span class="strong">85.71% </span>
<span class="quiet">Lines</span>
<span class='fraction'>300/351</span>
<span class='fraction'>300/350</span>
</div>
</div>
</div>
@@ -60,15 +60,15 @@ <h1>
</thead>
<tbody><tr>
<td class="file high" data-value="templiteral.js"><a href="templiteral.js.html">templiteral.js</a></td>
<td data-value="83.38" class="pic high"><div class="chart"><div class="cover-fill" style="width: 83%;"></div><div class="cover-empty" style="width:17%;"></div></div></td>
<td data-value="83.38" class="pct high">83.38%</td>
<td data-value="373" class="abs high">311/373</td>
<td data-value="69.48" class="pct medium">69.48%</td>
<td data-value="213" class="abs medium">148/213</td>
<td data-value="88.1" class="pct high">88.1%</td>
<td data-value="42" class="abs high">37/42</td>
<td data-value="85.47" class="pct high">85.47%</td>
<td data-value="351" class="abs high">300/351</td>
<td data-value="83.6" class="pic high"><div class="chart"><div class="cover-fill" style="width: 83%;"></div><div class="cover-empty" style="width:17%;"></div></div></td>
<td data-value="83.6" class="pct high">83.6%</td>
<td data-value="372" class="abs high">311/372</td>
<td data-value="69.42" class="pct medium">69.42%</td>
<td data-value="206" class="abs medium">143/206</td>
<td data-value="88.64" class="pct high">88.64%</td>
<td data-value="44" class="abs high">39/44</td>
<td data-value="85.71" class="pct high">85.71%</td>
<td data-value="350" class="abs high">300/350</td>
</tr>

</tbody>
@@ -77,7 +77,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Aug 27 2018 21:44:15 GMT-0500 (CDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Aug 29 2018 19:33:26 GMT-0500 (CDT)
</div>
</div>
<script src="../prettify.js"></script>
@@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">83.38% </span>
<span class="strong">83.6% </span>
<span class="quiet">Statements</span>
<span class='fraction'>311/373</span>
<span class='fraction'>311/372</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">69.48% </span>
<span class="strong">69.42% </span>
<span class="quiet">Branches</span>
<span class='fraction'>148/213</span>
<span class='fraction'>143/206</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">88.1% </span>
<span class="strong">88.64% </span>
<span class="quiet">Functions</span>
<span class='fraction'>37/42</span>
<span class='fraction'>39/44</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.47% </span>
<span class="strong">85.71% </span>
<span class="quiet">Lines</span>
<span class='fraction'>300/351</span>
<span class='fraction'>300/350</span>
</div>
</div>
</div>
@@ -960,8 +960,6 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">86×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -1232,6 +1230,7 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -1242,7 +1241,8 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -1601,8 +1601,6 @@ <h1>
configurable: false,
writable: false
});
&nbsp;
this.context.onInit &amp;&amp; typeof this.context.onInit === 'function' &amp;&amp; this.context.onInit();
}
}
&nbsp;
@@ -1874,6 +1872,7 @@ <h1>
}

this.$$listening = true;
this.onInit();
}

disconnectedCallback() {
@@ -1883,10 +1882,11 @@ <h1>
this.$$listening = false;
}
this[rendererSymbol] &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >this[rendererSymbol][removeSymbol]();</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (this.onDestroy &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >typeof this.onDestroy === 'function')</span> {
<span class="cstat-no" title="statement not covered" > this.onDestroy();</span>
}
this.onDestroy();
}
&nbsp;
onInit() {}
onDestroy() {}
&nbsp;
emit(eventName, detail) {
this.dispatchEvent(new CustomEvent(eventName, {
@@ -1975,7 +1975,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Aug 27 2018 21:44:15 GMT-0500 (CDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Aug 29 2018 19:33:26 GMT-0500 (CDT)
</div>
</div>
<script src="../prettify.js"></script>
@@ -273,8 +273,6 @@ class Template {
configurable: false,
writable: false
});

this.context.onInit && typeof this.context.onInit === 'function' && this.context.onInit();
}
}

@@ -546,6 +544,7 @@ class Component extends HTMLElement {
}

this.$$listening = true;
this.onInit();
}

disconnectedCallback() {
@@ -555,11 +554,12 @@ class Component extends HTMLElement {
this.$$listening = false;
}
this[rendererSymbol] && this[rendererSymbol][removeSymbol]();
if (this.onDestroy && typeof this.onDestroy === 'function') {
this.onDestroy();
}
this.onDestroy();
}

onInit() {}
onDestroy() {}

emit(eventName, detail) {
this.dispatchEvent(new CustomEvent(eventName, {
bubbles: true,
Oops, something went wrong.

0 comments on commit 1edd4cf

Please sign in to comment.