[webkit-reviews] review granted: [Bug 189934] No DOM API to instantiate an attachment for an img element : [Attachment 351073] Alternate approach (Win build fix)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 28 14:18:39 PDT 2018


Ryosuke Niwa <rniwa at webkit.org> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 189934: No DOM API to instantiate an attachment for an img element
https://bugs.webkit.org/show_bug.cgi?id=189934

Attachment 351073: Alternate approach (Win build fix)

https://bugs.webkit.org/attachment.cgi?id=351073&action=review




--- Comment #13 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 351073
  --> https://bugs.webkit.org/attachment.cgi?id=351073
Alternate approach (Win build fix)

View in context: https://bugs.webkit.org/attachment.cgi?id=351073&action=review

> Source/WebCore/html/HTMLImageElement.idl:45
> +    [Conditional=ATTACHMENT_ELEMENT, EnabledAtRuntime=AttachmentElement,
ImplementedAs=ensureAttachment] DOMString webkitEnsureAttachment();

I don't think any other JS API use "ensure" naming pattern. Maybe we should
call it createAttachment().
By the way, I don't think we should be prefixing these with "webkit" anymore
per our feature guidelines.

I guess yet another alternative design is to add a some static method on
HTMLAttachmentElement that you can call on an image element.
That might be slightly cleaner since what we're doing it here is really
creating an attachment element.


More information about the webkit-reviews mailing list