Rename `Fuse.Browser` to `Fuse.Env`
Reported by Kit Goncharov | 2009-07-13 11:47:18 UTC
Fuse.Browser.Bug(...) =>
Fuse.Env.hasBug(...)
Fuse.Browser.Feature(...) =>
Fuse.Env.hasFeature(...)
Comments and changes to this ticket
-

Kit Goncharov 2009-08-02 11:34:31 UTC
- Assigned user changed from John-David Dalton to Kit Goncharov
- State changed from new to open
- Tag set to browser, env
-

-

John-David Dalton 2009-08-14 07:40:56 UTC
A note on changing
Fuse.Env.Feature(...)toFuse.Env.hasFeature(..).Currently there is a
Fuse.Env.Feature.set(...)andFuse.Env.Feature.unset(...)would changing to
hasFeatureandhasBugmake setting new checks seem awkward?Fuse.Env.hasFeature.set({...}); -

Kit Goncharov 2009-08-14 11:06:59 UTC
Yep, that definitely would.
A possible alternative might be to have two arguments for setting
features/bugs and one argument for getting them:Fuse.Env.hasFeature('ELEMENT_PROPERTIES_ARE_ATTRIBUTES') //=> true (if IE) Fuse.Env.hasFeature('IE_IS_A_BUGGY_BROWSER', function(){ return true; }); //Returns the setter functionOr maybe even
Fuse.Env.addFeatureandaddBug... -

John-David Dalton 2009-08-14 11:16:52 UTC
Currently
Fuse.Env.hasFeature('SOME_FEATURE', 'ANOTHER_FEATURE')will return true only if both features are true.
This may be confusing so I will probably drop this usage. -

Juriy Zaytsev 2009-08-14 11:30:46 UTC
I'd rather have a way to test multiple features. It's actually pretty useful. What is setting/unsetting used for?
-

-

John-David Dalton 2009-08-14 13:06:06 UTC
maybe
Fuse.Env.addFeatureTest(...)too verbose... I dig how shortaddFeatureis but the name is misleading cause its adding check not extending the feature-set of the environment. -

Juriy Zaytsev 2009-08-14 13:21:09 UTC
I think set/unset seem like weird names for adding/removing user-defined feature tests. They sound more like toggling something on and off. I also think that
hasFeature.set(method on method) and overloadedhasFeatureare awkward.I would rather go with:
Fuse.Env.hasFeature(testName1[, testName2[, ...]]); Fuse.Env.addFeatureTest(testName, testBody);The downside is that
hasFeature('foo', 'bar')looks a bit awkward but I don't think it's worth adding something likehasFeaturesfor multiple tests support (or maybehasFeaturecan be renamed tohasFeatures) -

John-David Dalton 2009-08-14 13:41:33 UTC
I agree and think allowing more than 1 on a singular name is fine.
currently the
addFeatureTestequive allows only passing an object, but we can make that optional,
1 argument -> object; 2 -> name and test -

Phred 2009-08-14 14:21:37 UTC
Doesn't passing one object do the same (but better) of N parameters?
.addFeatureTest({ name: 'foo' ,test: fn ,other: 'we can add and deprecate values here freely' ,unlike: 'when adding/removing additional passed in args' }) -

John-David Dalton 2009-08-14 14:34:50 UTC
@phred I was talking about just
Fuse.Env.hasFeature(testName1[, testName2[, ...]]);.Which would basically be the quiv of
hasFeature(testName1) && hasFeature(testName2) && hasFeature(textName3)Ya I would say for
addFeatureTestaFuse.Env.addFeatureTest(object)andFuse.Env.addFeatureTest(name, test)is fine, no need to allow n number of arguments for that. -

Joe Gornick 2009-09-30 22:31:09 UTC
- Assigned user changed from Kit Goncharov to Joe Gornick
-

Joe Gornick 2009-10-06 23:52:03 UTC
- State changed from open to patched
- Assigned user changed from Joe Gornick to John-David Dalton
Here's my commit: https://github.com/jgornick/fusejs/commit/d1449265157cc463710c76e52...
-

John-David Dalton 2010-01-27 10:37:00 UTC
- State changed from patched to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
JavaScript frameworks share similar features and functionality such as DOM manipulation, event registration, and CSS selector engines. FuseJS attempts to incorporate the strengths of these frameworks into one stable, efficient, and optimized core JavaScript framework.