Learn English – Behave as if it was or it were

grammaticalityirrealis-weresubjunctive-mood

You can place the script in the head or body as you like. The
script will behave as if it was located exactly where you put the
script tag in the document.

The sentences above are taken from this JavaScript tutorial (at the very bottom). I think they made a grammatical mistake here: it should be behave as if it were rather than it was. I'm not 100% sure, so want to confirm it.

Best Answer

Peter's comment indicates he feels 'were' is the preferred phrasing, and so do I.

'behave as if it were' is meant to indicate it is counter-factual (substitute 'even though it's not') so the subjunctive should be used.

Also it just sounds better that way to me.