Make WordPress Core


Ignore:
Timestamp:
07/30/2024 06:44:45 PM (17 months ago)
Author:
dmsnell
Message:

HTML API: Add TEMPLATE and related support in HTML Processor.

As part of work to add more spec support to the HTML API, this patch adds
support for the IN TEMPLATE and IN HEAD insertion modes. These changes are
primarily about adding support for TEMPLATE elements in the HTML Processor,
but include support for other tags commonly found in the document head, such
as LINK, META, SCRIPT, STYLE, and TITLE.

Developed in https://github.com/wordpress/wordpress-develop/pull/7046
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell, westonruter.
See #61576.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-open-elements.php

    r58806 r58833  
    309309                'OBJECT',
    310310                'TEMPLATE',
    311                 // @todo: Support SVG and MathML nodes when support for foreign content is added.
     311
     312                /*
     313                 * @todo Support SVG and MathML nodes when support for foreign content is added.
     314                 *
     315                 * - MathML mi
     316                 * - MathML mo
     317                 * - MathML mn
     318                 * - MathML ms
     319                 * - MathML mtext
     320                 * - MathML annotation-xml
     321                 * - SVG foreignObject
     322                 * - SVG desc
     323                 * - SVG title
     324                 */
    312325            )
    313326        );
     
    350363                'TEMPLATE',
    351364                'UL',
    352                 // @todo: Support SVG and MathML nodes when support for foreign content is added.
     365
     366                /*
     367                 * @todo Support SVG and MathML nodes when support for foreign content is added.
     368                 *
     369                 * - MathML mi
     370                 * - MathML mo
     371                 * - MathML mn
     372                 * - MathML ms
     373                 * - MathML mtext
     374                 * - MathML annotation-xml
     375                 * - SVG foreignObject
     376                 * - SVG desc
     377                 * - SVG title
     378                 */
    353379            )
    354380        );
     
    387413                'OBJECT',
    388414                'TEMPLATE',
    389                 // @todo: Support SVG and MathML nodes when support for foreign content is added.
     415
     416                /*
     417                 * @todo Support SVG and MathML nodes when support for foreign content is added.
     418                 *
     419                 * - MathML mi
     420                 * - MathML mo
     421                 * - MathML mn
     422                 * - MathML ms
     423                 * - MathML mtext
     424                 * - MathML annotation-xml
     425                 * - SVG foreignObject
     426                 * - SVG desc
     427                 * - SVG title
     428                 */
    390429            )
    391430        );
Note: See TracChangeset for help on using the changeset viewer.