diff --git a/CHANGELOG.md b/CHANGELOG.md index ca291536..fca94d3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.29.3 + +- widgets + - add `allow` property ## 1.29.1 / 1.29.2 diff --git a/src/client/widgets/frames/frame.js b/src/client/widgets/frames/frame.js index 519d97e9..d3d2f654 100644 --- a/src/client/widgets/frames/frame.js +++ b/src/client/widgets/frames/frame.js @@ -14,6 +14,11 @@ class Frame extends StaticProperties(Widget, {bypass: true}) { static defaults() { return super.defaults().extend({ + class_specific: { + allow: {type: 'string', value: '', help: [ + 'Content for the iframe element\'s allow attribute', + ]}, + }, value: { value: {type: 'string', value: '', help: [ 'External web page URL.', @@ -40,6 +45,9 @@ class Frame extends StaticProperties(Widget, {bypass: true}) { if (!this.getProp('border')) this.container.classList.add('noborder') this.frame = DOM.get(this.widget, '.frame')[0] + + if (this.getProp('allow')) this.frame.setAttribute('allow', this.getProp('allow')) + this.errorText = html`${locales('iframe_unauthorized')}` this.errorTextMounted = false