CSS: Don't name the anonymous swap function

IE8 doesn't like named anonymous expressions. Not naming the function
expression reduces the gzipped size by 5 bytes.

In ECMAScript 2015 the function will get the name inferred from the
variable name (here: swap) anyway.

(cherry-picked from e847574fc7)

Refs 02a9d9f94b
This commit is contained in:
Michał Gołębiowski
2015-06-01 19:55:18 +02:00
parent 8e92e1ea3c
commit 0019a463bd

View File

@@ -1,7 +1,7 @@
define(function() {
// A method for quickly swapping in/out CSS properties to get correct calculations.
return function swap( elem, options, callback, args ) {
return function( elem, options, callback, args ) {
var ret, name,
old = {};