OLD | NEW |
1 <html> | 1 <html> |
| 2 <head> |
| 3 <script src="../fast/js/resources/js-test-pre.js"></script> |
| 4 </head> |
2 <body> | 5 <body> |
3 <script src="../fast/js/resources/js-test-pre.js"></script> | |
4 <script> | 6 <script> |
5 description("This test documents the Constructor properties on the global window
object."); | 7 description("This test documents the Constructor properties on the global window
object."); |
6 | |
7 function isConstructor(propertyName) { | |
8 var descriptor = Object.getOwnPropertyDescriptor(window, propertyName); | |
9 if (descriptor.value == undefined || descriptor.value.prototype == undefined
) | |
10 return false; | |
11 return descriptor.writable && !descriptor.enumerable && descriptor.configura
ble; | |
12 } | |
13 | |
14 var constructorNames = []; | |
15 var propertyNames = Object.getOwnPropertyNames(window); | |
16 for (var i = 0; i < propertyNames.length; i++) { | |
17 if (isConstructor(propertyNames[i])) | |
18 constructorNames[constructorNames.length] = propertyNames[i]; | |
19 } | |
20 | |
21 constructorNames.sort(); | |
22 for (var i = 0; i < constructorNames.length; i++) | |
23 debug(constructorNames[i]); | |
24 </script> | 8 </script> |
| 9 <script src="resources/global-context-constructors-listing.js"></script> |
25 <script src="../fast/js/resources/js-test-post.js"></script> | 10 <script src="../fast/js/resources/js-test-post.js"></script> |
26 </body> | 11 </body> |
27 </html> | 12 </html> |
OLD | NEW |