I like to make stuff for the web.
๐ Pronouns: he/they
๐ Check out my website!
๐ฌ Latest blog post: Mastodon is like email
A zero-dependency, buildless, terse, and type-safe way to write HTML in JavaScript.
Home Page: https://hdot.dev/
I like to make stuff for the web.
๐ Pronouns: he/they
๐ Check out my website!
๐ฌ Latest blog post: Mastodon is like email
Is your feature request related to a problem? Please describe.
hdot should support ARIA attributes to improve accessibility of a site.
Describe the solution you'd like
ARIA Attributes should be supported similar to data
attributes using camelCase.
h.button.ariaLabel('Close`)();
Describe alternatives you've considered
The only workaround right now is using [aria-xyz]
which is not a very nice syntax (and no TS support):
h.button['aria-label']('Close')`button`,
Currently, hdot does not type-check the content category of children passed to other elements. This feature needs to be added to the element types here.
The following should cause a type error, since <link>
is an empty element.
h.link('Hello world');
Find more info here: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories
Describe the bug
The parameter type of the class
attribute function accepts a string or an array of strings.
But when using an array it will call .join()
which results in class="one,two,three"
.
To Reproduce
Steps to reproduce the behavior:
h.p.class(['one', 'two', 'three'])('hello')
,
<p class="one,two,three">hello</p>
Expected behavior
The classes should be joined using spaces:
<p class="one two three">hello</p>
Desktop (please complete the following information):
Additional context
Right now we either need to use a string or add a custom plugin:
setPlugins(h, [
{
attribute: (tagName, key, args) => {
if (key === "class" && Array.isArray(args)) {
return [key, args.join(" ")];
}
return [key, args];
},
},
]);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.