4 ms·
Oh! Hello. This is my thing I made for usvsth3m.com. Hope y'all like it. HTML5 Webworkers made it possible - sandboxing user-submitted JavaScript so an accident
by tomscott 13y ago
Oh! Hello. This is my thing I made for usvsth3m.com. Hope y'all like it. HTML5 Webworkers made it possible - sandboxing user-submitted JavaScript so an accidental while(1) or document.write can't kill everything.
Do have a look at the source code. Oh, and try turning up your speakers and typing in the Konami code...
- JosephRedfern 13y agoIf you alert() something inside an infinite loop it doesn't seem to be able to detect it (nor does it show an alert box!)
- Demiurge 13y agoNothing like figuring out another way to kill your browser :)
- TazeTSchnitzel 13y agoOh, you, Tom Scott, made it? :D I'm a big fan. A few suggestions, then: 1. Don't use i as the name of the parameter. A lot of people use that as the name of loop variables, and it means breaking habit or wasting time changing the name. 2. For test 3, try some multiple-extension files to make sure they did it right (some.file.multiple.extensions, should return "extensions") 3. For test 5, it says "integers". Try some non-integers during testing, to make sure that it's only checking for integers. 4. For test 5, it says "arrays". Try some objects to make sure they're not being lazy and using typeof thing === "object" Anyway, thanks for making this. I love it!
- TazeTSchnitzel 13y agoOh, you, Tom Scott, made it? :D I'm a big fan. A few suggestions, then: 1. Don't use i as the name of the parameter. A lot of people use that as the name of loop variables, and it means breaking habit or wasting time changing the name. 2. For test 3, try some multiple-extension files to make sure they did it right (some.file.multiple.extensions, should return "extensions") 3. For test 5, it says "integers". Try some non-integers during testing, to make sure that it's only checking for integers. 4. For test 5, it says "arrays". Try some objects to make sure they're not being lazy and using typeof thing === "object" Anyway, thanks for making this. I love it!