add a Javascript fragment that will execute after the document is printed.
There can only be a single fragment. Calling this function multiple times will override earlier fragments.
# File lib/prawn/js.rb, line 27 def add_did_print_js(script) aa[:DP] = ref!(:S => :JavaScript, :JS => script) end
add a Javascript fragment that will execute after the document is saved.
There can only be a single fragment. Calling this function multiple times will override earlier fragments.
# File lib/prawn/js.rb, line 18 def add_did_save_js(script) aa[:DS] = ref!(:S => :JavaScript, :JS => script) end
add a Javascript fragment that will execute when the document is opened.
There can only be as many fragments as required. Calling this function multiple times will append the new fragment to the list.
# File lib/prawn/js.rb, line 36 def add_docopen_js(name, script) obj = ref!(:S => :JavaScript, :JS => script) javascript.data.add(name, obj) end
add a Javascript fragment that will execute when the document is closed.
There can only be a single fragment. Calling this function multiple times will override earlier fragments.
# File lib/prawn/js.rb, line 46 def add_will_close_js(script) aa[:WC] = ref!(:S => :JavaScript, :JS => script) end
add a Javascript fragment that will execute before the document is printed.
There can only be a single fragment. Calling this function multiple times will override earlier fragments.
# File lib/prawn/js.rb, line 55 def add_will_print_js(script) aa[:WP] = ref!(:S => :JavaScript, :JS => script) end
add a Javascript fragment that will execute before the document is saved.
There can only be a single fragment. Calling this function multiple times will override earlier fragments.
# File lib/prawn/js.rb, line 64 def add_will_save_js(script) aa[:WS] = ref!(:S => :JavaScript, :JS => script) end
Generated with the Darkfish Rdoc Generator 2.