1. A mobile device comprising: one or more processors and a computer-readable medium coupled to the one or more processors having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations comprising: receiving a resource associated with a web mail application, wherein the resource includes markup language code and executable code embedded in a comment of the markup language code, wherein the executable code is embedded in the comment of the markup language code such that the executable code is not executed when the markup language code is initially loaded, and an end-comment delimiter of the executable code being replaced with a predefined token, loading the markup language code without executing the executable code embedded in the comment of the markup language code, in response to invoking the markup language code, registering an event handler associated with a Document Object Model event, wherein the event handler references the executable code embedded within the comment of the markup, in response to determining that the Document Object Model event has occurred, extracting the executable code from within the comment of the markup language code, and executing the extracted executable code wherein extracting the executable code from the comment comprises selecting a portion of the comment between a begin-comment delimiter and an end-comment delimiter of the markup language code, and replacing, within the portion of the comment, one or more occurrences of the predefined token with the end-comment delimiter of the executable code.
1. A mobile device comprising: one or more processors and a computer-readable medium coupled to the one or more processors having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations comprising: receiving a resource associated with a web mail application, wherein the resource includes markup language code and executable code embedded in a comment of the markup language code, wherein the executable code is embedded in the comment of the markup language code such that the executable code is not executed when the markup language code is initially loaded, and an end-comment delimiter of the executable code being replaced with a predefined token, loading the markup language code without executing the executable code embedded in the comment of the markup language code, in response to invoking the markup language code, registering an event handler associated with a Document Object Model event, wherein the event handler references the executable code embedded within the comment of the markup, in response to determining that the Document Object Model event has occurred, extracting the executable code from within the comment of the markup language code, and executing the extracted executable code wherein extracting the executable code from the comment comprises selecting a portion of the comment between a begin-comment delimiter and an end-comment delimiter of the markup language code, and replacing, within the portion of the comment, one or more occurrences of the predefined token with the end-comment delimiter of the executable code. 5. The mobile device of claim 1 , wherein receiving a resource that includes markup language code and executable code embedded within the markup language code further comprises receiving a single resource that includes both markup language code and executable code embedded within the markup language code.