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
↓ 3 callers
Method
setup
* @param {!Object} env * @param {BrowserNameDef} browserName * @param {number} retries * @return {Promise<void>}
build-system/tasks/e2e/describes-e2e.js:575
↓ 3 callers
Method
setupDateField_
* Get the existing input, or create a hidden input for the date field. * @param {!DateFieldType} type The selector for the input field * @return
extensions/amp-date-picker/0.1/amp-date-picker.js:861
↓ 3 callers
Function
setupFakesForVisibilityStateManipulation
()
test/unit/test-performance.js:843
↓ 3 callers
Function
setupForResize
()
extensions/amp-ad-network-doubleclick-impl/0.1/test/test-doubleclick-safeframe.js:650
↓ 3 callers
Method
setupInputModeClasses
* See https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-css-classes.md#input-mode-classes * @param {!./service/ampdoc-impl.AmpDoc} ampd
src/input.js:85
↓ 3 callers
Method
setupOpenButton_
* @param {!Element} button * @param {string} openInAppUrl * @param {string} installAppUrl * @protected
extensions/amp-app-banner/0.1/amp-app-banner.js:47
↓ 3 callers
Method
setupSrcAttributes_
* Fetch and parse any attributes specified via the `src` attribute. * @return {!Promise} * @private
extensions/amp-date-picker/0.1/amp-date-picker.js:1209
↓ 3 callers
Function
shouldAppendExtraParams
(ampdoc)
src/impression.js:282
↓ 3 callers
Function
shouldBeDestructure
* @param {CompilerNode} node * @param {boolean=} renamable * @return {boolean}
build-system/eslint-rules/prefer-destructuring.js:21
↓ 3 callers
Method
shouldBeValidated_
* @return {boolean} * @private
extensions/amp-access/0.1/amp-access-server-jwt.js:251
↓ 3 callers
Function
shouldCheckMember
* @param {CompilerNode} node * @param {boolean=} needsThis * @return {boolean}
build-system/eslint-rules/unused-private-field.js:171
↓ 3 callers
Method
shouldHandleEvent_
* Checks if the event should be handled by ManualAdvancement, or should * follow its capture phase. * @param {!Event} event * @return {boolea
extensions/amp-story/1.0/page-advancement.js:484
↓ 3 callers
Method
shouldShowOnFocus
* Whether or not the autocomplete should show suggestions when the input element has been focused * @return {boolean}
extensions/amp-autocomplete/0.1/autocomplete-binding-def.js:52
↓ 3 callers
Method
show
@override
extensions/amp-user-notification/0.1/amp-user-notification.js:394
↓ 3 callers
Method
show
* Shows the bubble targeted to an element with the passed message. * @param {!Element} targetElement * @param {string} message
extensions/amp-form/0.1/validation-bubble.js:79
↓ 3 callers
Method
show
* @param {!Document} doc * @param {string} url
examples/pwa/pwa.js:251
↓ 3 callers
Function
showConfirmation_
* Shows confirmation and calls callback if it's approved. * @param {string} message * @param {function()} callback
tools/experiments/experiments.js:350
↓ 3 callers
Method
showControls
* Makes the video UI controls visible. * * AMP will not call this method if `controls` attribute is not set. * * Implementation is require
src/video-interface.js:116
↓ 3 callers
Method
showNavigationOverlay
* Show navigation overlay DOM.
extensions/amp-story/1.0/amp-story-hint.js:179
↓ 3 callers
Method
showOffers
@override
third_party/subscriptions-project/swg.js:19271
↓ 3 callers
Method
showSlideAndTriggerAction_
* Shows the slide at the given index and triggers a `slideChange` event. * @param {number} newIndex * @param {ActionTrust_Enum=} opt_trust LOW b
extensions/amp-carousel/0.1/slidescroll.js:887
↓ 3 callers
Function
si
(e)
examples/amp-script/vue-todomvc.js:7
↓ 3 callers
Method
signalEmit_
* Callback for a gesture emit the gesture. Only the currently emitting * recognizer is allowed to emit gestures. * @param {!GestureRecognizer} r
src/gesture.js:416
↓ 3 callers
Method
signalPending_
* Callback for a gesture recognizer to communicate that it's close to * start emitting gestures, but needs more time to see more events. Once *
src/gesture.js:376
↓ 3 callers
Method
signalReady_
* Callback for a gesture recognizer to communicate that it's ready to * start emitting gestures. Gestures instance may or may not allow the * re
src/gesture.js:346
↓ 3 callers
Method
signals
@return {!Signals}
src/friendly-iframe-embed.js:429
↓ 3 callers
Function
signatureVerifierFor
(win)
extensions/amp-a4a/0.1/amp-a4a.js:2586
↓ 3 callers
Function
simplifyDeviceName
* Method that returns lowercase and remove non-alphanumeric, used on matching hashString. * * Simplifies the string so that it's easier to match dev
extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:341
↓ 3 callers
Function
sizeAgainstWindow
(availableWidth, data)
ads/vendors/ssp.js:97
↓ 3 callers
Method
skipSafari
()
testing/test-config.js:64
↓ 3 callers
Function
slideChangeEventAfterClicking
* Attach an event listener to page to capture the 'slideChange' event. * If given a selector, click on it to fire the event being listened for.
extensions/amp-carousel/0.1/test-e2e/test-slidescroll-autoplay.js:15
↓ 3 callers
Function
snapshot
(element)
extensions/amp-list/1.0/test/test-amp-list.js:15
↓ 3 callers
Function
splitIgnoreListByHeader
* @param {string} source * @return {string[]}
build-system/tasks/check-ignore-lists.js:15
↓ 3 callers
Function
spyInstallExtensionsForDoc
()
extensions/amp-auto-lightbox/0.1/test/test-amp-auto-lightbox.js:81
↓ 3 callers
Function
srcsetFromSrc
(src)
src/core/dom/srcset.js:46
↓ 3 callers
Method
startForDoc
* Add visibility listener to ampdoc. * * @param {!../../../../../src/service/ampdoc-impl.AmpDoc} ampDoc
extensions/amp-addthis/0.1/addthis-utils/monitors/dwell-monitor.js:15
↓ 3 callers
Method
startTimeout
* @param {Window} win
extensions/amp-consent/0.1/consent-policy-manager.js:411
↓ 3 callers
Method
startToday
(offset?: number)
extensions/amp-date-picker/1.0/types.ts:64
↓ 3 callers
Function
startsWith
(string, prefix)
examples/pwa/pwa.js:10
↓ 3 callers
Function
storageKey
* @param {string} key * @return {string}
third_party/subscriptions-project/swg.js:18808
↓ 3 callers
Function
stringToBool
(str)
extensions/amp-analytics/0.1/variables.js:618
↓ 3 callers
Function
stringToBytes
* Converts a string which holds 8-bit code points, such as the result of atob, * into a Uint8Array with the corresponding bytes. * If you have a str
third_party/subscriptions-project/swg.js:3161
↓ 3 callers
Function
stubAmpElement
(element)
test/unit/preact/test-slot.js:98
↓ 3 callers
Function
stubExpandFrameForTesting
(implFn)
ads/inabox/frame-overlay-helper.js:102
↓ 3 callers
Function
stubForAmpCreative
* Calling this function ensures that the enclosing test will behave as if * it has an AMP creative.
extensions/amp-ad-network-doubleclick-impl/0.1/test/test-amp-ad-network-doubleclick-impl.js:1513
↓ 3 callers
Function
stubLayoutBox
(impl, rect)
extensions/amp-video-docking/0.1/test/test-amp-video-docking.js:72
↓ 3 callers
Function
stubModule
(path, name, fn, callsFake = () => {})
build-system/tasks/make-extension/test/test.js:8
↓ 3 callers
Function
stubSourcesWithCapionsRequest
()
extensions/amp-video/0.1/test/test-video-cache.js:514
↓ 3 callers
Function
sum
(values)
src/core/math.js:146
↓ 3 callers
Function
sum
* @param {!Array<number>} arr * @return {number}
extensions/amp-base-carousel/0.1/carousel.js:61
↓ 3 callers
Function
supportedAssertionsMessage
()
build-system/babel-plugins/babel-plugin-transform-json-import/index.js:76
↓ 3 callers
Function
supportsPassiveEventListener
(win)
src/core/dom/event-helper-listen.js:130
↓ 3 callers
Function
switchToAdFrame
(controller)
extensions/amp-story-auto-ads/0.1/test-e2e/test-amp-story-auto-ads-utils.js:8
↓ 3 callers
Method
takeRecords
()
testing/fake-dom.js:739
↓ 3 callers
Method
teardown
* @param {!Object} env * @return {Promise<void>}
build-system/tasks/e2e/describes-e2e.js:607
↓ 3 callers
Function
testIframe
(iframe)
extensions/amp-addthis/0.1/test/test-amp-addthis.js:85
↓ 3 callers
Function
testIframe
(callCount = 1)
extensions/amp-install-serviceworker/0.1/test/test-amp-install-serviceworker.js:394
↓ 3 callers
Function
testSuiteAndroid
()
extensions/amp-app-banner/0.1/test/test-amp-app-banner.js:220
↓ 3 callers
Function
throttleTail
(handler, defaultScheduler)
src/core/context/scheduler.js:11
↓ 3 callers
Method
throwIfCannotNavigate
* Throws an error if window navigation is disallowed by this element. * Otherwise, does nothing. * @throws {!Error}
extensions/amp-iframe/0.1/amp-iframe.js:608
↓ 3 callers
Function
tick
(timeout = 0)
extensions/amp-analytics/0.1/test/test-visibility-model.js:10
↓ 3 callers
Function
timeout
(ms)
extensions/amp-fx-collection/0.1/test/integration/test-amp-fx-fly-in.js:146
↓ 3 callers
Function
timeout
(ms)
extensions/amp-fx-collection/0.1/test/integration/test-amp-fx-parallax.js:132
↓ 3 callers
Function
toArray
* @param {PriorityQueue<T>} pq * @return {Array<T>}
test/unit/core/data-structures/test-priority-queue.js:14
↓ 3 callers
Function
toArrayOrDefault
* Put value in Array context. * * @param {GlobsDef|string|undefined} value * @param {!GlobsDef} defaultValue * @return {!GlobsDef}
build-system/tasks/dep-check.js:301
↓ 3 callers
Method
toHistoryState_
* Gets the history state from a response. This checks if `maybeHistoryState` * is a history state, and returns it if so, falling back to `fallbackS
src/service/history-impl.js:903
↓ 3 callers
Function
toTimestamp
* @param {!number} millis * @return {!Timestamp}
third_party/subscriptions-project/swg.js:7663
↓ 3 callers
Method
toggleFallback_
* Wraps `toggleFallback()`. Must be called in a mutate context. * @param {boolean} show * @private
extensions/amp-list/0.1/amp-list.js:589
↓ 3 callers
Method
toggleHiddenAndReplaceableElements
* Hides or shows elements based on the `next-page-hide` and * `next-page-replace` attributes * @param {!Document|!ShadowRoot} doc Document to at
extensions/amp-next-page/1.0/service.js:719
↓ 3 callers
Method
toggleInputClass_
* @param {!./service/ampdoc-impl.AmpDoc} ampdoc * @param {string} clazz * @param {boolean} on * @private
src/input.js:166
↓ 3 callers
Method
toggleLoadMoreLoading
* Toggles the visibility of the load-more-loading element. Must be called * in mutate context. * @param {boolean} state
extensions/amp-list/0.1/service/load-more-service.js:215
↓ 3 callers
Function
toggleLoadingSpinner
(element, isActive)
extensions/amp-story/1.0/loading-spinner.js:20
↓ 3 callers
Function
toggleOnChange
* @param {ExprDef} expr * @param {function():void} callback * @param {boolean} on
src/core/dom/media-query-props.js:245
↓ 3 callers
Method
togglePlayMessage_
* Toggles the visibility of the "Play video" fallback message. * @param {boolean} isActive * @private
extensions/amp-story/1.0/amp-story-page.js:1844
↓ 3 callers
Method
toggleTopClass_
* @param {string} className * @param {boolean} on * @private
extensions/amp-access/0.1/amp-access.js:685
↓ 3 callers
Method
toggleUpdateButton_
* Sets the `amp-hidden` and `amp-active` classes on the `update` reference * point. * * @param {boolean} visible * @private
extensions/amp-live-list/0.1/amp-live-list.js:402
↓ 3 callers
Method
toggleViewMode
* Toggles the view mode. * @param {boolean=} opt_on
extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:958
↓ 3 callers
Function
toggleViewport
* Simulate an IntersectionObserver callback for an element. * @param {!Element} el * @param {boolean} inViewport
test/unit/test-amp-story-player-viewport-observer.js:40
↓ 3 callers
Method
toggle_
* @param {boolean} isShown * @private
extensions/amp-fx-collection/0.1/scroll-toggle.js:108
↓ 3 callers
Function
trackbackPositions
(originalPos, newPos, fillOnly)
third_party/inputmask/inputmask.js:1408
↓ 3 callers
Method
transferBodyChunk_
* Transfers available body elements in vsync cycle. * @return {!Promise}
src/utils/dom-transform-stream.js:137
↓ 3 callers
Method
transformCreative_
* Converts a general AMP doc to a AMP4ADS doc. * @param {string} source * @return {string}
extensions/amp-ad-network-fake-impl/0.1/amp-ad-network-fake-impl.js:112
↓ 3 callers
Function
transformCss
* @param {string} contents * @param {string} hash * @param {string=} opt_filename * @return {Promise<CssTransformResultDef>}
build-system/tasks/css/jsify-css.js:140
↓ 3 callers
Function
triggerClickFromLightDom
(anchorElement, domElement)
extensions/amp-story/1.0/utils.js:292
↓ 3 callers
Method
triggerSubscribeRequest
* @return {boolean} Whether the callback has been found.
third_party/subscriptions-project/swg.js:9156
↓ 3 callers
Method
triggerVisibility_
* @param {!Element} target * @param {boolean} isIntersecting
extensions/amp-base-carousel/0.1/child-layout-manager.js:184
↓ 3 callers
Method
trigger_
* Function that schedule the actual request send. * @param {boolean} isImmediate * @private
extensions/amp-analytics/0.1/requests.js:214
↓ 3 callers
Method
trigger_
* @param {!Actions} action * @param {!DockTargetDef=} opt_target * @private
extensions/amp-video-docking/0.1/amp-video-docking.js:821
↓ 3 callers
Function
tryGetUrl
( src: string, host: string = '0.0.0.0', port: number = 8000 )
build-system/server/new-server/transforms/utilities/cdn-tag.ts:80
↓ 3 callers
Function
tryParseJson
* Parses the given `json` string without throwing an exception if not valid. * Returns `undefined` if parsing fails. * Returns the `Object` correspo
third_party/subscriptions-project/swg.js:4125
↓ 3 callers
Function
trySetCookie
* Attempt to set a cookie with the given params. * * @param {!Window} win * @param {string} name * @param {string} value * @param {time} expirati
src/cookies.js:177
↓ 3 callers
Function
tweetCreated
* Handles a tweet or moment being created, resizing as necessary. * @param {!Object} twttr * @param {?Element} el
3p/twitter.js:78
↓ 3 callers
Function
ua
(e,t,n)
examples/amp-script/vue-todomvc.js:7
↓ 3 callers
Function
uint8Array
(array)
test/unit/test-crypto.js:19
↓ 3 callers
Method
unblockNextNotification
()
third_party/subscriptions-project/swg.js:12867
↓ 3 callers
Function
unknownUnits
* @param {string} units * @return {!Error}
extensions/amp-animation/0.1/parsers/css-expr-ast.js:1357
↓ 3 callers
Method
unlayoutCallback
@override
extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:597
↓ 3 callers
Method
unlayoutCallback
@override
extensions/amp-recaptcha-input/0.1/amp-recaptcha-input.js:113
↓ 3 callers
Method
unlisten_
* Remove all listeners associated with this Activity instance. * @private
extensions/amp-analytics/0.1/activity-impl.js:314
↓ 3 callers
Method
unload
* Called when a previously visible element is no longer displayed.
src/service/resource.js:1043
← previous
next →
4,801–4,900 of 18,703, ranked by callers