Skip to content

Define goog and assign to global when generating UMD debug builds #3070

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

Merged
merged 1 commit into from
Dec 19, 2014
Merged

Define goog and assign to global when generating UMD debug builds #3070

merged 1 commit into from
Dec 19, 2014

Conversation

tschaub
Copy link
Member

@tschaub tschaub commented Dec 19, 2014

When concatenating the Closure Library, base.js creates a new goog object if there is not already one in scope. Later, goog.global is assigned the value of this. Calls to goog.provide create "namespace" objects by assigning to goog.global. To ensure that goog is the same as goog.global.goog, we need to create a new goog object in the scope of base.js and assign it to this.goog.

When concatenating the Closure Library, base.js creates a new `goog` object if there is not already one in scope.  Later, `goog.global` is assigned the value of `this`.  Calls to `goog.provide` create "namespace" objects by assigning to `goog.global`.  To ensure that `goog` is the same as `goog.global.goog`, we need to create a new `goog` object in the scope of base.js and assign it to `this.goog`.
@tschaub
Copy link
Member Author

tschaub commented Dec 19, 2014

Debug build config only change. Merging.

tschaub added a commit that referenced this pull request Dec 19, 2014
Define goog and assign to global when generating UMD debug builds.
@tschaub tschaub merged commit 27b5036 into openlayers:master Dec 19, 2014
@tschaub tschaub deleted the umd-debug branch December 19, 2014 23:53
@elemoine
Copy link
Member

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants