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
// SNIPPET whenPageReady v1.3 | |
// state: [interactive | complete] | |
// usage: whenPageReady(doStuff, 'interactive'); | |
var whenPageReady = (handler, state = 'complete') => { | |
var eventName; | |
if (state === 'DOMContentLoaded') { state = 'interactive'; } | |
if (state === 'load') { state = 'complete'; } | |
if (state !== 'interactive' && state !== 'complete') { | |
console.warn('SCRIPTNAME: whenPageReady(): wrong STATE argument: ' + state + '. Defaulting to: "complete".'); |
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
// this is file 1 | |
// edit | |
// edit after edit filename | |
// 2503 | |
// na PC | |
// skus ces github desktop tlacit | |
// vyp v options |