-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix + docs: fix $sceDelegateProvider.resourceUrlWhitelist()
and fix docs on recently deprecated properties/methods
#17090
fix + docs: fix $sceDelegateProvider.resourceUrlWhitelist()
and fix docs on recently deprecated properties/methods
#17090
Conversation
In commits 9679e58..3dd42ce, some properties and methods names including the terms whitelist/blacklist were deprecated in favor of new ones not including the terms. This commit fixes some typos in docs related to these changes and adds links to the new properties/methods in the changelog for easier access. Fixes angular#17088
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.
Thanks for the fixes in the first commit.
I don't quite understand the 2nd commit. These are methods not properties, so why would they be overwritten? I am pretty sure that would not be a supported scenario even before...
* This method is deprecated. Use {@link $sceDelegateProvider#trustedResourceUrlList | ||
* trustedResourceUrlList} instead. | ||
*/ | ||
Object.defineProperty(this, 'resourceUrlWhitelist', { |
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.
OK, so we need a 1.8.2...
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.
I'm afraid we do 😁
@petebacondarwin I can imagine monkey-patching by third-party libraries. Also, we're now inconsistent as some APIs deprecated in 1.8.1 already have this treatment and |
…dResourceUrlList()` In commit a206e26, `$sceDelegateProvider`'s `resourceUrlWhitelist()` was deprecated in favor of the new `trustedResourceUrlList()`. However, although both properties were assigned the same value, it was possible for an app to break if one of the properties was overwritten in one part of the app (or a 3rd-party library) while another part of the app interacts with the other, non-overwritten property. This commit fixes it by making `resourceUrlWhitelist()` a getter/setter that delegates to `trustedResourceUrlList()`, ensuring that the two properties will remain in sync. This, also, makes it consistent with other similar deprecated properties, such as `$sceDelegateProvider`'s `resourceUrlBlacklist()`.
3fdeff7
to
527a2ae
Compare
…dResourceUrlList()` In commit a206e26, `$sceDelegateProvider`'s `resourceUrlWhitelist()` was deprecated in favor of the new `trustedResourceUrlList()`. However, although both properties were assigned the same value, it was possible for an app to break if one of the properties was overwritten in one part of the app (or a 3rd-party library) while another part of the app interacts with the other, non-overwritten property. This commit fixes it by making `resourceUrlWhitelist()` a getter/setter that delegates to `trustedResourceUrlList()`, ensuring that the two properties will remain in sync. This, also, makes it consistent with other similar deprecated properties, such as `$sceDelegateProvider`'s `resourceUrlBlacklist()`. Closes #17090
…dResourceUrlList()` In commit a206e26, `$sceDelegateProvider`'s `resourceUrlWhitelist()` was deprecated in favor of the new `trustedResourceUrlList()`. However, although both properties were assigned the same value, it was possible for an app to break if one of the properties was overwritten in one part of the app (or a 3rd-party library) while another part of the app interacts with the other, non-overwritten property. This commit fixes it by making `resourceUrlWhitelist()` a getter/setter that delegates to `trustedResourceUrlList()`, ensuring that the two properties will remain in sync. This, also, makes it consistent with other similar deprecated properties, such as `$sceDelegateProvider`'s `resourceUrlBlacklist()`. Closes angular#17090
This PR includes the following fixes (see the individual commits for more details):
fix($sceDelegate): make `resourceUrlWhitelist()` is identical `trustedResourceUrlList()`
docs(*): fix docs on recently deprecated properties/methods