摘要 |
A method for loading a web page is provided. Primary executable script are asynchronously loaded. Commands associated with the primary executable script are pushed onto a first queue and processed by asynchronously loading secondary executable script if the command is a dependency command and pushing the dependency command onto a second queue; registering secondary executable script referenced in the command if the command is a fulfillment command, and pushing the command onto the second queue if the command is neither a dependency nor a fulfillment command. Commands in the second queue are processed by, if the command is a dependency command, determining if the secondary executable script referenced in the dependency command is registered, and associating the secondary executable script with an object if the secondary executable script is registered. If the command is not a dependency command, then the command is executed and removed from the second queue. |