m:html-body-script

m:html-body-script — Add script elements to the end of a document.

Mode:
{http://docbook.org/ns/docbook/modes}html-body-script
Defined in:
modules/head.xsl
Deprecated since:
2.1.0

Deprecated

The technique described here is no longer necessary. Modern browsers accept a defer attribute on the script tag to explicitly specify when scripts are to execute.

Description

One way to assure that JavaScript will only be invoked by the user agent after the DOM tree has been constructed is to put the script elements for that code at the end of the file.

The root element of each result document is formatted once in the m:html-body-script mode. Any elements constructed in this mode will be added to the end of the HTML body. The built-in implementation does nothing; this mode exists as an extensibility point. See also m:html-head-script.