@elliemae/ssf-host 2.25.4 → 2.25.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,8 @@ __export(utils_exports, {
21
21
  createHost: () => createHost,
22
22
  initGuest: () => initGuest,
23
23
  postMessage: () => postMessage,
24
- releaseJSThread: () => releaseJSThread
24
+ releaseJSThread: () => releaseJSThread,
25
+ unloadGuestSilently: () => unloadGuestSilently
25
26
  });
26
27
  module.exports = __toCommonJS(utils_exports);
27
28
  var import_microfe_common = require("@elliemae/microfe-common");
@@ -75,3 +76,8 @@ const initGuest = (guestId, capabilities = { eventFeedback: true }) => {
75
76
  const releaseJSThread = () => new Promise((resolve) => {
76
77
  setTimeout(resolve, 0);
77
78
  });
79
+ const ignoreRejectedPromise = () => {
80
+ };
81
+ const unloadGuestSilently = (host, guestId) => {
82
+ host?.unloadGuest(guestId).catch(ignoreRejectedPromise);
83
+ };
package/dist/cjs/utils.js CHANGED
@@ -38,9 +38,16 @@ const flatten = (source) => source.flat(Infinity).filter((v) => v !== void 0);
38
38
  function isFunction(value) {
39
39
  return typeof value === "function";
40
40
  }
41
- const TRUSTED_DOMAIN_SUFFIXES = [".ice.com", ".elliemae.com", ".ellielabs.com"];
41
+ const TRUSTED_DOMAIN_SUFFIXES = [
42
+ ".ice.com",
43
+ ".elliemae.com",
44
+ ".ellielabs.com",
45
+ ".elliemae.io",
46
+ ".ellieservices.com"
47
+ ];
42
48
  const TRUSTED_HOSTNAMES = ["localhost", "127.0.0.1"];
43
49
  const isTrustedDomain = (url) => {
50
+ if (!url) return false;
44
51
  try {
45
52
  const { hostname } = new URL(url, document.baseURI);
46
53
  return TRUSTED_HOSTNAMES.includes(hostname) || TRUSTED_DOMAIN_SUFFIXES.some(