Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hiccup/hdom]: boolean attributes are not expressed in html as #133

Closed
loganpowell opened this issue Sep 23, 2019 · 4 comments
Closed

[hiccup/hdom]: boolean attributes are not expressed in html as #133

loganpowell opened this issue Sep 23, 2019 · 4 comments

Comments

@loganpowell
Copy link
Contributor

in the hiccup docs I see this example:

serialize(
    ["div.notice",
        {
            selected: true,
            style: {
                background: "#ff0",
                border: "3px solid black"
            }
        },
        "WARNING"]
);
<div class="notice" selected style="background:#ff0;border:3px solid black">WARNING</div>

but when I use the selected: true syntax I end up with:

<div class="notice" selected="true" style="background:#ff0;border:3px solid black">WARNING</div>

I am using hiccup via hdom if that is the reason...

@loganpowell
Copy link
Contributor Author

loganpowell commented Sep 23, 2019

@postspectacular
Copy link
Member

Hi @loganpowell - this is a regression & thanks for finding it! I already have a fix ready (incl. support for more element properties). Btw. when you're using hdom, you're not actually using hiccup as underlying implementation (only some config/constants from the latter). Both packages just use the same syntax and (in theory) should be fully compatible...

@loganpowell
Copy link
Contributor Author

Good to know!

@postspectacular
Copy link
Member

fixed in hdom v8.0.6 (just released)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants