Using Google Image or other Image board image requests at runtime

Can you access image results and images with in them for display? I get that everything is HTML. I can construct the same url I would need for a image board search, and get the return data from the request somehow, right? At least resolve something to the images direct url...


I'm going to go with the answer, "Quest doesn't support => or async function type calls as they are Unexpected tokens." I'm not even sure fetch works because I can't get an object to help handle the request. So I guess it just doesn't support it? Am I doing something wrong with either of these within the context of Quest? Pretty sure these are two ways to do it generally.

function fetchPrint(url){
	fetch(imageUrl)
	.then(response => response.blob())
	.then(imageBlob => {
    const imageObjectURL = URL.createObjectURL(imageBlob);
    ASLEvent("JSMessage", imageObjectURL);
  });
}

function fetchX(url){
	async function getText(file) {
	let x = await fetch(file);
  	let y = await x.text();
  	ASLEvent("JSMessage", y);
	}
}

Quest doesn't support => or async function type calls

It's not up to Quest. Javascript support is up to the browser the player is using.
If you mean the desktop player, that's a pretty old version of Chromium (I don't remember the exact version, but it's old).

If I want to get stuff from the web in a Quest game I would normally use jQuery's functions; which abstract over most of the variations between browsers.


I do mean the desktop player of course, but that's what I figured is the prob with bob. I'll see about doing it with JQuery another time. Kinda lost the magic.


Log in to post a reply.

Support

Forums