TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

navigator.mediaDevices is not available in insecure contexts

Open anilanar opened this issue 3 years ago • 1 comments

lib Update Request

Configuration Check

My compilation target is esnext and my lib is ['esnext', 'dom'].

Missing / Incorrect Definition

navigator.mediaDevices (and potentially everything that doesn't exist in insecure contexts) should be an optional property in the interface.

Documentation Link

Accoding to the spec:

partial interface Navigator {
  [SameObject, SecureContext] readonly attribute MediaDevices mediaDevices;
};

The meaning of SecureContext:

... it indicates that the construct is exposed only within a secure context.

anilanar avatar Nov 11 '21 08:11 anilanar

Should have an jsdoc comment: #1150

HolgerJeromin avatar Nov 11 '21 21:11 HolgerJeromin

Yup, https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1175 covered this and there now should at least be a comment about it.

@github-actions close

saschanaz avatar Sep 18 '22 12:09 saschanaz

Closing because @saschanaz is one of the code-owners of this repository.

github-actions[bot] avatar Sep 18 '22 12:09 github-actions[bot]