Conversation
|
would prefer kraen takes a look given he is working a bunch on this sdk |
|
Generally speaking, I am refactoring this class to avoid the I'm not a super-fan of patching the global like this. Would it make sense to add a properly typed |
Yeah so I wanted to keep changes minimal - this does introduce one additional check but given the refactoring isn't done, can we save this for afterwards? Happy to help refactor this when the time comes, though it should not be much work. As for the global patch, it's not nice but the only method of creating state that both the extension and other javascript has access to is by patching a global variable. This is so that external javascript through the dev console or browser extensions can interact with it. |
kraenhansen
left a comment
There was a problem hiding this comment.
We discussed an alternative approach on Slack
This will allow javascript like browser extensions to interact with the conversation, and also allow developers to debug in the console. Currently exposing only what I'm specifically using as although this technically doesn't introduce any malicious capabilities, would prefer to trivialise it less.