You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/optimizely-sdk/lib/index.browser.js
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -78,3 +78,21 @@ module.exports = {
78
78
}
79
79
}
80
80
};
81
+
82
+
if(typeofwindow!=='undefined'){
83
+
window.optimizelySdk=module.exports;
84
+
var_optimizelyClientWarningGiven=false;
85
+
86
+
Object.defineProperty(window,'optimizelyClient',{
87
+
get: function(){
88
+
if(!_optimizelyClientWarningGiven){
89
+
console.warn('Accessing the SDK via window.optimizelyClient is deprecated; please use window.optimizelySdk instead. This alias will be dropped in 3.0.0.');
0 commit comments