- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Sat, 24 Aug 2013 07:21:19 +1000
- To: Brendan Long <self@brendanlong.com>
- Cc: HTML WG LIST <public-html@w3.org>
- Message-ID: <CAHp8n2ksa3+bucC_6kPtfq0x1ffzoKut3FhSvN39-df7cdf=JQ@mail.gmail.com>
On Fri, Aug 16, 2013 at 3:22 AM, Brendan Long <self@brendanlong.com> wrote: > On 08/08/2013 11:00 PM, Silvia Pfeiffer wrote: > > If we put getCueAsHTML() on TextTrackCue object, a JS developer would > never be able to tell which formats will be parse-able by getCueAsHTML(), > since that information would be hidden in the algorithm - and it could be > multiple formats. > > I'm arguing that the average JS developer doesn't need to know what the > original format was, or how that was converted to HTML, they just care > about the HTML representation. > > For example: > > - If I wanted to present the cue in a custom way, I would get the HTML > representation, then insert it into the DOM. > - If I wanted to look at cues to see what their content is, I would > get the HTML representation, get the text content out of that, then run it > through my algorithm. > - If I wanted to alter cues, I'd get the HTML representation, do my > replacement to that, then insert it into the DOM (or possibly push it back > into the text track). > > You can't define a conversion to HTML for something for which you don't know the format. That's too much magic. For example, if somebody provides some JSON text in the text attribute of the TextTrackCue, how is the browser to know how to convert this to HTML? Silvia.
Received on Friday, 23 August 2013 21:22:06 UTC