Re: [clipboard-apis] Non Recognizable formats (#9)

2. I think each page should have a fresh default registered type list (perhaps augmented by an extension or UI), and then each page can register the formats they want to use, and they will only be active for that page. This prevents pages from overwriting each other causing unexpected behavior. One remaining question would be would be if overwriting default types were possible. This may allow a site to improve default functionality, but that seems unlikely, and may interfere with default user interactions causing undesirable consequences. Thus I think the default formats should not be overwritten, and I don't think a page would need the ability to overwrite itself so I think overwriting could be prohibited.

1. This has been bothering me for days.... I was trying to avoid using OS names. In order to be cross browser, the names would need to be written into the spec, which may hinder new OSs being supported. Requiring OS names would also prevent happy coincidence support: a native application using the same handle on different OSs where the developer didn't specifically search out the duplicate would be supported anyway. I believe the risk of this happen is very low given (2.) as any one page will likely only be dealing with a handful of native applications, and the likelihood of a handful of apps using conflicting handles across OSs seems low to me. That said as long as the conflicts weren't circular, it would be possible to define priorities based on the order that handles and mime types were added that could resolve simple conflicts.


Somewhat unrelated: I think there's no advantage of registering multiple formats at once, also for string based formats it would be nice to get strings vs files, so it should probably be `registerClipboardFormat('mime/type', 'string/file',['osFormatName1','osFormatName2', ...])`



---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/9#issuecomment-109356202

Received on Friday, 5 June 2015 16:36:18 UTC