prototype: Add Prototype.Browser.MobileSafari which evaluates to true on the iPhone's browser.
This commit is contained in:
parent
8077a0ccee
commit
5645a0783f
@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Add Prototype.Browser.MobileSafari which evaluates to true on the iPhone's browser. [sam]
|
||||
|
||||
* Optimize Selector#match and Element#match for simple selectors. Closes #9082. [Andrew Dupont]
|
||||
|
||||
* Remove the dependency on Element.ClassNames from Element#addClassName/removeClassName/toggleClassName, and deprecate Element.ClassNames. Closes #9073. [Tobie Langel]
|
||||
|
13
src/prototype.js
vendored
13
src/prototype.js
vendored
@ -7,16 +7,16 @@ var Prototype = {
|
||||
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
|
||||
Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
|
||||
MobileSafari: !!navigator.userAgent.match(/iPhone.*Mobile.*Safari/)
|
||||
},
|
||||
|
||||
BrowserFeatures: {
|
||||
XPath: !!document.evaluate,
|
||||
ElementExtensions: !!window.HTMLElement,
|
||||
SpecificElementExtensions:
|
||||
navigator.userAgent.indexOf('iPhone') == -1 &&
|
||||
(document.createElement('div').__proto__ !==
|
||||
document.createElement('form').__proto__)
|
||||
document.createElement('div').__proto__ !==
|
||||
document.createElement('form').__proto__
|
||||
},
|
||||
|
||||
ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
|
||||
@ -24,7 +24,10 @@ var Prototype = {
|
||||
|
||||
emptyFunction: function() { },
|
||||
K: function(x) { return x }
|
||||
}
|
||||
};
|
||||
|
||||
if (Prototype.Browser.MobileSafari)
|
||||
Prototype.BrowserFeatures.SpecificElementExtensions = false;
|
||||
|
||||
<%= include 'base.js', 'string.js' %>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user