MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / enable

Method enable

scripts/devtools_build.mjs:130–138  ·  view source on GitHub ↗

* Enables the given `feature`, and optionally adds the `parameters` to it. * For example: * ```js * featureSet.enable('DevToolsFreestyler', {patching: true}); * ``` * The parameters are additive. * * @param feature the name of the feature to enable. * @param parameters the ad

(feature, parameters = {})

Source from the content-addressed store, hash-verified

128 * the form of key/value pairs.
129 */
130 enable(feature, parameters = {}) {
131 this.#disabled.delete(feature);
132 if (!this.#enabled.has(feature)) {
133 this.#enabled.set(feature, Object.create(null));
134 }
135 for (const [key, value] of Object.entries(parameters)) {
136 this.#enabled.get(feature)[key] = value;
137 }
138 }
139
140 /**
141 * Merge the other `featureSet` into this.

Callers 4

mergeMethod · 0.95
startFunction · 0.95
run_start.mjsFile · 0.45

Calls 6

deleteMethod · 0.65
setMethod · 0.65
createMethod · 0.65
getMethod · 0.65
hasMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected