+ 27
Is it possible to make a sandbox in JavaScript?
I have not seen anyone making a sandbox in java script, so I would ,like to know if it is even possible! :D
19 odpowiedzi
+ 24
iframes can be used to sandbox your javascript best.
since iframes don't share the global scope or the DOM with the parent object
and most importantly scripts running within an iframe are subject to same origin policy.
https://medium.com/zendesk-enginnering/sandboxing-javascipt-e4def55e855e
+ 11
-I Think it is.
+ 4
Hi Redstoneperson 123
Not quite a Sandbox as in the classical sense ,but you may want to consider Browser feature policy.
https://wicg.github.io/feature-policy/
eg Chrome feature policy added recently will open cross domain code inside different tabs to limit access to for malicious code.
Check your feature policy status here
http://xhr.featurepolicy.rocks/
+ 4
Ever heard of powdergame? Check it out at Dan-Ball.jp, if that's what you meant by sandbox.
+ 4
Nothing's impossible but it sure will be difficult!
+ 3
Nothing is unachievable. If the mind can conceive it, believe it, then it can achieve it.
+ 3
So if you want to do something like codepen or what browser dev tools use. Try Codemirror
http://codemirror.net/
here it is used for Wordpress coding sandbox
https://www.elegantthemes.com/blog/resources/codemirror-and-the-coding-sandbox-introduced-in-wordpress-4-9
+ 3
this will going to be very difficult
and Nothing is Impossible with JavaScript there are many Frameworks is Created with JavaScript
+ 2
I think it is
+ 2
what is sandbox?
+ 2
why not,
+ 2
Mike Choy has it right - try codepen, a sandbox environment for practice (html, css & js) and their interaction. plus lots of examples and inspiration
+ 1
I'm pretty sure you can I have read it a few times im not sure why tho as different functions if that's making sense just sure you can
+ 1
Yes if done correctly
+ 1
It an be made but a little bit of HTML most be use to that the people can see it in practice if not the then it can not be done.
+ 1
Just add sand
0
somali miyaa tahay wll
- 2
toàn tiếng anh thế này
- 4
i thnk it is posibal. you should do it like a game.you an also us iframs.