Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalization should preserve global variable declarations #1

Open
xiemaisi opened this issue May 31, 2013 · 0 comments
Open

Normalization should preserve global variable declarations #1

xiemaisi opened this issue May 31, 2013 · 0 comments
Assignees
Labels

Comments

@xiemaisi
Copy link

Consider an HTML page including two scripts 1.js and 2.js, where 1.js is

var x;

and 2.js is

alert(x);

Loading this page alerts undefined.

Assume we only normalize 1.js and leave 2.js in its original state. Loading the modified page then results in a ReferenceError since global variable x is neither declared nor defined.

To enable normalized and non-normalized code to work together, the normalization should preserve global variable declarations.

@ghost ghost assigned xiemaisi May 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant