-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinitExampleSdk.js
More file actions
21 lines (18 loc) · 879 Bytes
/
initExampleSdk.js
File metadata and controls
21 lines (18 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import initFullscreenPlugin from "../src/initFullscreenPlugin.js";
import initInlinePlugin from "../src/initInlinePlugin.js";
export default function initExampleSdk({ settings: { splashScreenUrl } = {} }) {
function initInlineAdPlugin({ data, settings, hooks }, { container, beforeInit, timeout }) {
const src = "./plugins/inline-ad.html";
// we could define the beforeInit here to set the dimensions from the settings object
return initInlinePlugin({ data, settings, hooks }, { container, src, beforeInit, timeout });
}
// eslint-disable-next-line no-empty-pattern
function initContentEditorPlugin({ data, settings, hooks }) {
const src = "./plugins/content-editor.html";
return initFullscreenPlugin({ data, settings: { ...settings, splashScreenUrl }, hooks }, { id: "content-editor", src });
}
return {
initInlineAdPlugin,
initContentEditorPlugin,
};
}