This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given the name and body for a JavaScript function, this defines the | |
# function globally in the page. | |
# | |
# This is most useful for making helper JavaScript functions that you can | |
# call later, eg. foo = evaluate_script('myFunction()') | |
# | |
# Usage: | |
# | |
# page.define_function :whatever, %{ | |
# var foo = 'hello'; |