[Webkit-unassigned] [Bug 189934] No DOM API to instantiate an attachment for an img element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 24 15:45:55 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=189934

--- Comment #2 from Wenson Hsieh <wenson_hsieh at apple.com> ---
(In reply to mitz from comment #0)
> Given an img element that’s not backed by an attachment, there’s currently
> no way to get it to be backed by an attachment. It would be useful to have a
> function on HTMLImageElement that one could call from JavaScript that would
> create a new attachment element, then call
> HTMLImageElement::setAttachmentElement to associate the attachment with the
> img. The caller could then use webkitAttachmentIdentifier to get the unique
> identifier of the attachment that’s been created.

Hm...I'm a bit more partial to adding a method to HTMLImageElement that ensures an attachment element, and returns just the attachment identifier so we don't need to worry about cases where a client could remove the attachment element of the image afterwards via script.

Is there any reason you might need the entire attachment element instead of just the identifier?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180924/2512091a/attachment.html>


More information about the webkit-unassigned mailing list