/
ashipov
/
react
Обзор
Документация
Войти
/
ashipov
/
react
Код
Запросы
0
Задачи 2.0
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
packages/react-devtools-extensions/src/background/executeScript.js
41 строка
844 B
Sebastian "Sebbie" Silbermann
[DevTools] Allow inspection before streaming has finished in Chrome (#34360)
04 сен 2025, 13:21
Не верифицирован
04 сен 2025, 13:21
5a31758
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ /* global chrome */ export function executeScriptInIsolatedWorld({ target, files, }: { files: any, target: any, }): Promise<void> { return chrome.scripting.executeScript({ target, files, world: chrome.scripting.ExecutionWorld.ISOLATED, }); } export function executeScriptInMainWorld({ target, files, injectImmediately, }: { files: any, target: any, // It's nice to have this required to make active choices. injectImmediately: boolean, }): Promise<void> { return chrome.scripting.executeScript({ target, files, injectImmediately, world: chrome.scripting.ExecutionWorld.MAIN, }); }