RequireJS CDN test
Using RequireJS to load from a CDN
See: https://github.com/jherax/proxy-storage
HTML
<script src="http://requirejs.org/docs/release/2.1.5/minified/require.js"></script>
<div id="test">It doesn't work :( </div>
CSS
#test {
color: orangered;
line-height: 24px;
}
JavaScript
requirejs.config({
paths: {
'handle-events': 'https://unpkg.com/handle-events/dist/handle-events.min'
}
});
require(['handle-events'], function(evt) {
console.info('handle-events');
console.log(evt);
console.warn('Get all events in the document');
console.log(evt.getEventListeners(document));
document.getElementById('test').innerHTML = "It works!<br>See the results in console.";
});