Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
Fixed styling, this mostly affects man page.
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Dec 22, 2010
1 parent 2b99178 commit 8f28067
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 38 deletions.
1 change: 0 additions & 1 deletion Cakefile
@@ -1,7 +1,6 @@
fs = require("fs") fs = require("fs")
path = require("path") path = require("path")
{spawn, exec} = require("child_process") {spawn, exec} = require("child_process")
markdown = require("node-markdown").Markdown
sys = require("sys") sys = require("sys")


# ANSI Terminal Colors. # ANSI Terminal Colors.
Expand Down
71 changes: 39 additions & 32 deletions README.md
Expand Up @@ -177,122 +177,122 @@ Let's combine all of that into one example:


## Browser API ## Browser API


#### Browser.visit(url, callback) ### Browser.visit(url, callback)


Shortcut for creating new browser and calling `browser.visit` on it. Shortcut for creating new browser and calling `browser.visit` on it.


#### browser.body => Element ### browser.body : Element


Returns the body Element of the current document. Returns the body Element of the current document.


#### browser.check(field) => this ### browser.check(field) : this


Checks a checkbox. Checks a checkbox.


#### browser.choose(field) => this ### browser.choose(field) : this


Selects a radio box option. Selects a radio box option.


#### browser.clickLink(selector, callback) ### browser.clickLink(selector, callback)


Clicks on a link. Clicking on a link can trigger other events, load new page, Clicks on a link. Clicking on a link can trigger other events, load new page,
etc: use a callback to be notified of completion. Finds link by text content etc: use a callback to be notified of completion. Finds link by text content
or selector. or selector.


#### browser.clock ### browser.clock


The current system clock according to the browser (see also `browser.now`). The current system clock according to the browser (see also `browser.now`).


#### browser.cookies(domain, path?) => Cookies ### browser.cookies(domain, path?) : Cookies


Returns all the cookies for this domain/path. Path defaults to "/". Returns all the cookies for this domain/path. Path defaults to "/".


#### browser.document => Document ### browser.document : Document


Returns the main window's document. Only valid after opening a document (see `browser.open`). Returns the main window's document. Only valid after opening a document (see `browser.open`).


#### browser.fill(field, value) => this ### browser.fill(field, value) : this


Fill in a field: input field or text area. Fill in a field: input field or text area.


#### browser.fire(name, target, calback?) ### browser.fire(name, target, calback?)


Fire a DOM event. You can use this to simulate a DOM event, e.g. clicking a Fire a DOM event. You can use this to simulate a DOM event, e.g. clicking a
link. These events will bubble up and can be cancelled. With a callback, this link. These events will bubble up and can be cancelled. With a callback, this
function will call `wait`. function will call `wait`.


#### browser.html(selector?, context?) => String ### browser.html(selector?, context?) : String


Returns the HTML contents of the selected elements. Returns the HTML contents of the selected elements.


#### browser.last_error => Object ### browser.last_error : Object


Returns the last error received by this browser in lieu of response. Returns the last error received by this browser in lieu of response.


#### browser.last_request => Object ### browser.last_request : Object


Returns the last request sent by this browser. Returns the last request sent by this browser.


#### browser.last_response => Object ### browser.last_response : Object


Returns the last response received by this browser. Returns the last response received by this browser.


#### browser.localStorage(host) => Storage ### browser.localStorage(host) : Storage


Returns local Storage based on the document origin (hostname/port). Returns local Storage based on the document origin (hostname/port).


#### browser.location => Location ### browser.location : Location


Return the location of the current document (same as `window.location.href`). Return the location of the current document (same as `window.location.href`).


#### browser.location = url ### browser.location = url


Changes document location, loads new document if necessary (same as setting Changes document location, loads new document if necessary (same as setting
`window.location`). `window.location`).


#### browser.now => Date ### browser.now : Date


The current system time according to the browser (see also `browser.clock`). The current system time according to the browser (see also `browser.clock`).


#### browser.open() => Window ### browser.open() : Window


Open new browser window. Open new browser window.


