Investigate shortcomings in MDN live samples/sample embedding



Mozilla Developer Network
3 years ago
3 years ago


(Reporter: cmills, Unassigned)


(Blocks: 1 bug, {productwanted})


(Whiteboard: [specification][type:change])

What feature should be changed? Please provide the URL of the feature if possible.
The Live Sample system is pretty cool, and works well for most things. However, there are a some cases where it fails to come through, and I'd love to see them addressed:

1. When you want to link to external resources in your live demo, be they JS files, CSS files, whatever. Yes, I could just put the code in the page, but in cases like web components it completely defeats the purpose of using the component in the first place, and probably won't work anyway. I appreciate the security implications of doing this. Perhaps we could just put the demo on say gh-pages (or*), whitelist that particular subdomain for embedding, and put it in an IFrame. Or maybe there is a way to allow linking/script tags in a secure way?

2. When you just want to embed a demo that someone has already put up on say github or jsfiddle. It is more reusable where it is, and it would be a waste of time to recreate it in a live sample.

* could we have some kind of system to allow us to manually upload demos to I'd still probably prefer github, as the code is more reusable that way.

What problems would this solve?
Shortcomings in MDN live samples/sample embedding

Who would use this?
MDN editors/contributors

What would users see?
Better quality demos

What would users do? What would happen as a result?
Better quality demos

Is there anything else we should know?


3 years ago
Severity: normal → enhancement
Keywords: productwanted
Blocks: 780040, 1109141
What I read from this is that we should be able to integrate our MDN GitHub repos into our articles.
I filed bug 1157355 to fix what is missing to do that.

I think with the jsfiddle integration from the Berlin weekend. See eg. 

and bug 1157355 for the iframe integration, we have won two good shortcomings.
I don't see more specific actions from the problem description here, but feel free to re-open and clarify.
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.