File tree Expand file tree Collapse file tree 11 files changed +19
-19
lines changed
Sources/ContentScopeScripts/dist Expand file tree Collapse file tree 11 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 173
173
* @returns {boolean } if we infer the document is framed
174
174
*/
175
175
function isBeingFramed ( ) {
176
- if ( 'ancestorOrigins' in globalThis . location ) {
176
+ if ( globalThis . location && 'ancestorOrigins' in globalThis . location ) {
177
177
return globalThis . location . ancestorOrigins . length > 0
178
178
}
179
179
return globalThis . top !== globalThis . window
5309
5309
get : ( ) => this . getFeatureAttr ( 'pixelDepth' , 24 )
5310
5310
} ) ;
5311
5311
5312
- window . addEventListener ( 'resize' , function ( ) {
5312
+ globalThis . window . addEventListener ( 'resize' , function ( ) {
5313
5313
setWindowDimensions ( ) ;
5314
5314
} ) ;
5315
5315
setWindowDimensions ( ) ;
Original file line number Diff line number Diff line change 25
25
* @returns {boolean } if we infer the document is framed
26
26
*/
27
27
function isBeingFramed ( ) {
28
- if ( 'ancestorOrigins' in globalThis . location ) {
28
+ if ( globalThis . location && 'ancestorOrigins' in globalThis . location ) {
29
29
return globalThis . location . ancestorOrigins . length > 0
30
30
}
31
31
return globalThis . top !== globalThis . window
Original file line number Diff line number Diff line change 178
178
* @returns {boolean} if we infer the document is framed
179
179
*/
180
180
function isBeingFramed () {
181
- if ('ancestorOrigins' in globalThis.location) {
181
+ if (globalThis.location && 'ancestorOrigins' in globalThis.location) {
182
182
return globalThis.location.ancestorOrigins.length > 0
183
183
}
184
184
return globalThis.top !== globalThis.window
6270
6270
get: () => this.getFeatureAttr('pixelDepth', 24)
6271
6271
});
6272
6272
6273
- window.addEventListener('resize', function () {
6273
+ globalThis. window.addEventListener('resize', function () {
6274
6274
setWindowDimensions();
6275
6275
});
6276
6276
setWindowDimensions();
Original file line number Diff line number Diff line change 178
178
* @returns {boolean} if we infer the document is framed
179
179
*/
180
180
function isBeingFramed () {
181
- if ('ancestorOrigins' in globalThis.location) {
181
+ if (globalThis.location && 'ancestorOrigins' in globalThis.location) {
182
182
return globalThis.location.ancestorOrigins.length > 0
183
183
}
184
184
return globalThis.top !== globalThis.window
6546
6546
get: () => this.getFeatureAttr('pixelDepth', 24)
6547
6547
});
6548
6548
6549
- window.addEventListener('resize', function () {
6549
+ globalThis. window.addEventListener('resize', function () {
6550
6550
setWindowDimensions();
6551
6551
});
6552
6552
setWindowDimensions();
Original file line number Diff line number Diff line change 214
214
* @returns {boolean} if we infer the document is framed
215
215
*/
216
216
function isBeingFramed () {
217
- if ('ancestorOrigins' in globalThis.location) {
217
+ if (globalThis.location && 'ancestorOrigins' in globalThis.location) {
218
218
return globalThis.location.ancestorOrigins.length > 0
219
219
}
220
220
return globalThis.top !== globalThis.window
6259
6259
get: () => this.getFeatureAttr('pixelDepth', 24)
6260
6260
});
6261
6261
6262
- window.addEventListener('resize', function () {
6262
+ globalThis. window.addEventListener('resize', function () {
6263
6263
setWindowDimensions();
6264
6264
});
6265
6265
setWindowDimensions();
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 214
214
* @returns {boolean} if we infer the document is framed
215
215
*/
216
216
function isBeingFramed () {
217
- if ('ancestorOrigins' in globalThis.location) {
217
+ if (globalThis.location && 'ancestorOrigins' in globalThis.location) {
218
218
return globalThis.location.ancestorOrigins.length > 0
219
219
}
220
220
return globalThis.top !== globalThis.window
6259
6259
get: () => this.getFeatureAttr('pixelDepth', 24)
6260
6260
});
6261
6261
6262
- window.addEventListener('resize', function () {
6262
+ globalThis. window.addEventListener('resize', function () {
6263
6263
setWindowDimensions();
6264
6264
});
6265
6265
setWindowDimensions();
Original file line number Diff line number Diff line change 173
173
* @returns {boolean } if we infer the document is framed
174
174
*/
175
175
function isBeingFramed ( ) {
176
- if ( 'ancestorOrigins' in globalThis . location ) {
176
+ if ( globalThis . location && 'ancestorOrigins' in globalThis . location ) {
177
177
return globalThis . location . ancestorOrigins . length > 0
178
178
}
179
179
return globalThis . top !== globalThis . window
6588
6588
get : ( ) => this . getFeatureAttr ( 'pixelDepth' , 24 )
6589
6589
} ) ;
6590
6590
6591
- window . addEventListener ( 'resize' , function ( ) {
6591
+ globalThis . window . addEventListener ( 'resize' , function ( ) {
6592
6592
setWindowDimensions ( ) ;
6593
6593
} ) ;
6594
6594
setWindowDimensions ( ) ;
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ export default class FingerprintingScreenSize extends ContentFeature {
126
126
get : ( ) => this . getFeatureAttr ( 'pixelDepth' , 24 )
127
127
} )
128
128
129
- window . addEventListener ( 'resize' , function ( ) {
129
+ globalThis . window . addEventListener ( 'resize' , function ( ) {
130
130
setWindowDimensions ( )
131
131
} )
132
132
setWindowDimensions ( )
You can’t perform that action at this time.
0 commit comments