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

Adds document title element #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smoyer64
Copy link
Contributor

@smoyer64 smoyer64 commented Jun 3, 2019

Resolves #46

@dennwc
Copy link
Owner

dennwc commented Jun 3, 2019

Sorry, I don't think this should be added. This change unconditionally creates a title element in the DOM, which might or might not be desired.

@smoyer64
Copy link
Contributor Author

smoyer64 commented Jun 3, 2019

Ah ... that it does (and leaves it empty). The one in my library is Title() so it only creates the element if you ask for it. I was also looking into the failing unit test - the underlying code compiles and then works in the browser.

Would you be open to Title() and SetTitle() functions for this? ... the <title> element (and others) are "special": https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title. I suppose another alternative is to export getFirstWithTag which is about 70% of the code I discovered was duplicated in my library.

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

Successfully merging this pull request may close these issues.

Add document title element to those available through global.go
2 participants