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

Base: WebSocket Polyfill #30

Closed
3 tasks done
cookiengineer opened this issue Apr 4, 2020 · 2 comments
Closed
3 tasks done

Base: WebSocket Polyfill #30

cookiengineer opened this issue Apr 4, 2020 · 2 comments
Assignees

Comments

@cookiengineer
Copy link
Member

cookiengineer commented Apr 4, 2020

Currently, the Browser's Client API requires a global WebSocket API available, which is only the case for the WebView/headles platform as of now.

In order to make the Browser available on the node.js side, the POLYFILLS.mjs should also include a WebSocket polyfill that implements the client-side WS13 protocol.

  • Backport the crux.socket.WS implementation from lycheejs.
  • Backport the WebSocket() API usage to have a 1:1 replacement.
  • Implement a review for the base.mjs file.
@cookiengineer cookiengineer changed the title Browser: Client needs a WebSocket Polyfill Base: WebSocket Polyfill Apr 9, 2020
@cookiengineer
Copy link
Member Author

cookiengineer commented Apr 9, 2020

In order to have a WebSocket polyfill, the /base/source/node/WebSocket.mjs file has to be implemented.

Additionally, the following reviews have to be implemented:

  • base/review/Buffer.mjs
    - [ ] base/review/browser/WebSocket.mjs
    - [ ] base/review/node/Buffer.mjs
    - [ ] base/review/node/WebSocket.mjs

Afterwards, the base/review/index.mjs needs to be patched to contain above new polyfills.

@cookiengineer
Copy link
Member Author

As of fe0e1e3 this is not necessary anymore.

Stealth is now so modular that both the Browser and Tab interface are compatible with the browser Project and also can run in the node.js context.

Therefore the browser, as of now, only consists of Browser.mjs and ENVIRONMENT.mjs that both have DOM and Web API dependencies. Everything else is completely isomorphic, so that Stealth can run as a headless Browser now, too.

@cookiengineer cookiengineer self-assigned this Apr 23, 2020
@cookiengineer cookiengineer added this to the X0 - Codename Spirit milestone Apr 23, 2020
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

1 participant