1 | import { Widget } from '@lumino/widgets';
|
2 |
|
3 |
|
4 |
|
5 | export declare class IFrame extends Widget {
|
6 | |
7 |
|
8 |
|
9 | constructor(options?: IFrame.IOptions);
|
10 | /**
|
11 | * Referrer policy for the iframe.
|
12 | *
|
13 | * #### Notes
|
14 | * By default, `no-referrer` is chosen.
|
15 | *
|
16 | * For more information, see
|
17 | * https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy
|
18 | */
|
19 | get referrerPolicy(): IFrame.ReferrerPolicy;
|
20 | set referrerPolicy(value: IFrame.ReferrerPolicy);
|
21 | /**
|
22 | * Exceptions to the sandboxing.
|
23 | *
|
24 | * #### Notes
|
25 | * By default, all sandboxing security policies are enabled.
|
26 | * This setting allows the user to selectively disable these
|
27 | * policies. This should be done with care, as it can
|
28 | * introduce security risks, and possibly allow malicious
|
29 | * sites to execute code in a JupyterLab session.
|
30 | *
|
31 | * For more information, see
|
32 | * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
33 | */
|
34 | get sandbox(): IFrame.SandboxExceptions[];
|
35 | set sandbox(values: IFrame.SandboxExceptions[]);
|
36 | /**
|
37 | * The url of the IFrame.
|
38 | */
|
39 | get url(): string;
|
40 | set url(url: string);
|
41 | private _sandbox;
|
42 | private _referrerPolicy;
|
43 | }
|
44 | /**
|
45 | * A namespace for IFrame widget statics.
|
46 | */
|
47 | export declare namespace IFrame {
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | type ReferrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
55 | |
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | type SandboxExceptions = 'allow-downloads' | 'allow-forms' | 'allow-modals' | 'allow-orientation-lock' | 'allow-pointer-lock' | 'allow-popups' | 'popups-to-escape-sandbox' | 'allow-presentation' | 'allow-same-origin' | 'allow-scripts' | 'allow-storage-access-by-user-activation' | 'allow-top-navigation' | 'allow-top-navigation-by-user-activation';
|
64 | |
65 |
|
66 |
|
67 | interface IOptions {
|
68 | |
69 |
|
70 |
|
71 | sandbox?: SandboxExceptions[];
|
72 | |
73 |
|
74 |
|
75 | referrerPolicy?: ReferrerPolicy;
|
76 | }
|
77 | }
|