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

don't use reserved IDs #9

Open
therealglazou opened this issue Jan 17, 2017 · 2 comments
Open

don't use reserved IDs #9

therealglazou opened this issue Jan 17, 2017 · 2 comments

Comments

@therealglazou
Copy link
Owner

edasfr thinks we should not use reserved IDs

Source: https://n.survol.fr/n/e0-le-retour-du-fils-de-la-vengeance

@dauwhe
Copy link

dauwhe commented Jan 18, 2017

They do make it really easy to write JS against the book: document.getElementById('spine')

And it prevents having two nav id='spine' in the same index.html

@frivoal
Copy link

frivoal commented Jan 18, 2017

And it prevents having two nav id='spine' in the same index.html

It does not really prevent it. I can type <nav id=doc-toc> twice just as easily as I can type <nav role=doc-toc> twice. Yes, it is wrong, but if we forbid <nav role=doc-toc> from being included twice that would be wrong too.

They do make it really easy to write JS against the book

Not much of a difference:

document.getElementById('doc-toc')
vs
document.querySelector('[role~="doc-toc"]')

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

3 participants