Removed support module. Typeof construct does not work reliably enough, and workarounds have been added to the event module
This commit is contained in:
parent
e83c33e65e
commit
72500234b5
24
kis.js
24
kis.js
@ -53,23 +53,6 @@
|
|||||||
|
|
||||||
window.$ = $;
|
window.$ = $;
|
||||||
|
|
||||||
/**
|
|
||||||
* Support
|
|
||||||
*
|
|
||||||
* Module for browser feature detection
|
|
||||||
*/
|
|
||||||
(function (){
|
|
||||||
|
|
||||||
var support = {
|
|
||||||
attachEvent: typeof window.attachEvent === "function",
|
|
||||||
addEventListener: typeof window.addEventListener === "function",
|
|
||||||
querySelector: typeof document.querySelectorAll === "function"
|
|
||||||
};
|
|
||||||
|
|
||||||
$_.support = support;
|
|
||||||
|
|
||||||
}());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajax
|
* Ajax
|
||||||
*
|
*
|
||||||
@ -291,17 +274,14 @@
|
|||||||
* Event object
|
* Event object
|
||||||
*
|
*
|
||||||
* Event api wrapper
|
* Event api wrapper
|
||||||
* Requires Support module
|
|
||||||
*/
|
*/
|
||||||
(function (){
|
(function (){
|
||||||
|
|
||||||
var attach, remove, add_remove, e, support;
|
var attach, remove, add_remove, e;
|
||||||
|
|
||||||
support = $_.support;
|
|
||||||
|
|
||||||
// Define the proper attach and remove functions
|
// Define the proper attach and remove functions
|
||||||
// based on browser support
|
// based on browser support
|
||||||
if(support.addEventListener === true)
|
if(typeof document.addEventListener !== "undefined")
|
||||||
{
|
{
|
||||||
attach = function (sel, event, callback)
|
attach = function (sel, event, callback)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user