Class RestrictionTarget
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalRestrictionTarget interface of the {{domxref("Screen Capture API", "Screen Capture API", "", "nocode")}} provides a static method, FromElement(Element), which returns a RestrictionTarget instance that can be used to restrict a captured video track to a specified DOM element.
[Value("RestrictionTarget")]
public class RestrictionTarget
- Inheritance
-
RestrictionTarget
- Inherited Members
Remarks
Constructors
RestrictionTarget()
public RestrictionTarget()
Methods
FromElement(Element)
NOTE
ExperimentalfromElement() static method of the RestrictionTarget interface returns a RestrictionTarget instance that can be used to restrict a captured video track to a specified DOM element (plus its descendants).
[Value("fromElement")]
public static Task<RestrictionTarget> FromElement(Element element)
Parameters
elementElement
Returns
- Task<RestrictionTarget>
A {{jsxref("Promise")}} that resolves to a RestrictionTarget object instance, which can then be passed to RestrictTo(RestrictionTarget?) to restrict the video captured in the track to just the particular DOM element the
RestrictionTargetwas created with.RestrictionTargetobjects are serializable. They can be passed to another document using mechanisms such as PostMessage(dynamic, string, List<Object>).The promise will reject if the restriction target element is not eligible for restriction.