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

Issue in Event Utility Event.js?

Expand Messages
  • Fred Janon
    Hi, Shouldn t the code in addListener be: var scope = el; if (override) { if (override === true) { scope = obj; } else { scope = *el; //
    Message 1 of 2 , May 1 4:06 AM
    • 0 Attachment
      Hi,
       
      Shouldn't the code in addListener be:
       
      var scope = el;
                      if ( override) {
                          if (override === true ) {
                              scope = obj;
                          } else {
                              scope = el; // <== 'el' instead of 'override'
                          }
       
      instead of
       
      var scope = el;
                      if ( override) {
                          if (override === true ) {
                              scope = obj;
                          } else {
                              scope = override; // scope will be 'false' or anything passed in if not 'true'
                          }
       
      Thanks
       
      Fred
       
    • Philip Tellis
      ... scope will never be false because of the enclosing if(override) what this does is allow people to directly specify an object as the override parameter.
      Message 2 of 2 , May 1 4:19 AM
      • 0 Attachment
        Sometime Today, Fred Janon assembled some asciibets to say:

        > var scope = el;
        > if (override) {
        > if (override === true) {
        > scope = obj;
        > } else {
        > scope = override; *// scope will be 'false' or
        > anything passed in if not 'true'*
        > }

        scope will never be false because of the enclosing if(override)

        what this does is allow people to directly specify an object as the
        override parameter.
      Your message has been successfully submitted and would be delivered to recipients shortly.