Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #26391 > unrolled thread
| Started by | Haris Bogdanovich <haris.bogdanovic@gmail.com> |
|---|---|
| First post | 2014-12-28 18:12 +0100 |
| Last post | 2014-12-29 08:09 +0200 |
| Articles | 5 on this page of 25 — 6 participants |
Back to article view | Back to comp.lang.javascript
simple error Haris Bogdanovich <haris.bogdanovic@gmail.com> - 2014-12-28 18:12 +0100
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 18:25 +0100
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 21:00 +0200
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 21:32 +0100
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 23:56 +0200
Re: simple error Denis McMahon <denismfmcmahon@gmail.com> - 2014-12-28 18:46 +0000
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 21:13 +0200
Re: simple error Denis McMahon <denismfmcmahon@gmail.com> - 2014-12-28 23:19 +0000
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 01:03 +0100
Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-29 01:08 +0100
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 20:13 +0100
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 22:30 +0200
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-28 21:44 +0100
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-28 23:50 +0200
Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-28 23:10 +0100
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 03:10 +0100
Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-29 13:17 +0100
Re: simple error Tim Streater <timstreater@greenbee.net> - 2014-12-29 12:30 +0000
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-29 14:49 +0200
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 15:18 +0100
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-29 08:20 +0200
Re: simple error "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-29 12:36 +0100
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 15:40 +0100
Re: simple error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-29 01:04 +0100
Re: simple error "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-12-29 08:09 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
|---|---|
| Date | 2014-12-29 08:20 +0200 |
| Message-ID | <m7qrql$3no$1@dont-email.me> |
| In reply to | #26402 |
2014-12-29, 0:10, Christoph M. Becker wrote: > Jukka K. Korpela wrote: > >> The issue was the use of the code >> >> <td onclick='this.innerHTML = `X`;'>--</td> >> >> which was stated to work in Firefox. >> >> There is no HTML error in that code. The error is in JavaScript code. > > Obviously, not. Otherwise it wouldn't work in Firefox' JavaScript > engine as if the backticks have been quotes. So are you saying that there is no error in code? And that if something works in an implementation it’s not an error? Some future extension to the language might make it valid, and might get implemented, but that’s a different story. What matters here is that the error*) is in JavaScript code, not in HTML code, contrary to what the troll’s message claimed *) Just to save us from pointless philosophy of “error”, you can read “error” simply as my shorthand for “a deviation from the current definition of the language, preventing the construct from having the desired effect in most implementations”. -- Yucca, http://www.cs.tut.fi/~jkorpela/
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2014-12-29 12:36 +0100 |
| Message-ID | <m7rec6$fsf$1@solani.org> |
| In reply to | #26411 |
Jukka K. Korpela wrote: > 2014-12-29, 0:10, Christoph M. Becker wrote: > >> Jukka K. Korpela wrote: >> >>> The issue was the use of the code >>> >>> <td onclick='this.innerHTML = `X`;'>--</td> >>> >>> which was stated to work in Firefox. >>> >>> There is no HTML error in that code. The error is in JavaScript code. >> >> Obviously, not. Otherwise it wouldn't work in Firefox' JavaScript >> engine as if the backticks have been quotes. > > So are you saying that there is no error in code? And that if something > works in an implementation it’s not an error? > > Some future extension to the language might make it valid, and might get > implemented, but that’s a different story. It seems to be prudent to avoid talking about "the language" here. Even talking about JavaScript is misleading in this case, obviously. Talking about ECMAScript (implementations) clarifies things considerably, because then we can look up the relevant part of the current specification[1] (instead of speculating): | A conforming implementation of ECMAScript is permitted to support | program and regular expression syntax not described in this | specification. So the code above is not in error. [1] <http://www.ecma-international.org/ecma-262/5.1/#sec-2> -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-12-29 15:40 +0100 |
| Message-ID | <44374431.ADoVJf56ko@PointedEars.de> |
| In reply to | #26414 |
Christoph M. Becker wrote: > Talking about ECMAScript (implementations) clarifies things considerably, > because then we can look up the relevant part of the current > specification[1] (instead of speculating): > > | A conforming implementation of ECMAScript is permitted to support > | program and regular expression syntax not described in this > | specification. > > So the code above is not in error. The above code would not be in error if it were considered code in/for an implementation of ECMAScript (in this case, Mozilla JavaScript), because that would still be a conforming implementation of ECMAScript (Editions 1 to 5.1, excluding 4). In this case, however, it is not in error because the Mozilla JavaScript version in question is an implementation, at least with regard to the syntax feature relevant here, of the latest working draft of ECMAScript Edition 6, which specifies that syntax instead. (Voting on that draft to become a standard was planned for this year, but eventually postponed. [2]) ISTM that implementations can extend an Edition of the Specification in this way, which, if adopted, could lead to additional standard syntax in later Editions, was the secondary goal when this paragraph was introduced with the first Edition. The primary goal was to reconcile the differences between Netscape JavaScript 1.1 and Microsoft JScript 1.0 (and other versions and implementations later), so that both existing, used languages could have syntax extensions but still be conforming implementations of ECMAScript. IOW, "standard followed practice" from the beginning. > [1] <http://www.ecma-international.org/ecma-262/5.1/#sec-2> [2] <http://wingolog.org/archives/2014/12/09/state-of-js-implementations-2014-edition> -- 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.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-12-29 01:04 +0100 |
| Message-ID | <1714327.Q2JTzWgtq2@PointedEars.de> |
| In reply to | #26400 |
Jukka K. Korpela wrote:
> 2014-12-28, 22:44, Lahn wrote:
>> The HTML5 parsing algorithm at least, which I cited, states that if a
>> backtick (`) is parsed at this position, it constitutes a “Parse error”,
>
> The issue was the use of the code
>
> <td onclick='this.innerHTML = `X`;'>--</td>
>
> which was stated to work in Firefox.
It was not clear what has been claimed. The claim was:
| (`) might also work (it does in my firefox at least).
Which referred to:
| Use double quotes (") for one of the strings.
Therefore, it is a fallacy to state that what you have assumed is the only
possible valid interpretation.
That said, see my other followup for the proper explanation.
--
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.
[toc] | [prev] | [next] | [standalone]
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
|---|---|
| Date | 2014-12-29 08:09 +0200 |
| Message-ID | <m7qr58$25h$1@dont-email.me> |
| In reply to | #26407 |
2014-12-29, 2:04, Lahn wrote:
> It was not clear what has been claimed.
It was to those who checked the facts.
> The claim was:
>
> | (`) might also work (it does in my firefox at least).
>
> Which referred to:
>
> | Use double quotes (") for one of the strings.
>
> Therefore, it is a fallacy to state that what you have assumed is the only
> possible valid interpretation.
The fallacy is entirely on your side: you ignored that part “it does in
my firefox at least”.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.javascript
csiph-web