(win, data, configCallback)
| 119 | * on this. |
| 120 | */ |
| 121 | export function draw3pInternal(win, data, configCallback) { |
| 122 | const type = data['type']; |
| 123 | |
| 124 | userAssert( |
| 125 | isTagNameAllowed(type, win.context.tagName), |
| 126 | 'Embed type %s not allowed with tag %s', |
| 127 | type, |
| 128 | win.context.tagName |
| 129 | ); |
| 130 | if (configCallback) { |
| 131 | configCallback(data, (data) => { |
| 132 | userAssert(data, 'Expected configuration to be passed as first argument'); |
| 133 | run(type, win, data); |
| 134 | }); |
| 135 | } else { |
| 136 | run(type, win, data); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * Draws an embed, optionally synchronously, to the DOM. |
no test coverage detected