This patch implements frame switching api in phantom shim and
passes the relevant test.
This makes sure that puppeteer's frames API is comprehensive.
Fixes#4.
This patch improves phantom_shim:
- introduce WebPage.loading/WebPage.loadingProgress
- improve compatibility of WebPage.onInitialized. This allows to
pass phantomjs tests, even though the implementation is hacky.
- teach PhantomResponse about "stage" state which could be either
"start" or "end"
- unskip a bunch of phantom webpage tests:
- webpage/change-request-encoded-url
- webpage/loading.js
- webpage/long-running-javascript.js
- webpage/modify-header.js
- webpage/on-initialized.js
- webpage/remove-header.js
This patch implements NetworkManager, which encapsulates all the
interaction with Network domain.
The NetworkManager also uses partial implementation of Request and
Response classes, defined in the Fetch API specification.
References #26
This patch does a step towards Fetch API:
- implements Request object to some extend. The Request object will be
sent in RequestWillBeSent event.
- implements InterceptedRequest which extends from Request and allows
for request modification. The InterceptedRequest does not
conform to Fetch API spec - there seems to be nothing related to
amending in-flight request.
- adds test to make sure that request can change headers.
References #26
This patch:
- reformats codebase to use 2-spaces instead of 4. This will
align the project with other codebases (e.g. DevTools and Lighthouse)
- enables eslint indentation checking
References #19
This patch refactors Page.screenshot api, accoring to the discussion
in #5:
- Page.screenshot accepts single optional options object
- Page.saveScreenshot is removed
- Page.screenshot assumes 'png' screenshot if no type is set and no
'path' property is given
Fixes#5.
This patch introduces a Dialog class and a new 'dialog'
event instead of the 'alert', 'beforeunload', 'confirm' and
'prompt' events and 'Page.handleDialog' method.
Fixes#2.
This patch:
- introduces Request class.
- implements Page.setRequestInterceptor method. The method
allows to install a callback which will be called for every request
with a |Request| object as a single parameter. The callback is free
to override certain request's properties and then either continue or
abort it.
- implements request interception api for phantom-shim and unskips the
module/webpage/abort-network-request.js phantomjs test
References #1
It turns page.size() and page.setSize() methods are slightly
confusing since there multiple different sizes (layout size,
content size, viewport size..)
This patch renames Page.{size,setSize} methods into
Page.{viewportSize,setViewportSize} methods to avoid confusion.
This patch:
- renames phantomjs folder into phantom_shim
- moves bin/puppeteer into a phantom_shim/runner.js and
merges the file with phantomjs/index.js
- removes "bin" field from the package.json - it is confusing
to have phantom shim installable