DOM dynamically built table and addEventListener....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thomas 'PointedEars' Lahn

    #16
    Re: DOM dynamically built table and addEventListene r....

    VK wrote:
    On Jun 3, 4:52 pm, Jorge <jo...@jorgecha morro.comwrote:
    >>>I hope that "implement in any manner" doesn't mean that a get method
    >>>might not fetch a property's value, nor that a put method might not store
    >>>it...
    >>But that is exactly what it means.
    >>BTW, I found this article that you were interested in:
    >><news:483F3F7 9.8080605@Point edEars.de>.
    >>There's at least one other: <news:4836A152. 2090609@Pointed Ears.de>
    >Still, I can't figure out why, if this is so crude, I have never had a
    >problem with it.
    >Might it be because I never program for nor test in IEs ?
    >If the property can be set and can be read, why isn't it safe to go on
    >with it ?
    >
    I would disregard whatever Thomas is saying unless it is a request for
    a particular standard reference where he is pretty good. By having no
    ^^
    practical programming experience, [...]
    ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^
    ROTFL. Weren't you supposed to be somewhere else?


    PointedEars
    --
    var bugRiddenCrashP ronePieceOfJunk = (
    navigator.userA gent.indexOf('M SIE 5') != -1
    && navigator.userA gent.indexOf('M ac') != -1
    ) // Plone, register_functi on.js:16

    Comment

    • Jorge

      #17
      Re: DOM dynamically built table and addEventListene r....

      On Jun 3, 7:35 pm, VK <schools_r...@y ahoo.comwrote:
      For the possibility of DOM object augmentation failure you may account
      expando flag state for IE. Seehttp://msdn.microsoft. com/en-us/library/ms533747.aspx
      >
      Yep. The more I google around for this, the more convinced I am that
      this "law" has to do with (yet another) buggy IE behaviour.

      For example :
      "* Even though it is legal to retrieve DOM objects and subsequently
      storing
      custom properties and attributes in them, you should not do it for
      several
      reasons."
      (..)
      "4. I won't name any names in particular, but a certain browser made
      by
      Microsoft does not tolerate custom properties and attributes on DOM
      objects very well, particularly when the objects are added to the
      DOM
      dynamically and exceptions are thrown. The more elements that are
      generated, the more custom properties, and the more exceptions that
      are
      thrown, the worse it gets."

      OTOH, Safari/Webkit's automated tests check specifically that DOM
      objects' *custom properties* are correctly preserved after garbage
      collection :
      (and that's a +2 years-old test log !)

      <http://paste.lisp.org/display/20395>

      +This page tests whether custom properties on DOM objects persist
      after garbage collection.
      +
      +If the test passes, you'll see a series of 'PASS' messages below.
      +
      +DOM OBJECTS BEFORE GARBAGE COLLECTION:
      +PASS: document.implem entation.myCust omProperty should be 1 and is.
      +PASS: document.myCust omProperty should be 1 and is.
      +PASS: document.body.m yCustomProperty should be 1 and is.
      ...etc.

      Note, however this paragraph in the test log :

      +Because neither WinIE nor FF has reasonable or predictable behavior
      in this scenario, this test just documents our behavior to ensure that
      we don't change it accidentally. It is not a prescription for how
      things should behave.

      And that, Thomas, explains why these bugs have never bitten me... :

      because in Safari/WebKit, those things **work fine, as they should**.

      --Jorge.

      Comment

      • Jorge

        #18
        Re: DOM dynamically built table and addEventListene r....

        BTW,

        Safari for Mac/Win is a free download :
        <http://www.apple.com/safari/download/>

        Latest nighly builds are here:
        <http://nightly.webkit. org/>

        :-)

        --Jorge.

        Comment

        • Jorge

          #19
          Re: DOM dynamically built table and addEventListene r....

          On Jun 3, 8:02 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
          wrote:
          VK wrote:
          On Jun 3, 4:52 pm, Jorge <jo...@jorgecha morro.comwrote:
          >>I hope that "implement in any manner" doesn't mean that a get method
          >>might not fetch a property's value, nor that a put method might not store
          >>it...
          >But that is exactly what it means.
          >BTW, I found this article that you were interested in:
          ><news:483F3F79 .8080605@Pointe dEars.de>.
          >There's at least one other: <news:4836A152. 2090609@Pointed Ears.de>
          Still, I can't figure out why, if this is so crude, I have never had a
          problem with it.
          Might it be because I never program for nor test in IEs ?
          If the property can be set and can be read, why isn't it safe to go on
          with it ?
          >
          I would disregard whatever Thomas is saying unless it is a request for
          a particular standard reference where he is pretty good. By having no
          >
                                                                               ^^practical programming experience, [...]
          >
            ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^
          ROTFL.  Weren't you supposed to be somewhere else?
          >
          PointedEars
          Please trim your quotes...

          /8¬)

          --Jorge.

          Comment

          • VK

            #20
            Re: DOM dynamically built table and addEventListene r....

            On Jun 3, 10:42 pm, Jorge <jo...@jorgecha morro.comwrote:
            On Jun 3, 7:35 pm, VK <schools_r...@y ahoo.comwrote:
            >
            For the possibility of DOM object augmentation failure you may account
            expando flag state for IE. Seehttp://msdn.microsoft. com/en-us/library/ms533747.aspx
            >
            Yep. The more I google around for this, the more convinced I am that
            this "law" has to do with (yet another) buggy IE behaviour.
            I'm missing the reason to call it a "bug". It is an additional flag in
            Microsoft model allowing to lock/unlock "document" object
            augmentation.
            a certain browser made by
            Microsoft does not tolerate custom properties and attributes on DOM
            objects very well, particularly when the objects are added to the
            DOM
            dynamically and exceptions are thrown. The more elements that are
            generated, the more custom properties, and the more exceptions that
            are
            thrown, the worse it gets."
            I guess you are quoting some resource, but which one? "Microsoft does
            not tolerate custom properties" is a big news for me in account of the
            technology of behaviors specially made to have as many different
            custom properties as one wants - besides the regular object
            augmentation. Possibly the quoted source contains some explained test
            cases to sustain such claim, but again: what is this source?

            Comment

            • Jorge

              #21
              Re: DOM dynamically built table and addEventListene r....

              On Jun 3, 9:46 pm, VK <schools_r...@y ahoo.comwrote:
              On Jun 3, 10:42 pm, Jorge <jo...@jorgecha morro.comwrote:
              Yep. The more I google around for this, the more convinced I am that
              this "law" has to do with (yet another) buggy IE behaviour.
              >
              I'm missing the reason to call it a "bug". It is an additional flag in
              Microsoft model allowing to lock/unlock "document" object
              augmentation.
              The "law" we were talking about is that you should not, never ever,
              add/use custom properties to host objects, more specifically
              to dynamically created DOM element objects.

              For example, create a <liwith
              e= document.create Element('li');
              then attach a custom property :
              e.customPropert y= whatever;

              I wonder, and forgot to ask, if the same rule applies to properties
              created by :

              e.setAttribute( 'customProperty ', whatever);
              a certain browser made by
              Microsoft does not tolerate custom properties and attributes on DOM
              objects very well, particularly  when the objects are added to the
              DOM
              dynamically and exceptions are thrown. The more elements that are
              generated, the more custom properties, and the more exceptions that
              are
              thrown, the worse it gets."
              >
              I guess you are quoting some resource, but which one?
              Tip: copy a sentence and paste it in google (enclosed in
              quotes)... :-)
              http://www.google.com/search?q="Micro soft+does+not+t olerate+custom"

              --Jorge.

              Comment

              • Evertjan.

                #22
                Re: DOM dynamically built table and addEventListene r....

                Jorge wrote on 03 jun 2008 in comp.lang.javas cript:
                On Jun 3, 9:46ÿpm, VK <schools_r...@y ahoo.comwrote:
                >>
                >I'm missing the reason to call it a "bug". It is an additional flag in
                >Microsoft model allowing to lock/unlock "document" object
                >augmentation .
                >
                The "law" we were talking about is that you should not, never ever,
                add/use custom properties to host objects, more specifically
                to dynamically created DOM element objects.
                And why is that may I ask?

                Any object can have custom properies, methinks.
                So it stands to logic and it works.
                Why that "law", and whose law?

                --
                Evertjan.
                The Netherlands.
                (Please change the x'es to dots in my emailaddress)

                Comment

                • VK

                  #23
                  Re: DOM dynamically built table and addEventListene r....

                  The "law" we were talking about is that you should not, never ever,
                  add/use custom properties to host objects, more specifically
                  to dynamically created DOM element objects.
                  I never heard about such "law". In the way as spelled above it is
                  definitely plain b.s. Leaving out the casual augmentation, read about
                  XBL (Mozilla) and behaviors (Microsoft)
                  For example, create a <liwith
                  e= document.create Element('li');
                  then attach a custom property :
                  e.customPropert y= whatever;
                  so what problems are we having and where with that?
                  I wonder, and forgot to ask, if the same rule applies to properties
                  created by :
                  >
                  e.setAttribute( 'customProperty ', whatever);
                  there is not such "law" or "rule" so nothing to apply.
                  a certain browser made by
                  Microsoft does not tolerate custom properties and attributes on DOM
                  objects very well, particularly when the objects are added to the
                  DOM
                  dynamically and exceptions are thrown. The more elements that are
                  generated, the more custom properties, and the more exceptions that
                  are
                  thrown, the worse it gets."
                  >
                  I guess you are quoting some resource, but which one?
                  >
                  Tip: copy a sentence and paste it in google (enclosed in
                  quotes)... :-)http://www.google.com/search?q="Micro soft+does+not+t olerate+custom"
                  AFAICT it gives one hit to a post of someone Jason Smestad. Is it some
                  hugely authoritative person in Javascript programming? Who is he?


                  Comment

                  • Thomas 'PointedEars' Lahn

                    #24
                    Re: DOM dynamically built table and addEventListene r....

                    Jorge wrote:
                    [...]
                    Note, however this paragraph in the test log :
                    >
                    +Because neither WinIE nor FF has reasonable or predictable behavior
                    in this scenario, this test just documents our behavior to ensure that
                    we don't change it accidentally. It is not a prescription for how
                    things should behave.
                    >
                    And that, Thomas, explains why these bugs have never bitten me... :
                    >
                    because in Safari/WebKit, those things **work fine, as they should**.
                    Utter nonsense.


                    PointedEars
                    --
                    Prototype.js was written by people who don't know javascript for people
                    who don't know javascript. People who don't know javascript are not
                    the best source of advice on designing systems that use javascript.
                    -- Richard Cornford, cljs, <f806at$ail$1$8 300dec7@news.de mon.co.uk>

                    Comment

                    • Jorge

                      #25
                      Re: DOM dynamically built table and addEventListene r....

                      On Jun 3, 11:41 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                      wrote:

                      because in Safari/WebKit, those things **work fine, as they should**.
                      >
                      Utter nonsense.
                      Yes, "Utter nonsense".
                      I might be wrong, of course.
                      But can you prove that ?

                      Could you write a (small) code snippet that proves what you say, so
                      that we can see/compare its behaviour among different browsers ?
                      Please ?

                      Thanks,
                      --Jorge.

                      Comment

                      • Thomas 'PointedEars' Lahn

                        #26
                        Re: DOM dynamically built table and addEventListene r....

                        Jorge wrote:
                        On Jun 3, 11:41 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                        wrote:
                        >>because in Safari/WebKit, those things **work fine, as they should**.
                        >Utter nonsense.
                        >
                        Yes, "Utter nonsense".
                        I might be wrong, of course.
                        You *are* wrong.
                        But can you prove that ?
                        I have already proven that. The Language Specification allows host objects
                        to implement [[Get]] and [[Put]] as their respective implementor sees fit.
                        Could you write a (small) code snippet that proves what you say, so
                        that we can see/compare its behaviour among different browsers ?
                        Gladly. Which object reference, which property name, and if [[Put]], which
                        value?


                        PointedEars
                        --
                        realism: HTML 4.01 Strict
                        evangelism: XHTML 1.0 Strict
                        madness: XHTML 1.1 as application/xhtml+xml
                        -- Bjoern Hoehrmann

                        Comment

                        • Jorge

                          #27
                          Re: DOM dynamically built table and addEventListene r....

                          On Jun 4, 9:22 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                          wrote:

                          Could you write a (small) code snippet that proves what you say, so
                          that we can see/compare its behaviour among different browsers ?
                          >
                          Gladly.  Which object reference, which property name, and if [[Put]], which
                          value?
                          It doesn't matter.
                          Come on.

                          --Jorge.

                          Comment

                          • Thomas 'PointedEars' Lahn

                            #28
                            Re: DOM dynamically built table and addEventListene r....

                            Jorge wrote:
                            On Jun 4, 9:22 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                            wrote:
                            >>Could you write a (small) code snippet that proves what you say, so
                            >>that we can see/compare its behaviour among different browsers ?
                            >Gladly. Which object reference, which property name, and if [[Put]], which
                            >value?
                            >
                            It doesn't matter.
                            Yes, it does.
                            Come on.
                            You have still not got it.


                            PointedEars
                            --
                            Anyone who slaps a 'this page is best viewed with Browser X' label on
                            a Web page appears to be yearning for the bad old days, before the Web,
                            when you had very little chance of reading a document written on another
                            computer, another word processor, or another network. -- Tim Berners-Lee

                            Comment

                            • Jorge

                              #29
                              Re: DOM dynamically built table and addEventListene r....

                              On Jun 4, 9:22 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                              wrote:
                              Jorge wrote:
                              Could you write a (small) code snippet that proves what you say, so
                              that we can see/compare its behaviour among different browsers ?
                              >
                              Gladly. (..)
                              How is it going ?

                              --Jorge.

                              Comment

                              • Thomas 'PointedEars' Lahn

                                #30
                                Re: DOM dynamically built table and addEventListene r....

                                Jorge wrote:
                                Thomas 'PointedEars' Lahn wrote:
                                >Jorge wrote:
                                >>Could you write a (small) code snippet that proves what you say, so
                                >>that we can see/compare its behaviour among different browsers ?
                                >Gladly. (..)
                                >
                                How is it going ?
                                It went quickly into your mailbox yesterday, I hope.


                                PointedEars
                                --
                                var bugRiddenCrashP ronePieceOfJunk = (
                                navigator.userA gent.indexOf('M SIE 5') != -1
                                && navigator.userA gent.indexOf('M ac') != -1
                                ) // Plone, register_functi on.js:16

                                Comment

                                Working...