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

Check for global document rather than exports with INTO HTML #1449

Merged
merged 1 commit into from
Sep 24, 2022

Conversation

brettz9
Copy link
Contributor

@brettz9 brettz9 commented Mar 30, 2022

This allows for one to set a global.document = document in Node via the likes of JSDom to query HTML one has parsed in Node (on the server side).

A better approach might be allowing the user to supply the document object as an option, but as it seems you don't really accept options in the constructor, I thought this might be as easy.

One other item this PR doesn't handle is that it is possible that SELECT * FROM TXT('#one') could be supported in Node too.

@brettz9
Copy link
Contributor Author

brettz9 commented Mar 31, 2022

btw, off topic, but an interesting idea for a user function would be one which could do fetch (in browser or in Node via node-fetch) to URLs and then grab tables out of the HTML, allowing for cross-site joins...

@mathiasrw
Copy link
Member

Awesome!

@mathiasrw mathiasrw changed the title check for global document rather than exports with INTO HTML Check for global document rather than exports with INTO HTML Sep 24, 2022
@mathiasrw mathiasrw merged commit 5a8d005 into AlaSQL:develop Sep 24, 2022
@mathiasrw
Copy link
Member

Released as part of https://github.com/AlaSQL/alasql/releases/tag/v2.0.1

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.

2 participants