Browse Source

docs: make constructor arguments more readable

pull/3468/head
Arman Ozak 7 years ago
parent
commit
e1e0b9b078
  1. 4
      docs/en/UI/Angular/Content-Security-Strategy.md
  2. 4
      docs/en/UI/Angular/Cross-Origin-Strategy.md
  3. 6
      docs/en/UI/Angular/Dom-Strategy.md

4
docs/en/UI/Angular/Content-Security-Strategy.md

@ -10,7 +10,7 @@
### constructor(public nonce?: string)
`nonce` enables whitelisting inline script or styles in order to avoid using `unsafe-inline` in [script-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#Unsafe_inline_script) and [style-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#Unsafe_inline_styles) directives.
- `nonce` enables whitelisting inline script or styles in order to avoid using `unsafe-inline` in [script-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#Unsafe_inline_script) and [style-src](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#Unsafe_inline_styles) directives.
### applyCSP(element: HTMLScriptElement | HTMLStyleElement): void
@ -22,7 +22,7 @@ This method maps the aforementioned properties to the given `element`.
## LooseContentSecurityPolicy
`LooseContentSecurityPolicy` is a class that extends `ContentSecurityStrategy`. It required `nonce` and marks given `<script>` or `<style>` tag with it.
`LooseContentSecurityPolicy` is a class that extends `ContentSecurityStrategy`. It requires `nonce` and marks given `<script>` or `<style>` tag with it.

4
docs/en/UI/Angular/Cross-Origin-Strategy.md

@ -8,8 +8,8 @@
### constructor(public crossorigin: 'anonymous' | 'use-credentials', public integrity?: string)
`crossorigin` is mapped to [the HTML attribute with the same name](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).
`integrity` is a hash for validating a remote resource. Its use is explained [here](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
- `crossorigin` is mapped to [the HTML attribute with the same name](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).
- `integrity` is a hash for validating a remote resource. Its use is explained [here](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
### setCrossOrigin(element: HTMLElement): void

6
docs/en/UI/Angular/Dom-Strategy.md

@ -8,8 +8,8 @@
### constructor(public target?: HTMLElement, public position?: InsertPosition)
`target` is an HTMLElement (_default: document.head_).
`position` defines where the created element will be placed. All possible values of `position` can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement) (_default: 'beforeend'_).
- `target` is an HTMLElement (_default: document.head_).
- `position` defines where the created element will be placed. All possible values of `position` can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement) (_default: 'beforeend'_).
### insertElement(element: HTMLElement): void
@ -54,3 +54,5 @@ Predefined dom strategies are accessible via `DOM_STRATEGY` constant.
## What's Next?
- [LoadingStrategy](./Loading-Strategy.md)
TODO: Place new InsertionStrategy link here.

Loading…
Cancel
Save