Module
PhantomJS.Page
- Package
- purescript-phantom
- Repository
- purescripters/purescript-phantom
#RenderFormat Source
#RenderSettings Source
#jpeg Source
jpeg :: RenderSettings
Predefined setting for rendering screenshot as jpeg
#png Source
png :: RenderSettings
Predefined setting for rendering screenshot as png
#createPage Source
createPage :: forall e. PhantomAff e Page
Creates a new page context.
#customHeadersRaw Source
customHeadersRaw :: forall f e. Foldable f => Page -> f (Tuple String String) -> PhantomAff e Unit
Sets custom headers on a page context. These headers will persist for the life of the context.
#render Source
render :: forall e. Page -> FilePath -> RenderSettings -> PhantomAff e Unit
Renders a screenshot of the given page.
#injectJs Source
injectJs :: forall e. Page -> FilePath -> PhantomAff e Unit
Injects a javascript file into a page.
#evaluate Source
evaluate :: forall a e. Page -> String -> PhantomAff e a
Evaluates a specific function on the window object of the page. When using this function you will need to add a type annotation so PureScript knows what type the native javascript will return, e.g.
result <- evaluate page "file.js" :: forall e. Aff e (Array String)