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
export default function foo() { | |
return "foo"; | |
} |
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
Show hidden characters
{ | |
"scope": "source.js", | |
"completions": [ | |
{ | |
"trigger": ".attributeContains", | |
"contents": ".assert.attributeContains(${1:selector}${2:, attribute}${3:, expected}${4:, message})" | |
}, | |
{ | |
"trigger": ".attributeEquals", | |
"contents": ".assert.attributeEquals(${1:cssSelector}${2:, attribute}${3:, expected}${4:, msg})" |
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
var methods = document.querySelectorAll('.assertions .apimethod'); | |
methods = Array.from(methods); | |
var assertions = methods.map(function(method){ | |
var args = Array.from(method.querySelectorAll('table code')); | |
return { | |
name: method.querySelector('h3 code').textContent, | |
args: args.map(function(table){ return table.textContent}), | |
}; | |
}); |
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
if( !HTMLCanvasElement.prototype.toBlob ) { | |
Object.defineProperty( HTMLCanvasElement.prototype, 'toBlob', | |
{ | |
value: function( callback, type, quality ) | |
{ | |
var bin = atob( this.toDataURL( type, quality ).split(',')[1] ), | |
len = bin.length, | |
len32 = len >> 2, | |
a8 = new Uint8Array( len ), | |
a32 = new Uint32Array( a8.buffer, 0, len32 ); |
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></head> | |
<body> | |
<img src="img.jpg" width="500" alt=""> | |
<button onclick="doResize()">Resize</button> | |
<script src="parallel.js"></script> | |
<script> | |