jobbautista9 wrote: ↑2025-03-12, 13:23
Apparently Mozilla knew about this 12 years ago and decided not to fix it:
bug #815662
They are wrong because that is talking about declaration blocks (i.e. the { } declaration blocks),
not function definitions (using ( ) parentheses). How did nobody catch that?
I looked again this time in the
specific syntax document that is currently the latest active standards track document, that
does mention
<EOF> explicitly, and that should be a
parse error, it should definitely still throw an error in the console at the very least and never silently accept it. Parse errors are normally just warnings (with the affected declaration ignored, as we do if an unknown keyword is found for example), and either way it would not be parsed as something valid there according to the standards, even if the function is returned. That means it should never be accepted as valid or something functional, but it seems that it just wholly ignored.
Once more the function pseudo-class does not allow the closing parenthesis to be omitted and explicitly says to throw a syntax error, which I think should clearly override any parse errors that have lower severity.
EDIT: Maybe it would serve for someone to file a new bug on this because I'm not sure the older standards docs made that distinction.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite