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

Deferred testing / on-demand feature tests #589

Closed
paulirish opened this issue May 15, 2012 · 1 comment
Closed

Deferred testing / on-demand feature tests #589

paulirish opened this issue May 15, 2012 · 1 comment

Comments

@paulirish
Copy link
Member

has.js makes you run a method when you want to test a feature. I believe this is for two reasons

  1. feature tests can have a runtime cost. it's small, but it exists.
  2. there are some tests that must be async (data URIs for example)

In another ticket we're talking about a pub/sub events setup for async events. But I wanted to focus on runtime cost.

What about using getters via Object.defineProperty to defer the initial run of the feature tests......

...

Oh i just realized this doesn't work at all for anything that you'd want a css-class for.

(Again, has.js has you opt-in to a css-class, which tackles that situation)

Well..

Discuss?

cc @pamelafox

@paulirish
Copy link
Member Author

closing in honor of related tickets #589 and #622

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

No branches or pull requests

1 participant