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

DOMParser Discussion #7505

Closed
sno2 opened this issue Sep 15, 2020 · 6 comments
Closed

DOMParser Discussion #7505

sno2 opened this issue Sep 15, 2020 · 6 comments
Labels

Comments

@sno2
Copy link
Contributor

sno2 commented Sep 15, 2020

I think that we should try to implement an official module like the Deno DOM third-party module that includes the DOMParser. The whole part about Deno is to mirror the Browser APIs, but we don't even have an official DOM Parser in the std. I think that this should definitely be in the std as it is something that is in every single browser shipped out of the box. I understand that the deno-dom third party module does include a DOMParser, but there are a couple of issues and if a module were created by Deno, it would be worked on as a community. The author of the module did amazing at starting the project, but we must have one included with Deno. Also, it would make Deno viable for scraping which is very important for a lot of node users. Thank you for your time!

@sno2 sno2 changed the title Need DOMParser We need a DOMParser Sep 15, 2020
@sno2
Copy link
Contributor Author

sno2 commented Sep 15, 2020

There is also more discussion over at #6794

@0kku
Copy link

0kku commented Sep 16, 2020

but there are a couple of issues and if a module were created by Deno, it would be worked on as a community.

Hi! The module is in prerelease so issues are to be expected — please report the issues so we can fix them! Implementing DOM is a lot of work. Also, we do accept PRs for deno-dom, so nothing should stop the community from contributing.

@kitsonk
Copy link
Contributor

kitsonk commented Sep 16, 2020

Duplicate of #6794

We really don't need to split issues like this.

@sno2
Copy link
Contributor Author

sno2 commented Sep 16, 2020

I did read through #6794, @kitsonk, but the title of that issue was not indicating that there should be an official DOMParser implemented nor did the description so I thought that it would be better to just have it as a separate issue as @jsejcksn stated within the issue. Also, @jsejcksn stated the following in a comment:

Can the scope of the request be clarified?

I don't want to assume anything, but it sounds like DOMParser and XMLSerializer are being abandoned by closing #3447 in preference to this one.

Originally posted by @jsejcksn in #6794 (comment)

Also, @nayeemrmn reacted to the closing of a different issue (#3447) saying that the existing issue (#6794) was not related to implementing a DOMParser, but a basic feature of manipulating the DOM. Therefore, I thought a separate issue dedicated to the DOMParser development discussion will fasten its journey towards production. Here are @nayeemrmn's words:

... are being abandoned by closing #3447 in preference to this one.

@jsejcksn This issue requests a specific and foundational part of the DOM with a use case. It's better to let any more advanced API be gradually requested after the prerequisites are implemented, with specificity and a use case. See #4756. As another reason, #3447 is requesting a jsdom port in std which would be redundant if we're considering built-ins.

@brianleroux For server rendering, I guess for now you're looking for the ability to document.createElement()s, append them to each other, change attributes etc. and just stringify it for the client?

Originally posted by @nayeemrmn in #6794 (comment)

And to you, @0kku, I have been working on trying to understand the code for contributing and I have already reported an issue towards the module. I know this is a lot of work and I understand that I may have sounded pushy within the PR desc, but I was meaning that it should be stated that some Deno module or repo should be declared as the future DOMParser to make sure that everyone understands that that repo will someday be the official DOMParser for Deno that will be incorporated into the std once it is finished.

Sorry if I offended any of you I had honest hopes of bettering the development of a DOMParser into Deno.

@sno2 sno2 changed the title We need a DOMParser DOMParser Discussion Sep 16, 2020
@MarkTiedemann
Copy link
Contributor

Here's a ref to an even older DOMParser issue (and it's companion API XMLSerializer) if anyone's interested: #3648

@stale
Copy link

stale bot commented Jan 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2021
@sno2 sno2 closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants