1. A method, comprising: responsive to an event occurring within a web browser on a host system: initiating an operating system process that is separate from an operating process of the web browser's; initiating an execution of an application within the operating system process, wherein a message passing service implementation is used to provide services to the application from the web browser, and wherein the application receives a set of services by using the message passing service implementation to exchange a set of messages with the web browser; while executing the application within the operating system process, displaying a visual representation of the application within a visual representation of the web browser; responsive to receiving an execution environment change notification for the application, transitioning the application to a second execution environment by: displaying the visual representation within a visual representation of the second execution environment, wherein the second execution environment operates independently of the operating system process of the web browser on the host system; and replacing the message passing service implementation with a new message passing service implementation that facilitates communication between the application and the second execution environment, wherein the replacement is performed while the application is executing; and while continuing to execute the application within the operating system process after terminating the operating system process of the web browser, continuing to display the visual representation of the application within the visual representation of the second execution environment's visual representation, wherein the new message passing service implementation allows the application to run independently of the web browser by, while the application is executing within the operating system process, ignoring another subsequent set of messages from the web browser; and wherein the method is performed by one or more computing devices.