版本
语言

CrossOriginStrategy

CrossOriginStrategy is a class exposed by @abp/ng.core package. Its instances define how a source referenced by an element will be retrieved by the browser and are consumed by other classes such as LoadingStrategy.

API

constructor

constructor(
  public crossorigin: 'anonymous' | 'use-credentials',
  public integrity?: string
)

setCrossOrigin

setCrossOrigin(element: HTMLElement): void

This method maps the aforementioned properties to the given element.

Predefined Cross-Origin Strategies

Predefined cross-origin strategies are accessible via CROSS_ORIGIN_STRATEGY constant.

Anonymous

CROSS_ORIGIN_STRATEGY.Anonymous(integrity?: string)

crossorigin will be set as "anonymous" and integrity is optional.

UseCredentials

CROSS_ORIGIN_STRATEGY.UseCredentials(integrity?: string)

crossorigin will be set as "use-credentials" and integrity is optional.

本页对您有帮助吗?
请进行选择。
感谢您的宝贵意见!

请注意,虽然我们无法回复反馈意见,但我们的团队会根据您的意见改进体验。

在本文档中
Mastering ABP Framework Book
掌握 ABP 框架

本书将帮助你全面了解框架和现代Web应用程序开发技术。