|
423 | 423 | return "Phantom.js v" + phantom.version + " - Use phantom._() or phantom.help() for help"; |
424 | 424 | }; |
425 | 425 |
|
426 | | - // Add enumerable properties for better autocomplete discovery in OIE |
427 | | - // This helps editors show available options when typing "phantom." |
428 | | - try { |
429 | | - Object.defineProperty(phantom, 'maps', { |
430 | | - enumerable: true, |
431 | | - configurable: true, |
432 | | - get: function() { return phantom.maps; } |
433 | | - }); |
434 | | - Object.defineProperty(phantom, 'strings', { |
435 | | - enumerable: true, |
436 | | - configurable: true, |
437 | | - get: function() { return phantom.strings; } |
438 | | - }); |
439 | | - Object.defineProperty(phantom, 'numbers', { |
440 | | - enumerable: true, |
441 | | - configurable: true, |
442 | | - get: function() { return phantom.numbers; } |
443 | | - }); |
444 | | - Object.defineProperty(phantom, 'json', { |
445 | | - enumerable: true, |
446 | | - configurable: true, |
447 | | - get: function() { return phantom.json; } |
448 | | - }); |
449 | | - Object.defineProperty(phantom, 'base64', { |
450 | | - enumerable: true, |
451 | | - configurable: true, |
452 | | - get: function() { return phantom.base64; } |
453 | | - }); |
454 | | - Object.defineProperty(phantom, 'xml', { |
455 | | - enumerable: true, |
456 | | - configurable: true, |
457 | | - get: function() { return phantom.xml; } |
458 | | - }); |
459 | | - Object.defineProperty(phantom, 'dates', { |
460 | | - enumerable: true, |
461 | | - configurable: true, |
462 | | - get: function() { return phantom.dates; } |
463 | | - }); |
464 | | - } catch (e) { |
465 | | - // If defineProperty fails, properties are already set normally |
466 | | - } |
467 | | - |
468 | 426 | // Only log on error (as requested) |
469 | 427 | function logError(msg) { |
470 | 428 | if (typeof logger !== "undefined") { |
|
0 commit comments