MCPcopy Index your code
hub / github.com/ampproject/amphtml / ExtensionScript

Function ExtensionScript

build-system/server/app-index/amphtml-helpers.js:19–25  ·  view source on GitHub ↗
({isTemplate, name, version})

Source from the content-addressed store, hash-verified

17const formTypes = ['input', 'select', 'form'];
18
19const ExtensionScript = ({isTemplate, name, version}) => html`
20 <script
21 async
22 ${isTemplate ? 'custom-template' : 'custom-element'}="${name}"
23 src="https://cdn.ampproject.org/v0/${name}-${version || '0.1'}.js"
24 ></script>
25`;
26
27const AmpState = (id, state) => html`
28 <amp-state id="${id}">

Callers

nothing calls this directly

Calls 1

htmlFunction · 0.70

Tested by

no test coverage detected