This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['module'], function (module) { | |
'use strict'; | |
var fetchText = function(url, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', url, true); | |
xhr.onreadystatechange = function(evt) { | |
if (xhr.readyState === 4) { | |
callback(xhr.responseText); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
//Add a single event listener that handles one or more actions based on the data-* attributes. | |
var nodeclick = function (container, mapping, omitHref) { | |
container.addEventListener ('click', function(event) { | |
var el = event.target; | |
while (el != container) { | |
if (el.href && omitHref !== false) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
canvas { | |
outline: solid 1px black; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.test { | |
background: red; | |
zoom: expression( | |
this.runtimeStyle.zoom="1", | |
this.insertBefore( document.createElement("before"), this.firstChild ).innerHTML = this.getAttribute ('data-for-before'), | |
this.appendChild( document.createElement("after") ).innerHTML = ' after-content ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; | |
font-size: 15px; | |
font-family: Arial; | |
overflow: hidden; |