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

Function assertNotDisplay

src/core/dom/style.js:351–359  ·  view source on GitHub ↗
(style)

Source from the content-addressed store, hash-verified

349 * @return {string}
350 */
351export function assertNotDisplay(style) {
352 // TODO(rcebulko): This calls itself an assert, but doesn't throw an error.
353 // Should it throw sync? If so, this/below can reduce to
354 // `return devAssert(style == 'display', DISPLAY_STYLE_MESSAGE);`
355 if (style === 'display') {
356 devError('STYLE', DISPLAY_STYLE_MESSAGE);
357 }
358 return style;
359}
360
361/**
362 * Asserts that the styles does not contain the `display` style.

Callers 1

setStylesFunction · 0.90

Calls 1

devErrorFunction · 0.90

Tested by

no test coverage detected