Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ampproject/amphtml
/ functions
Functions
18,703 in github.com/ampproject/amphtml
⨍
Functions
18,703
◇
Types & classes
2,331
↓ 2 callers
Function
runTestsForDatasource
* This function runs generic tests for components based on * data-videoid or data-live-channelid. * @param {string} datasource
extensions/amp-youtube/0.1/test/test-amp-youtube.js:75
↓ 2 callers
Function
runV1
(g, d)
ads/vendors/affinity.js:23
↓ 2 callers
Function
runWhenFetchingSettled
(fetchingSSPs, cb)
ads/vendors/ssp.js:44
↓ 2 callers
Function
safeAesGcmImportKey
(key)
third_party/subscriptions-project/aes_gcm.js:73
↓ 2 callers
Function
safeUri
(uri, effect, ltype, hints, naiveUriRewriter)
third_party/caja/html-sanitizer.js:2206
↓ 2 callers
Method
sandboxContainsToken_
* @param {string} sandbox * @param {string} token * @return {boolean} * @private
extensions/amp-iframe/0.1/amp-iframe.js:193
↓ 2 callers
Function
sanityCheck
* Checks that only 1 AMP_CONFIG should exist after append. * * @param {string} str
build-system/tasks/prepend-global/index.js:50
↓ 2 callers
Function
saveExperimentToggles
* Saves a set of experiment IDs currently on. * @param {Window} win * @param {ExperimentTogglesMap} toggles
src/experiments/index.js:213
↓ 2 callers
Method
saveStore_
* @param {function(!Store)} mutator * @return {!Promise} * @private
src/service/storage-impl.js:140
↓ 2 callers
Method
scanElement_
* Scans the element for bindings and adds up to |quota| to `outBindings`. * Also updates ivars `boundElements_` and `expressionToElements_`. * @
extensions/amp-bind/0.1/bind-impl.js:938
↓ 2 callers
Method
scanForBindings_
* Scans for bindings in `addedElements` and removes bindings in `removedElements`. * Unlike updateBindings(), does NOT apply bindings or update DOM
extensions/amp-list/0.1/amp-list.js:1100
↓ 2 callers
Method
scanLightboxables_
* Scans the document for lightboxable elements and updates `this.elements_` * accordingly. * @private * @return {!Promise}
extensions/amp-lightbox-gallery/0.1/service/lightbox-manager-impl.js:149
↓ 2 callers
Method
scanNode_
* @param {!Node} node * @param {boolean=} opt_lightboxMode * @private
src/service/fixed-layer.js:213
↓ 2 callers
Method
scan_
* Scans the root for fx-enabled elements and registers them with the * fx provider.
extensions/amp-fx-collection/0.1/amp-fx-collection.js:49
↓ 2 callers
Method
scheduleLayoutForAd_
* Function that check if ad has been built. If not, wait for the "built" * signal. Otherwise schedule layout for ad. * @private
extensions/amp-sticky-ad/1.0/amp-sticky-ad.js:225
↓ 2 callers
Method
scheduleLayoutOrPreloadForSubresources_
* Schedules layout or preload for the sub-resources of the specified * resource. * @param {!Resource} parentResource * @param {boolean} layou
src/service/owners-impl.js:152
↓ 2 callers
Method
schedule_
@private
src/utils/dom-writer.js:159
↓ 2 callers
Method
schedule_
* Schedules a task. * @param {!Resource} resource * @param {string} localId * @param {number} priorityOffset * @param {number} parentPrior
src/service/resources-impl.js:1592
↓ 2 callers
Method
scopeBaseCid_
* * @param {!Promise} persistenceConsent * @param {*} scope * @param {!Location} url * @return {*}
src/service/cid-impl.js:273
↓ 2 callers
Function
scopeShadowCss
(shadowRoot, css)
src/shadow-embed.js:215
↓ 2 callers
Function
scopedQuerySelectionFallback
* Finds all elements that matche `selector`, scoped inside `root` * for user-agents that do not support native scoping. * * This method isn't requi
src/core/dom/query.js:33
↓ 2 callers
Method
scopedQuerySelector_
* @param {string} selector * @return {?Element} * @private
extensions/amp-animation/0.1/web-animations.js:1314
↓ 2 callers
Function
scroll
(page, _, target = 'bottom')
examples/visual-tests/amp-video-docking/amp-video-docking.js:18
↓ 2 callers
Function
scrollContainerToElement
( axis, alignment, container, el, offset = 0 )
src/bento/components/bento-base-carousel/1.0/dimensions.js:234
↓ 2 callers
Method
scrollHandler_
* Handles scroll on the slides container. * @param {Event} unusedEvent Event object. * @private
extensions/amp-carousel/0.1/slidescroll.js:560
↓ 2 callers
Method
scrollIntoIfNotVisible_
* Scrolls to a video if it's not in view. * @param {!../video-interface.VideoOrBaseElementDef} video * @param {?string=} optPos * @return {!P
src/service/video-manager-impl.js:1241
↓ 2 callers
Method
scrollToAnimationStart_
* @param {number} top * @private
extensions/amp-viewer-integration/0.1/highlight-handler.js:364
↓ 2 callers
Method
scrollToElement_
* Scrolls the page to the given element. * @param {?Element} elem * @param {string} hash * @private
src/service/navigation.js:655
↓ 2 callers
Method
scrollToTopWitoutAnimation_
* Equivalent to animateScrollToTop_ without scroll animation. * @param {number} top * @private
extensions/amp-viewer-integration/0.1/highlight-handler.js:354
↓ 2 callers
Method
sdnBridge_
* * @param {!Event} event * @private
extensions/amp-3q-player/0.1/amp-3q-player.js:166
↓ 2 callers
Function
se
(e,t,n,a,r)
third_party/inputmask/bundle.js:11
↓ 2 callers
Function
secondWindowFromTop
* @param {!Window} win * @return {!Window}
ads/google/a4a/utils.js:466
↓ 2 callers
Function
secondsToTimestampString
(seconds)
extensions/amp-lightbox-gallery/0.1/utils.js:33
↓ 2 callers
Method
seekTo
* @param {time} unusedTime
extensions/amp-animation/0.1/runners/animation-runner.js:53
↓ 2 callers
Method
seekToPercent
* Seeks to a relative position within the animation timeline given a * percentage (0 to 1 number). * @param {number} unusedPercent between 0 and
extensions/amp-animation/0.1/runners/animation-runner.js:60
↓ 2 callers
Method
selectPurchaseOption_
* @param {!Element} target * @private
extensions/amp-access-laterpay/0.2/laterpay-impl.js:576
↓ 2 callers
Method
selectPurchaseOption_
* @param {!Element} target * @private
extensions/amp-access-laterpay/0.1/laterpay-impl.js:515
↓ 2 callers
Method
select_
* Handles selectUp events. * @param {number} delta * @param {!ActionTrust_Enum} trust * @private
extensions/amp-selector/0.1/amp-selector.js:459
↓ 2 callers
Method
selectedOptions_
* @return {!Array<string>} * @private
extensions/amp-selector/0.1/amp-selector.js:374
↓ 2 callers
Function
selectorNeedsScope
* Checks if the selector is using grandchild selector semantics * `node.querySelector('child grandchild')` or `'child>grandchild'` But, * specif
build-system/eslint-rules/query-selector.js:207
↓ 2 callers
Method
sendBeacon
* POST data to a URL endpoint, do not wait for a response. * @param {!string} unusedUrl * @param {!../proto/api_messages.Message} unusedData
third_party/subscriptions-project/swg.js:13753
↓ 2 callers
Method
sendBindingsToWorker_
* Sends new bindings to the web worker for parsing. * @param {!Array<!BindBindingDef>} bindings * @return {!Promise<number>}
extensions/amp-bind/0.1/bind-impl.js:792
↓ 2 callers
Method
sendCommand_
* Sends a command to the player through postMessage. * @param {string} command * @param {*=} opt_arg * @private *
extensions/amp-gfycat/0.1/amp-gfycat.js:177
↓ 2 callers
Method
sendConfiguration_
* @param {!SendConfigurationInput} input * @private
extensions/amp-addthis/0.1/config-manager.js:112
↓ 2 callers
Method
sendDeprecationNotice_
* @param {string} endpoint Method being called * @private
3p/ampcontext.js:264
↓ 2 callers
Method
sendEmbedSizeResponse_
* Sends a response to the window which requested a resize. * @param {boolean} success * @param {number|undefined} id * @param {number} reques
extensions/amp-ad/0.1/amp-ad-xorigin-iframe-handler.js:492
↓ 2 callers
Method
sendEnterFullscreenResponse_
* @param {string} requestType * @param {string} requestAction * @param {boolean} isError *
extensions/amp-consent/0.1/consent-ui.js:909
↓ 2 callers
Function
sendFakeMessage
(gfycat, iframe, command)
extensions/amp-gfycat/0.1/test/test-amp-gfycat.js:96
↓ 2 callers
Function
sendFakeMessage
()
extensions/amp-3d-gltf/0.1/test/test-amp-3d-gltf.js:17
↓ 2 callers
Method
sendMessageInternal_
* @param {!Window} win * @param {string} msg * private
3p/iframe-messaging-client.js:146
↓ 2 callers
Method
sendPosition_
* * @param {!Object} request * @param {!Window} source * @param {?JsonObject} data
ads/inabox/inabox-messaging-host.js:181
↓ 2 callers
Method
sendRequestUsingIframe
* Sends a ping request using an iframe, that is removed 5 seconds after * it is loaded. * This is not available as a standard transport, but rat
extensions/amp-analytics/0.1/transport.js:206
↓ 2 callers
Method
sendRequest_
* Sends ad request. * @private
extensions/amp-a4a/0.1/amp-ad-network-base.js:137
↓ 2 callers
Method
sendSignal
* Sends the request, awaits result and confirms that it was successful. * * See https://developer.mozilla.org/en-US/docs/Web/API/GlobalFetch/fet
src/service/xhr-impl.js:186
↓ 2 callers
Method
sendUpdateHrefRequest_
* send a POST request to the updateHref with userId with fixed scope * and consentInstanceIds * @param {!ConsentInfoDef} consentInfo
extensions/amp-consent/0.1/consent-state-manager.js:532
↓ 2 callers
Method
sendViewerEvent_
* Send viewer an event. * @param {string} event
extensions/amp-consent/0.1/consent-ui.js:463
↓ 2 callers
Method
serializeHtml_
* Sanitizes the html and inserts it in the DOM. * @param {string} html * @return {!Element} * @private
extensions/amp-mustache/0.1/amp-mustache.js:143
↓ 2 callers
Function
serializeItem_
* @param {string} key * @param {(!Array<string>|string)} value * @return {string} * @private
extensions/amp-ad-network-doubleclick-impl/0.1/sra-utils.js:367
↓ 2 callers
Function
serializeProtoMessageForUrl
* @param {!../proto/api_messages.Message} message * @return {string}
third_party/subscriptions-project/swg.js:5409
↓ 2 callers
Function
sessionServicePromiseForDoc
(elementOrAmpDoc)
extensions/amp-analytics/0.1/session-manager.js:345
↓ 2 callers
Function
set
* Set a DOM element attribute * @param {Element} el - The element * @param {string} attr - the attribute key * @param {string} value - the attribut
extensions/amp-pinterest/0.1/util.js:67
↓ 2 callers
Function
setAttributeInMutate
(elementImpl, name, opt_value)
extensions/amp-story/1.0/utils.js:170
↓ 2 callers
Function
setBodyVisibleStyles
* Make sure that body exists, and make it visible. * @param {!Document} doc
src/style-installer.js:247
↓ 2 callers
Function
setChildNodes
* @private * @description * Utility that will nodes childern to match another nodes children. * * @param {Node} oldParent - The existing parent no
third_party/set-dom/set-dom.js:141
↓ 2 callers
Function
setChildNodes
* @private * @description * Utility that will nodes childern to match another nodes children. * * @param {Node} oldParent - The existing parent no
third_party/set-dom/original.js:139
↓ 2 callers
Function
setCidBackup
* Sets a new CID backup in Storage * @param {!./ampdoc-impl.AmpDoc} ampdoc * @param {string} cookieName * @param {string} cookie
src/service/cid-impl.js:387
↓ 2 callers
Method
setContent
* @param {string} content The content for the caption.
extensions/amp-lightbox-gallery/0.1/lightbox-caption.js:80
↓ 2 callers
Method
setCssGridStyles_
* Copies the values of an element's attributes to its styles, if the * attributes/properties are in the allowlist. * * @param {!Element} elem
extensions/amp-story/1.0/amp-story-grid-layer.js:132
↓ 2 callers
Method
setCssPosition_
* Sets the CSS 'position' property of this.element. * @param {string} position The CSS position value. * @return {!Promise} A promise that resol
extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js:1493
↓ 2 callers
Method
setCurrentTime
* Sets currentTime for a specified media element in the DOM. * @param {!DomElementDef} domMediaEl The media element. * @param {number} currentTi
extensions/amp-story/1.0/media-pool.js:847
↓ 2 callers
Method
setCurve
* Sets the default curve for the animation. Each segment is allowed to have * its own curve, but this curve will be used if a segment doesn't speci
src/utils/animation.js:68
↓ 2 callers
Method
setDates
(startDate: Date, endDate: Date)
extensions/amp-date-picker/1.0/types.ts:66
↓ 2 callers
Function
setDefaultWebPushConfig
()
extensions/amp-web-push/0.1/test/test-web-push-config.js:16
↓ 2 callers
Function
setDenylistedPropertiesForTesting
(properties)
extensions/amp-form/0.1/form-proxy.js:17
↓ 2 callers
Method
setDocumentVisibility_
* Manually overrides the document's visible state to the given state * * @param {!DocumentRef} ref Reference to the document to change * @par
extensions/amp-next-page/0.1/next-page-service.js:548
↓ 2 callers
Method
setEnabled
* Enables or disables all animations in this document. When disabled, all * animations are turned off with a CSS `animation: none` override. Action
extensions/amp-gwd-animation/0.1/amp-gwd-animation-impl.js:199
↓ 2 callers
Method
setErrorSuffix_
* @param {!Error} error * @return {!Error} * @private
src/utils/log.js:312
↓ 2 callers
Function
setExpanded
* @param {string} id * @param {boolean} value * @param {!{[key: string]: boolean}} expandedMap * @param {boolean} expandSingleSection * @return {!
src/bento/components/bento-accordion/1.0/component.js:231
↓ 2 callers
Method
setExtraUrlParams
* @param {!JsonObject} extraUrlParamsConfig
src/extension-analytics.js:147
↓ 2 callers
Method
setGlobals_
* Sets global references in scope if they're not already set or overriden. * @param {!JsonObject} scope
extensions/amp-bind/0.1/bind-evaluator.js:183
↓ 2 callers
Method
setGyroscopeDefaultHeading_
* Ensures user is facing a specified point of interest. * @param {number} orientationAlpha * @private
extensions/amp-story-360/0.1/amp-story-360.js:504
↓ 2 callers
Method
setImage
(img)
third_party/zuho/zuho.js:173
↓ 2 callers
Method
setImageCenteringStyles_
* Centers the amp-img horizontally or vertically based on aspect ratio. * The img element does not load if this is done in CSS. * @private
extensions/amp-story-panning-media/0.1/amp-story-panning-media.js:274
↓ 2 callers
Function
setImportantStyles
* Sets the CSS styles of the specified element with !important. The styles * are specified as a map from CSS property names to their values. * @para
third_party/subscriptions-project/swg-gaa.js:1113
↓ 2 callers
Function
setInternalParam
* @param {!PaymentDataRequest} paymentRequest * @param {string} param * @param {*} value
third_party/subscriptions-project/swg.js:18322
↓ 2 callers
Method
setIsUserRegistered
* @param {boolean} value
third_party/subscriptions-project/swg.js:1472
↓ 2 callers
Method
setLightboxMode
* Toggles internal state after entering or leaving lightbox mode. * @param {boolean} unusedOn
src/service/fixed-layer.js:954
↓ 2 callers
Method
setLoadMoreEnded
* Must be called in mutate context
extensions/amp-list/0.1/service/load-more-service.js:201
↓ 2 callers
Method
setMetaByName
* Stores the value of an ampdoc's meta tag content for a given name. To be * implemented by subclasses. * @param {string} unusedName * @param
src/service/ampdoc-impl.js:401
↓ 2 callers
Method
setOnFlowCanceled
* @param {function({flow: string, data: !Object})} callback
third_party/subscriptions-project/swg.js:9266
↓ 2 callers
Method
setOnFlowStarted
* @param {function({flow: string, data: !Object})} callback
third_party/subscriptions-project/swg.js:9247
↓ 2 callers
Method
setOnLinkComplete
* @param {function()} callback
third_party/subscriptions-project/swg.js:9113
↓ 2 callers
Method
setOnLoginRequest
* @param {function(!../api/subscriptions.LoginRequest)} callback
third_party/subscriptions-project/swg.js:9078
↓ 2 callers
Method
setOnPaymentResponse
* @param {function(!Promise<!../api/subscribe-response.SubscribeResponse>)} callback
third_party/subscriptions-project/swg.js:9211
↓ 2 callers
Method
setOnchange_
* Sets the onchange for each of the associated MediaQueryLists. * @param {!Array<!MediaQueriesListAndValueDef>} mediaQueryListsAndValues * @para
extensions/amp-base-carousel/0.1/responsive-attributes.js:159
↓ 2 callers
Method
setOverflowState
* @param {!OverflowState} state
extensions/amp-lightbox-gallery/0.1/lightbox-caption.js:87
↓ 2 callers
Method
setPausedStateToRestore_
@private
extensions/amp-story/1.0/amp-story.js:548
↓ 2 callers
Method
setPermissionState_
* @param {string} permissionState * @private
extensions/amp-story-360/0.1/amp-story-360.js:591
↓ 2 callers
Method
setPosition_
* Sets the position of the dialog. Currently only supports 'BOTTOM', with * an option of switching to 'CENTER' on desktop screens.
third_party/subscriptions-project/swg.js:11310
↓ 2 callers
Function
setPrototypeOf
* Sets the prototype chain of an object, with various fallbacks to support * old IE. * @param {!Object} obj * @param {!Object} prototype
src/polyfills/custom-elements.js:828
← previous
next →
6,801–6,900 of 18,703, ranked by callers