Things which you might have not known about the “forEach” loop
if you think the below code only prints “1,2,3” you are wrong
the reason for this behaviour is that we are passing a callback function in our “foreach” function, which behaves like a normal function and is appliead to each element no matter if we “return” from one.
do you think “foreach” loop break when equals to 3 ?
The above code will throw an exception
Uncaught SyntaxError: Illegal break statement
This is because , technically the break not inside a loop.
Do you think this code…
Cross domain communication b/w Vue component and iframe.
Cross domain communication (also called Cross-origin) can be difficult and security risks. “window.postmessage()” method gives a provision for sending cross-domain e.g.: between a page and iframe or pop-up.
If you are using vuejs for iframe and target window both.
In this component where we going to send message to parent window. here we have…
Senior Software Engg. @customersuccessbox