3.20.2 Repositioning HTML for CSS and javascript links
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP server libraries
          • The library(http/html_write) library
            • Repositioning HTML for CSS and javascript links
              • html_post//2
              • html_receive//1
              • html_receive//2
              • xhtml_ns//2
Availability::- use_module(library(http/html_write)).
Source[det]html_receive(+Id, :Handler)//
This extended version of html_receive//1 causes Handler to be called to process all messages posted to the channal at the time output is generated. Handler is called as below, where PostedTerms is a list of Module:Term created from calls to html_post//2. Module is the context module of html_post and Term is the unmodified term. Members in PostedTerms are in the order posted and may contain duplicates.
  phrase(Handler, PostedTerms, HtmlTerms, Rest)

Typically, Handler collects the posted terms, creating a term suitable for html//1 and finally calls html//1.