docs: remove mentions of the WebWorker platform (#50059)

The webworker platform was dropped in v11.

PR Close #50059
This commit is contained in:
Matthieu Riegler 2023-04-28 10:00:57 +02:00 committed by Pawel Kozlowski
parent adf3f6af88
commit 39d2ea0a4d
5 changed files with 4 additions and 17 deletions

View file

@ -135,7 +135,7 @@ Here are the most useful `DebugElement` members for testers, in approximate orde
| Members | Details |
|:--- |:--- |
| `nativeElement` | The corresponding DOM element in the browser \(null for WebWorkers\). |
| `nativeElement` | The corresponding DOM element in the browser |
| `query` | Calling `query(predicate: Predicate<DebugElement>)` returns the first `DebugElement` that matches the [predicate](#query-predicate) at any depth in the subtree. |
| `queryAll` | Calling `queryAll(predicate: Predicate<DebugElement>)` returns all `DebugElements` that matches the [predicate](#query-predicate) at any depth in subtree. |
| `injector` | The host dependency injector. For example, the root element's component instance injector. |

View file

@ -49,25 +49,14 @@ export function createElementRef(tNode: TNode, lView: LView): ElementRef {
// and could do better codegen in the future.
export class ElementRef<T = any> {
/**
* The underlying native element or `null` if direct access to native elements is not supported
* (e.g. when the application runs in a web worker).
*
* <div class="callout is-critical">
* <header>Use with caution</header>
* <p>
* Use this API as the last resort when direct access to DOM is needed. Use templating and
* data-binding provided by Angular instead. Alternatively you can take a look at {@link
* Renderer2}
* which provides API that can safely be used even when direct access to native elements is not
* supported.
* </p>
* <p>
* Relying on direct DOM access creates tight coupling between your application and rendering
* layers which will make it impossible to separate the two and deploy your application into a
* web worker.
* Renderer2} which provides an API that can be safely used.
* </p>
* </div>
*
*/
public nativeElement: T;

View file

@ -139,7 +139,6 @@ export abstract class Renderer2 {
* in the host element's DOM.
* @param node The child node to query.
* @returns The parent node, or null if there is no parent.
* For WebWorkers, always returns true.
* This is because the check is synchronous,
* and the caller can't rely on checking for null.
*/
@ -148,7 +147,6 @@ export abstract class Renderer2 {
* Implement this callback to get the next sibling node of a given node
* in the host element's DOM.
* @returns The sibling node, or null if there is no sibling.
* For WebWorkers, always returns a value.
* This is because the check is synchronous,
* and the caller can't rely on checking for null.
*/

View file

@ -145,7 +145,7 @@ export function isPropertyValid(
if (schemas === null) return true;
// The property is considered valid if the element matches the schema, it exists on the element,
// or it is synthetic, and we are in a browser context (web worker nodes should be skipped).
// or it is synthetic.
if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {
return true;
}

View file

@ -19,7 +19,7 @@
* When running ivy outside of a browser environment, it is necessary to call `setDocument()` to
* tell ivy what the global `document` is.
*
* Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)
* Angular does this for us in each of the standard platforms (`Browser` and `Server`)
* by calling `setDocument()` when providing the `DOCUMENT` token.
*/
let DOCUMENT: Document|undefined = undefined;