From aeba37dd3251bcb201b8524012f184ff470693be Mon Sep 17 00:00:00 2001
From: Eran Grinberg
- +
@@ -158,11 +158,12 @@ Here are the new options: | --- | --- | --- | --- | --- | | useChatAsIframe | boolean | Whether to use the chat as an iframe. | false | | useInAppCss | boolean | Whether to use in-app inline CSS. | false | -| useShadowDom | boolean | Whether to use shadow DOM. | true | css is always injected | +| useShadowDom | boolean | Whether to use [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM). | true | css is always injected | | requestHeaders | object | Custom headers for authentication. | {} | | customStylesInjection | string | Custom styles to inject into the widget. | '' | | autoInit | boolean | Whether to automatically initialize the widget. use if load in html | false | | useLoader | boolean | Whether to use a loader as a type indication until the server responds | false | +| sandboxAttributes | string | The [sandbox attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox) for the iframe | '' | [Sandbox Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox) | ## reactiv chat open / close state ```javascript diff --git a/package.json b/package.json index f76014a..659a03c 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "git", "url": "https://github.com/EranGrin/botman-extended-web-widget" }, - "version": "1.2.7", + "version": "1.2.8", "description": "A BotMan frontend package for the web widget", "type": "module", "main": "dist/widget.js", diff --git a/src/typings/index.ts b/src/typings/index.ts index 9e495e1..7c08876 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -148,4 +148,6 @@ export interface IConfiguration { autoInit?: boolean, useLoader?: boolean, + + sandboxAttributes?: string, } \ No newline at end of file diff --git a/src/widget/chat-frame.tsx b/src/widget/chat-frame.tsx index 6a3a9a4..1f97c7e 100644 --- a/src/widget/chat-frame.tsx +++ b/src/widget/chat-frame.tsx @@ -22,6 +22,7 @@ export default class ChatFrame extends Component