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
↓ 1 callers
Method
setUtmSource
* @param {string} value
third_party/subscriptions-project/swg.js:513
↓ 1 callers
Method
setVideo
* @param {!../../../src/video-interface.VideoOrBaseElementDef} video * @param {!../../../src/layout-rect.LayoutRectDef} area
extensions/amp-video-docking/0.1/controls.js:232
↓ 1 callers
Method
setVisibleAttribute_
* Sets a `amp-story-visible` attribute on the fie body so that embedded ads * can know when they are visible and do things like trigger animations.
extensions/amp-story-auto-ads/0.1/amp-story-auto-ads.js:475
↓ 1 callers
Method
setup
(build)
build-system/tasks/runtime-test/runtime-test-base.js:221
↓ 1 callers
Method
setup
* Must be always called after DOMReady. * @return {boolean}
src/service/fixed-layer.js:150
↓ 1 callers
Method
setupActions_
* Sets up the actions supported by this element. * @private
extensions/amp-truncate-text/0.1/amp-truncate-text.js:41
↓ 1 callers
Method
setupActions_
* @private
extensions/amp-carousel/0.2/amp-carousel.js:41
↓ 1 callers
Function
setupAdoConfig
* @param {string} mode * @param {!Window} global * @param {object} consent
ads/vendors/adocean.js:30
↓ 1 callers
Method
setupAmpImgRenderer_
* @param {!Element} ampImgEl * @return {!Promise} * @private
extensions/amp-story-360/0.1/amp-story-360.js:677
↓ 1 callers
Method
setupAmpVideoRenderer_
* @return {!Promise} * @private
extensions/amp-story-360/0.1/amp-story-360.js:699
↓ 1 callers
Method
setupAnalytics_
* Initialise the amp-analytics internal API. * Warning: Analytics API will not send any request until * CommonSignals.LOAD_START has been trigge
extensions/amp-skimlinks/0.1/tracking.js:206
↓ 1 callers
Method
setupAutoAdvanceForPreview_
* Configures the page to auto advance using preview-specific durations. * @private
extensions/amp-story/1.0/amp-story-page.js:375
↓ 1 callers
Method
setupAutoAdvanceForVisible_
* Configures the page to auto advance using default durations. * @private
extensions/amp-story/1.0/amp-story-page.js:439
↓ 1 callers
Method
setupBehavior_
* Attaches event handlers. * @private
extensions/amp-carousel/0.1/scrollable-carousel.js:60
↓ 1 callers
Method
setupBehavior_
* Attaches event handlers * @private
extensions/amp-carousel/0.1/slidescroll.js:192
↓ 1 callers
Method
setupBehaviors_
* Runs side effects to initialize controls. * Meant to be called during carousel's buildCallback().
extensions/amp-carousel/0.1/carousel-controls.js:49
↓ 1 callers
Method
setupCameraForObject_
* Camera is set to be not too far or near in terms of object's size. * * We are positioning camera on a ray coming from center (C) * of bound
3p/3d-gltf/viewer.js:205
↓ 1 callers
Method
setupControls_
@private
3p/3d-gltf/viewer.js:135
↓ 1 callers
Method
setupDialog_
* @param {string} returnUrl * @private
extensions/amp-access/0.1/login-dialog.js:257
↓ 1 callers
Method
setupEventListener_
* Sets up event listener for post messages of the desired type. * The actual implementation only uses a single event listener for all of * t
3p/iframe-messaging-client.js:176
↓ 1 callers
Method
setupEventListeners_
* Set up event listeners. * @private
extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:596
↓ 1 callers
Method
setupGeom_
* Creates IntersectionObserver instance for this SafeframeAPI instance. * We utilize the existing IntersectionObserver class, by passing in this
extensions/amp-ad-network-doubleclick-impl/0.1/safeframe-host.js:331
↓ 1 callers
Method
setupGestures_
@private
extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:350
↓ 1 callers
Method
setupGestures_
@private
extensions/amp-pan-zoom/0.1/amp-pan-zoom.js:544
↓ 1 callers
Method
setupGestures_
* Set up gestures * @private
extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:621
↓ 1 callers
Function
setupInit
* Sets up and normalizes the FetchInitDef * * @param {?FetchInitDef=} init Fetch options object. * @param {string=} accept The HTTP Accept header v
third_party/subscriptions-project/swg.js:13484
↓ 1 callers
Function
setupLegacyProxy
* This is a very heavy-handed way to support browsers that do not have * properties defined in the prototype chain. Specifically, this is necessary
extensions/amp-form/0.1/form-proxy.js:147
↓ 1 callers
Method
setupLight_
* Sets lighting scheme. * * There are no formal reasoning behind lighting scheme. * It just looks good. * * Two directional lights, fro
3p/3d-gltf/viewer.js:153
↓ 1 callers
Method
setupListeners_
* Add the document-level event listeners to attach behavior to any referenced * input fields and to enable overlay open/close. * @private
extensions/amp-date-picker/0.1/amp-date-picker.js:926
↓ 1 callers
Method
setupListeners_
* Sets up listeners. * * @param {!SetupListenersInput} input * @memberof AmpAddThis
extensions/amp-addthis/0.1/amp-addthis.js:399
↓ 1 callers
Method
setupLoadMoreAuto_
* Sets up a listener on viewport change to load more items * @private
extensions/amp-list/0.1/amp-list.js:1598
↓ 1 callers
Function
setupMockXhr
()
test/unit/test-xhr-fetch-polyfill.js:12
↓ 1 callers
Function
setupMutationSelector
()
extensions/amp-experiment/1.0/test/test-mutation-record.js:31
↓ 1 callers
Function
setupPreview
* @param {!Window} global * @param {!Object} data
ads/vendors/adocean.js:51
↓ 1 callers
Method
setupRenderer_
@private
3p/3d-gltf/viewer.js:169
↓ 1 callers
Function
setupResponseAttributeElements
(formEl, storyEl)
extensions/amp-story-page-attachment/0.1/amp-story-form.js:57
↓ 1 callers
Function
setupSDKReadyCallback
* @param {!Window} win * @param {string} appKey
ads/vendors/vmfive.js:54
↓ 1 callers
Method
setupSelectors_
* Calls `setupElement_` for up to 10 elements matching each selector * in `fixedSelectors` and for all selectors in `stickySelectors`. * @param
src/service/fixed-layer.js:582
↓ 1 callers
Method
setupSize_
* @private * @return {*} TODO(#23582): Specify return type
3p/3d-gltf/viewer.js:111
↓ 1 callers
Method
setupSlideBehavior_
* Attaches event listeners for slides. * Also creates client-specific DOM for various bugfixes.
extensions/amp-carousel/0.1/slidescroll.js:220
↓ 1 callers
Method
setupStateMachine_
* Configure the states and transitions in the state machine. * @param {string} initialState * @return {!FiniteStateMachine}
extensions/amp-date-picker/0.1/amp-date-picker.js:582
↓ 1 callers
Method
setupVisibilityHandler_
* Listens to he doc visibility changed event. * @private
extensions/amp-live-list/0.1/live-list-manager.js:283
↓ 1 callers
Method
setupVisibilityStateMachine_
* Calls iterator on each sub-resource * @param {!FiniteStateMachine<!VisibilityState_Enum>} vsm
src/service/resources-impl.js:1639
↓ 1 callers
Method
setup_
@private
src/service/viewport/viewport-binding-ios-embed-wrapper.js:86
↓ 1 callers
Method
setup_
* Sets up for intersection monitoring, creating IntersectionObserver * instances for doing layout as well as those that are actually visible. *
extensions/amp-base-carousel/0.1/child-layout-manager.js:197
↓ 1 callers
Method
setup_
* @param {!Messaging} messaging * @param {!../../../src/service/viewer-interface.ViewerInterface} viewer * @param {string} origin * @return {
extensions/amp-viewer-integration/0.1/amp-viewer-integration.js:196
↓ 1 callers
Function
shadowContains
* Same as Element.contains, except it traverses shadow DOM too. * @param element - The element that might contain the target * @param target - The e
src/preact/hooks/useClickOutside.tsx:40
↓ 1 callers
Function
shallowDiffers
(a, b)
src/preact/compat/memo.js:17
↓ 1 callers
Method
shallowExpandObject
* Expands all key value pairs asynchronously and returns a promise that will * resolve with the expanded object. * @param {!Element} element
extensions/amp-analytics/0.1/config.js:450
↓ 1 callers
Method
shouldAlwaysLogEvent_
* @param {!../api/client-event-manager-api.ClientEvent} event * @return {boolean}
third_party/subscriptions-project/swg.js:8033
↓ 1 callers
Method
shouldAnimateOut_
* It's possible for the current lightbox to be displaying an image that * is not visible in the viewport. We should not transition those images.
extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:822
↓ 1 callers
Function
shouldBeIdempotent
* @param {CompilerNode} node * @return {boolean}
build-system/eslint-rules/prefer-destructuring.js:50
↓ 1 callers
Method
shouldCheck
* @param {!../../../src/service/ampdoc-impl.AmpDoc} ampdoc * @return {boolean} * @static
extensions/amp-access-scroll/0.1/scroll-impl.js:180
↓ 1 callers
Method
shouldCreateNextAd_
* Determine if enough pages in the story are left for ad placement to be * possible. * * @param {number} pageIndex * @return {boolean}
extensions/amp-story-auto-ads/0.1/algorithm-count-pages.js:84
↓ 1 callers
Method
shouldExecuteInvocation_
* Returns whether the given action invocation should be executed. * @param {!../../../src/service/action-impl.ActionInvocation} invocation * @pr
extensions/amp-gwd-animation/0.1/amp-gwd-animation.js:188
↓ 1 callers
Method
shouldFetchMoreStories_
* Checks if fetching more stories is enabled and validates the configuration. * @return {boolean} * @private
src/amp-story-player/amp-story-player-impl.js:1029
↓ 1 callers
Method
shouldHandleClick_
* We should support clicks on any children of the header except for on * links or elements with tap targets, which should not have their default
extensions/amp-accordion/0.1/amp-accordion.js:553
↓ 1 callers
Method
shouldHandleClick_
* We should support clicks on any children of the heading except for on * links or elements with tap targets, which should not have their default
extensions/amp-mega-menu/0.1/amp-mega-menu.js:262
↓ 1 callers
Method
shouldHandleClick_
* We should support clicks on any children of submenu open/close except for * links or elements with tap targets, which should not have their defau
extensions/amp-nested-menu/0.1/amp-nested-menu.js:144
↓ 1 callers
Method
shouldHandleClick_
* We should not try to toggle controls or otherwise handle a click on * the lightbox if the click has already been handled by a link, a button,
extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:535
↓ 1 callers
Method
shouldHideControls_
* @return {boolean} Whether or not controls should be hidden.
extensions/amp-base-carousel/0.1/amp-base-carousel.js:490
↓ 1 callers
Method
shouldHideInsetButtons_
* TODO(sparhami) If swipe is disabled, then auto should show the inset arrow * buttons, even if there is a peek value. * @return {boolean} *
extensions/amp-stream-gallery/0.1/amp-stream-gallery.js:511
↓ 1 callers
Function
shouldInstall
* Determines if this polyfill should be installed. * @param {!Window} win * @return {boolean}
src/polyfills/get-bounding-client-rect.js:37
↓ 1 callers
Method
shouldLogPublisherEvents_
* @return {boolean}
third_party/subscriptions-project/swg.js:8025
↓ 1 callers
Function
shouldMutationBeRerendered
* @param {typeof PreactBaseElement} Ctor * @param {MutationRecord} m * @return {boolean}
src/preact/base-element.js:970
↓ 1 callers
Method
shouldRequestFullWidth_
* @return {boolean} * @private
extensions/amp-ad/0.1/amp-ad-3p-impl.js:218
↓ 1 callers
Function
shouldRunTest
* @param {string} testFile * @param {string[]} srcFiles * @return {boolean}
build-system/tasks/runtime-test/helpers-unit.js:211
↓ 1 callers
Method
shouldSetSizes_
* @param {number} newWidth * @return {boolean} * @private
src/builtins/amp-img/amp-img.js:295
↓ 1 callers
Method
shouldShowViaXhr_
* @return {!Promise<boolean>} * @private
extensions/amp-user-notification/0.1/amp-user-notification.js:387
↓ 1 callers
Method
shouldShow_
* Returns whether this flow is configured as enabled, not showing * even on explicit start when flag is configured false. * * @param {!../mod
third_party/subscriptions-project/swg.js:6496
↓ 1 callers
Method
shouldShow_
* Returns whether this flow is configured as enabled, not showing * even on explicit start when flag is configured false. * * @param {!../mod
third_party/subscriptions-project/swg.js:9999
↓ 1 callers
Function
shouldSkipDirtinessCheck
* Returns true if the form should be subject to dirtiness check. Unsupported * elements, disabled elements, hidden elements, or elements without the
extensions/amp-form/0.1/form-dirtiness.js:239
↓ 1 callers
Function
shouldTriggerAva
* Determines whether to trigger ava by a file change adjacent to a test file. * Considered adjacent when the file changed is in the same directory as
build-system/tasks/ava.js:29
↓ 1 callers
Function
shouldUpdateStoredTime
* Whether we should write a new timestamp to the stored cid value. * We say yes if it is older than 1 day, so we only do this max once * per day to
src/service/cid-impl.js:673
↓ 1 callers
Function
shouldUse
(schema)
build-system/compile/json-schema/index.js:41
↓ 1 callers
Function
shouldUseInlineVideoResponse
* Returns `true` if the video's inline response should be used instead of * issuing an XHR request. * @param {!Element} videoEl * @param {!Window}
extensions/amp-video/0.1/video-cache.js:294
↓ 1 callers
Method
shouldValidateOnInteraction
* Whether an input should validate after an interaction. * @param {!Element} unusedInput * @return {boolean}
extensions/amp-form/0.1/form-validators.js:406
↓ 1 callers
Method
show
* Shows the story provided by the URL in the player and go to the page if provided. * @param {?string} storyUrl * @param {string=} pageId * @
src/amp-story-player/amp-story-player-impl.js:866
↓ 1 callers
Method
showAbbrvOffer
@override
third_party/subscriptions-project/swg.js:19307
↓ 1 callers
Function
showAdControls
()
ads/google/ima/ima-video.js:1306
↓ 1 callers
Method
showAddDeviceDialog_
* Builds & shows the ADD DEVICE dialog creating chips for each device in ALL_DEVICES * and attaching them to the corresponding section (mobile, tab
extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:731
↓ 1 callers
Method
showAsStream
* @param {string} url * @return {!Promise<!ShadowDoc>}
examples/pwa/pwa.js:281
↓ 1 callers
Method
showCarousel_
* Show an existing carousel. Ensure it's been unlayed out before displaying again. * @param {string} lightboxGroupId * @return {!Promise} * @
extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:348
↓ 1 callers
Method
showCloseButtonHeader_
* Show close button header * @private
extensions/amp-lightbox/0.1/amp-lightbox.js:448
↓ 1 callers
Method
showCopyFailedToast_
* @private
extensions/amp-story-share-menu/0.1/amp-story-share-menu.js:391
↓ 1 callers
Method
showCopySuccessfulToast_
* @param {string} url * @private
extensions/amp-story-share-menu/0.1/amp-story-share-menu.js:375
↓ 1 callers
Method
showFallback_
* @private
extensions/amp-list/0.1/amp-list.js:1673
↓ 1 callers
Method
showHelpDialog_
* Builds & shows the HELP dialog. * @private
extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:775
↓ 1 callers
Method
showIframe_
* Hide the placeholder * Apply animation to show the iframe
extensions/amp-consent/0.1/consent-ui.js:631
↓ 1 callers
Method
showMeteringRegwall_
* Asks user to register an account with the publisher. * Returns a promise that resolves when the process completes. * @return {!Promise}
extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js:780
↓ 1 callers
Method
showOnNextAnimationFrame_
@private
extensions/amp-video-docking/0.1/controls.js:397
↓ 1 callers
Method
showOnTapOrHover_
@private
extensions/amp-video-docking/0.1/controls.js:378
↓ 1 callers
Method
showUi_
* Show the Tez payment request UI. * * @private * @param {!PaymentRequest} request The payment request object. * @return {!Promise<!Paymen
third_party/subscriptions-project/swg.js:17050
↓ 1 callers
Method
showValidationFor
* @param {!Element} input * @param {string} invalidType
extensions/amp-form/0.1/form-validators.js:351
↓ 1 callers
Method
showViewerHeader
* Updates binding with the new padding when showing viewer header. * @param {boolean} unusedTransient * @param {number} unusedPaddingTop
src/service/viewport/viewport-binding-def.js:82
↓ 1 callers
Function
showcaseEventToAnalyticsEvents
* Converts a publisher entitlement event enum into an array analytics events. * @param {!ShowcaseEvent} event * @returns {!Array<AnalyticsEvent>}
third_party/subscriptions-project/swg.js:12286
↓ 1 callers
Function
showcaseEventToAnalyticsEvents
* Converts a publisher entitlement event enum into an array analytics events. * @param {!ShowcaseEvent} event * @returns {!Array<AnalyticsEvent>}
third_party/subscriptions-project/swg-gaa.js:1472
↓ 1 callers
Method
sign_
* Wraps SubtleCrypto.sign(). * @param {!Uint8Array} data * @param {!webCrypto.CryptoKey} privateKey * @return {!Promise} * @private
src/service/origin-experiments-impl.js:258
↓ 1 callers
Function
signalGracefulHalt
* Signal to dependent jobs that they should be skipped. Uses an identifier that * corresponds to the current job to eliminate conflicts if a parallel
build-system/pr-check/utils.js:95
↓ 1 callers
Method
signalIfReady_
* If (1) the document is fully parsed, (2) the AMP runtime (services etc.) * is initialized, and (3) we did a first pass on element measurements,
src/service/resources-impl.js:685
← previous
next →
11,501–11,600 of 18,703, ranked by callers