+ 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

20th Apr 2018, 12:59 AM
Supergrupgr
Supergrupgr - avatar
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
20th Apr 2018, 3:04 AM
Morpheus
Morpheus - avatar
+ 11
-I Think it is.
20th Apr 2018, 7:07 PM
Sadaam Linux
Sadaam Linux - avatar
+ 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/
20th Apr 2018, 8:10 AM
Mike Choy
Mike Choy - avatar
+ 4
Ever heard of powdergame? Check it out at Dan-Ball.jp, if that's what you meant by sandbox.
20th Apr 2018, 1:40 PM
What was my name again?
What was my name again? - avatar
+ 4
Nothing's impossible but it sure will be difficult!
21st Apr 2018, 7:25 AM
Jake The Great
Jake The Great - avatar
+ 3
Nothing is unachievable. If the mind can conceive it, believe it, then it can achieve it.
23rd Apr 2018, 10:37 PM
David Agboola Olalekan
David Agboola Olalekan - avatar
+ 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
24th Apr 2018, 1:36 PM
Mike Choy
Mike Choy - avatar
+ 3
this will going to be very difficult and Nothing is Impossible with JavaScript there are many Frameworks is Created with JavaScript
24th Apr 2018, 2:25 PM
Gaurav Chaudhary
Gaurav Chaudhary - avatar
+ 2
I think it is
23rd Apr 2018, 6:08 PM
Feras Harb
Feras Harb - avatar
+ 2
what is sandbox?
24th Apr 2018, 4:15 AM
​​Joshua Nathan Davies
+ 2
why not,
24th Apr 2018, 7:00 PM
Saied Hossien
Saied Hossien - avatar
+ 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
25th Apr 2018, 1:03 AM
Colin
Colin - avatar
+ 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
23rd Apr 2018, 1:29 AM
kell kell n kids
kell kell n kids - avatar
+ 1
Yes if done correctly
24th Apr 2018, 3:53 PM
Ayyudude
Ayyudude - avatar
+ 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.
25th Apr 2018, 7:54 PM
Muhammad Abdullahi
Muhammad Abdullahi - avatar
+ 1
Just add sand
26th Apr 2018, 6:40 PM
Bush
Bush - avatar
0
somali miyaa tahay wll
1st Aug 2018, 9:04 PM
karim cabdalla
- 2
toàn tiếng anh thế này
25th Apr 2018, 2:39 AM
Tuyến
Tuyến - avatar
- 4
i thnk it is posibal. you should do it like a game.you an also us iframs.
24th Apr 2018, 2:58 AM
Misbakh Ahmed
Misbakh Ahmed - avatar