Deferred testing / on-demand feature tests #589

paulirish opened this Issue May 15, 2012 · 1 comment


None yet
1 participant

paulirish commented May 15, 2012

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)



cc @pamelafox


paulirish commented Jul 19, 2012

closing in honor of related tickets #589 and #622

@paulirish paulirish closed this Jul 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment