1 | export interface SharedState {
|
2 | }
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | export default class ChildRunner {
|
8 | private container?;
|
9 | private eventListenersToRemoveOnClean;
|
10 | private iframe?;
|
11 | private onRunComplete;
|
12 | share: SharedState | null;
|
13 | state: 'initializing' | 'loading' | 'complete';
|
14 | private timeoutId?;
|
15 | private url;
|
16 | parentScope: Window;
|
17 | constructor(url: string, parentScope: Window);
|
18 | /**
|
19 | * Listeners added using this method will be removed on done()
|
20 | *
|
21 | * @param type event type
|
22 | * @param listener object which receives a notification
|
23 | * @param target event target
|
24 | */
|
25 | private addEventListener;
|
26 | /**
|
27 | * Removes all event listeners added by a method addEventListener defined
|
28 | * on an instance of ChildRunner.
|
29 | */
|
30 | private removeAllEventListeners;
|
31 | static loadTimeout: number;
|
32 | private static byUrl;
|
33 | /**
|
34 | * @return {ChildRunner} The `ChildRunner` that was registered for this
|
35 | * window.
|
36 | */
|
37 | static current(): ChildRunner | null;
|
38 | |
39 |
|
40 |
|
41 |
|
42 |
|
43 | static get(target: Window, traversal?: boolean): ChildRunner | null;
|
44 | |
45 |
|
46 |
|
47 |
|
48 |
|
49 | run(done: (error?: {}) => void): void;
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 | loaded(error?: {}): void;
|
56 | |
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 | ready(error?: {}): void;
|
63 | |
64 |
|
65 |
|
66 | done(): void;
|
67 | signalRunComplete(error?: {}): void;
|
68 | }
|