mirror of
https://github.com/flynx/object.js.git
synced 2025-10-30 02:50:10 +00:00
reverted to old code -- though functionally identical, the new version does not affect object display in chrome (both do not work in FF)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
339dc14c9f
commit
9d919187a5
@ -890,8 +890,11 @@ function Constructor(name, a, b, c){
|
|||||||
&& obj.__init__(...arguments)
|
&& obj.__init__(...arguments)
|
||||||
return obj }
|
return obj }
|
||||||
|
|
||||||
Object.defineProperty(_constructor, 'name', { value: name })
|
// XXX this changes the name but does not seem to affect the displayed
|
||||||
/*/ XXX is this still needed???
|
// doc in chrome...
|
||||||
|
// FF does not seem to be affected by either version of code...
|
||||||
|
//Object.defineProperty(_constructor, 'name', { value: name })
|
||||||
|
_constructor.name = name
|
||||||
// just in case the browser/node refuses to change the name, we'll make
|
// just in case the browser/node refuses to change the name, we'll make
|
||||||
// it a different offer ;)
|
// it a different offer ;)
|
||||||
_constructor.name == 'Constructor'
|
_constructor.name == 'Constructor'
|
||||||
@ -901,7 +904,6 @@ function Constructor(name, a, b, c){
|
|||||||
&& eval('_constructor = '+ _constructor
|
&& eval('_constructor = '+ _constructor
|
||||||
.toString()
|
.toString()
|
||||||
.replace(/Constructor/g, name))
|
.replace(/Constructor/g, name))
|
||||||
//*/
|
|
||||||
// set .toString(..)...
|
// set .toString(..)...
|
||||||
// NOTE: do this only if .toString(..) is not defined by user...
|
// NOTE: do this only if .toString(..) is not defined by user...
|
||||||
// XXX revise this test...
|
// XXX revise this test...
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ig-object",
|
"name": "ig-object",
|
||||||
"version": "5.4.6",
|
"version": "5.4.7",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "object.js",
|
"main": "object.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user