MCPcopy
hub / github.com/ampproject/amphtml / getElementServiceForDoc

Function getElementServiceForDoc

src/element-service.js:63–70  ·  view source on GitHub ↗
(element, id, extension, opt_element)

Source from the content-addressed store, hash-verified

61 * @return {!Promise<*>}
62 */
63export function getElementServiceForDoc(element, id, extension, opt_element) {
64 return getElementServiceIfAvailableForDoc(
65 element,
66 id,
67 extension,
68 opt_element
69 ).then((service) => assertService(service, id, extension));
70}
71
72/**
73 * Same as getElementService but produces null if the given element is not

Callers 4

index.jsFile · 0.90
buildCallbackMethod · 0.90
lightboxManagerForDocFunction · 0.90

Calls 3

assertServiceFunction · 0.85
thenMethod · 0.45

Tested by

no test coverage detected