src/main.js
function getScriptElementContents(el) {
  if (!isElement(el)) {
    throw new TypeError('Expected a DOM Node, got ' + common.unexpectedObjToString(el));
  }
  if (el.type !== 'text/ohm-js') {
    throw new Error('Expected a script tag with type="text/ohm-js", got ' + el);
  }
  return el.getAttribute('src') ? load(el.getAttribute('src')) : el.innerHTML;
}
function getScriptElementContents(el) {
  if (!isElement(el)) {
    throw new TypeError('Expected a DOM Node, got ' + common.unexpectedObjToString(el));
  }
  if (el.type !== 'text/ohm-js') {
    throw new Error('Expected a script tag with type="text/ohm-js", got ' + el);
  }
  return el.getAttribute('src') ? load(el.getAttribute('src')) : el.innerHTML;
}
function getScriptElementContents ( el ) { if ( ! isElement ( el ) ) { throw new TypeError ( 'Expected a DOM Node, got ' + common . unexpectedObjToString ( el ) ) ; } if ( el . type !== 'text/ohm-js' ) { throw new Error ( 'Expected a script tag with type="text/ohm-js", got ' + el ) ; } return el . getAttribute ( 'src' ) ? load ( el . getAttribute ( 'src' ) ) : el . innerHTML ; }
Return the contents of a script element, fetching it via XHR if necessary.
Return the contents of a script element fetching it via XHR if necessary .