Skip to content

Type Alias: ScriptElementDataSetType ​

ts
type ScriptElementDataSetType = Partial<CamelCasedProperties<Record<Replace<ValueOf<typeof ScriptElementDataAttributesNames>, "data-", "">, string>>>;

The attributes of ScriptElementDataAttributesNames as HTMLElement.dataset keys, all optional and of type string.

Remarks ​

dataset converts the attribute names to camel case without the data- prefix, i.e. data-td-api-key becomes tdApiKey.

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples