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

Method setLightboxMode

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

@override

(on)

Source from the content-addressed store, hash-verified

1023
1024 /** @override */
1025 setLightboxMode(on) {
1026 this.vsync_.mutate(() => {
1027 const root = this.getRoot();
1028 if (on) {
1029 root.setAttribute(LIGHTBOX_MODE_ATTR, '');
1030 } else {
1031 root.removeAttribute(LIGHTBOX_MODE_ATTR);
1032 }
1033 });
1034 }
1035
1036 /**
1037 * Synchronizes any attribute mutations done on the real body to the layer.

Callers

nothing calls this directly

Calls 3

getRootMethod · 0.95
mutateMethod · 0.45
setAttributeMethod · 0.45

Tested by

no test coverage detected