Then yes that is correct. You cannot fetch and embed a raw HTML page/file from another place.
You’d have to do a Javascript Fetch of something that describes the content and build the content dynamically.
You would potentially do
fetch(
'https://mywebsite/data.json',
{
method: 'GET',
headers: {
'Accept': 'application/json',
'x-extension-jwt': window.Twitch.ext.viewer.sessionToken
}
}
).then(response => response.json()
).then(data => {
// use data to populate a template or build whatever
})
Yeah you can’t do that you’d have to build the display internally not include it via iframes/objects/othermeans
2.7 You must not inject directly into the DOM any data obtained dynamically over AJAX without first validating and processing that data.
It would also violate 2.7
2.2 Extensions may not use iframes.
and of course 2.2
2.8 All front-end HTML, CSS, and Javascript files used by your Extension must be included in the zip file for your assets. You should not include extraneous files or code not used by your extension.
and perhaps 2.8