This is a vote to create a new dojo/sniff.js module. The intention is
that for the 2.0 release (but not before that) we'll drop
dojo/_base/sniff.js, but dojo/sniff.js will carry over.

dojo/_base/sniff.js will maintain the same API as before. dojo/sniff.js
will be a similar API, but it won't defined constants like dojo.isIE,
instead just defining the has() flags, ex has("ie").

Rationale: while we recognize the merits of feature detection and bug
detection, we think that for 2.0 (1) some customers will still want this
module to use in their own code AND/OR (2) we will want/need to use it in
some parts of our code, such as dijit.Editor and dojo/uacss (the module to
set classes on <html> such as dj_ie8).

Voting +1 means:
(1) you want dojo/sniff.js to be created for 1.8.
(2) It does *not* mean that you are against feature detection or
against converting more of the dojo code to use feature detection.

Voting -1 could mean that:
(1) you don't want the dojo/sniff module to return has, for usage like
require(["dojo/sniff"], function(has){ if(has("ie") ..
(2) you want the has() tests to return boolean values, so instead of
has("ie") == 6 you want has("ie6") == true
(3) against having the module altogether (although that would leave the
question of dojo/uacss)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/05d8801c/attachment-0001.htm

Search Discussions

  • Tom Trenka at Jan 11, 2012 at 11:48 pm
    +1, with one caveat: based on what I'm seeing in the current
    dojo/_base/sniff, I would like to see that module return an object instead
    of simply attaching the is[X] to dojo. So continue to add the has tests,
    but instead of the way it does it now (lines 170-182), follow the pattern
    established by the dojo/dom-[module] and return an object.

    -- Tom

    2012/1/11 Bill Keese <bill at dojotoolkit.org>
    This is a vote to create a new dojo/sniff.js module. The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before. dojo/sniff.js
    will be a similar API, but it won't defined constants like dojo.isIE,
    instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 (1) some customers will still want this
    module to use in their own code AND/OR (2) we will want/need to use it in
    some parts of our code, such as dijit.Editor and dojo/uacss (the module to
    set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage like
    require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave
    the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120111/cc84b153/attachment.htm
  • Kenneth G. Franqueiro at Jan 11, 2012 at 11:57 pm
    I'm also +1, but let me attempt to clarify based on Tom's response...

    If I understand correctly, the dojo.is* properties will still need to be
    exposed at least in legacy mode for Dojo 1.x. I presume that would
    still stay in _base somewhere?

    Regarding return value of the new module, I'm kind of ambivalent. I
    always felt weird with sniff returning has, but on the other hand,
    returning a straight-up object with properties and encouraging its use
    that way removes the possibility of predefining UA-related has features
    for a build and removing dead code.

    --Ken
    On 1/11/2012 11:48 PM, Tom Trenka wrote:
    +1, with one caveat: based on what I'm seeing in the current
    dojo/_base/sniff, I would like to see that module return an object
    instead of simply attaching the is[X] to dojo. So continue to add the
    has tests, but instead of the way it does it now (lines 170-182), follow
    the pattern established by the dojo/dom-[module] and return an object.

    -- Tom

    2012/1/11 Bill Keese <bill at dojotoolkit.org <mailto:bill at dojotoolkit.org>>

    This is a vote to create a new dojo/sniff.js module. The intention
    is that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants
    like dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and
    bug detection, we think that for 2.0 (1) some customers will still
    want this module to use in their own code AND/OR (2) we will
    want/need to use it in some parts of our code, such as dijit.Editor
    and dojo/uacss (the module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for
    usage like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so
    instead of has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would
    leave the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors




    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Tom Trenka at Jan 12, 2012 at 12:02 am
    To clarify as well, I'm not thinking that the has test definitions need to
    be removed; just thinking that simply returning has is not the best thing
    to do. That way we can get our baseless "cake" and eat it too.

    Maybe tomorrow I'll whip up what I'm thinking and post it somewhere.

    Tom
    On Wed, Jan 11, 2012 at 10:57 PM, Kenneth G. Franqueiro wrote:

    I'm also +1, but let me attempt to clarify based on Tom's response...

    If I understand correctly, the dojo.is* properties will still need to be
    exposed at least in legacy mode for Dojo 1.x. I presume that would
    still stay in _base somewhere?

    Regarding return value of the new module, I'm kind of ambivalent. I
    always felt weird with sniff returning has, but on the other hand,
    returning a straight-up object with properties and encouraging its use
    that way removes the possibility of predefining UA-related has features
    for a build and removing dead code.

    --Ken
    On 1/11/2012 11:48 PM, Tom Trenka wrote:
    +1, with one caveat: based on what I'm seeing in the current
    dojo/_base/sniff, I would like to see that module return an object
    instead of simply attaching the is[X] to dojo. So continue to add the
    has tests, but instead of the way it does it now (lines 170-182), follow
    the pattern established by the dojo/dom-[module] and return an object.

    -- Tom

    2012/1/11 Bill Keese <bill at dojotoolkit.org <mailto:bill at dojotoolkit.org
    This is a vote to create a new dojo/sniff.js module. The intention
    is that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants
    like dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and
    bug detection, we think that for 2.0 (1) some customers will still
    want this module to use in their own code AND/OR (2) we will
    want/need to use it in some parts of our code, such as dijit.Editor
    and dojo/uacss (the module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for
    usage like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so
    instead of has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would
    leave the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors




    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120111/52544cc9/attachment.htm
  • Bill Keese at Jan 12, 2012 at 1:11 am
    To give an example, the code below would *not* work w.r.t. dead-code
    removal for a browser specific build:

    require(["dojo/sniff"], function(sniff){
    if(sniff.ie <= 7){ ... }
    });

    That's the danger of supporting such a return value from dojo/sniff, and
    that's why the current dojo/_base/sniff module returns has() instead. In
    other words, the code below *does* work for dead code removal for a browser
    specific build:

    require(["dojo/sniff"], function(has){
    if(has("ie") <= 7){ ... }
    });

    2012/1/12 Tom Trenka <ttrenka at gmail.com>
    To clarify as well, I'm not thinking that the has test definitions need to
    be removed; just thinking that simply returning has is not the best thing
    to do. That way we can get our baseless "cake" and eat it too.

    Maybe tomorrow I'll whip up what I'm thinking and post it somewhere.

    Tom


    On Wed, Jan 11, 2012 at 10:57 PM, Kenneth G. Franqueiro <
    kgf at dojotoolkit.org> wrote:
    I'm also +1, but let me attempt to clarify based on Tom's response...

    If I understand correctly, the dojo.is* properties will still need to be
    exposed at least in legacy mode for Dojo 1.x. I presume that would
    still stay in _base somewhere?

    Regarding return value of the new module, I'm kind of ambivalent. I
    always felt weird with sniff returning has, but on the other hand,
    returning a straight-up object with properties and encouraging its use
    that way removes the possibility of predefining UA-related has features
    for a build and removing dead code.

    --Ken
    On 1/11/2012 11:48 PM, Tom Trenka wrote:
    +1, with one caveat: based on what I'm seeing in the current
    dojo/_base/sniff, I would like to see that module return an object
    instead of simply attaching the is[X] to dojo. So continue to add the
    has tests, but instead of the way it does it now (lines 170-182), follow
    the pattern established by the dojo/dom-[module] and return an object.

    -- Tom

    2012/1/11 Bill Keese <bill at dojotoolkit.org <mailto:bill at dojotoolkit.org
    This is a vote to create a new dojo/sniff.js module. The intention
    is that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants
    like dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and
    bug detection, we think that for 2.0 (1) some customers will still
    want this module to use in their own code AND/OR (2) we will
    want/need to use it in some parts of our code, such as dijit.Editor
    and dojo/uacss (the module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for
    usage like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so
    instead of has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would
    leave the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors




    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/e2ece7cb/attachment-0001.htm
  • Chris Mitchell at Jan 12, 2012 at 8:03 am
    +1

    -chris
    On Jan 12, 2012, at 1:11 AM, Bill Keese wrote:

    To give an example, the code below would *not* work w.r.t. dead-code removal for a browser specific build:

    require(["dojo/sniff"], function(sniff){
    if(sniff.ie <= 7){ ... }
    });

    That's the danger of supporting such a return value from dojo/sniff, and that's why the current dojo/_base/sniff module returns has() instead. In other words, the code below *does* work for dead code removal for a browser specific build:

    require(["dojo/sniff"], function(has){
    if(has("ie") <= 7){ ... }
    });

    2012/1/12 Tom Trenka <ttrenka at gmail.com>
    To clarify as well, I'm not thinking that the has test definitions need to be removed; just thinking that simply returning has is not the best thing to do. That way we can get our baseless "cake" and eat it too.

    Maybe tomorrow I'll whip up what I'm thinking and post it somewhere.

    Tom


    On Wed, Jan 11, 2012 at 10:57 PM, Kenneth G. Franqueiro wrote:
    I'm also +1, but let me attempt to clarify based on Tom's response...

    If I understand correctly, the dojo.is* properties will still need to be
    exposed at least in legacy mode for Dojo 1.x. I presume that would
    still stay in _base somewhere?

    Regarding return value of the new module, I'm kind of ambivalent. I
    always felt weird with sniff returning has, but on the other hand,
    returning a straight-up object with properties and encouraging its use
    that way removes the possibility of predefining UA-related has features
    for a build and removing dead code.

    --Ken
    On 1/11/2012 11:48 PM, Tom Trenka wrote:
    +1, with one caveat: based on what I'm seeing in the current
    dojo/_base/sniff, I would like to see that module return an object
    instead of simply attaching the is[X] to dojo. So continue to add the
    has tests, but instead of the way it does it now (lines 170-182), follow
    the pattern established by the dojo/dom-[module] and return an object.

    -- Tom

    2012/1/11 Bill Keese <bill at dojotoolkit.org <mailto:bill at dojotoolkit.org>>

    This is a vote to create a new dojo/sniff.js module. The intention
    is that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants
    like dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and
    bug detection, we think that for 2.0 (1) some customers will still
    want this module to use in their own code AND/OR (2) we will
    want/need to use it in some parts of our code, such as dijit.Editor
    and dojo/uacss (the module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for
    usage like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so
    instead of has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would
    leave the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors




    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/aa1f2350/attachment-0001.htm
  • Dylan Schiemann at Jan 12, 2012 at 8:05 am
    +1

    on 1/12/12 6:03 AM (GMT-07:00) Chris Mitchell said the following:
    +1

    -chris

    On Jan 12, 2012, at 1:11 AM, Bill Keese <bill at dojotoolkit.org
    wrote:
    To give an example, the code below would *not* work w.r.t.
    dead-code removal for a browser specific build:

    require(["dojo/sniff"], function(sniff){ if(sniff.ie
    <http://sniff.ie> <= 7){ ... } });

    That's the danger of supporting such a return value from
    dojo/sniff, and that's why the current dojo/_base/sniff module
    returns has() instead. In other words, the code below *does* work
    for dead code removal for a browser specific build:

    require(["dojo/sniff"], function(has){ if(has("ie") <= 7){ ... }
    });

    2012/1/12 Tom Trenka <ttrenka at gmail.com
    <mailto:ttrenka at gmail.com>>

    To clarify as well, I'm not thinking that the has test definitions
    need to be removed; just thinking that simply returning has is not
    the best thing to do. That way we can get our baseless "cake" and
    eat it too.

    Maybe tomorrow I'll whip up what I'm thinking and post it
    somewhere.

    Tom


    On Wed, Jan 11, 2012 at 10:57 PM, Kenneth G. Franqueiro
    <kgf at dojotoolkit.org wrote:

    I'm also +1, but let me attempt to clarify based on Tom's
    response...

    If I understand correctly, the dojo.is <http://dojo.is>* properties
    will still need to be exposed at least in legacy mode for Dojo 1.x.
    I presume that would still stay in _base somewhere?

    Regarding return value of the new module, I'm kind of ambivalent.
    I always felt weird with sniff returning has, but on the other
    hand, returning a straight-up object with properties and
    encouraging its use that way removes the possibility of predefining
    UA-related has features for a build and removing dead code.

    --Ken
    On 1/11/2012 11:48 PM, Tom Trenka wrote:
    +1, with one caveat: based on what I'm seeing in the current
    dojo/_base/sniff, I would like to see that module return an object
    instead of simply attaching the is[X] to dojo. So continue
    to add the
    has tests, but instead of the way it does it now (lines
    170-182), follow
    the pattern established by the dojo/dom-[module] and return
    an object.
    -- Tom

    2012/1/11 Bill Keese <bill at dojotoolkit.org
    <mailto:bill at dojotoolkit.org> <mailto:bill at dojotoolkit.org
    <mailto:bill at dojotoolkit.org>>>
    This is a vote to create a new dojo/sniff.js module.
    The intention
    is that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't
    defined constants
    like dojo.isIE, instead just defining the has() flags,
    ex has("ie").
    Rationale: while we recognize the merits of feature
    detection and
    bug detection, we think that for 2.0 (1) some customers
    will still
    want this module to use in their own code AND/OR (2) we will
    want/need to use it in some parts of our code, such as
    dijit.Editor
    and dojo/uacss (the module to set classes on <html> such
    as dj_ie8).
    Voting +1 means: (1) you want dojo/sniff.js to be created for
    1.8. (2) It does *not* mean that you are against feature
    detection or
    against converting more of the dojo code to use feature
    detection.
    Voting -1 could mean that: (1) you don't want the dojo/sniff
    module to return has, for
    usage like require(["dojo/sniff"], function(has){
    if(has("ie") ..
    (2) you want the has() tests to return boolean
    values, so
    instead of has("ie") == 6 you want has("ie6") == true (3) against
    having the module altogether (although
    that would
    leave the question of dojo/uacss)


    _______________________________________________ dojo-contributors
    mailing list dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    <mailto:dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>>

    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



    _______________________________________________ dojo-contributors
    mailing list dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________ dojo-contributors
    mailing list dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



    _______________________________________________ dojo-contributors
    mailing list dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors


    _______________________________________________ dojo-contributors
    mailing list dojo-contributors at mail.dojotoolkit.org
    <mailto:dojo-contributors at mail.dojotoolkit.org>
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________ dojo-contributors
    mailing list dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Rawld at Jan 12, 2012 at 1:15 am
    +1
    On 01/11/2012 08:25 PM, Bill Keese wrote:
    This is a vote to create a new dojo/sniff.js module. The intention
    is that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants
    like dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 (1) some customers will still want
    this module to use in their own code AND/OR (2) we will want/need to
    use it in some parts of our code, such as dijit.Editor and dojo/uacss
    (the module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage
    like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead
    of has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would
    leave the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120111/f0eac769/attachment.htm
  • Christophe Jolif at Jan 12, 2012 at 1:40 am
    +1

    Christophe
    Le 12 janv. 2012 ? 05:25, Bill Keese <bill at dojotoolkit.org> a ?crit :

    This is a vote to create a new dojo/sniff.js module. The intention is that for the 2.0 release (but not before that) we'll drop dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before. dojo/sniff.js will be a similar API, but it won't defined constants like dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug detection, we think that for 2.0 (1) some customers will still want this module to use in their own code AND/OR (2) we will want/need to use it in some parts of our code, such as dijit.Editor and dojo/uacss (the module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave the question of dojo/uacss)

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/7e4f7949/attachment.htm
  • Revin Guillen at Jan 12, 2012 at 1:45 am
    +1

    On Jan 11, 2012, at 8:25 PM, Bill Keese wrote:

    This is a vote to create a new dojo/sniff.js module. The intention is that for the 2.0 release (but not before that) we'll drop dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before. dojo/sniff.js will be a similar API, but it won't defined constants like dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug detection, we think that for 2.0 (1) some customers will still want this module to use in their own code AND/OR (2) we will want/need to use it in some parts of our code, such as dijit.Editor and dojo/uacss (the module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave the question of dojo/uacss)

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120111/9e2b3411/attachment.htm
  • Patrick Ruzand at Jan 12, 2012 at 1:51 am
    +1
    Patrick
    ------------------------------
    De : Bill Keese
    Envoy? : 12/01/2012 05:25
    ? : dojo dev.
    Objet : [dojo-contributors] (little) vote to create dojo/sniff.js

    This is a vote to create a new dojo/sniff.js module. The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before. dojo/sniff.js
    will be a similar API, but it won't defined constants like dojo.isIE,
    instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 (1) some customers will still want this
    module to use in their own code AND/OR (2) we will want/need to use it in
    some parts of our code, such as dijit.Editor and dojo/uacss (the module to
    set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage like
    require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave the
    question of dojo/uacss)
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120111/6f79be61/attachment.htm
  • Douglas Hays at Jan 12, 2012 at 8:21 am
    +1

    - Doug Hays



    From: Bill Keese <bill at dojotoolkit.org>

    To: "dojo dev." <dojo-contributors at mail.dojotoolkit.org>

    Date: 01/11/2012 11:25 PM

    Subject: [dojo-contributors] (little) vote to create dojo/sniff.js

    Sent by: dojo-contributors-bounces at mail.dojotoolkit.org






    This is a vote to create a new dojo/sniff.js module. ? The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before. ? dojo/sniff.js
    will be a similar API, but it won't defined constants like dojo.isIE,
    instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 ?(1) some customers will still want this
    module to use in their own code AND/OR (2) we will want/need to use it in
    some parts of our code, such as dijit.Editor and dojo/uacss (the module to
    set classes on <html> such as dj_ie8).

    Voting +1 means:
    ? ? (1)?you want dojo/sniff.js to be created for 1.8.
    ? ? (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    ? ? (1) you don't want the dojo/sniff module to return has, for usage like
    require(["dojo/sniff"], function(has){ ?if(has("ie") ..
    ? ? (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    ? ? (3) against having the module altogether (although that would leave the
    question of dojo/uacss)
    ?_______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Bryan Forbes at Jan 12, 2012 at 10:14 am
    +1

    Thanks for the clarifications. I especially liked the "a +1 does not
    mean you hate feature detection". Thanks for proposing this!

    Bill Keese wrote:
    This is a vote to create a new dojo/sniff.js module. The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants like
    dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 (1) some customers will still want
    this module to use in their own code AND/OR (2) we will want/need to use
    it in some parts of our code, such as dijit.Editor and dojo/uacss (the
    module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage
    like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave
    the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D

    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: signature.asc
    Type: application/pgp-signature
    Size: 195 bytes
    Desc: OpenPGP digital signature
    Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/9e8c12d0/attachment.sig
  • Dustin Machi at Jan 12, 2012 at 10:26 am
    +1
    On Jan 12, 2012, at 10:14 AM, Bryan Forbes wrote:

    +1

    Thanks for the clarifications. I especially liked the "a +1 does not
    mean you hate feature detection". Thanks for proposing this!

    Bill Keese wrote:
    This is a vote to create a new dojo/sniff.js module. The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants like
    dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 (1) some customers will still want
    this module to use in their own code AND/OR (2) we will want/need to use
    it in some parts of our code, such as dijit.Editor and dojo/uacss (the
    module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage
    like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave
    the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Jared Jurkiewicz at Jan 12, 2012 at 10:28 am
    +1


    2012/1/12 Bryan Forbes <bryan at reigndropsfall.net>:
    +1

    Thanks for the clarifications. I especially liked the "a +1 does not
    mean you hate feature detection". Thanks for proposing this!

    Bill Keese wrote:
    This is a vote to create a new dojo/sniff.js module. ? The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants like
    dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 ?(1) some customers will still want
    this module to use in their own code AND/OR (2) we will want/need to use
    it in some parts of our code, such as dijit.Editor and dojo/uacss (the
    module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    ? ? (1) you want dojo/sniff.js to be created for 1.8.
    ? ? (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    ? ? (1) you don't want the dojo/sniff module to return has, for usage
    like require(["dojo/sniff"], function(has){ ?if(has("ie") ..
    ? ? (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    ? ? (3) against having the module altogether (although that would leave
    the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 ?5B61 3888 17E0 70CA 0F3D


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Tom Trenka at Jan 12, 2012 at 11:11 am
    Quick gist as an example of what I was thinking:
    https://gist.github.com/1601352 (I have no idea if it works, this is really
    just quick and dirty to give everyone an idea of what I meant).

    Cheers--
    Tom
    On Thu, Jan 12, 2012 at 9:28 AM, Jared Jurkiewicz wrote:

    +1


    2012/1/12 Bryan Forbes <bryan at reigndropsfall.net>:
    +1

    Thanks for the clarifications. I especially liked the "a +1 does not
    mean you hate feature detection". Thanks for proposing this!

    Bill Keese wrote:
    This is a vote to create a new dojo/sniff.js module. The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before.
    dojo/sniff.js will be a similar API, but it won't defined constants like
    dojo.isIE, instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 (1) some customers will still want
    this module to use in their own code AND/OR (2) we will want/need to use
    it in some parts of our code, such as dijit.Editor and dojo/uacss (the
    module to set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage
    like require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave
    the question of dojo/uacss)


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D


    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/699fa50c/attachment.htm
  • Bryan Forbes at Jan 12, 2012 at 11:16 am

    Tom Trenka wrote:
    Quick gist as an example of what I was thinking:
    https://gist.github.com/1601352 (I have no idea if it works, this is
    really just quick and dirty to give everyone an idea of what I meant).

    Cheers--
    Tom
    The problem I have with this approach is that you're requiring the user
    to explicitly require `dojo/sniff` to use the `has` mechanism:

    define(['dojo/has', 'dojo/sniff'], function(has){ });

    Returning `has` from `dojo/sniff` gives the user the power to only
    require one module (explicitly), thus reducing valuable bytes:

    define(['dojo/sniff'], function(has){ });

    Just my 2 cents :).

    --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D

    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: signature.asc
    Type: application/pgp-signature
    Size: 195 bytes
    Desc: OpenPGP digital signature
    Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/d3b34301/attachment.sig
  • Revin Guillen at Jan 12, 2012 at 11:20 am
    What if the return value of dojo/sniff included 'has' as a property? It's kinda funny looking, but it'd solve the One Dependency Problem.

    define(['dojo/sniff'], function(sniff){ var has = sniff.has; });


    -Revin

    On Jan 12, 2012, at Jan 12 | 8:16 AM, Bryan Forbes wrote:

    Tom Trenka wrote:
    Quick gist as an example of what I was thinking:
    https://gist.github.com/1601352 (I have no idea if it works, this is
    really just quick and dirty to give everyone an idea of what I meant).

    Cheers--
    Tom
    The problem I have with this approach is that you're requiring the user
    to explicitly require `dojo/sniff` to use the `has` mechanism:

    define(['dojo/has', 'dojo/sniff'], function(has){ });

    Returning `has` from `dojo/sniff` gives the user the power to only
    require one module (explicitly), thus reducing valuable bytes:

    define(['dojo/sniff'], function(has){ });

    Just my 2 cents :).

    --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Tom Trenka at Jan 12, 2012 at 11:52 am
    2012/1/12 Bryan Forbes <bryan at reigndropsfall.net>
    The problem I have with this approach is that you're requiring the user
    to explicitly require `dojo/sniff` to use the `has` mechanism:

    define(['dojo/has', 'dojo/sniff'], function(has){ });

    Returning `has` from `dojo/sniff` gives the user the power to only
    require one module (explicitly), thus reducing valuable bytes:

    define(['dojo/sniff'], function(has){ });

    Just my 2 cents :).

    Given what sniff does, I don't really see a problem with someone having to
    include dojo/has explicitly, although I'd probably write your example
    differently:

    define(['dojo/has', 'dojo/sniff'], function(has, is){
    if(is.IE < 8)...
    });

    Mainly because if you're looking for info directly out of sniff, you'd be
    using the object returned from that module. We'd also have to make it
    explicit (in docs probably) that if you want the build tools to remove dead
    code paths, they have to use has.

    Cheers--
    Tom
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120112/80bced74/attachment.htm
  • Bill Keese at Jan 12, 2012 at 10:30 pm
    OK, I'm going to check this in, everyone was +1, except for one objection
    on the return value.
    On Thu, Jan 12, 2012 at 1:25 PM, Bill Keese wrote:

    This is a vote to create a new dojo/sniff.js module. The intention is
    that for the 2.0 release (but not before that) we'll drop
    dojo/_base/sniff.js, but dojo/sniff.js will carry over.

    dojo/_base/sniff.js will maintain the same API as before. dojo/sniff.js
    will be a similar API, but it won't defined constants like dojo.isIE,
    instead just defining the has() flags, ex has("ie").

    Rationale: while we recognize the merits of feature detection and bug
    detection, we think that for 2.0 (1) some customers will still want this
    module to use in their own code AND/OR (2) we will want/need to use it in
    some parts of our code, such as dijit.Editor and dojo/uacss (the module to
    set classes on <html> such as dj_ie8).

    Voting +1 means:
    (1) you want dojo/sniff.js to be created for 1.8.
    (2) It does *not* mean that you are against feature detection or
    against converting more of the dojo code to use feature detection.

    Voting -1 could mean that:
    (1) you don't want the dojo/sniff module to return has, for usage like
    require(["dojo/sniff"], function(has){ if(has("ie") ..
    (2) you want the has() tests to return boolean values, so instead of
    has("ie") == 6 you want has("ie6") == true
    (3) against having the module altogether (although that would leave
    the question of dojo/uacss)
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20120113/88a1ee83/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedJan 11, '12 at 11:25p
activeJan 12, '12 at 10:30p
posts20
users13
websitedojotoolkit.org

People

Translate

site design / logo © 2021 Grokbase