diff --git a/README.md b/README.md index ee19969..9006576 100755 --- a/README.md +++ b/README.md @@ -599,6 +599,8 @@ RawInstance(, , ..) - get result of `.__new__(..)` if defined, or - if prototype is a function or `.__call__(..)` is defined, create a wrapper function, or + - if constructor's `.__proto__` has a `.__rawinstance__(..)` use it + to create an instance, or - if constructor's `.__proto__` is a function (constructor) use it to create an instance, or - use `{}`. diff --git a/object.js b/object.js index ccbf2ca..8691a79 100755 --- a/object.js +++ b/object.js @@ -470,6 +470,8 @@ function(base, ...objects){ // -> call and use its return value // - if prototype is a function or if .__call__(..) is defined // -> use a wrapper function +// - if construct.__proto__ has .__rawinstance__(..) +// -> use it to create an instance // - if constructor.__proto__ is a constructor // -> use it to create an instance // - else