Closed adamnbowen closed 13 years ago
You are right. The docs should say that this is actually an object.
You can do if (Browser.Plugins.Flash){ doSomething(); }
Please fix it and send us a pull request :)
By fix it's: press fork button on github, find the right markdown file (Docs/Browser/Browser.md) on github, click "edit file" and fix it on github, press the pull request button on github.
Did i mention github is pretty nice?
@arian: too many steps. simply navigate to the file on the mootools repo, click the button "Fork and edit this file."
okay, I'll make the modification to the documentation tomorrow.
Thanks ;P that was quick.
By "tomorrow", I apparently meant "15 minutes from now". I've made the documentation change.
@cpojer --just as a note, the code you wrote is incorrect --an iPad will still see Browser.Plugins.Flash as truthy, so you must do
if (Browser.Plugins.Flash.version !== 0) {
alert('Flash is installed');
}
Way ahead of you.
Oh yeah, you are right. Flash is dead tho :P
alas, the client still needed SlideShowPro (and therefore Flash)... Should probably just use its xml file from now on and serve that business with javascript.
In the docs, it states "Browser.Plugins.Flash - (boolean) - True if Flash is present.", which simply isn't true, as seen on this jsfiddle
So either, we need to change the documentation to say that Browser.Plugins.Flash is an object with some properties that you can use to test if flash is installed (currently, doing something like
Browser.Plugins.Flash.version !== 0
works), or we need to fix the functionality, or we need to do both, and add something like Browser.Plugins.Flash.available (=== true or === false)