Re: [webkit-dev] How to display new MIME types?
Re: [webkit-dev] How to display new MIME types?
- Subject: Re: [webkit-dev] How to display new MIME types?
- From: じょいすじょん <email@hidden>
- Date: Thu, 27 Jul 2017 10:47:25 +0900
> On Jul 27, 2017, at 10:13, Conrad Shultz <email@hidden> wrote:
>
>
>
>> On Jul 22, 2017, at 7:32 PM, Jens Alfke <email@hidden> wrote:
>>
>>
>>> On Jul 21, 2017, at 7:19 PM, Conrad Shultz <email@hidden> wrote:
>>>
>>> You can build a Safari extension as an app extension bundled with an app,
>>> meaning you can write your extension in Swift or Objective-C (and
>>> JavaScript).
>>
>> It doesn’t look like these can do what the OP wants to do — display a
>> specific MIME type in Safari. Safari Extensions are triggered by web pages
>> loading, and can inject JS or CSS, which implies that the page is already
>> HTML-based. If Safari encounters a page whose MIME type is
>> “application/foobar”, it’s not going to display any HTML, it’s going to
>> download it as a file and the extension never gets to run.
>>
>> —Jens
>>
>
> Yes, you will not able to directly display a new MIME type in Safari using
> the existing extensions API. I encourage filing a bug at
> https://bugreport.apple.com <https://bugreport.apple.com/> requesting new
> functionality.
>
> However, you might be able to emulate a similar behavior. For example, your
> extension could add script that detects a link (or other reference) in HTML
> to the content of interest, then routes it (either as downloaded data or the
> resource URL) to your native code, which could then render it either in your
> associated app or in a popover in Safari.
With emulation of the link sniffing,
would Web Assembly make it doable potentially?
That's a big black box still to me...
>
> -Conrad
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden