5ElmRuntime.Display = { FULLSCREEN: 0, COMPONENT: 1, NONE: 2 };
8ElmRuntime.guid = function() { return ElmRuntime.counter++; }
10ElmRuntime.use = function(M) {
11 if (typeof M === 'function') M = M();
15function isAlive(input) {
16 if (!('defaultNumberOfKids' in input)) return true;
17 var len = input.kids.length;
18 if (len === 0) return false;
19 if (len > input.defaultNumberOfKids) return true;
21 for (var i = len; i--; ) {
22 alive = alive || isAlive(input.kids[i]);
27ElmRuntime.filterDeadInputs = function(inputs) {
29 for (var i = inputs.length; i--; ) {
30 if (isAlive(inputs[i])) temp.push(inputs[i]);
35// define function for drawing efficiently
37// draw : RequestID -> (() -> ()) -> RequestID
39// Takes a "RequestID" allowing you to cancel old requests if possible.
40// Returns a "RequestID" so you can refer to past requests.
42var vendors = ['ms', 'moz', 'webkit', 'o'];
43var win = typeof window !== 'undefined' ? window : {};
44for (var i = 0; i < vendors.length && !win.requestAnimationFrame; ++i) {
45 win.requestAnimationFrame = win[vendors[i]+'RequestAnimationFrame'];
46 win.cancelAnimationFrame = win[vendors[i]+'CancelAnimationFrame'] ||
47 win[vendors[i]+'CancelRequestAnimationFrame'];
50if (win.requestAnimationFrame && win.cancelAnimationFrame) {
51 ElmRuntime.draw = function(previousRequestID, callback) {
52 win.cancelAnimationFrame(previousRequestID);
53 return win.requestAnimationFrame(callback);
56 ElmRuntime.draw = function(previousRequestID, callback) {
58 return previousRequestID;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list