In sake of simplicity and security, up until this point Snow only accepted one single callback (first one to register wins).
We now need Snow to be able to accept more than just one without breaking its security principles.
Solution
Snow will now accept an unlimited amount of callbacks.
To prevent anyone in the page from using Snow, former callbacks can decide whether to allow the chain of calls to continue or not by simply returning a boolean (true=stop;false[default]=continue).
This mechanism only applies to non-top realms - every callback passed to Snow will immediately be called on the top realm, regardless of the mentioned above chain of calls.
Example
SNOW( w => false ) // will be called on top and all future same origin realms (false continues the chain)
SNOW( w => true ) // will be called on top and all future same origin realms (true breaks the chain)
SNOW( w => false ) // will be called on top and top only! (true broke the chain)
SNOW( w => false ) // will be called on top and top only! (true broke the chain)
Background
In sake of simplicity and security, up until this point Snow only accepted one single callback (first one to register wins). We now need Snow to be able to accept more than just one without breaking its security principles.
Solution
true=stop
;false[default]=continue
).Example