dvBodyEndInsertionPoint function

int dvBodyEndInsertionPoint(
  1. String html
)

Where content that belongs at the end of the body goes: before the body-end slot when the page has one, so that slot stays last, and before </body> otherwise. -1 when the page has no body.

Implementation

int dvBodyEndInsertionPoint(String html) {
  final int slot = html.lastIndexOf(DVDocumentSlot.bodyEnd.open);
  if (slot >= 0) return slot;
  return html.indexOf('</body>');
}