Skip to content

Instantly share code, notes, and snippets.

View jmcker's full-sized avatar

Jack McKernan jmcker

View GitHub Profile
@jmcker
jmcker / index.html
Last active May 11, 2019 09:33 — forked from jarek-foksa/index.html
Electron 5.x demo app that demonstrates how to enable ES modules support.
<!DOCTYPE html>
<html>
<head>
<base href="app://./" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' app:; object-src 'self' app:;">
<script type="module" src="./module.js"></script>
</head>
<body>
Check the console!
@jmcker
jmcker / javascript-ajax-get.js
Last active July 15, 2018 23:11 — forked from john-doherty/javascript-http-get.js
Simple, pure JavaScript HTTP Get function (QML, IE8+, Chrome, Safari, Firefox, PhoneGap/Cordova)
/**
* GET contents of a URL
* @access private
* @param {string} url - url to get
* @param {function} error - function to call if there is an error
* @param {function} callback - function to call if success
* @returns {void}
*/
function httpGet(url, error, callback) {