504 - Extending Prototypes Single

by steen_hansen

HTML

<!DOCTYPE html><meta charset="utf-8" />
<title>504 Extending Prototypes Single</title>



  
<div id='js-div' style="width:53%; "  class='code-scroll'>
  <a href='https://github.com/steenhansen/type-czech'  target="_blank"  class='git-hub'>GitHub Package</a>
  <div id='js-code'>the javascript</div>
  <br>



  

</div>


<div id="the-explanation" style="width:47%">
  <div class='an-explantion'>504 - Extending Prototypes Single</div>
  <div id='explanation-text'>
    <br>

    By moving all checking functions to an external file, it is possible to stop the
    loading and execution of TypeCzech code by commenting out loading of the scripts.
    Note that this moves the function signatures and checking code away from the
     actual functions to be tested.
<pre>
&lt;script s r c = "../../TypeCzech.js"&gt;
&lt;script s r c = "./504-iife-external-checks.js"&gt;
</pre>    
   
Thus being left with one instruction that loads and executes the checks when
TypeCzech has been imported.
<pre>
if (typeof check_linkUp_first_last_full === 'function')
  check_linkUp_first_last_full()
</pre>


  </div>




  <div id="console-log"  >
    <div class='a-title'>Console Output</div>
    <div id='log-text'></div>

    <br>






<!--            ---------------TYPE 3---------------------------       -->
    <script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/consolelog.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/TypeCzech.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/examples-web/504-Extending-Prototypes-Single/504-iife-external-checks.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/type-czech.css">
<!--            ----------------TYPE 3--------------------------       -->
<div id='js-fiddles'>
  <a title="Example-Contents"...