зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1667471 - Expose IsCORSSafelistedRequestHeader in WindowUtils. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91981
This commit is contained in:
Родитель
de2b36d2d8
Коммит
55236f8555
|
@ -693,6 +693,15 @@ nsDOMWindowUtils::SendMouseEventCommon(
|
|||
aPreventDefault, aIsDOMEventSynthesized, aIsWidgetEventSynthesized);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::IsCORSSafelistedRequestHeader(const nsACString& aName,
|
||||
const nsACString& aValue,
|
||||
bool* aRetVal) {
|
||||
NS_ENSURE_ARG_POINTER(aRetVal);
|
||||
*aRetVal = nsContentUtils::IsCORSSafelistedRequestHeader(aName, aValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::SendWheelEvent(float aX, float aY, double aDeltaX,
|
||||
double aDeltaY, double aDeltaZ,
|
||||
|
|
|
@ -266,6 +266,12 @@ interface nsIDOMWindowUtils : nsISupports {
|
|||
|
||||
uint32_t getPresShellId();
|
||||
|
||||
/**
|
||||
* Returns whether a given header and value is a CORS-safelisted request
|
||||
* header per https://fetch.spec.whatwg.org/#cors-safelisted-request-header
|
||||
*/
|
||||
boolean isCORSSafelistedRequestHeader(in ACString name, in ACString value);
|
||||
|
||||
/**
|
||||
* Following modifiers are for sent*Event() except sendNative*Event().
|
||||
* NOTE: MODIFIER_ALT, MODIFIER_CONTROL, MODIFIER_SHIFT and MODIFIER_META
|
||||
|
|
Загрузка…
Ссылка в новой задаче