Html Document Not Defined Javascript Error Works In Chrome Console

Html Document Not Defined Javascript Error Works In Chrome Console