KEMBAR78
getViewport with an invalid view throws an error by toji · Pull Request #771 · immersive-web/webxr · GitHub
Skip to content

Conversation

toji
Copy link
Member

@toji toji commented Jul 19, 2019

/fixes #769 (sort of).

The previous logic to return null in situations where the passed view
was from a different session was not consistent with the error behavior
elsewhere. As a specific example, passing spaces from one session to an
XRFrame from a different session throws an InvalidStateError. As such,
throwing the same error here for the same type of validation makes the
spec more internally consistent.

/fixes #769 (sort of).

The previous logic to return `null` in situations where the passed view
was from a different session was not consistent with the error behavior
elsewhere. As a specific example, passing spaces from one session to an
XRFrame from a different session throws an `InvalidStateError`. As such,
throwing the same error here for the same type of validation makes the
spec more internally consistent.
@toji toji merged commit 6be299a into master Jul 19, 2019
@toji toji deleted the viewport-error branch July 19, 2019 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should getViewport return null if there is no matching viewport?

2 participants