appwrite / sdk-for-web

[READ-ONLY] Official Appwrite Web SDK ๐Ÿงก
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
273 stars 59 forks source link

๐Ÿš€ Feature: globalThis #38

Open eleanorjmorel opened 1 year ago

eleanorjmorel commented 1 year ago

๐Ÿ”– Feature description

in the javscript client SDK, make it more compatible in a wider amount of uh, environments, or something, by using the globalThis context instead of window and this

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis

๐ŸŽค Pitch

God uh like, i dont, ugh, like, it will work better ???

Like im making a browser game and want to use appwrite and i want performance and responsiveness so like I run it in a web worker so it's not blocking but that locks me out of the DOM and i lose window access and like, all your uh, bindings? variables? i dont know the word, are written in the window context instead of using the much more compatible globalThis property that probs wouldn't break anything in ur code and broaden ocmpatibility to like allow it to also run on nodejs and deno maybe ?? and like that'S a good thing I think ? because it would be a pain in the ass to change the minified file every time myself when there'S an update when you could just, do it yourself and make your thingy thing better for everyone at the same time

dab, vineboom !!!

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

๐Ÿข Have you read the Code of Conduct?

lohanidamodar commented 1 year ago

@eleanorjmorel Thank you for raising the issue. We will get back to you soon.