ウインドウのスクロール量を取得するクラスブラウザなコードを考えます。
This file contains hidden or 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
/** | |
* multidimensional-map.js | |
* | |
* @version 1.0.0 | |
* @author think49 | |
* @url https://gist.github.com/think49/00326b750d48f5f9c48a042f1b19a1c2 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ | |
function createMultidimensionalMap (mapData) { |
This file contains hidden or 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
/** | |
* es6-object-assign.js | |
* | |
* Object.assign( target, ...sources ) | |
* The assign function is used to copy the values of all of the enumerable own properties from one or more source objects to a target object. When the assign function is called, the following steps are taken. (ECMA-262 6th Edition / ECMAScript 2015) | |
* | |
* @version 1.0.0 | |
* @author think49 | |
* @url https://gist.github.com/think49/a615978e85f44cb0ef5c7cbdd3cca942 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) |
This file contains hidden or 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
/** | |
* deep-copy-object.js | |
* | |
* Deep copy objects. | |
* | |
* @version 1.0.0 | |
* @author think49 | |
* @url https://gist.github.com/think49/96e8fc064b917287cadb1dfacc39695c | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ |
This file contains hidden or 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
/** | |
* json-for-date-1.0.2.js | |
* JSON which can serialize Date object | |
* | |
* @version 1.0.2 | |
* @author think49 | |
* @url https://gist.github.com/think49/26fcddaaa63cd0d6b27de8ef9c514c41 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ |
This file contains hidden or 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
/** | |
* create-square-aa-1.0.1.js | |
* create ASCII art square. | |
* | |
* @version 1.0.1 | |
* @author think49 | |
* @url https://gist.github.com/think49/2a30b4e865f3dca4043440fb9b99a448 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ |
This file contains hidden or 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
/** | |
* nodelist-prototype-foreach.js | |
* The forEach() method of the NodeList interface calls the callback given in parameter once for each value pair in the list, in insertion order. | |
* | |
* @version 1.0.0 | |
* @author think49 | |
* @url https://gist.github.com/think49/df8c54a9aa421db3b650a3c1cab9b4a9 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
* @see <a href="https://heycam.github.io/webidl/#es-forEach">3.6.9.2. forEach - Web IDL</a> | |
*/ |