1. 1
  1. 1

    Can we not start people off with inline javascript? CSP is a thing.

    <!DOCTYPE html>
        <meta charset="utf-8" /> 
          function init() {
            var e = document.getElementById('foo');
            var txt;
            if (null !== e) {
              txt = document.createTextNode('hello, world');
          document.addEventListener('DOMContentLoaded', init);
        <span id="foo"></span>
    1. 1

      I like your example. I also see value in what you are saying. I’m actually pretty new to JS myself. Thanks for the tip!