MCPcopy
hub / github.com/ampproject/amphtml / get

Method get

src/gesture.js:55–70  ·  view source on GitHub ↗

* Creates if not yet created and returns the shared Gestures instance for * the specified element. * @param {!Element} element * @param {boolean=} opt_shouldNotPreventDefault * @param {boolean=} opt_shouldStopPropagation * @return {!Gestures}

(
    element,
    opt_shouldNotPreventDefault = false,
    opt_shouldStopPropagation = false
  )

Source from the content-addressed store, hash-verified

53 * @return {!Gestures}
54 */
55 static get(
56 element,
57 opt_shouldNotPreventDefault = false,
58 opt_shouldStopPropagation = false
59 ) {
60 let res = element[PROP_];
61 if (!res) {
62 res = new Gestures(
63 element,
64 opt_shouldNotPreventDefault,
65 opt_shouldStopPropagation
66 );
67 element[PROP_] = res;
68 }
69 return res;
70 }
71
72 /**
73 * @param {!Element} element

Callers 15

babel.config.jsFile · 0.45
isLoadingEnabled_Method · 0.45
parseUrlWithAFunction · 0.45
whenContentIniLoadInObFunction · 0.45
getMeasuredResourcesFunction · 0.45
getOrCreateAdCidFunction · 0.45
InstallNodeDependenciesFunction · 0.45
GenerateTestRunnerFunction · 0.45
MainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected