These commands proved to be over-complicating the documentation source.
We should keep documentation source as simple to edit as possible to
make it friendly to contributions.
This patch keeps the gen:version command as it is non-invasive.
This patch implements 'autoRepeat' functionality for `keyboard.down`.
With this patch, the subsequent calls to `keyboard.down` would generate
an event with 'autoRepeat` flag set to true.
Closes#157
The motivation behind the patch:
- examples are probably the most valuable thing in the doc
- currently, one would need to navigate to `page.evaluate` and then
click to the `frame.evaluate` to see the example.
- with this patch, all the descriptions for the shortcut methods are
copied as well. So there's an example for `page.evaluate` right
away.
Drive-by: fix links for `page.$` and `page.$$`
The two tasks allow to copy text from one part of document to another.
This comes handy in organizing the documentation for our shortcut
methods, which should be exactly the same as the original methods.
The tasks work like this:
- the gen:copy(id) task saves a part of document under the name 'ID'.
- the gen:paste(id) task pastes text saved with id 'ID'
This patch also fixes a bunch of links in documentation, as well as
migrating `api.md` to use the two tasks.
This patch implements simple markdown preprocessor. The goal
is to generate certain parts of markdown, such as:
- puppeteer version
- chromium revision
- table-of-contents
- copy/paste parts of documentation (for shortcut methods)
This patch refactors doclint so that more checks and more generators
could be added.
This patch:
- Introduces 'Source' class, which holds file content in-memory and
allows it to be updated.
- Introduces 'Message' class - which is a pair of a text and a type.
Messages could have either 'error' type or 'warning' type.
This patch makes sure that request.text() doesn't try
to fetch response body from the backend until the request is
actually finished (finished or failed).
It turns out we're not receiving 'Network.requestWillBeSent' event
for every requestId.
This patch makes sure we don't dispatch `requestfinished` and
`requestfailed` events without passing actual request.
References #168
VolumeUp, VolumeDown, and VolumeMute were changed to AudioVolumeUp, AudioVolumeDown, and AudioVolumeMute
The media keys like MediaTrackNext were also missing, so I added them.
Allow running phantom tests on Windows. These were relying on #!/usr/bin/env node at the top of runner.js, which doesn't work outside of a unix environment.
It turned out that PhantomShim used puppeteer's version to report
in tests. This caused one of phantomJS tests to fail when the puppeteer
version got bumped.
This patch grants PhantomShim its own version, independent from
puppeteer's. This would make it easier to roll puppeteer.
This patch:
- teaches page.uploadFile() to resolve given file paths against
current working directory. This aligns paths handling with all the
other methods
- moves page.uploadFile() under Frame
- changes test to use relative path for file upload
The Body class was inlined in the Request and Response classes.
This patch:
- removes the Body class
- adds Request.postData public property
- adds Response.buffer(), Response.text() and Response.json() methods
Fixes#106.
The page.waitForFunction method allows to wait for a general predicate.
The predicate will be continiously polled for in page, until
it either returns true or the timeout happens.
The polling parameter could be one of the following:
- 'raf' - to poll on every animation frame
- 'mutation' - to poll on every dom mutation
- <number> - to poll every X milliseconds
References #91
This patch:
- implements a basic public API coverage based on 'helper.tracePublicAPI' methods
- adds `npm run coverage` command which reports coverage after running all of the unit tests
References #50.
This patch:
- removes Body.arrayBuffer. This method is redundant since there's
already a Body.buffer() method
- removes Body.bodyUsed getter.
References #106
This patch:
- renames page.setHTTPHeaders into page.setExtraHTTPHeaders
- starts using Map instead of Object to align with other headers
arguments
Fixes#112.
This patch improves on page.evaluate to accept a string.
The string can have a trailing '//# sourceURL=' comment which would
name the evaluation to make stacks beautiful.
In order to make sourceURL comments possible, this patch:
- removes wrapping of the client function into `Promise.resolve()`
- stops passing `awaitPromise` parameter to `Runtime.evaluate`
- starts to await promise via the `Runtime.awaitPromise` if the return type of the evaluation
is promise
closes#118