-
Notifications
You must be signed in to change notification settings - Fork 512
Add an example for Navigator.userAgent #2347
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
Conversation
Hmmm, should I close this or mark it as a draft? |
Draft will do fine. I will notify you when something changes. |
@NiedziolkaMichal I don’t know what to do about meta.json but from what I saw in mdn/mdn-community#305 this should be good now. |
Since your example requires just a JS tab, you can use the JS editor. Your "navigatorPrototypeUserAgent": {
"exampleCode": "./live-examples/webapi-examples/navigator/navigator-prototype-useragent.js",
"fileName": "navigator-prototype-useragent.html",
"title": "Web API Demo: Navigator.prototype.userAgent",
"type": "js"
} You would need to move and rename
|
The point about interactive examples is that they are interactive: the user can edit them and see something different. So for example the one for But this example isn't interactive - there's nothing you can do with the editor: all you can do is press "Run". You could implement this as a normal live sample. And all it will tell you is your browser's UA string. It would be much more helpful to users to list several common UA strings. When we started the interactive examples project we were conscious of the fact that they are quite rude: they occupy quite a lot of the most precious space on the page. So we always felt that there would be features where it wasn't appropriate to add examples, because they didn't add enough value to justify their existence - and I would say this is one of these cases. So I think it's only worth adding examples like this if we want to change that policy, and instead want to add examples for just about everything. |
No description provided.