Skip to main content

setPluginConfigDefaults

Function setPluginConfigDefaults 

Source
pub fn setPluginConfigDefaults(
    defaults: JsConfigDefaults,
    options: Option<JsConfigDefaultsOptions>,
) -> ApiResult<()>
Expand description

Merge defaults into the plugin_config defaults every <perspective-viewer> on the page applies, where a null value removes a default and a null defaults clears the slot.

§Arguments

  • defaults - Values keyed like plugin_config, or null.
  • options.plugin - Limits the defaults to the named plugin.

§JavaScript Examples

customElements.get("perspective-viewer").setPluginConfigDefaults({group_pad: 10});