you can check if ripple instance is available: if(typeof window.parent.ripple ==="undefined")
if ripple is an object, ripple works, another ripple does not work! Fast and easy.
try to explain:
The target application runs in the iframe. If a ripple session is started, an object with the name "ripples" is created (at the moment it does not matter what the object "ripples" does). This is enough to know that the object was created. Because, knowing this, we know that the application works in a ripple container.
With window.parent we can request the parent node iframe, in this case, a ripple environment in which there is also a ripple object.
Masood moshref
source share