awslabs / aws-crt-nodejs

NodeJS bindings for the AWS Common Runtime.
Apache License 2.0
37 stars 24 forks source link

Add polyfill for non-window browser contexts #540

Closed MYoung25 closed 3 months ago

MYoung25 commented 3 months ago

Description of changes: This PR updates the browser polyfill check to check for any browser-based global context through self instead of window. It should enable aws-crt-nodejs to work in web and service worker contexts.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

MYoung25 commented 3 months ago

Meant to be a draft PR to share a concept