* Asserts that the viewer is from a trusted origin. * * @param {!Element} element * @return {!Promise}
(element)
| 56 | * @return {!Promise} |
| 57 | */ |
| 58 | assertTrustedViewer(element) { |
| 59 | return this.viewer_.isTrustedViewer().then((trusted) => { |
| 60 | userAssert( |
| 61 | trusted, |
| 62 | 'Refused to attempt SSR in untrusted viewer: ', |
| 63 | element |
| 64 | ); |
| 65 | }); |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Proxies xhr and template rendering to the viewer. |
no test coverage detected