Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Support NodeFront in Node reps #92

Closed
juliandescottes opened this issue Feb 20, 2017 · 3 comments
Closed

Support NodeFront in Node reps #92

juliandescottes opened this issue Feb 20, 2017 · 3 comments

Comments

@juliandescottes
Copy link
Member

Currently investigating using Reps to display grid containers in the new Inspector Grid panel (Bug 1338298).

Most of the complex reps are expecting grips (generated from ObjectActors). But the inspector is usually dealing with NodeActors, not with ObjectActors.

Initially I wanted to add an actor method to instantiate an ObjectActor from a NodeActor. The more I investigate on this path the more it seems like ObjectActor & grips are tightly linked to the debugger domain. I thought grips were kind a of a generic/shared representation of values for actors, but I guess this was wrong.

@nchevobbe suggested two options:

  • support NodeFront objects in ElementNode rep
  • convert (as much as possible) NodeFront to grips on the client side

Given what I understand about ObjectActors and grips I am tempted to go for the 1st option: reps should not force callers to use grips. Regarding the callbacks onInspectIconClick & onDOMNodeMouseOver, they should be called with the object used to create the rep. Meaning that if you create an ElementNode rep using NodeFronts, the argument of your callbacks will be a NodeFront.

Thoughts @nchevobbe @janodvarko ?

@nchevobbe
Copy link
Member

@juliandescottes is it still wanted ?
I'm moving reps to devtools-core and I was wondering if this is still valid.

@juliandescottes
Copy link
Member Author

We have implemented workarounds everywhere for now, by converting NodeFronts to grips:

I think it would be nicer to have an actual support for NodeFronts. If we don't implement this, then let's open a bug in bugzilla to cleanup the duplicated translation linked above.

@nchevobbe
Copy link
Member

Thanks @juliandescottes !
I moved the issue to firefox-devtools/devtools-core#411

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants