Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #28987
| Path | csiph.com!au2pb.net!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: <!-- |
| Date | Mon, 07 Dec 2015 20:33:37 +0100 |
| Organization | PointedEars Software (PES) |
| Lines | 42 |
| Message-ID | <3162871.iCtvOAfsBC@PointedEars.de> (permalink) |
| References | <comment-20151207122517@ram.dialup.fu-berlin.de> <5333913.KbEaQyBAFF@PointedEars.de> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| X-Trace | solani.org 1449516818 3089 eJwFwYEBwCAIA7CXsEKRc2SW/09YEpuLXzqDHhODlGNRRNPs5GTK2FnnQahAYeuhrHVJ3B8A2RBN (7 Dec 2015 19:33:38 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Mon, 7 Dec 2015 19:33:38 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| X-User-ID | eJwNyMEBwCAIA8CVREmAcQRk/xHaex4OhWVKUDGYCh8mTt62l1tGVA04Y1HulbGHhdC7uxHtL1V4V3a9v2t9ZDIWOA== |
| Cancel-Lock | sha1:27dFXpih6+V+6FveiaZiNhehnlA= |
| X-NNTP-Posting-Host | eJwFwQEBADAEBMBKDI84zPSPsDsTMK4rDGpr6xcZw7FVw12aZ1RfZ4jXimSSbxNRNeg88Q8jZREC |
| Xref | csiph.com comp.lang.javascript:28987 |
Show key headers only | View raw
Thomas 'PointedEars' Lahn wrote: > Stefan Ram wrote: >> I tried the following with the Firefox console (one line of >> input, one line of output, and one blank line is given below): >> […] >> But when I hit »<!--«, it does not say >> »SyntaxError«, but »undefined«. Where is the production in >> the grammar of JavaScript that allows this »<!--«? > > I presume that “<!--”, at least at the beginning of a program, is parsed > like “//” in Mozilla JavaScript was built into SpiderMonkey after people > abused HTML comments to hide improperly escaped “script” element content > from improperly working HTML parsers and the (properly working) W3C > Validator. That is one of the syntax extensions allowed by the > “Conformance” section of ECMAScript Editions. > […] Apparently “<!--” is parsed exactly like “//” on *every* line of a program in Mozilla JavaScript as of Iceweasel 38.1.0 and Google V8 JavaScript as of Chromium 46.0.2490.71, both running under Debian GNU/Linux 8.2 64-bit (console tests). BTW, it is probably not a good idea to develop and to test only with Mozilla JavaScript, as according to StatCounter.com the top 3 of world-wide market shares as of November 2015, all platforms, Chrome and Firefox 5+ combined each, are: Chrome: 44.17 % (Google V8 JavaScript) Firefox 5+: 10.63 % (Mozilla JavaScript 5+) IE 11: 7.00 % (“Internet Explorer JavaScript”, i.e. JScript 11.x) <http://gs.statcounter.com/#all-browser_version_partially_combined-ww-monthly-201411-201511-bar> See also <http://PointedEars.de/es-matrix/#environments> (whose display I need to improve). -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: <!-- Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-07 15:01 +0100 Re: <!-- Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-07 20:33 +0100 Re: <!-- John Harris <niam@jghnorth.org.uk.invalid> - 2015-12-08 11:02 +0000
csiph-web