Here is an example, from Leo Laporte's blog:
https://leo.fm/2022/02/isitover/
Click on the "Load comments", you can see that it does request to Mastodon server, in this case, twit.social to fetch the comments. Because most Mastodon servers have CORS allowed to all sites, it's pretty easy to do.