#### browser.pressButton(name, callback) ### browser.pressButton(name, callback)


Press a button (button element or input of type `submit`). Typically this will Press a button (button element or input of type `submit`). Typically this will
submit the form. Use the callback to wait for the from submission, page to submit the form. Use the callback to wait for the from submission, page to
load and all events run their course. load and all events run their course.


#### browser.querySelector(selector) => Element ### browser.querySelector(selector) : Element


Select a single element (first match) and return it. Select a single element (first match) and return it.


#### browser.querySelectorAll(selector) => NodeList ### browser.querySelectorAll(selector) : NodeList


Select multiple elements and return a static node list. Select multiple elements and return a static node list.


#### browser.select(field, value) => this ### browser.select(field, value) : this


Selects an option. Selects an option.


#### browser.sessionStorage(host) => Storage ### browser.sessionStorage(host) : Storage


Returns session Storage based on the document origin (hostname/port). Returns session Storage based on the document origin (hostname/port).


#### browser.text(selector, context?) => String ### browser.text(selector, context?) : String


Returns the text contents of the selected elements. Returns the text contents of the selected elements.


#### browser.uncheck(field) => this ### browser.uncheck(field) : this


Unchecks a checkbox. Unchecks a checkbox.


#### browser.visit(url, callback) ### browser.visit(url, callback)


Loads document from the specified URL, processes events and calls the callback. Loads document from the specified URL, processes events and calls the callback.


#### browser.wait(terminator, callback) ### browser.wait(terminator, callback)


Process all events from the queue. This includes resource loading, XHR Process all events from the queue. This includes resource loading, XHR
requests, timeout and interval timers. Calls the callback when done. requests, timeout and interval timers. Calls the callback when done.
Expand All @@ -302,19 +302,22 @@ The terminator is optional and can be one of:
* Number -- process that number of events * Number -- process that number of events
* Function -- called after each event, returns false to stop processing * Function -- called after each event, returns false to stop processing


#### browser.window => Window ### browser.window : Window


Returns the main window. Returns the main window.


#### Event: "drain" ### Event: 'drain'
`function (browser) { }`


Emitted whenever the event queue goes back to empty. Emitted whenever the event queue goes back to empty.


#### Event: "loaded" ### Event: 'loaded'
`function (browser) { }`


Emitted whenever new page loaded. This event is emitted before `DOMContentLoaded`. Emitted whenever new page loaded. This event is emitted before `DOMContentLoaded`.


#### Event: "error" ### Event: 'error'
`function (error) { }`


Emitted if an error occurred loading a page or submitting a form. Emitted if an error occurred loading a page or submitting a form.


Expand Down Expand Up @@ -401,7 +404,11 @@ Zombie.js is written in
## See Also ## See Also


[Annotated Source Code](source/browser.html) [Annotated Source Code](source/browser.html)

[Changelog](changelog.html) [Changelog](changelog.html)

[DOM API](http://www.w3.org/DOM/DOMTR) [DOM API](http://www.w3.org/DOM/DOMTR)

[Sizzle.js](http://sizzlejs.com/) [Sizzle.js](http://sizzlejs.com/)

[Vows](http://vowsjs.org/) [Vows](http://vowsjs.org/)
8 changes: 3 additions & 5 deletions doc/screen.css
Expand Up @@ -7,15 +7,13 @@ body {
} }
h1, h2, h3, h4, #header { h1, h2, h3, h4, #header {
font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
color: #660000; color: #600;
} }
h1, h2, h3 { color: #600; }
h1 { font-size: 22pt; } h1 { font-size: 22pt; }
h2 { font-size: 20pt; } h2 { font-size: 20pt; }
h3 { font-size: 18pt; } h3 {
h4 {
font-size: 16pt; font-size: 16pt;
color: #666; color: #444;
} }
pre, code { pre, code {
font-family: "Menlo", "Consolas", "New Courier", Courier, monospace; font-family: "Menlo", "Consolas", "New Courier", Courier, monospace;
Expand Down

0 comments on commit 8f28067

Please sign in to comment.