aframe-href-component
aframe-href-component copied to clipboard
Hash logic perpaps too prescriptive
I may want to change the hash of the page for reasons unrelated to A-Frame entities (e.g., a URL for #siteInfo
).
IMO, the logic should be simplified to check if URL starts with a #
, and then set window.location.hash
. Otherwise, window.location.href
.
Also, if you're going to support jumping to A-Frame entities based on their id
s, perhaps add separate logic (IMO a separate component) that actually uses a hashchange
listener.
got your point @cvan . I think for general web developer its still a nature behavior to expect how anchor works with href
attribute though.
I'd like to have the separate logic in the target
component, that
- implement HTML
target="window"
andtarget="_blank"
.
By extend it, user can add
-
target="hash"
to only change the hash of the page -
target="camera (not determined)"
to specify the camera angle and the distance, -
target="(not determined)"
to listen tohashchange
and specify the transition animation.
Does it make sense to you?
basic target attribute support is commited in e485254