Skip to content
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

[Main] Fix extension / channel not being readonly #2018

Merged
merged 1 commit into from
Mar 15, 2023
Merged

Conversation

MSNev
Copy link
Collaborator

@MSNev MSNev commented Mar 14, 2023

  • Bug fixes for getPlugin() not searching the TeeChannel
  • Minification improcements

_autoCapture = false;

// Define _self.config
objDefineProp(self, "config", {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually adding a config property to window...
Note: the self is missing the _ prefix and even if it had that it's outside of the closure that defines _self...
So just removing as it's not used (or valid) to populate window.config

enumerable: true,
configurable: true,
get: function() {
objDefine(_self, "context", {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using objDefine() as the defaults for enumerable and configurable are true and it avoids adding these uncompressible names

[STR_EXTENSIONS]: [],
[STR_CHANNELS]: [],
[STR_EXTENSION_CONFIG]: {},
[STR_EXTENSIONS]: { rdOnly: true, ref: true, v: [] },
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the main parts that makes the extensions and channels readonly enforced.

- Bug fixes for getPlugin() not searching the TeeChannel
- Minification improcements
* @param pageName
* @returns {}
*/
function startPageVisitTimer(pageName: string, pageUrl: string) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just removing and collapsing a function that is only used once

@MSNev MSNev merged commit bb26f8c into main Mar 15, 2023
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