Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
038fc12d
Commit
038fc12d
authored
Feb 08, 2015
by
Pascal Hartig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flight: Upgrade transient dependencies
parent
3ed634b9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1332 additions
and
536 deletions
+1332
-536
examples/flight/node_modules/es5-shim/es5-sham.js
examples/flight/node_modules/es5-shim/es5-sham.js
+131
-11
examples/flight/node_modules/es5-shim/es5-shim.js
examples/flight/node_modules/es5-shim/es5-shim.js
+695
-113
examples/flight/node_modules/jquery/dist/jquery.js
examples/flight/node_modules/jquery/dist/jquery.js
+506
-412
No files found.
examples/flight/node_modules/es5-shim/es5-sham.js
View file @
038fc12d
// Copyright 2009-2012 by contributors, MIT License
// vim: ts=4 sts=4 sw=4 expandtab
//Add semicolon to prevent IIFE from being passed as argument to concated code.
;
// Module systems magic dance
(
function
(
definition
)
{
// RequireJS
...
...
@@ -15,10 +17,28 @@
}
})(
function
()
{
var
call
=
Function
.
prototype
.
call
;
var
prototypeOfObject
=
Object
.
prototype
;
var
owns
=
call
.
bind
(
prototypeOfObject
.
hasOwnProperty
);
// If JS engine supports accessors creating shortcuts.
var
defineGetter
;
var
defineSetter
;
var
lookupGetter
;
var
lookupSetter
;
var
supportsAccessors
;
if
((
supportsAccessors
=
owns
(
prototypeOfObject
,
"
__defineGetter__
"
)))
{
defineGetter
=
call
.
bind
(
prototypeOfObject
.
__defineGetter__
);
defineSetter
=
call
.
bind
(
prototypeOfObject
.
__defineSetter__
);
lookupGetter
=
call
.
bind
(
prototypeOfObject
.
__lookupGetter__
);
lookupSetter
=
call
.
bind
(
prototypeOfObject
.
__lookupSetter__
);
}
// ES5 15.2.3.2
// http://es5.github.com/#x15.2.3.2
if
(
!
Object
.
getPrototypeOf
)
{
// https://github.com/
kriskowal
/es5-shim/issues#issue/2
// https://github.com/
es-shims
/es5-shim/issues#issue/2
// http://ejohn.org/blog/objectgetprototypeof/
// recommended by fschaefer on github
Object
.
getPrototypeOf
=
function
getPrototypeOf
(
object
)
{
...
...
@@ -30,15 +50,53 @@ if (!Object.getPrototypeOf) {
};
}
// ES5 15.2.3.3
// http://es5.github.com/#x15.2.3.3
if
(
!
Object
.
getOwnPropertyDescriptor
)
{
//ES5 15.2.3.3
//http://es5.github.com/#x15.2.3.3
function
doesGetOwnPropertyDescriptorWork
(
object
)
{
try
{
object
.
sentinel
=
0
;
return
Object
.
getOwnPropertyDescriptor
(
object
,
"
sentinel
"
).
value
===
0
;
}
catch
(
exception
)
{
// returns falsy
}
}
//check whether getOwnPropertyDescriptor works if it's given. Otherwise,
//shim partially.
if
(
Object
.
defineProperty
)
{
var
getOwnPropertyDescriptorWorksOnObject
=
doesGetOwnPropertyDescriptorWork
({});
var
getOwnPropertyDescriptorWorksOnDom
=
typeof
document
==
"
undefined
"
||
doesGetOwnPropertyDescriptorWork
(
document
.
createElement
(
"
div
"
));
if
(
!
getOwnPropertyDescriptorWorksOnDom
||
!
getOwnPropertyDescriptorWorksOnObject
)
{
var
getOwnPropertyDescriptorFallback
=
Object
.
getOwnPropertyDescriptor
;
}
}
if
(
!
Object
.
getOwnPropertyDescriptor
||
getOwnPropertyDescriptorFallback
)
{
var
ERR_NON_OBJECT
=
"
Object.getOwnPropertyDescriptor called on a non-object:
"
;
Object
.
getOwnPropertyDescriptor
=
function
getOwnPropertyDescriptor
(
object
,
property
)
{
if
((
typeof
object
!=
"
object
"
&&
typeof
object
!=
"
function
"
)
||
object
===
null
)
{
throw
new
TypeError
(
ERR_NON_OBJECT
+
object
);
}
// make a valiant attempt to use the real getOwnPropertyDescriptor
// for I8's DOM elements.
if
(
getOwnPropertyDescriptorFallback
)
{
try
{
return
getOwnPropertyDescriptorFallback
.
call
(
Object
,
object
,
property
);
}
catch
(
exception
)
{
// try the shim if the real one doesn't work
}
}
// If object does not owns property return undefined immediately.
if
(
!
owns
(
object
,
property
))
{
return
;
...
...
@@ -81,6 +139,7 @@ if (!Object.getOwnPropertyDescriptor) {
// If we got this far we know that object has an own property that is
// not an accessor so we set it as a value and return descriptor.
descriptor
.
value
=
object
[
property
];
descriptor
.
writable
=
true
;
return
descriptor
;
};
}
...
...
@@ -96,15 +155,64 @@ if (!Object.getOwnPropertyNames) {
// ES5 15.2.3.5
// http://es5.github.com/#x15.2.3.5
if
(
!
Object
.
create
)
{
// Contributed by Brandon Benvie, October, 2012
var
createEmpty
;
var
supportsProto
=
Object
.
prototype
.
__proto__
===
null
;
if
(
supportsProto
||
typeof
document
==
'
undefined
'
)
{
createEmpty
=
function
()
{
return
{
"
__proto__
"
:
null
};
};
}
else
{
// In old IE __proto__ can't be used to manually set `null`, nor does
// any other method exist to make an object that inherits from nothing,
// aside from Object.prototype itself. Instead, create a new global
// object and *steal* its Object.prototype and strip it bare. This is
// used as the prototype to create nullary objects.
createEmpty
=
function
()
{
var
iframe
=
document
.
createElement
(
'
iframe
'
);
var
parent
=
document
.
body
||
document
.
documentElement
;
iframe
.
style
.
display
=
'
none
'
;
parent
.
appendChild
(
iframe
);
iframe
.
src
=
'
javascript:
'
;
var
empty
=
iframe
.
contentWindow
.
Object
.
prototype
;
parent
.
removeChild
(
iframe
);
iframe
=
null
;
delete
empty
.
constructor
;
delete
empty
.
hasOwnProperty
;
delete
empty
.
propertyIsEnumerable
;
delete
empty
.
isPrototypeOf
;
delete
empty
.
toLocaleString
;
delete
empty
.
toString
;
delete
empty
.
valueOf
;
empty
.
__proto__
=
null
;
function
Empty
()
{}
Empty
.
prototype
=
empty
;
// short-circuit future calls
createEmpty
=
function
()
{
return
new
Empty
();
};
return
new
Empty
();
};
}
Object
.
create
=
function
create
(
prototype
,
properties
)
{
var
object
;
function
Type
()
{}
// An empty constructor.
if
(
prototype
===
null
)
{
object
=
{
"
__proto__
"
:
null
}
;
object
=
createEmpty
()
;
}
else
{
if
(
typeof
prototype
!=
"
object
"
)
{
throw
new
TypeError
(
"
typeof prototype[
"
+
(
typeof
prototype
)
+
"
] != 'object'
"
);
if
(
typeof
prototype
!==
"
object
"
&&
typeof
prototype
!==
"
function
"
)
{
// In the native implementation `parent` can be `null`
// OR *any* `instanceof Object` (Object|Function|Array|RegExp|etc)
// Use `typeof` tho, b/c in old IE, DOM elements are not `instanceof Object`
// like they are in modern browsers. Using `Object.create` on DOM elements
// is...err...probably inappropriate, but the native version allows for it.
throw
new
TypeError
(
"
Object prototype may only be an Object or null
"
);
// same msg as Chrome
}
var
Type
=
function
()
{};
Type
.
prototype
=
prototype
;
object
=
new
Type
();
// IE has no built-in implementation of `Object.getPrototypeOf`
...
...
@@ -113,9 +221,11 @@ if (!Object.create) {
// objects created using `Object.create`
object
.
__proto__
=
prototype
;
}
if
(
properties
!==
void
0
)
{
Object
.
defineProperties
(
object
,
properties
);
}
return
object
;
};
}
...
...
@@ -125,7 +235,7 @@ if (!Object.create) {
// Patch for WebKit and IE8 standard mode
// Designed by hax <hax.github.com>
// related issue: https://github.com/
kriskowal
/es5-shim/issues#issue/5
// related issue: https://github.com/
es-shims
/es5-shim/issues#issue/5
// IE8 Reference:
// http://msdn.microsoft.com/en-us/library/dd282900.aspx
// http://msdn.microsoft.com/en-us/library/dd229916.aspx
...
...
@@ -148,7 +258,8 @@ if (Object.defineProperty) {
var
definePropertyWorksOnDom
=
typeof
document
==
"
undefined
"
||
doesDefinePropertyWork
(
document
.
createElement
(
"
div
"
));
if
(
!
definePropertyWorksOnObject
||
!
definePropertyWorksOnDom
)
{
var
definePropertyFallback
=
Object
.
defineProperty
;
var
definePropertyFallback
=
Object
.
defineProperty
,
definePropertiesFallback
=
Object
.
defineProperties
;
}
}
...
...
@@ -228,8 +339,17 @@ if (!Object.defineProperty || definePropertyFallback) {
// ES5 15.2.3.7
// http://es5.github.com/#x15.2.3.7
if
(
!
Object
.
defineProperties
)
{
if
(
!
Object
.
defineProperties
||
definePropertiesFallback
)
{
Object
.
defineProperties
=
function
defineProperties
(
object
,
properties
)
{
// make a valiant attempt to use the real defineProperties
if
(
definePropertiesFallback
)
{
try
{
return
definePropertiesFallback
.
call
(
Object
,
object
,
properties
);
}
catch
(
exception
)
{
// try the shim if the real one doesn't work
}
}
for
(
var
property
in
properties
)
{
if
(
owns
(
properties
,
property
)
&&
property
!=
"
__proto__
"
)
{
Object
.
defineProperty
(
object
,
property
,
properties
[
property
]);
...
...
examples/flight/node_modules/es5-shim/es5-shim.js
View file @
038fc12d
This diff is collapsed.
Click to expand it.
examples/flight/node_modules/jquery/dist/jquery.js
View file @
038fc12d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment