# `Session.supports`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Method of [`Session`](Session.md) · inherited by [`testing.FakeSession`](testing.FakeSession.md) · stable · since 2.0.0 · called as `session.supports`

```ts
supports(capability: Capability): boolean;
```

Whether this runtime implements a capability. Sync. Unknown ids answer false; an id not in
this runtime's [`KnownCapability`](KnownCapability.md) (a 1.4 id such as 'idle', or one a later contract added) also
records 'unknown-capability', once per id per session, with `didYouMean`. For an experimental
method, use [`has(session, id)`](has.md) instead: it also narrows the type.

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `supports` names no product |
| 2. A precedent | pass: [Google Scene Viewer intent (title, resizable)](https://developers.google.com/ar/develop/scene-viewer) (row `G60`); [Babylon.js PBRMaterial.environmentIntensity](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Materials/PBR/pbrMaterial.ts) (row `G65`); [model-viewer canActivateAR and activateAR()](https://modelviewer.dev/docs/index.html#entrydocs-augmentedreality-methods-activateAR) (row `G66`); [XRSession.end()](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/end) (row `G66`); [Navigator.share() (resolves when the share UI closes)](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share) (row `G66`) |
| 3. Two apps, or labs | pass: 22 apps (ledger: app-0c773a4ee3, app-4f16d2f6da, app-59c5b5751e, app-b362a81c85, app-ceb4eccc72, app-fc07850558, configurator-template, tryon-template; fleet cross-check: app-37356bf09f, app-4f16d2f6da, app-4fd23bc869, app-822bb9d6aa, app-8675b3225c, app-bcb7ef21da, app-c1384707fc, app-ceb4eccc72 and 9 more) |
| 4. The cheaper fix first | decided per need in Appendix B: rows `G60`, `G65`, `G66` at tier labs, stable (a member only where no rule, data, asset or app code serves the need) |
