Method: Pdfcrowd::HtmlToImageClient#setCustomJavascript
- Defined in:
- lib/pdfcrowd.rb
#setCustomJavascript(javascript) ⇒ Object
Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, …). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
-
javascript- A string containing a JavaScript code. The string must not be empty. -
Returns - The converter object.
2958 2959 2960 2961 2962 2963 2964 2965 |
# File 'lib/pdfcrowd.rb', line 2958 def setCustomJavascript(javascript) if (!(!javascript.nil? && !javascript.empty?)) raise Error.new(Pdfcrowd.(javascript, "setCustomJavascript", "html-to-image", "The string must not be empty.", "set_custom_javascript"), 470); end @fields['custom_javascript'] = javascript self end |