prototype/src/prototype.js

43 lines
1.3 KiB
JavaScript
Raw Normal View History

2007-01-18 22:24:27 +00:00
<%= include 'HEADER' %>
var Prototype = {
Version: '<%= PROTOTYPE_VERSION %>',
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/)
},
2007-01-18 22:24:27 +00:00
BrowserFeatures: {
XPath: !!document.evaluate,
ElementExtensions: !!window.HTMLElement,
SpecificElementExtensions:
document.createElement('div').__proto__ &&
document.createElement('div').__proto__ !==
document.createElement('form').__proto__
2007-01-18 22:24:27 +00:00
},
ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
emptyFunction: function() { },
2007-01-18 22:24:27 +00:00
K: function(x) { return x }
};
if (Prototype.Browser.MobileSafari)
Prototype.BrowserFeatures.SpecificElementExtensions = false;
if (Prototype.Browser.WebKit)
Prototype.BrowserFeatures.XPath = false;
2007-01-18 22:24:27 +00:00
<%= include 'base.js', 'string.js' %>
<%= include 'enumerable.js', 'array.js', 'number.js', 'hash.js', 'range.js' %>
2007-01-18 22:24:27 +00:00
<%= include 'ajax.js', 'dom.js', 'selector.js', 'form.js', 'event.js', 'deprecated.js' %>
2007-01-18 22:24:27 +00:00
Element.addMethods();