MCPcopy Index your code
hub / github.com/ampproject/amphtml / getEffectiveLayout

Function getEffectiveLayout

src/core/static-layout.js:210–218  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

208 * @return {Layout_Enum}
209 */
210export function getEffectiveLayout(element) {
211 // Return the pre-existing value if layout has already been applied.
212 const completedLayout = parseLayout(element.getAttribute('layout') ?? '');
213 if (completedLayout) {
214 return completedLayout;
215 }
216
217 return getEffectiveLayoutInternal(element).layout;
218}
219
220/**
221 * @typedef {{

Callers 1

buildDomFunction · 0.90

Calls 3

parseLayoutFunction · 0.90
getAttributeMethod · 0.80

Tested by

no test coverage detected