Architecture Decision Records (ADRs)

← Home

JavaScript hooks use data- attributes

Introduction

Scripts find elements and read values through data- attributes.

Decision

In the KalaPress starter and new sites, every script hook is a data- attribute:

Context

No project followed one style. Some builds mostly used data- attributes, while others mostly used js- classes. Standardizing on one method should reduce potential confusion.

Consequences

Exceptions

Additional Resources

← See more ADRs