Phantomjs-event-property

提供:Dev Guides
移動先:案内検索

PhantomJS-イベントプロパティ

イベントの長いリスト、つまり、修飾子、キーの詳細などを返します。

構文

その構文は次のとおりです-

var wpage = require('webpage').create();
wpage.event;

*event* プロパティがどのように機能するかを理解するために例を見てみましょう。
var page = require('webpage').create();
console.log(JSON.stringify(page.event));

上記のプログラムは、次の 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}}