Y
Y
Yuri Yerusalimsky2015-12-21 23:54:27
JavaScript
Yuri Yerusalimsky, 2015-12-21 23:54:27

How to get around the inability to handle the old browser (Google Chrome 27) Object.assign?

There is a jQuery plugin called Custombox to create modal popups. The script has a main JS file , in which on line 82 there is Object.assign, designed to copy all of its own enumerable properties of the source object (objects) to the target object. I observe an interesting situation - Google Chrome version 27, and maybe even earlier ones, does not understand what it is, gives an error " Object function Object() { [native code] } has no method 'assign' ". Is this something to do with the fact that chromes before version 28 are based on the Webkit engine, or is there another explanation for this? It just became interesting why such a problem arises, what is it connected with, and, of course, can it be easily fixed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
timfcsm, 2015-12-22
@werber

this is generally from ES2015 method .. it is not implemented in many places, in IE11, for example.
in the same place in the plugin repository, there is a file with polyfills https://github.com/dixso/custombox/blob/master/src...
connect it before the plugin itself

S
sanex3339, 2015-12-22
@sanex3339

Google Chrome version 27

But why? In EverGreen browsers, you should only be interested in n - 1 (n - 2 optional) versions, where n is the latest stable version.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question