Skip to content

Definition of a scripting context may be overzealous  #1352

@iherman

Description

@iherman

§5.4 of the core defines a scripting context base on the presence of the <script> element in, say, HTML. However, the HTML <script> element is not restricted to active 'scripts', i.e., javascript code. It can hold any type of data: a typical case is schema.org metadata in JSON-LD format.

The HTML spec says of the type attribute:

Omitting the attribute, setting it to the empty string, or setting it to a JavaScript MIME type essence match [...] to be interpreted according to the JavaScript Script top-level production.

which probably gives us the way we should restrict the case when we consider the scripting context: it does not have a type or the value of the type is a JavaScript MIME type essence match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EPUB33Issues fixed in the EPUB 3.3 revisionSpec-EPUB3The issue affects the core EPUB 3.X Recommendation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions