Loading ...
Sorry, an error occurred while loading the content.
 

Safari 3-beta NO_MODIFICATION_ALLOWED_ERR DOM exception

Expand Messages
  • David Pratt
    Hi. I am getting a NO_MODIFICATION_ALLOWED_ERR in Safari 3-beta browser with code that seems to be working well in FireFox. I am calling my init method using
    Message 1 of 7 , Oct 26, 2007
      Hi. I am getting a NO_MODIFICATION_ALLOWED_ERR in Safari 3-beta browser
      with code that seems to be working well in FireFox. I am calling my init
      method using YAHOO.util.Event.onDOMReady. Looking at the log the code
      seems to hum along fine until it gets to the first asnycRequest where it
      seems to throw the following exception:

      Event: CustomEvent: 'DOMReady', scope: [object DOMWindow] subcriber
      exception: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7

      Nothing fancy about the request:

      var request = YAHOO.util.Connect.asyncRequest('POST',
      method,
      {success:successHandler, failure:failureHandler},
      null
      );

      In Firefox the request is executed and the content rendered. The method
      is a view without parameters that returns markup. I'd appreciate advice
      on what I should be for here or how to solve this. Many thanks.

      Regards,
      David
    • David Pratt
      Hi. What I am noticing from logs and running event debug that DOMReady on Safari is coming well after where it is supposed to occur in the code. I am wondering
      Message 2 of 7 , Oct 27, 2007
        Hi. What I am noticing from logs and running event debug that DOMReady
        on Safari is coming well after where it is supposed to occur in the
        code. I am wondering if there may be a bug in YUI.

        The exception is 7 which means that I am attempting to modify the DOM
        when it is in a read only state from what I understand. I have two
        subscribers to DOMReady. The first is my init method in my code and the
        other the logger.

        In FireFox, it reads the DOM, emits the DOMReady and works on these two
        methods. In Safari it seems to set my code in motion before the event
        system has reported the DOM has been read. The error seems to come at
        the point in my code where DOM should be available to change.

        Regards,
        David

        David Pratt wrote:
        > Hi. I am getting a NO_MODIFICATION_ALLOWED_ERR in Safari 3-beta browser
        > with code that seems to be working well in FireFox. I am calling my init
        > method using YAHOO.util.Event.onDOMReady. Looking at the log the code
        > seems to hum along fine until it gets to the first asnycRequest where it
        > seems to throw the following exception:
        >
        > Event: CustomEvent: 'DOMReady', scope: [object DOMWindow] subcriber
        > exception: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
        >
        > Nothing fancy about the request:
        >
        > var request = YAHOO.util.Connect.asyncRequest('POST',
        > method,
        > {success:successHandler, failure:failureHandler},
        > null
        > );
        >
        > In Firefox the request is executed and the content rendered. The method
        > is a view without parameters that returns markup. I'd appreciate advice
        > on what I should be for here or how to solve this. Many thanks.
        >
        > Regards,
        > David
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • David Pratt
        Hi. Hoping someone can reply to this post. At the very least hoping someone can provide hints on what I ought to be doing to isolate and solve this issue. I am
        Message 3 of 7 , Oct 30, 2007
          Hi. Hoping someone can reply to this post. At the very least hoping
          someone can provide hints on what I ought to be doing to isolate and
          solve this issue. I am puzzled by the appearance of this error (and of
          course want my code to be cross browser compatible) since it does not
          appear in FireFox.

          I have place a number of log statements to attempt to determine what is
          happening here. Unfortunately I can only see the activity closer to
          where it fails in the log. I want the full log output from start to
          finish. Can someone also advise the setting in log configuration to
          output the full log. I have tried setting a large thresholdMax into my
          log configuration however it does not seem to capture all output.

          Firebug does this without any configuration of course but Firebug is not
          a tool that can be used with Safari.

          Regards,
          David

          David Pratt wrote:
          > Hi. I am getting a NO_MODIFICATION_ALLOWED_ERR in Safari 3-beta browser
          > with code that seems to be working well in FireFox. I am calling my init
          > method using YAHOO.util.Event.onDOMReady. Looking at the log the code
          > seems to hum along fine until it gets to the first asnycRequest where it
          > seems to throw the following exception:
          >
          > Event: CustomEvent: 'DOMReady', scope: [object DOMWindow] subcriber
          > exception: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
          >
          > Nothing fancy about the request:
          >
          > var request = YAHOO.util.Connect.asyncRequest('POST',
          > method,
          > {success:successHandler, failure:failureHandler},
          > null
          > );
          >
          > In Firefox the request is executed and the content rendered. The method
          > is a view without parameters that returns markup. I'd appreciate advice
          > on what I should be for here or how to solve this. Many thanks.
          >
          > Regards,
          > David
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
        • Adam Moore
          ... David, it would be helpful if you could get together a test case and submit a bug. This will help us determine if we need to modify the DOMReady strategy
          Message 4 of 7 , Oct 30, 2007
            On Fri, Oct 26, 2007 at 11:09:57PM -0300, David Pratt wrote:
            > Hi. I am getting a NO_MODIFICATION_ALLOWED_ERR in Safari 3-beta browser
            > with code that seems to be working well in FireFox. I am calling my init
            > method using YAHOO.util.Event.onDOMReady. Looking at the log the code
            > seems to hum along fine until it gets to the first asnycRequest where it
            > seems to throw the following exception:
            >
            > Event: CustomEvent: 'DOMReady', scope: [object DOMWindow] subcriber
            > exception: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
            >
            > Nothing fancy about the request:
            >
            > var request = YAHOO.util.Connect.asyncRequest('POST',
            > method,
            > {success:successHandler, failure:failureHandler},
            > null
            > );
            >
            > In Firefox the request is executed and the content rendered. The method
            > is a view without parameters that returns markup. I'd appreciate advice
            > on what I should be for here or how to solve this. Many thanks.

            David, it would be helpful if you could get together a test case and
            submit a bug. This will help us determine if we need to modify the
            DOMReady strategy for Safari 3.

            DOMReady is a moment prior to the window load event where it is safe to
            modify the DOM. You are not actually doing the DOM additions during
            this moment. You are doing an async request and inserting the elements
            at a time that may or may not be safe. Connection doesn't require the
            DOM in order to fire off the request. So, I suggest you make the
            request immediately (inline), and in the success handler wrap the DOM
            additions in an onAvailable call (on the element that you will insert
            the new elements into).

            -Adam
          • David Pratt
            Hi Adam. I appreciate your reply. I will take your advice and see if I can assemble a test case that demonstrates the issue. I ll try wrapping in onAvailable
            Message 5 of 7 , Oct 31, 2007
              Hi Adam. I appreciate your reply. I will take your advice and see if I
              can assemble a test case that demonstrates the issue. I'll try wrapping
              in onAvailable as you suggest.

              Have you any advice of retrieving full log output from the logger? I
              have manipulated thresholdMin and thresholdMax values and I cannot seem
              to obtain any more than 200 lines of output. As a result, I have been
              relying on Firebug for FireFox since it captures it all. I need this
              debugging capacity for all browsers to make the logger more useful. I
              don't want to miss any of the output. Many thanks.

              Regards,
              David

              Adam Moore wrote:
              > On Fri, Oct 26, 2007 at 11:09:57PM -0300, David Pratt wrote:
              >> Hi. I am getting a NO_MODIFICATION_ALLOWED_ERR in Safari 3-beta browser
              >> with code that seems to be working well in FireFox. I am calling my init
              >> method using YAHOO.util.Event.onDOMReady. Looking at the log the code
              >> seems to hum along fine until it gets to the first asnycRequest where it
              >> seems to throw the following exception:
              >>
              >> Event: CustomEvent: 'DOMReady', scope: [object DOMWindow] subcriber
              >> exception: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
              >>
              >> Nothing fancy about the request:
              >>
              >> var request = YAHOO.util.Connect.asyncRequest('POST',
              >> method,
              >> {success:successHandler, failure:failureHandler},
              >> null
              >> );
              >>
              >> In Firefox the request is executed and the content rendered. The method
              >> is a view without parameters that returns markup. I'd appreciate advice
              >> on what I should be for here or how to solve this. Many thanks.
              >
              > David, it would be helpful if you could get together a test case and
              > submit a bug. This will help us determine if we need to modify the
              > DOMReady strategy for Safari 3.
              >
              > DOMReady is a moment prior to the window load event where it is safe to
              > modify the DOM. You are not actually doing the DOM additions during
              > this moment. You are doing an async request and inserting the elements
              > at a time that may or may not be safe. Connection doesn't require the
              > DOM in order to fire off the request. So, I suggest you make the
              > request immediately (inline), and in the success handler wrap the DOM
              > additions in an onAvailable call (on the element that you will insert
              > the new elements into).
              >
              > -Adam
            • David Pratt
              I managed to improve my debugging capacity in Safari 3 by enabling debug so it will log everything to the console in the meantime. I have yet to find a way of
              Message 6 of 7 , Nov 1, 2007
                I managed to improve my debugging capacity in Safari 3 by enabling debug
                so it will log everything to the console in the meantime. I have yet to
                find a way of getting all output from the yahoo logger. Anyone with some
                configuration assistance here would be appreciated since I have tried a
                number of things but not getting full output but max 200 lines.

                In any case I managed to isolate the error to a text insertion in the
                DOM quite far into my init method (that is my callback method to
                onDOMReady). The interesting part of this is that I am adding nodes up
                until this point without difficulty. This is the first that adds text.

                Where the exception occurs I am doing this in a method:

                node.appendChild(document.createTextNode(options.text))

                So this had nothing to do with an asyncronous call, just that my
                debugging capability was poorer in safari a couple of days ago. I have
                not yet been successful in wrapping this to prevent the error at this
                point. Any pointers are appreciated. Many thanks.

                Regards,
                David




                David Pratt wrote:
                > Hi Adam. I appreciate your reply. I will take your advice and see if I
                > can assemble a test case that demonstrates the issue. I'll try wrapping
                > in onAvailable as you suggest.
                >
                > Have you any advice of retrieving full log output from the logger? I
                > have manipulated thresholdMin and thresholdMax values and I cannot seem
                > to obtain any more than 200 lines of output. As a result, I have been
                > relying on Firebug for FireFox since it captures it all. I need this
                > debugging capacity for all browsers to make the logger more useful. I
                > don't want to miss any of the output. Many thanks.
                >
                > Regards,
                > David
                >
                > Adam Moore wrote:
                >> On Fri, Oct 26, 2007 at 11:09:57PM -0300, David Pratt wrote:
                >>> Hi. I am getting a NO_MODIFICATION_ALLOWED_ERR in Safari 3-beta browser
                >>> with code that seems to be working well in FireFox. I am calling my init
                >>> method using YAHOO.util.Event.onDOMReady. Looking at the log the code
                >>> seems to hum along fine until it gets to the first asnycRequest where it
                >>> seems to throw the following exception:
                >>>
                >>> Event: CustomEvent: 'DOMReady', scope: [object DOMWindow] subcriber
                >>> exception: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
                >>>
                >>> Nothing fancy about the request:
                >>>
                >>> var request = YAHOO.util.Connect.asyncRequest('POST',
                >>> method,
                >>> {success:successHandler, failure:failureHandler},
                >>> null
                >>> );
                >>>
                >>> In Firefox the request is executed and the content rendered. The method
                >>> is a view without parameters that returns markup. I'd appreciate advice
                >>> on what I should be for here or how to solve this. Many thanks.
                >> David, it would be helpful if you could get together a test case and
                >> submit a bug. This will help us determine if we need to modify the
                >> DOMReady strategy for Safari 3.
                >>
                >> DOMReady is a moment prior to the window load event where it is safe to
                >> modify the DOM. You are not actually doing the DOM additions during
                >> this moment. You are doing an async request and inserting the elements
                >> at a time that may or may not be safe. Connection doesn't require the
                >> DOM in order to fire off the request. So, I suggest you make the
                >> request immediately (inline), and in the success handler wrap the DOM
                >> additions in an onAvailable call (on the element that you will insert
                >> the new elements into).
                >>
                >> -Adam
                >
                >
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
              • Adam Moore
                David, ... I m not sure why this is happening. Jenny Han, the author of the component, suggested that you may be able to see the rest of the messages by
                Message 7 of 7 , Nov 5, 2007
                  David,

                  On Thu, Nov 01, 2007 at 02:06:57PM -0300, David Pratt wrote:
                  > I managed to improve my debugging capacity in Safari 3 by enabling debug
                  > so it will log everything to the console in the meantime. I have yet to
                  > find a way of getting all output from the yahoo logger. Anyone with some
                  > configuration assistance here would be appreciated since I have tried a
                  > number of things but not getting full output but max 200 lines.

                  I'm not sure why this is happening. Jenny Han, the author of the
                  component, suggested that you may be able to see the rest of the
                  messages by looking at the stack directly:

                  http://developer.yahoo.com/yui/docs/YAHOO.widget.Logger.html#getStack

                  > In any case I managed to isolate the error to a text insertion in the
                  > DOM quite far into my init method (that is my callback method to
                  > onDOMReady). The interesting part of this is that I am adding nodes up
                  > until this point without difficulty. This is the first that adds text.
                  >
                  > Where the exception occurs I am doing this in a method:
                  >
                  > node.appendChild(document.createTextNode(options.text))

                  Interesting. What is the content of options.text? What happens if you
                  change options.text to a "test string"? What doc type are you using?
                  Have you tried making the change I suggested before, and did that
                  produce the same error? Will this same block of code run successfully
                  if executed during the window load event? I'd really like to be able to
                  take a glance at the page that is generating the error. This would help
                  us understand what is happening with the logger as well.

                  -Adam
                Your message has been successfully submitted and would be delivered to recipients shortly.