Results 1 to 2 of 2

Thread: get nearest enclosing component of a raw DOM element

  1. #1
    Sencha User
    Join Date
    Dec 2011

    Default Answered: get nearest enclosing component of a raw DOM element

    I have a reference to the DOM element that was created inside a component that is capable of rendering arbitrary HTML. How do I get the component containing this element?

    function findComponentByChild(rawElem) {
      var foundCmp; { return (foundCmp = Ext.getCmp( !== undefined; });
      return foundCmp;
    The problem with the code above is that passing a function instead of an expression to findParent() is not documented.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Sydney, Australia
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts