/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/service/owners-interface.js
71 строка
3 KB
renovate[bot]
📦 Update linting devDependencies (#39577)
16 ноя 2023, 00:25
Не верифицирован
16 ноя 2023, 00:25
ed16ad3
Код
Авторство
О чём код?
/* eslint-disable @typescript-eslint/no-unused-vars */ /** * @interface */ export class OwnersInterface { /** * Assigns an owner for the specified element. This means that the resources * within this element will be managed by the owner and not Resources manager. * @param {!Element} element * @param {!AmpElement} owner */ setOwner(element, owner) {} /** * Schedules preload for the specified sub-elements that are children of the * parent element. The parent element may choose to send this signal either * because it's an owner (see {@link setOwner}) or because it wants the * preloads to be done sooner. In either case, both parent's and children's * priority is observed when scheduling this work. * @param {!Element} parentElement * @param {!Element|!Array<!Element>} subElements */ schedulePreload(parentElement, subElements) {} /** * Schedules layout for the specified sub-elements that are children of the * parent element. The parent element may choose to send this signal either * because it's an owner (see {@link setOwner}) or because it wants the * layouts to be done sooner. In either case, both parent's and children's * priority is observed when scheduling this work. * @param {!Element} parentElement * @param {!Element|!Array<!Element>} subElements */ scheduleLayout(parentElement, subElements) {} /** * Invokes `unload` on the elements' resource which in turn will invoke * the `documentBecameInactive` callback on the custom element. * Resources that call `schedulePause` must also call `scheduleResume`. * @param {!Element} parentElement * @param {!Element|!Array<!Element>} subElements */ schedulePause(parentElement, subElements) {} /** * Invokes `resume` on the elements' resource which in turn will invoke * `resumeCallback` only on paused custom elements. * Resources that call `schedulePause` must also call `scheduleResume`. * @param {!Element} parentElement * @param {!Element|!Array<!Element>} subElements */ scheduleResume(parentElement, subElements) {} /** * Schedules unlayout for specified sub-elements that are children of the * parent element. The parent element can choose to send this signal when * it want to unload resources for its children. * @param {!Element} parentElement * @param {!Element|!Array<!Element>} subElements */ scheduleUnlayout(parentElement, subElements) {} /** * Requires the layout of the specified element or top-level sub-elements * within. * @param {!Element} element * @param {number=} opt_parentPriority * @return {!Promise} */ requireLayout(element, opt_parentPriority) {} }