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

Re: Dom html...

Expand Messages
  • Douglas Crockford
    ... Yes it is. HTMLElement is not found in all browsers, so it is usually good to get the warning.
    Message 1 of 2 , Sep 20, 2008
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "santini.alberto"
      <albertosantini@...> wrote:
      >
      > I have a code snippet containing:
      >
      > ...
      > if (!(contents instanceof HTMLElement)) {
      > ...
      >
      > Of course JSLint says
      >
      > 'HTMLElement' is undefined.
      >
      > Same message with browser option activated.
      >
      > My workaround is to use /*globals HTMLElement */, but I was wondering
      > if it is the correct approach.

      Yes it is. HTMLElement is not found in all browsers, so it is usually
      good to get the warning.
    Your message has been successfully submitted and would be delivered to recipients shortly.