object uses method not listed in Watch expression

22 visualitzacions
Ves al primer missatge no llegit

fvil...@gmail.com

no llegida,
12 de juny 2018, 5:10:0912/6/18
a Chrome DevTools


  1. In the code (generated by Adobe Animate CC - see screenshot) , the stage object calls a method called addChild. I don't see that method listed in the breakdown of the object in the Watch section. What gives?
  2. Where should I look for a list of events triggered by the object? I want to trigger code when the animation finishes.
  3. What general advice would you give to people trying to understand/tweak existing code in this way?





PhistucK

no llegida,
12 de juny 2018, 5:15:0412/6/18
a Google Chrome Developer Tools
1. I guess it is on the prototype/class/inheritance, so scroll down to see __proto__, expand it and you should see that method (or in its __proto__).
2. It depends on how events are defined. If they are initially defined on the object as oneventname = null, then they might show up like any other property, either on the instance or in the __proto__. If they are defined using addListener or the like, then each object defines its own way of firing events, storing its possible event list or listening to events.

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/42a22005-cbcc-4576-951b-be464ff99ee6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

francis vila

no llegida,
12 de juny 2018, 7:46:5012/6/18
a google-chrome-...@googlegroups.com
Gotcha! So __proto__ means "attributes and methods from parent classes" (I wouldn't have guessed). And the rule seems to be "if you don't see an attribute, scroll down and click on __proto__ , then repeat step again and again until it appears. Useful!

Respon a tots
Respon a l'autor
Reenvia
0 missatges nous