You should take a look at the kind of js that gets injected into most mainstream websites nowadays.
Tabs are isolated fork each other and the web browser does give a web page the kind of access to be key logging.
If you're talking about things that you type whilst the page is in active focus then it's kinda their website you're visiting.