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

Add HTML renderer built on ParserObject #22

Open
dominickpastore opened this issue May 16, 2021 · 1 comment
Open

Add HTML renderer built on ParserObject #22

dominickpastore opened this issue May 16, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dominickpastore
Copy link
Owner

Note: At the time of this issue's creation, much of the code mentioned below isn't yet in the repo, but it will be soon.

The DOMParser by default produces a DOM that is capable of producing HTML. This is great for users that need to do some DOM manipulation and then output to HTML.

Currently, subclassing the DOM object is also the only way to customize the HTML output if HTMLRenderer doesn't produce the results you need. If you do need that but don't need DOM manipulation, DOMParser adds a lot of overhead you don't need.

It would be useful to add another subclass of ParserObject that does HTML rendering without producing a DOM. Then, for the use case in the previous paragraph, a user can just subclass this new class and override methods as appropriate.

@dominickpastore dominickpastore added the enhancement New feature or request label May 16, 2021
@dominickpastore
Copy link
Owner Author

Make sure to update the "Advanced Manipulations" section of the "Generating HTML" page in the docs after implementing this (and perhaps rename that section to "Advanced HTML Generation")

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

No branches or pull requests

1 participant