<!doctype html>
<script>
if (parent.window.fetchTest) {
    fetch("fetch-xhr-load.py?fetch&uuid=" + parent.window.uuid).then(async response => {
        parent.window.resolveToken(await response.text());
    });
} else {
    const xhr = new XMLHttpRequest();
    xhr.open("GET", "fetch-xhr-load.py?xhr&uuid=" + parent.window.uuid, false);
    xhr.send();
    parent.window.resolveToken(xhr.responseText);
}
</script>
