Skip to content

Instantly share code, notes, and snippets.

@jarib
Created March 23, 2009 21:40
Show Gist options
  • Save jarib/83797 to your computer and use it in GitHub Desktop.
Save jarib/83797 to your computer and use it in GitHub Desktop.
## ex. 1 - expose remove_listener
blk = lamda { true }
browser.add_listener(:confirm, &blk)
browser.button(...).click # to trigger confirm
browser.remove_listener(blk)
## ex. 2 - new API
browser.confirm(true/false) do
browser.button(...).click # to trigger confirm() call
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment