-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Core: do not poll for some window dimensions #13916
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
Conversation
|
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀 |
|
does this fix for download page consumers? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good, it addresses separating the calls outside of the bundle unless explicitly imported with a module that depends on it. nice work
| @@ -0,0 +1,63 @@ | |||
| import {canAccessWindowTop, internal as utilsInternals} from '../utils.js'; | |||
|
|
|||
| const CHECK_INTERVAL_MS = 20; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make this configurable? Does this seem aggressive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In practice it's refreshed on every auction, as that's when modules query for dimensions.
Type of change
Description of change
With #12925 core always polls for every window dimension. Some of them (
outerHeight/outerWidth,availHeight/availWidthandcolorDepth) are more likely to be considered fingerprinting tools in https://github.com/duckduckgo/tracker-radar/blob/main/build-data/generated/api_fingerprint_weights.jsonThis PR breaks them out to their own library,
extraWinDimensions, so that they do not appear in Prebid bundles that do not need them.Other information
Related: #12060