Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. XRInputSourceArray
  4. values()

XRInputSourceArray: values() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

TheXRInputSourceArraymethodvalues() returns aJavaScriptiteratorthat can walk over the list ofXRInputSource objects contained in thearray, from first to last.

Syntax

js
values()

Parameters

None.

Return value

AJavaScriptiterator thatcan be used to walk through the list ofXRInputSource objects in thearray, starting with the first entry (at index 0) and proceeding straight through thelist.

Examples

This example snippet walks through each input and calls thefunctioncheckInput() with each returned value.

js
for (const source of xrSession.inputSources.values()) {  checkInput(source);}

Here,for...ofis used to iterate over the array's contents. Each pass through the loop,source is the nextXRInputSource in the list. The loop exitsonce every input has been delivered tocheckInput().

Specifications

This feature does not appear to be defined in any specification.

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp