OLD | NEW |
1 <!-- Feature template markdown: | 1 <!-- Feature template markdown: |
2 ## Header | 2 ## Header |
3 | 3 |
4 **Usage Example:** | 4 **Usage Example:** |
5 | 5 |
6 ```js | 6 ```js |
7 | 7 |
8 ``` | 8 ``` |
9 | 9 |
10 **Documentation:** [link]() | 10 **Documentation:** [link]() |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 if (isLoaded()) { | 125 if (isLoaded()) { |
126 resolve(); | 126 resolve(); |
127 } else { | 127 } else { |
128 document.onreadystatechange = function() { | 128 document.onreadystatechange = function() { |
129 if (isLoaded()) resolve(); | 129 if (isLoaded()) resolve(); |
130 }; | 130 }; |
131 } | 131 } |
132 }); | 132 }); |
133 | 133 |
134 // ... some time later ... | 134 // ... some time later ... |
135 loaded.then(startTheApp).then(maybeShowFirstRun); | 135 fullyLoaded.then(startTheApp).then(maybeShowFirstRun); |
136 ``` | 136 ``` |
137 | 137 |
138 **Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-pr
omise-objects) | 138 **Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-pr
omise-objects) |
139 [link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_
Objects/Promise) | 139 [link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_
Objects/Promise) |
140 | 140 |
141 **Discussion Notes:** Feature already extensively used prior to creation of | 141 **Discussion Notes:** Feature already extensively used prior to creation of |
142 this document. | 142 this document. |
143 | 143 |
144 --- | 144 --- |
145 | 145 |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 **Discussion Notes / Link to Thread:** | 629 **Discussion Notes / Link to Thread:** |
630 | 630 |
631 --- | 631 --- |
632 | 632 |
633 ## Object Static Methods | 633 ## Object Static Methods |
634 | 634 |
635 **Usage Example:** | 635 **Usage Example:** |
636 | 636 |
637 ```js | 637 ```js |
638 // Object.assign | 638 // Object.assign |
639 var o = Object.assign({a:true}, {b:true}, {c:true}); | 639 var o = Object.assign({a:true}, {b:true}, {c:true}); // {a: true, b: true, c: t
rue} |
640 'a' in o && 'b' in o && 'c' in o; // true | 640 'a' in o && 'b' in o && 'c' in o; // true |
641 | 641 |
642 // Object.setPrototypeOf | 642 // Object.setPrototypeOf |
643 Object.setPrototypeOf({}, Array.prototype) instanceof Array; // true | 643 Object.setPrototypeOf({}, Array.prototype) instanceof Array; // true |
644 | 644 |
645 // Object.is | 645 // Object.is |
| 646 Object.is(null, null) // true |
| 647 Object.is(NaN, NaN) // true |
| 648 Object.is(-0, +0) // false, btw: -0 === +0 is true |
| 649 |
646 // Object.getOwnPropertySymbols | 650 // Object.getOwnPropertySymbols |
647 ``` | 651 ``` |
648 | 652 |
649 **Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-pr
operties-of-the-object-constructor) | 653 **Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-pr
operties-of-the-object-constructor) |
650 | 654 |
651 **Discussion Notes / Link to Thread:** | 655 **Discussion Notes / Link to Thread:** |
652 | 656 |
653 --- | 657 --- |
654 | 658 |
655 ## String Static & Prototype methods | 659 ## String Static & Prototype methods |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 949 |
946 ```js | 950 ```js |
947 // See Doc | 951 // See Doc |
948 ``` | 952 ``` |
949 | 953 |
950 **Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-ma
th) | 954 **Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-ma
th) |
951 | 955 |
952 **Discussion Notes / Link to Thread:** | 956 **Discussion Notes / Link to Thread:** |
953 | 957 |
954 --- | 958 --- |
OLD | NEW |