To check for native <details> support you may want to use a more robust feature test. WebKit had implemented the IDL attributes (so 'open' in document.createElement('details') === true) long before it actually supported <details>.
'open' in document.createElement('details') === true
For a more robust solution, see http://mathiasbynens.be/notes/html5-details-jquery and especially http://mathiasbynens.be/notes/html5-details-jquery#comment-35
Oh, thank you for this information!
Did you know about my polyfill before you started yours? Just wondering if there was anything in particular you didn’t like about my version. I appreciate any feedback!
No. I just didn't know until I was almost done. If I had seen it before I had probably never created my own polyfill ;)
Now it's my goal to make it not-jQuery-dependend.
Added better feature test (Thanks to Mathias Bynens). Closes #1
Could you add a comment with a link to http://mathiasbynens.be/notes/html5-details-jquery above the feature test?
Honor to whom honor is due - fixes #1