3.23.3 Predicates
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP server libraries
          • library(http/html_head): Automatic inclusion of CSS and scripts links
            • Predicates
              • html_resource/2
              • html_current_resource/1
              • html_requires//1
              • html_insert_resource//1
              • mime_include//2
Source[det]html_insert_resource(+ResourceOrList)//
Actually include HTML head resources. Called through html_post//2 from html_requires//1 after rewrite by html_head_expansion/2. We are guaranteed we will only get one call that is passed a flat list of requested requirements. We have three jobs:

  1. Figure out all indirect requirements
  2. See whether we can use any‘aggregate' resources
  3. Put required resources before their requiree.