Iframe integration for signing web application

When hosting the signing application in a iframe is possible to also receive the same client side custom events as when extending directly the signing application. To enable this, when sending the bundle for signing, you must set the following value :

EnableIframeEventsForUrl = "https://example.com"

2 type of values can be set here:

  • the url for your page which hosts the iframe with the signing application. This is the recommanded way and you'll receive the events only when the hosting page url is matching the value set for "EnableIframeEventsForUrl".

  • you can set the value "*" : this means the events will be triggered no matter what the hosting page url.

How are the events dispatched ?

To receive the events you must subscribe to the "message" event, like this :

      window.addEventListener('message', function(event) {
                console.log('received message: ', event.data);
            }, false);
  • the events are dispatached as JSON strings with the following format
   {"event" : "DocumentsLoaded"}

If the events contains parameters, they will be added to the JSON starting with index 0 , like this :

{"0": "113-2345-5454432-234212", "event" : "Signed"}