r/ProgrammerAnimemes • • Jan 01 '20

document.all

Post image
979 Upvotes

29 comments sorted by

View all comments

Show parent comment

5

u/bucket3432 Jan 01 '20

iirc, it's actually defined by the HTML spec… which specifically notes that it requires behaviour (in terms of the extent it pretends not to be defined) not provided for by anything in the ECMAScript spec.

That was the case until a year or two ago. The behaviour of document.all used to be defined in the WhatWG spec as a willful violation of the ECMA-262 spec, but as of ES2018, there's a new internal slot defined in Annex B called IsHTMLDDA that describes its behaviour, so it is no longer a willful violation.