https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager
https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager#methods
The source using an include mechanism to inline https://developer.mozilla.org/en-US/docs/Web/API/EventTarget#methods, which includes this section:
Only things which are relevant for BatteryManager. There may be some use to including this information on the EventTarget page, but not on BatteryManager.
@wbamberg This is a good test case for discussing page inclusion since the inclusion results in a bug which needs to be fixed.
Would this be covered by the fact that EventTarget is a mixin (ie the discussion here). If so we would document the methods as though they were part of BatteryManager.
@Elchi3 do you have a view on this?
There are a couple of things going on here.
BatteryManager inherits from EventTarget. Usually Web API pages handle this by mentioning that fact and linking to the parent, like in, say, https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement#methods. But in this case for no good reason we've decided to handle it by transcluding the pages. We should delete this use of {{page}} and do the normal thing here.
EventTarget lists these Mozilla-chrome-specific events. I think we could just delete this section.
In some structured-content nirvana we could automatically slurp properties and methods from a parent into a child.
I agree with @wbamberg here. Mentioning the parent, EventTarget, removing the {{page}} macro, and removing Mozilla-isms is the correct thing here.
Also, this is a case of inheritance and not mixins. See https://github.com/mdn/content/issues/1006 for a discussion around documentation conventions for inheritance.
Great. Fixed.
Most helpful comment
I agree with @wbamberg here. Mentioning the parent,
EventTarget, removing the{{page}}macro, and removing Mozilla-isms is the correct thing here.Also, this is a case of inheritance and not mixins. See https://github.com/mdn/content/issues/1006 for a discussion around documentation conventions for inheritance.