首页>
外国专利>
Method of adding local variables in place of global in JavaScript
Method of adding local variables in place of global in JavaScript
展开▼
机译:在JavaScript中添加局部变量代替全局变量的方法
展开▼
页面导航
摘要
著录项
相似文献
摘要
The present invention, in some embodiments thereof comprises a computer implemented method of detecting global variables in JavaScript code, and adding local variables in place of the global variables, comprising receiving a JavaScript code containing at least one of a plurality of globally defined functions, identifying at least one of: one or more confined global variables which receive a value within a first JavaScript scope wherein the value is not referenced outside of the first JavaScript scope, and one or more repeating global variables accessed repeatedly within a second JavaScript scope, and adding local variables in place of at least one of the confined global variables and the repeating global variables.
展开▼