I need to return a previous object from an object, this is because I am using this
on function for tests.
See:
NodeList.prototype.style={
set background(a){
DefStyle("background",a,this)//aqui
},set backgroundColor(a){
DefStyle("backgroundColor",a,this/*não era isso que eu queria :/*/)//e aqui...
}
};
This this
returns the object / property style
of a prototype NodeList
(I'm using querySelectorAll
for the test, it generates some divs), but that was not the intention.
The this
would currently return an object with setters background
and backgroundColor
! Example (without using setters):
{background:null,backgroundColor:null}
Is there any way legal to return the relative object of the relative object of that object this
, which comes before prototype
?
Note:
- I want to do something like
parentElement
, but withoutDOM
, usingobjetos
/propriedades
, such as: -
Objeto={Huh:null,Propriedade:null};
-
Objeto.Propriedade.parent
, I wanted to returnObjeto
.