You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@formsort/web-embed-api

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formsort/web-embed-api - npm Package Compare versions

Comparing version
2.9.0
to
2.10.0
+9
-0
lib/index.d.ts

@@ -11,2 +11,11 @@ import { type IFormsortEmbedConfig, type IEventMap } from '@formsort/embed-messaging-manager';

useHistoryAPI?: boolean;
/**
* iframe title attribute for accessibility
*/
iframeTitle?: string;
/**
* iframe allow attribute for permissions
* e.g. "camera;"
*/
iframeAllow?: string;
}

@@ -13,0 +22,0 @@ declare const FormsortWebEmbed: (rootEl: HTMLElement, config?: IFormsortWebEmbedConfig) => IFormsortWebEmbed;

+7
-2

@@ -11,7 +11,9 @@ "use strict";

};
const DEFAULT_ALLOW = 'camera;';
const FormsortWebEmbed = (rootEl, config = DEFAULT_CONFIG) => {
const iframeEl = document.createElement('iframe');
const { style } = config;
const { style, iframeAllow = DEFAULT_ALLOW, iframeTitle } = config;
let loadedOrigin;
iframeEl.style.border = 'none';
iframeEl.allow = iframeAllow || DEFAULT_ALLOW;
if (style) {

@@ -22,2 +24,5 @@ const { width = '', height = '' } = style;

}
if (iframeTitle) {
iframeEl.title = iframeTitle;
}
rootEl.appendChild(iframeEl);

@@ -58,3 +63,3 @@ const setSize = (width, height) => {

messagingManager.addEventListener(embed_messaging_manager_1.SupportedAnalyticsEvent.FlowLoaded, (payload) => {
if (payload.documentTitle) {
if (payload.documentTitle && !iframeEl.title) {
iframeEl.title = payload.documentTitle;

@@ -61,0 +66,0 @@ }

{
"name": "@formsort/web-embed-api",
"version": "2.9.0",
"version": "2.10.0",
"description": "Embed Formsort flows within other webpages",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -36,2 +36,11 @@ # @formsort/web-embed-api

useHistoryAPI?: boolean; // Default: false
/**
* iframe title attribute for accessibility
*/
iframeTitle?: string;
/**
* iframe allow attribute for permissions
* e.g. "camera;"
*/
iframeAllow?: string;
autoHeight?: boolean; // Default: false

@@ -59,4 +68,10 @@ style?: {

- `iframeTitle`: Optional string to set the iframe's title attribute for accessibility. If not provided, the embed will attempt to set a title from the flow's document title when available.
- `iframeAllow`: Optional string to set the iframe's allow attribute for permissions (for example: `"camera;"`).
- `authentication.idToken`: When the Flow requires an ID token, this can be used to provide it.
- `origin`: When present, loads the flow from your custom domain instead of the default formsort domain.
### `loadFlow(clientLabel: string, flowLabel: string, variantLabel?: string, queryParams?: Array<[string, string]>) => void`

@@ -63,0 +78,0 @@