Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var localContext = {
- "window":{
- location:{
- href: "http://www.website.com?varName=foo"
- }
- }
- }
- // simulated context
- with(localContext){
- console.log(window.location.href);
- // http://www.website.com?varName=foo
- }
- //actual context
- console.log(window.location.href);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement