Intent to Prototype & Ship: WebXR enabledFeatures attribute

266 views
Skip to first unread message

Alex Cooper

unread,
Dec 13, 2022, 7:14:41 PM12/13/22
to blink-dev

Contact emails

alco...@chromium.org

Explainer

None

Specification

https://immersive-web.github.io/webxr/#dom-xrsession-enabledfeatures

Summary

Applications can query for which features from their supplied XRSessionInit were actually enabled on a newly created XRSession (note that this will really only be useful for optionalFeatures, since a session that cannot serve all requiredFeatures would be rejected). Most features have some way for developers to detect if they were granted; however, for some features the signal of whether or not a feature was enabled may tie closely with data for a feature just not being available "right now", rather than data not being available "ever". By querying enabledFeatures, a developer can determine if any helpful hints (e.g. to improve/start tracking) should be shown, or if a feature will never be supported in the current session. It is also possible that future WebXR features may not have other signals to detect whether or not they were enabled.



Blink component

Blink>WebXR

TAG review

https://github.com/w3ctag/design-reviews/issues/782

TAG review status

Issues addressed

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Flag name



Requires code in //chrome?

False

Tracking bug

https://crbug.com/1377430

Launch bug

https://launch.corp.google.com/launch/4225596

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5082665189900288

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Dec 14, 2022, 12:18:37 AM12/14/22
to Alex Cooper, blink-dev
On Wed, Dec 14, 2022 at 1:14 AM Alex Cooper <alco...@chromium.org> wrote:

Contact emails

alco...@chromium.org

Explainer

None

An explainer here would be useful to show examples of said features and how developers would use the enabledFeatures method.
 


Specification

https://immersive-web.github.io/webxr/#dom-xrsession-enabledfeatures

Summary

Applications can query for which features from their supplied XRSessionInit were actually enabled on a newly created XRSession (note that this will really only be useful for optionalFeatures, since a session that cannot serve all requiredFeatures would be rejected). Most features have some way for developers to detect if they were granted; however, for some features the signal of whether or not a feature was enabled may tie closely with data for a feature just not being available "right now", rather than data not being available "ever". By querying enabledFeatures, a developer can determine if any helpful hints (e.g. to improve/start tracking) should be shown, or if a feature will never be supported in the current session. It is also possible that future WebXR features may not have other signals to detect whether or not they were enabled.



Blink component

Blink>WebXR

TAG review

https://github.com/w3ctag/design-reviews/issues/782

TAG review status

Issues addressed

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Can you ask for signals for both? https://bit.ly/blink-signals
 

Web developers: No signals

Should we expect web developers to adopt this?
 

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Link to the relevant WPTs?
 


Flag name



Requires code in //chrome?

False

Tracking bug

https://crbug.com/1377430

Launch bug

https://launch.corp.google.com/launch/4225596

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).


Any open issues?
 


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5082665189900288

This intent message was generated by Chrome Platform Status.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGOLbz056atoRuWVtMncotiDixvRM2TQKDicCreLJqK3v8rcnA%40mail.gmail.com.

slightlyoff via Chromestatus

unread,
Dec 14, 2022, 11:47:13 AM12/14/22
to blin...@chromium.org
LGTM1

Alex Cooper

unread,
Dec 14, 2022, 12:00:40 PM12/14/22
to Yoav Weiss, blink-dev
I should clarify further that this is a tiny attribute addition to an existing spec. There are no Open Issues for it, and I didn't feel an explainer addition to the spec was worth it. The "features" are a core concept of the WebXR spec.

We've previously asked for signals for the overall spec, if it's acceptable to use those, as again, this is a minor addition to that spec.

The WPTs will be checked-in alongside the feature. The (pending) CL for it is here, since I intend to just land it as enabled and I needed to finish this process first.

Alex Cooper

unread,
Dec 15, 2022, 2:26:34 PM12/15/22
to Yoav Weiss, blink-dev
I've submitted a PR for a small modification to the explainer to show the usage: https://github.com/immersive-web/webxr/pull/1306.

Let me know if you think I should still request signals from other organizations and if you need something further regarding the tests.

Rick Byers

unread,
Dec 16, 2022, 3:37:22 PM12/16/22
to Alex Cooper, Yoav Weiss, blink-dev
Thanks for the explainer update to show an example. 

I agree this is a pretty trivial update to an existing spec. I skimmed through other Mozilla standards positions entries on WebXR and agree it seems unlikely that they (or WebKit) would see any value in calling out this little piece independently (though other API OWNERS may disagree).

LGTM1

Mike Taylor

unread,
Dec 16, 2022, 3:41:49 PM12/16/22
to Rick Byers, Alex Cooper, Yoav Weiss, blink-dev
LGTM3 (Rick may have missed Alex's LGTM1 here).

Rick Byers

unread,
Dec 16, 2022, 3:48:42 PM12/16/22
to Mike Taylor, Alex Cooper, Yoav Weiss, blink-dev
Whoops yes sorry, just saw that. LGTM2
Reply all
Reply to author
Forward
0 new messages