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

Method trySetupSelectors_

src/service/fixed-layer.js:566–573  ·  view source on GitHub ↗

* Calls `setupSelectors_` in a try-catch. * Fails quietly with a dev error if call fails. * This method should not be inlined to prevent TryCatch deoptimization. * @param {!Node} root * @param {boolean=} opt_lightboxMode * @private

(root, opt_lightboxMode)

Source from the content-addressed store, hash-verified

564 * @private
565 */
566 trySetupSelectors_(root, opt_lightboxMode) {
567 try {
568 this.setupSelectors_(root, opt_lightboxMode);
569 } catch (e) {
570 // Fail quietly.
571 dev().error(TAG, 'Failed to setup fixed elements:', e);
572 }
573 }
574
575 /**
576 * Calls `setupElement_` for up to 10 elements matching each selector

Callers 1

scanNode_Method · 0.95

Calls 3

setupSelectors_Method · 0.95
devFunction · 0.90
errorMethod · 0.45

Tested by

no test coverage detected