-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to represent the introduction of AudioScheduledSourceNode? #6656
Comments
As for a proposed solution in this case, I'd have to say removing the entries from the 3 concrete node types. If we find that event and methods became available at different times on the concrete types, a note on the support data for AudioScheduledSourceNode could explain it. I hope this is now far enough in the past that it doesn't matter in practice. cc @ddbeck @vinyldarkscratch |
For Chromium, the |
This seems reasonable to me. I do have a request though: To make it easier unstitch the mixins at a later date (should we ever get a good way of handling them), please be pedantic in the notes (e.g., multiple notes, if needed, to say something like, "From X to Y, someevent was implemented as part of OtherInterface." and so on, as you're able to express with the information you have). |
This is actually not a case of mixins, although a lot about it is similar to mixin situations. Here, the interface is web-observable, it just doesn't matter so much to web developers where on the prototype chain things are. |
Oh, I misunderstood (this will teach me to read something like this at the end of the day). 🤦 I'm sorry—I should read these things with more care. The good news is that I think I might have hit on a solution to interfaces moves. I spent a while thinking this through but I think the irrelevant features guideline gives us a good way of thinking about API moves: If the specced behavior is long-standing and consistent between vendors (e.g., if all the browsers have moved the API up the inheritance chain two or more years ago), then we could get away with your proposed solution (i.e., removing them from the inheriting interfaces and only documenting them in the By my thinking, our data guideline allows this already: the feature has been "removed" from the inheriting interfaces (even though a feature of the same name has been added further up the inheritance chain). That is, This works as long as the feature has been "removed" from every browser in the last two years (or never shipped in the first place). If, for example, IE implemented it, then we'd be stuck with having seemingly-duplicate features in two APIs for five years. That said, it would probably be a good idea to update the irrelevant feature guideline to suggest putting notes when the interface removal is one half of a move, rather than an absolute removal. |
Unfortunately, the introduction of In Chromium, it was early 2017: https://chromium.googlesource.com/chromium/src/+/00971f38908388728f49cd5127b9c6c6761d035f In Gecko, it was late 2016: mozilla/gecko-dev@bd93c7b#diff-4904f00bab0ff2507512266ffe296647 So the irrelevant features guideline won't help resolve this, at least not for about two years. To represent this as Thinking of the eventual state of the data here, if we remove the bits from the 3 concrete interfaces, it's going to be strange that The only way I can think of for this to look correct and non-scary to MDN readers is if the entries on Sorry I have only problems at this point, no solutions :) |
The same issue was raised in #5794. cc @sideshowbarker |
Right, this is an instance of #3463. Turns out that it might make sense to do things differently depending on how things moved in the prototype chain (tree, actually). |
To your earlier points, @foolip, I am disappointed my brilliant solution doesn't solve anything. Typical. 😆 I'm taking a new approach then. I'll try to write something up which distributes this a bit more widely, but I had a conversation with Chris Mills today about how to handle muddy questions, like this one, where there's no obvious or consensus solution. So, in general and in the near-term, I'm going to adopt a tendency toward reversibility: handle data in ways that will permit us flexibility. In this time of upheaval for MDN, a guiding principle of "don't make any difficult-to-revert decisions" feels like a good one, even if that leads to some untidiness in the near term. As you originally wrote:
And I think that should guide us toward duplication, rather than consolidating on So, what does this actually mean?
I realize this is going to be gnarly. This suggests to me that some tools to help reviewers with interdependent features (i.e., implementing #6571) is going to be especially important. If you think this is a good way to go, then I would prioritize that work after the What do you think? |
@ddbeck that sounds eminently reasonable to me, and I can definitely get behind the "don't make any difficult-to-revert decisions" principle. I think I'd be able to sort this out without any tooling support. What I'm suggesting in #6571 might even get in the way for this, since from Web IDL we would conclude that |
There's a pattern that could be followed for this in #3463 (comment). |
When Chromium 57: Firefox 53: WebKit trunk 610.1.20, which was Safari 14: |
AudioBufferSourceNode is as old as the Web Audio API itself, and originally had these members. OscillatorNode and ConstantSourceNode were added later and also had these members. Later, AudioScheduledSourceNode was introduced and the members were moved up to that prototype. Only an overload start() method remained on AudioBufferSourceNode. Summary of changes: - Remove the members no longer in spec/implementations. - Mark the members of AudioScheduledSourceNode as supported since the earliest time they were supported on AudioBufferSourceNode, which is the earliest of the concrete interfaces. - Mark AudioScheduledSourceNode as partially supported from the versions AudioBufferSourceNode were introduced until the AudioScheduledSourceNode interface was added. Introduction of AudioScheduledSourceNode in each browser/engine: Chromium 57: https://bugs.chromium.org/p/chromium/issues/detail?id=661207 https://storage.googleapis.com/chromium-find-releases-static/009.html#00971f38908388728f49cd5127b9c6c6761d035f Firefox 53: https://bugzilla.mozilla.org/show_bug.cgi?id=1324568 mozilla/gecko-dev@bd93c7b WebKit trunk 610.1.20, which was Safari 14: https://bugs.webkit.org/show_bug.cgi?id=214381 https://trac.webkit.org/changeset/264538/webkit There was an AudioSourceNode parent interface in WebKit, but it never had any members. These tests were used to find or confirm some version numbers: https://staging-dot-mdn-bcd-collector.appspot.com/tests/api/AudioScheduledSourceNode (It uses a AudioBufferSourceNode, as the oldest concrete type now inheriting from AudioScheduledSourceNode.) For start/stop, Chrome 23 and 24 were tested to confirm. WebKit commit for that at trunk version 537.12: https://trac.webkit.org/changeset/129260/webkit https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Configurations/Version.xcconfig?rev=129260 For onended, Chrome 29 and 30 were tested to confirm. WebKit commit for that at trunk version 537.44: https://trac.webkit.org/changeset/150905/webkit https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Configurations/Version.xcconfig?rev=150905 That also introduced support for the event itself. Edge 13 was tested to confirm support for onended/start/stop, and it was assumed to also be in Edge 12 since most of the Web Audio API was. Firefox 24 and 25 tested were tested to confirm Firefox data. Fixes #6656.
I've sent #9599. |
…9599) AudioBufferSourceNode is as old as the Web Audio API itself, and originally had these members. OscillatorNode and ConstantSourceNode were added later and also had these members. Later, AudioScheduledSourceNode was introduced and the members were moved up to that prototype. Only an overload start() method remained on AudioBufferSourceNode. Summary of changes: - Remove the members no longer in spec/implementations. - Mark the members of AudioScheduledSourceNode as supported since the earliest time they were supported on AudioBufferSourceNode, which is the earliest of the concrete interfaces. - Mark AudioScheduledSourceNode as partially supported from the versions AudioBufferSourceNode were introduced until the AudioScheduledSourceNode interface was added. Introduction of AudioScheduledSourceNode in each browser/engine: Chromium 57: https://bugs.chromium.org/p/chromium/issues/detail?id=661207 https://storage.googleapis.com/chromium-find-releases-static/009.html#00971f38908388728f49cd5127b9c6c6761d035f Firefox 53: https://bugzilla.mozilla.org/show_bug.cgi?id=1324568 mozilla/gecko-dev@bd93c7b WebKit trunk 610.1.20, which was Safari 14: https://bugs.webkit.org/show_bug.cgi?id=214381 https://trac.webkit.org/changeset/264538/webkit There was an AudioSourceNode parent interface in WebKit, but it never had any members. These tests were used to find or confirm some version numbers: https://staging-dot-mdn-bcd-collector.appspot.com/tests/api/AudioScheduledSourceNode (It uses a AudioBufferSourceNode, as the oldest concrete type now inheriting from AudioScheduledSourceNode.) For start/stop, Chrome 23 and 24 were tested to confirm. WebKit commit for that at trunk version 537.12: https://trac.webkit.org/changeset/129260/webkit https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Configurations/Version.xcconfig?rev=129260 For onended, Chrome 29 and 30 were tested to confirm. WebKit commit for that at trunk version 537.44: https://trac.webkit.org/changeset/150905/webkit https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Configurations/Version.xcconfig?rev=150905 That also introduced support for the event itself. Edge 13 was tested to confirm support for onended/start/stop, and it was assumed to also be in Edge 12 since most of the Web Audio API was. Firefox 24 and 25 tested were tested to confirm Firefox data. Fixes #6656.
As documented,
AudioScheduledSourceNode
is an abstract interface with concrete inheriting interfaces beingAudioBufferSourceNode
,OscillatorNode
, andConstantSourceNode
. Unfortunately, it originally didn't exist, but was added to the prototype chain during the evolution of the Web Audio API.The concrete problem in BCD now is that the ended event is represented in multiple places:
AudioScheduledSourceNode
hasended
event,onended
,start
andstop
AudioBufferSourceNode
hasonended
andstart
OscillatorNode
hasonended
,start
andstop
ConstantSourceNode
hasonended
,start
andstop
The data for these differs, and there's plenty wrong with it. But what should it say?
From the point of view of a web developer, the introduction of
AudioScheduledSourceNode
doesn't matter, what matters is that one can callstart()
,stop()
and listen for theended
event on the 3 concrete audio node types.This is a specific instance of a more general problem, How to represent changes/moves on the prototype chain. It's the opposite situation to Data for localName/namespaceURI/prefix attributes on Attr/Element/Node is inconsistent/confusing, as here things have moved upwards in the prototype chain, not downwards.
The text was updated successfully, but these errors were encountered: