<script> tag in the pages that reference and utilize the functionality it exposes:
This script defines a single, global object,
elli.script, which provides all the entry-point functions into the guest library. The script tag should be included in your page prior to other scripts that invoke the
elli.script object (preferably in the
<head> portion of the page).
<html> <head> <script src="https://cdn.elliemae.io/elliemae/core/ssf/1.0/elli.ssf.guest.js"></script> <!-- Any other script tags required by the page --> </head> <body> <!-- HTML content --> </body> </html>
Support for Promises
Promises) that are not available in legacy web browsers. This should be your default choice unless you are already including a polyfill library (e.g. the Babel Polyfill library) in your page as a separate script tag. This version of the library is available at:
elli.ssf.guest.jsfile excludes the polyfill library. Use this version of the script only if you are already including a polyfill library in your page. Note that the script tag for your polyfill library must precede the script tag for the SSF Guest Library. This version of the library is available at:
@elliemae/em-ssf-guest. This example shows how to install this to your project using
$ npm install @elliemae/em-ssf-guest
Note that the em-ssf-guest package does not include a polyfill as a dependency to prevent lock-in with a specific polyfill implementation. If you do not already have a polyfill included in your package.json file's dependencies section, then you need to add a dependency on the Babel Polyfill library and include the library in your bundle file.
Once installed - you can import the guest libraries default export (the global
elli.script object described above) into your application as needed, which provides all the entry-point functions into the guest library:
// Import the guest libraries default export import host from '@elliemae/em-ssf-guest'; ...