/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
status
packages/react-devtools-extensions/src/panel.js
19 строк
624 B
Brian Vaughn
Fixed a bunch of Lint issues
14 авг 2019, 07:59
14 авг 2019, 07:59
ac2e861
Код
Авторство
О чём код?
// Portal target container. window.container = document.getElementById('container'); let hasInjectedStyles = false; // DevTools styles are injected into the top-level document head (where the main React app is rendered). // This method copies those styles to the child window where each panel (e.g. Elements, Profiler) is portaled. window.injectStyles = getLinkTags => { if (!hasInjectedStyles) { hasInjectedStyles = true; const linkTags = getLinkTags(); // eslint-disable-next-line no-for-of-loops/no-for-of-loops for (let linkTag of linkTags) { document.head.appendChild(linkTag); } } };