Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_dom/src/dom/utils.ts>getDatasetHtmlAttrName

Browser DOM & HTML parser in Deno
Very Popular
Go to Latest
function getDatasetHtmlAttrName
import { getDatasetHtmlAttrName } from "https://deno.land/x/deno_dom@v0.1.43/src/dom/utils.ts";

Convert JS property name to dataset attribute name without validation

Parameters

name: string

Returns

`data-${string}`