Add service management on gadget.
A service is function which is executed outside the promise tree when the gadget is attached to the DOM. Services are stopped when the gadget is removed from the DOM. You can declare a service with the "declareService" method, which takes a function as parameter. Service errors are reported to the parent gadget by acquisition on "reportServiceError". If no gadget catched the service error, the application will crash (document body will display the raw error).
Showing with 842 additions and 7 deletions