interactive-examples
interactive-examples copied to clipboard
[Question] Add interactive example for web API(Streams API)?
I want to add an interactive example for https://developer.mozilla.org/en-US/docs/Web/API/Streams_API.
I noticed there is a type: webapi-tabbed
, but this is not in the CONTRIBUTING
doc, I tested this in my local, this type is working fine.
And the only example inside folder live-examples/webapi-examples
is also working fine in PROD env https://interactive-examples.mdn.mozilla.net/pages/webapi-tabbed/document-queryselector.html
So is ok for me to add Streams_API interactive example inside folder live-examples/webapi-examples
?
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
Lately application used for displaying interactive examples is undergoing some changes. Current version displays output in Shadow DOM, because of which simple DOM queries like document.getElementById
doesn't work and code needs to refer to Shadow Root instead:
let documentRoot = getShadowRoot();
return documentRoot.querySelector('header');
This is going to change in new version of BOB and linked example will need to be rewritten. Most likely new version will be released when all issues from #881 are resolved. After that, we will be able to publish Web API examples. I can leave this issue open and ping you when that happens.