Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
/angular.jsPublic archive

Commitd9f820a

Browse files
committed
fix($sceDelegate): makeresourceUrlWhitelist() is identicaltrustedResourceUrlList()
In commita206e26, `$sceDelegateProvider`'s`resourceUrlWhitelist()` was deprecated in favor of the new`trustedResourceUrlList()`. However, although both properties wereassigned the same value, it was possible for an app to break if one ofthe properties was overwritten in one part of the app (or a 3rd-partylibrary) while another part of the app interacts with the other,non-overwritten property.This commit fixes it by making `resourceUrlWhitelist()` a getter/setterthat delegates to `trustedResourceUrlList()`, ensuring that the twoproperties will remain in sync. This, also, makes it consistent withother similar deprecated properties, such as `$sceDelegateProvider`'s`resourceUrlBlacklist()`.Closes#17090
1 parent5e85ef3 commitd9f820a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

‎src/ng/sce.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,26 @@ function $SceDelegateProvider() {
215215
}
216216
returntrustedResourceUrlList;
217217
};
218-
this.resourceUrlWhitelist=this.trustedResourceUrlList;
218+
219+
/**
220+
*@ngdoc method
221+
*@name $sceDelegateProvider#resourceUrlWhitelist
222+
*@kind function
223+
*
224+
*@deprecated
225+
* sinceVersion="1.8.1"
226+
*
227+
* This method is deprecated. Use {@link $sceDelegateProvider#trustedResourceUrlList
228+
* trustedResourceUrlList} instead.
229+
*/
230+
Object.defineProperty(this,'resourceUrlWhitelist',{
231+
get:function(){
232+
returnthis.trustedResourceUrlList;
233+
},
234+
set:function(value){
235+
this.trustedResourceUrlList=value;
236+
}
237+
});
219238

220239
/**
221240
*@ngdoc method

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp