Closed bzbarsky closed 5 years ago
Per the current definition in the spec, it would return 'Array' and 'Node', but not the other ones, right?
Right. Note that none of these are returned by getOriginalProperty().
If you think it's not a big deal to open up getOriginalConstructor() [presumably renamed] to the "namespaces", we could. But it's not clear exactly how you'd use those. Would getOriginalProperty() work on the returned namespace objects? I was assuming an "unwrap the JS wrapper" strategy for getOriginalProperty(), in which case it would not. At which point having these namespace objects is fairly pointless.
Would getOriginalProperty() work on the returned namespace objects?
In Gecko it presumably would. This is how current privileged script touching web pages works, for example. There's a membrane in there, but in the end that's what happens.
I was assuming an "unwrap the JS wrapper" strategy for getOriginalProperty()
I'm not sure what you mean...
I'm not sure what you mean...
Rephrased in terms of https://github.com/domenic/get-originals/issues/10#issuecomment-393586192, I was assuming a "prototype based" strategy for getOriginalProperty(). But maybe that's not necessary.
It's really not clear to me how we decided what things are returned by getOriginalConstructor vs getOriginalProperty.
In terms of implementation,
JSON
is in more or less the same bucket asArray
at least in SpiderMonkey. AndReflect
is in the same bucket too.Just like
CSS
is more or less in the same bucket asNode
and `Image'.Per the current definition in the spec, it would return 'Array' and 'Node', but not the other ones, right?