Skip to content

Commit

Permalink
[RFC#706]: Deprecate window.Ember and window.Em, which is an alias of…
Browse files Browse the repository at this point in the history
… window.Ember

RFC: emberjs/rfcs#706

tl;dr: Recommend `import Ember from 'ember';` instead of using the window.Ember
global
  • Loading branch information
NullVoxPopuli committed Feb 13, 2021
1 parent 0fa78e0 commit 5534e7f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/@ember/-internals/bootstrap/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import require from 'require';
import { deprecate } from '@ember/debug';
import { context } from '@ember/-internals/environment';

(function () {
Expand All @@ -9,6 +10,18 @@ import { context } from '@ember/-internals/environment';
enumerable: true,
configurable: true,
get() {
deprecate(
"Using window.Ember and window.Em have been deprecated. Use `import Ember from 'ember';` instead ",
false,
{
id: 'ember-source.window-global',
until: '4.0.0',
url: 'tbd',
for: 'ember-source',
since: { enabled: '3.26.0-beta.1' },
}
);

if (!Ember) {
Ember = require('ember').default;
}
Expand Down

0 comments on commit 5534e7f

Please sign in to comment.