- PhantomJS Tutorial
- PhantomJS - Home
- PhantomJS - Overview
- PhantomJS - Environment Setup
- PhantomJS - Object
- PhantomJS - Methods
- WebPage Module
- PhantomJS - Properties
- PhantomJS - Methods
- PhantomJS - Events/Callbacks
- PhantomJS - Child Process Module
- File System Module
- PhantomJS - Properties
- PhantomJS - Methods
- System Module
- PhantomJS - Properties
- Web Server Module
- PhantomJS - Properties
- PhantomJS - Methods
- Miscellaneous
- Command Line Interface
- PhantomJS - Screen Capture
- PhantomJS - Page Automation
- PhantomJS - Network Monitoring
- PhantomJS - Testing
- PhantomJS - REPL
- PhantomJS - Examples
- PhantomJS Useful Resources
- PhantomJS - Quick Guide
- PhantomJS - Useful Resources
- PhantomJS - Discussion
PhantomJS - event Property
It returns a long list of events, i.e., modifier, keys details, etc.
Syntax
Its syntax is as follows −
var wpage = require('webpage').create(); wpage.event;
Example
Let us take an example to understand how the event property works.
var page = require('webpage').create(); console.log(JSON.stringify(page.event));
The above program generates the following output.
{"modifier":{"shift":33554432,"ctrl":67108864,"alt":134217728,"meta":268435456, " keypad":536870912},"key":{"0":48,"1":49,"2":50,"3":51,"4":52,"5":53,"6":54,"7": 5 5,"8":56,"9":57,"A":65,"AE":198,"Aacute":193,"Acircumflex":194,"AddFavorite":16 7 77408,"Adiaeresis":196,"Agrave":192,"Alt":16777251,"AltGr":16781571,"Ampersand" : 38,"Any":32,"Apostrophe":39,"ApplicationLeft":16777415,"ApplicationRight":16777 4 16,"Aring":197,"AsciiCircum":94,"AsciiTilde":126,"Asterisk":42,"At":64,"Atilde" : 195,"AudioCycleTrack":16777478,"AudioForward":16777474,"AudioRandomPlay":167774 7 6,"AudioRepeat":16777475,"AudioRewind":16777413,"Away":16777464,"B":66,"Back":1 6 777313}}
phantomjs_webpage_module_properties.htm
Advertisements
To Continue Learning Please Login
Login with Google