Skip to content

Commit cdfcc4c

Browse files
MOBILE-4826 core-iframe: Add allow attribute to iframe
1 parent 29415a7 commit cdfcc4c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/core/components/iframe/core-iframe.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
<!-- allowfullscreen cannot be set dynamically using attribute binding, define 2 iframe elements. -->
1919
@if (allowFullscreen) {
2020
<iframe #iframe class="core-iframe" [attr.id]="id" [ngStyle]="{'width': iframeWidth, 'height': iframeHeight}" [src]="safeUrl"
21-
allowfullscreen="true" [class.core-iframe-loading]="loading">
21+
allowfullscreen="true" [class.core-iframe-loading]="loading" [allow]="allow()">
2222
</iframe>
2323
} @else {
2424
<iframe #iframe class="core-iframe" [attr.id]="id" [ngStyle]="{'width': iframeWidth, 'height': iframeHeight}" [src]="safeUrl"
25-
[class.core-iframe-loading]="loading">
25+
[class.core-iframe-loading]="loading" [allow]="allow()">
2626
</iframe>
2727
}
2828

src/core/components/iframe/iframe.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
SimpleChange,
2424
OnDestroy,
2525
inject,
26+
input,
2627
} from '@angular/core';
2728
import { SafeResourceUrl } from '@angular/platform-browser';
2829

@@ -70,6 +71,7 @@ export class CoreIframeComponent implements OnChanges, OnDestroy {
7071
this.initIframeElement();
7172
}
7273

74+
readonly allow = input<string>();
7375
@Input() src?: string;
7476
@Input() id: string | null = null;
7577
@Input() iframeWidth = '100%';

0 commit comments

Comments
 (0)