new BlueInkEmbed(publicAPIKey)
Create a new BlueInkEmbed instance, which you can use to mount and unmount embedded signing iFrames.
Parameters:
| Name | Type | Description |
|---|---|---|
publicAPIKey |
string | the public API key for your BlueInk API App. This can be obtained by logging into your BlueInk Dashboard, or via the BlueInk API at /account/ |
Extends
- EventEmitter
Members
Methods
-
mount(container, embeddedSigningURL, options)
-
Parameters:
Name Type Default Description containerstring body the css selector of the container into which the embedded signing iFrame will be injected embeddedSigningURLstring the embedded signing URL, as returned by an API call to /packets/ /embed_url/ optionsobject optional arguments Properties
Name Type Description debugboolean if true, additional information will be printed to the console and displayed in the iFrame (if there is an error) isTestboolean set to true when testing in a development environment (or locally), to turn off verification of the referring domain. This is only valid for embedded signing of test Bundles (which were created with is_test set to true) localestring set the initial language / locale for the embedded signature iFrame redirectURLstring If provided, the parent page (not the iFrame) will be redirected to this URL upon successful completion of a signing replacestring If true, the signing iFrame replaces the contents of container, instead of being appended to the contents Throws:
-
when (1) there is already a mounted BlueInkEmbed iFrame instance, (2) the container element does not exist, or (3) the container selector corresponds to more than one element.
- Type
- BlueInkEmbedError
-
-
unmount()
-
Remove the BlueInk eSignature iFrame. If there is no iFrame (ie, mount(...) was not called previously), this is a noop.
Type Definitions
-
eventCallback(eventData)
-
A callback function that will be invoked with event data.
Parameters:
Name Type Description eventDataEventAnyData | EventErrorData | null depending on the event type