GNU bug report logs - #51712
29.0.50; [PATCH] New function `xwidget-webkit-load-html'

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Tue, 9 Nov 2021 10:27:02 UTC

Severity: wishlist

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #49 received at 51712 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: larsi <at> gnus.org, 51712 <at> debbugs.gnu.org
Subject: Re: bug#51712: 29.0.50; [PATCH] New function
 `xwidget-webkit-load-html'
Date: Wed, 10 Nov 2021 14:50:28 +0200
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  51712 <at> debbugs.gnu.org
> 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.




This bug report was last modified 2 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.