Comment Re: why is this even allowed? (Score 3, Interesting) 16
It's not allowed in regular browsers.
What is happening here is that the Web page is opened from within the TikTok app with a Web view screen instead of your actual browser. Since the TikTok app has full control over the Web view, it injects Javascript into every page.
Note, there are legitimate use cases to do exactly that (e.g. Hybrid apps, providing a native Web bridge, etc...).