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

223Re: Dojo and JSLint?

Expand Messages
  • fjcastan
    Sep 15, 2008
      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
      > --- In jslint_com@yahoogroups.com, "fjcastan" <fjcastan@> wrote:
      > >
      > > I've been exprimenting with mixing jslint and the dojo editor to
      > > syntax checking script editor.
      > >
      > > I've noticed that something in jslint seems to conflict with
      > > something in dojo when when they are running together.
      > > I consistently get a "node has no properties" error in dojo 1.1
      > > JSLINT is included. I have not narrowed the error down, but I was
      > > curious if anyone had any insight to the problem.
      > Please let me know if you find out what it is. If it is failing on
      > dojo side, then it is likely a dojo problem that is triggered by
      > something that JSLint does.

      The culprit appears to be here: (line 497 of fulljslint.hs)
      Object.prototype.union = function (o) {
      var n;
      for (n in o) if (o.hasOwnProperty(n)) {
      this[n] = o[n];

      and: (line 544 of dijit/_Widget.js)
      _attrToDom function in dijit._Widget attempts to copy attributes from
      a dom node and is failing because of the way its iterating through a
      list and picking up that union function. I'll look further into a fix
      from the dojo side, but it may be a more appropriate fix, to change
      it in JSLint, though I have not looked exactly how this union
      function is used.

      > > Doug, have you considered building a dojo widget for JSLint?
      > No.

      Would you be interested in contributing JSLint to dojo? I'm currently
      working on contributing some stuff that we have on the plate possibly
      in 1.3. I can "widgetize" and test this.
    • Show all 4 messages in this topic