Abstract:
A method and system for expanding a WebApp application function. The method comprises: adding a function expansion field which contains an expansion JS function and an address of a local application which responds to a request of the expansion JS function in the WebApp; sending each parameter of the function to a browser kernel by calling the expansion JS function; a WebApp frame setting an address of a local application program as the address of the local application which responds to the request of the expansion JS function according to a calling message received by the browser kernel; activating a target application program specified by the address according to the address of the local application; the activated target application program executing the expansion JS function according to the parameters of the expansion JS function and returning an execution result to the WebApp.
Abstract:
The disclosure provides a method for executing extended JavaScript (JS) by using an extended JS interface. The method includes the following steps: inquiring an extension program whether to execute the extended JS at a predetermined occasion when a webpage is loaded, wherein the extension program is loaded when a browser is started up; the browser assembles the extended JS interface according to an open application programming interface (API) when determining that the extended JS is needed to be executed; executing the extended JS by using the extended JS interface. According to the disclosure, browsing mode and layout mode of a browser can be changed dynamically according to the requirement for webpage contents in the form of extension programs, accordingly browsing experience of users is improved.
Abstract:
The disclosure provides a method for executing extended JavaScript (JS) by using an extended JS interface. The method comprises the following steps: inquiring an extension program whether to execute the extended JS at a predetermined occasion when a webpage is loaded, wherein the extension program is loaded when a browser is started up; the browser assembles the extended JS interface according to an open application programming interface (API) when determining that the extended JS is needed to be executed; executing the extended JS by using the extended JS interface. According to the disclosure, browsing mode and layout mode of a browser can be changed dynamically according to the requirement for webpage contents in the form of extension programs, accordingly browsing experience of users is improved.