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

Problems Using JSLint to check example ADsafe widget code

Expand Messages
  • Adam
    Hey guys, At RWE, I got the idea after hearing Douglas talk on the Good Parts to use AdSafe and JSLint for a new (poorly considered in my opinion but I don t
    Message 1 of 2 , Sep 9, 2008
    • 0 Attachment
      Hey guys,

      At RWE, I got the idea after hearing Douglas' talk on the Good Parts to
      use AdSafe and JSLint for a new (poorly considered in my opinion but I
      don't pay the bills) feature to include content from some outside
      source. The idea is that we'll create a separate caching server that
      will take the URLs some content author want to have included, request
      them via HTTP, and run the response through JSLint (with the adsafe
      option). If it passes, we'll include it if not, we'll fire off some
      exception log/email or something. The server would then use the caching
      data to regularly do conditional GETs (IF-NOT-MODIFIED) to keep its
      internal copy up to date.

      So today I thought I'd see just how well JSLint works. I took the markup
      from http://www.adsafe.org/widget.html and passed it through the online
      jslint tool with Adsafe and tolerate fragements enabled. I got the
      following errors:

      Error:

      Problem at line 1 character 8: Missing quotes around id attribute value.
      <div id="WIDGETNAME_">

      Problem at line 1 character 10: Unexpected '_' in 'WIDGETNAME_'.
      <div id="WIDGETNAME_">

      Problem at line 1 character 10: ADSAFE violation: bad id.
      <div id="WIDGETNAME_">

      Problem at line 1 character 21: Attribute 'WIDGETNAME_' not all lower
      case.
      <div id="WIDGETNAME_">

      Problem at line 1 character 21: Bad identifier.
      <div id="WIDGETNAME_">

      Problem at line 4 character 1: Missing "use strict" statement.
      "use strict";

      Problem at line 4 character 1: ADsafe violation: Missing ADSAFE.id or
      ADSAFE.go.
      "use strict";

      Problem at line 4 character 1: Stopping, unable to continue. (13%
      scanned).
      From my point of view either JSLint is broken (wrt ADsafe) or the
      examples on the page are out of date.

      Am I missing something?



      [Non-text portions of this message have been removed]
    • Douglas Crockford
      ... Clearly, but I don t know what. I don t see any of those problems.
      Message 2 of 2 , Sep 9, 2008
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Adam" <adam.vandenhoven@...> wrote:
        > Am I missing something?

        Clearly, but I don't know what. I don't see any of those problems.
      Your message has been successfully submitted and would be delivered to recipients shortly.