@laserware/dominator
    Preparing search index...

    Function removeDatasetEntries

    • Removes the dataset entries with the attribute/property names keys from the target.

      Type Parameters

      Parameters

      • target: null | Target

        Element, EventTarget, or CSS selector.

      • keys: string[]

        Array of dataset properties or attribute names to remove.

      Returns E

      Element representation of the specified target.

      elements!InvalidElementError if the specified target wasn't found.

      HTML (Before)

      <div
      id="example"
      data-is-active="false"
      data-count="30"
      data-label="Example"
      >
      ...
      </div>

      Using Attribute Names (data-*)

      const element = findElement("#example")!;

      removeDatasetEntries(element, ["data-label", "data-count"]);

      Using Property Names (camelCase)

      const element = findElement("#example")!;

      removeDatasetEntries(element, ["label", "count"]);

      HTML (After)

      <div
      id="example"
      data-is-active="false"
      >
      ...
      </div>