Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request(?): Ability to run the browser support tests explicitly #170

Open
pudgeball opened this issue Aug 8, 2019 · 4 comments
Open
Labels

Comments

@pudgeball
Copy link

Hey there! 👋

I was wondering if it was possible to expose a way to run the browser support tests explicitly. I have things that trigger off the change of focus and ran down a bug today that was happening because of the browser support tests changing the focus.

I'd love some way to manually and explicitly run the support suite so it can build the localStorage item, and anywhere we use Ally functions they can use that cached version.

Thanks!

@rodneyrehm
Copy link
Member

Hey there!

Browser support is evaluated here this function is called internally by any function that requires the supports data. So the tests are executed and cached (in localStorage) by the first ally method you use on an origin.

To kick off the tests manually you could do something like ally.element.disabled(document.body) at a time that suits you (before any other ally method is used).

@pudgeball
Copy link
Author

That's pretty well what I did, I just wanted to make it more explicit in some way. So it was clear why I was running an ally function at app start-up. At the moment it's just wrapped in a runAllySupportTests function wrapper to try and make it clear.

@rodneyrehm
Copy link
Member

ok, so, basically you'd like to expose src/supports/supports (maybe as initialize()) via src/ally to make things more explicit.

@pudgeball
Copy link
Author

That would be ideal I think, just so it's clear what's going on. That and I'm calling a function to throw away the result right now which works but just seems silly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants