phantom.js
870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!-- Start lib/phantom/bind.js -->
## bind()
Polyfill Function.prototype.bind
Based on the implementation found here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
<!-- End lib/phantom/bind.js -->
<!-- Start lib/phantom/emit.js -->
## emit(string|object)
Emit an event via JSON-RPC
### Params:
* **event** *string|object* the event to emit
<!-- End lib/phantom/emit.js -->
<!-- Start lib/phantom/spooky.js -->
Start a Spooky server in PhantomJS
- `--transport TRANSPORT`, `-t TRANSPORT`: the transport the server should
use to talk to clients. Available options are:
- `stdio`: receive on stdin, transmit on stdout
- `http`: receive on http, transmit on stdout
- `--port PORT`, `-p PORT`: the port the server should listen on when using
the `http` transport
<!-- End lib/phantom/spooky.js -->