|
1 | 1 | // @ts-check |
2 | 2 | import 'chrome-devtools-frontend/front_end/entrypoints/shell/shell.ts'; |
3 | 3 | import * as Common from 'chrome-devtools-frontend/front_end/core/common/common.ts'; |
4 | | -import { FEATURES } from '../../../lib/engine262.mjs'; |
| 4 | +import { Engine262Feature, FEATURES } from '../../../lib/engine262.mjs'; |
5 | 5 | import { state } from './state.mts'; |
6 | 6 | import { L } from './i18n.mts'; |
7 | 7 | import { WorkerBootstrapEvent } from './helpers.mts'; |
8 | 8 | import { Engine262ConnectionTransport } from './connection.mts'; |
9 | 9 |
|
10 | | -export const featureSettings = new Map<{ name: string; flag: string; url?: string; }, Common.Settings.Setting<boolean>>(); |
| 10 | +export const featureSettings = new Map<Engine262Feature, Common.Settings.Setting<boolean>>(); |
11 | 11 |
|
12 | 12 | export function initFeatureSettings() { |
13 | 13 | return { |
14 | 14 | async run() { |
15 | 15 | WorkerBootstrapEvent.addEventListener('bootstrap', syncFeatureToVM); |
16 | 16 | for (const feature of [ |
17 | 17 | ...FEATURES, |
18 | | - { flag: 'test262-harness', name: L.engine262.includeTest262Env }, |
19 | | - { flag: 'virtual-module-loader', name: L.engine262.includeVirtualModuleLoader } |
| 18 | + { flag: 'test262-harness', name: L.engine262.includeTest262Env, url: '', enableInPlayground: true } satisfies Engine262Feature, |
| 19 | + { flag: 'virtual-module-loader', name: L.engine262.includeVirtualModuleLoader, url: '', enableInPlayground: false } satisfies Engine262Feature, |
20 | 20 | ]) { |
21 | | - const featureSetting = Common.Settings.Settings.instance().createSetting(`engine262:${feature.flag}`, false); |
| 21 | + const featureSetting = Common.Settings.Settings.instance().createSetting(`engine262:${feature.flag}`, feature.enableInPlayground); |
22 | 22 | if (state.features) { |
23 | 23 | featureSetting.set(state.features.includes(feature.flag)); |
24 | 24 | } |
|
0 commit comments