MCPcopy Create free account
hub / github.com/ampproject/amphtml / isBot

Method isBot

src/service/platform-impl.js:121–123  ·  view source on GitHub ↗

* Whether the current platform matches a bot user agent. * @return {boolean}

()

Source from the content-addressed store, hash-verified

119 * @return {boolean}
120 */
121 isBot() {
122 return /bot/i.test(this.navigator_.userAgent);
123 }
124
125 /**
126 * Returns the major version of the browser.

Callers 7

constructorMethod · 0.80
buildCallbackMethod · 0.80
layoutCallbackMethod · 0.80
getUIType_Method · 0.80
isDesktop_Method · 0.80
fetchCachedSourcesFunction · 0.80

Calls 1

testMethod · 0.45

Tested by

no test coverage detected