diff --git a/wp-includes/js/prototype.js b/wp-includes/js/prototype.js
index 5c73462946..9fe6e1243b 100644
--- a/wp-includes/js/prototype.js
+++ b/wp-includes/js/prototype.js
@@ -1,5 +1,5 @@
-/* Prototype JavaScript framework, version 1.6.0
- * (c) 2005-2007 Sam Stephenson
+/* Prototype JavaScript framework, version 1.6.1
+ * (c) 2005-2009 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
@@ -7,23 +7,43 @@
*--------------------------------------------------------------------------*/
var Prototype = {
- Version: '1.6.0',
+ Version: '1.6.1',
- Browser: {
- IE: !!(window.attachEvent && !window.opera),
- Opera: !!window.opera,
- WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
- MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
- },
+ Browser: (function(){
+ var ua = navigator.userAgent;
+ var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
+ return {
+ IE: !!window.attachEvent && !isOpera,
+ Opera: isOpera,
+ WebKit: ua.indexOf('AppleWebKit/') > -1,
+ Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
+ MobileSafari: /Apple.*Mobile.*Safari/.test(ua)
+ }
+ })(),
BrowserFeatures: {
XPath: !!document.evaluate,
- ElementExtensions: !!window.HTMLElement,
- SpecificElementExtensions:
- document.createElement('div').__proto__ &&
- document.createElement('div').__proto__ !==
- document.createElement('form').__proto__
+ SelectorsAPI: !!document.querySelector,
+ ElementExtensions: (function() {
+ var constructor = window.Element || window.HTMLElement;
+ return !!(constructor && constructor.prototype);
+ })(),
+ SpecificElementExtensions: (function() {
+ if (typeof window.HTMLDivElement !== 'undefined')
+ return true;
+
+ var div = document.createElement('div');
+ var form = document.createElement('form');
+ var isSupported = false;
+
+ if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
+ isSupported = true;
+ }
+
+ div = form = null;
+
+ return isSupported;
+ })()
},
ScriptFragment: '');
- },
- REQUIRED_PROTOTYPE: '1.6',
- load: function() {
- function convertVersionString(versionString){
- var r = versionString.split('.');
- return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
+ try{
+ // inserting via DOM fails in Safari 2.0, so brute force approach
+ document.write('