Subject: Re: bug#51712: 29.0.50; [PATCH] New function `xwidget-webkit-load-html'

From: Eli Zaretskii <[email-masked]>
Date: Wed, 10 Nov 2021 14:50:28 +0200

> From: Po Lu <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Wed, 10 Nov 2021 14:08:59 +0800
> 
> > That should be \"about:blank\" instead, since it's a string and not a
> > symbol.
> 
> Thanks, how's this?  Eli, does this look good to you?

Almost:

> +@defun xwidget-webkit-load-html xwidget text &optional base-uri
> +Load @var{text}, a string, into @var{xwidget}, which should be a
> +WebKit xwidget.  It treats @var{text} as HTML markup, which will be
> +rendered by @var{xwidget}.

Instead of the last sentence:

  Any HTML markup in @var{text} will be processed by @var{xwidget}
  while rendering the text.

> +Optional argument @var{base-uri}, which should be a string, specifies
> +the location of web resources specified through relative links, such
> +as the resource @samp{foo.png} in the HTML tag @samp{<img
> +src="foo.png">}.  It defaults to @samp{about:blank}.
> +@end defun

  Optional argument @var{base-uri}, which should be a string,
  specifies the absolute location of the web resources referenced by
  @var{text}, to be used for resolving relative links in @var{text}.

> +*** New function 'xwidget-webkit-load-html'.
> +This function is used to load HTML text into WebKit xwidgets, without
> +having to create a temporary file to store the markup.

Here' I'd like to say something like

  This is in contrast with loading HTML using ... which requires to
  create temporary files for storing the markup.

But I don't know what to write instead of "...".  What was the method
which existed earlier that you wanted to improve?

> +BASE_URI should be a string containing a URI that is used to locate
> +resources described by relative URLs, and if not specified, defaults
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"resources with relative URLs" sounds better to me.

Thanks.