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 | * Loading for the iFrame
|
23 | *
|
24 | * ### Notes
|
25 | * By default, 'eager' loading is chosen
|
26 | *
|
27 | * For more information, see
|
28 | * https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/loading
|
29 | */
|
30 | get loading(): IFrame.Loading;
|
31 | set loading(value: IFrame.Loading);
|
32 | /**
|
33 | * Exceptions to the sandboxing.
|
34 | *
|
35 | * #### Notes
|
36 | * By default, all sandboxing security policies are enabled.
|
37 | * This setting allows the user to selectively disable these
|
38 | * policies. This should be done with care, as it can
|
39 | * introduce security risks, and possibly allow malicious
|
40 | * sites to execute code in a JupyterLab session.
|
41 | *
|
42 | * For more information, see
|
43 | * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
44 | */
|
45 | get sandbox(): IFrame.SandboxExceptions[];
|
46 | set sandbox(values: IFrame.SandboxExceptions[]);
|
47 | /**
|
48 | * The url of the IFrame.
|
49 | */
|
50 | get url(): string;
|
51 | set url(url: string);
|
52 | private _sandbox;
|
53 | private _referrerPolicy;
|
54 | private _loading;
|
55 | }
|
56 | /**
|
57 | * A namespace for IFrame widget statics.
|
58 | */
|
59 | export declare namespace IFrame {
|
60 | |
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | type ReferrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
67 | |
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 | 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';
|
76 | |
77 |
|
78 |
|
79 |
|
80 | type Loading = 'eager' | 'lazy';
|
81 | |
82 |
|
83 |
|
84 | interface IOptions {
|
85 | |
86 |
|
87 |
|
88 | sandbox?: SandboxExceptions[];
|
89 | |
90 |
|
91 |
|
92 | referrerPolicy?: ReferrerPolicy;
|
93 | |
94 |
|
95 |
|
96 | loading?: Loading;
|
97 | }
|
98 | }
|