The MSDN documentation shows two options for setting up the onactivated event for Win8 WinJS apps:
WinJS.Application.addEventListener("activated", listenerName);
or
WinJS.Application.onactivated = listenerName;
Do both options behave identically under the hood, or are there reasons to use one approach over the other?
These are the same. "onactivated" is the free onFoo event created by the WinJS Event mixin helpers. You can use either with impunity.
I prefer the addEventListener pattern myself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With