Internet Explorer ‘SCRIPT1002: Syntax error’: Help!?!

Problem

A script that otherwise is interpreted by other major browsers (Chrome/ Firefox) without problems, prompts Internet Explorer to issue an error along the lines of:

SCRIPT1002: Syntax error
edit-snapshot, line 2230 character 1

Analysis

I think this error can broadly be interpreted as: there is some seriously illegal markup in your script (according to IE's definition)

Solution

The script error will usually (unhelpfully) point to the end of the script definition, the tag. Essentially, the best strategy I could come up with, to sift through your script and search for anything unusual. For instance:

  • Does your JavaScript define new '' elements by using the exact string ' tag. Essentially, the best strategy I could come up with, to sift through your script and search for anything unusual. For instance:\n\n- Does your JavaScript define new '' elements by using the exact string ' tag. Essentially, the best strategy I could come up with, to sift through your script and search for anything unusual. For instance:

    \n
      \n
    • Does your JavaScript define new '' elements by using the exact string '