iframe change followup
greggman opened this issue · comments
A few random notes/thoughts about the change to iframes
It allows non-typescript examples
-
make a folder like this
+-sample +-myJSOnlySample +-index.html // the file that will be launched +-meta.ts // data about it (name, what files)
-
edit
src/samples.ts
and include themeta.ts
file
URL changes
- old:
https://site/webgpu-samples/samples/nameOfSample
- new:
https://site/webgpu-samples/?sample=nameOfSample
The old URLs redirect to the new ones. If you really hate the new ones we could make the framework do history.replace(...)
to make the new ones appear to be correct (they'd still work)
Note:
redirect: https://site/webgpu-samples/samples/nameOfSample
iframe: https://site/webgpu-samples/sample/nameOfSample
We could move the workload-simulator to a sample folder
Just for organizational purposes. It would be easy to add a flag to SampleInfo
to make the link open in a new tab
Cache issues
The new style builds the files with the same names. This might have cache issues. I can look into making it build all the JavaScript/CSS files with cache-busting names, (and the index.html files with links to them) if that's important.