Add on and emit methods to mobileFrontend (bug 44128)

Reuse the code previously written for View.

Change-Id: I94db146ab38a957629c9b4c8a7169a1391c9bea1