Code Monkey home page Code Monkey logo

Comments (4)

 avatar commented on August 28, 2024

Hi - Thanks for the feedback. extjs is one of the main libraries that I don't currently have a parser for - I'll look at what options extjs provides to get the events that have been assigned through it and see if I can add a suitable parser :-)

from visualevent.

davermont avatar davermont commented on August 28, 2024

Here's a parser for ExtJS 4.0.7:

(function(window, document, $, VisualEvent){

VisualEvent.parsers.push( function () {

if (typeof Ext == "undefined" || Ext.versions.core.version != '4.0.7') return [];

var elements = [];

for ( var j in Ext.cache ) {
    var cache = Ext.cache[j];
    if ( typeof cache.events == 'object' ) {

        var events = cache.events;
        if ( !$.isEmptyObject( events ) ) {

            var listeners = [];

            for ( var event in events ) {
                // there is an array of handlers for each event
                if (events[event].length > 0) {
                    for (var k=0; k<events[event].length; ++k) {
                        listeners.push( {
                            "type": event,
                            "func": events[event][k].fn.toString(),
                            "removed": false,
                            "source": 'Ext'
                        } );
                    }
                }
            }

            if (listeners.length > 0) {
                elements.push( {
                    "node": cache.el.dom,
                    "listeners": listeners
                } );
            }
        }
    }
}

return elements;

}

from visualevent.

 avatar commented on August 28, 2024

Superb! Thanks very much for sharing that with us davermont. I've just committed your parser in, and it works well on the ExtJS 4.0 demos. I've made one small alteration which is to allow it to work with all 4.0.x versions rather than just 4.0.7 - 4.0.0 seems to work great, so I doubt there would be much of a problem with the minor versions in the middle.

Regards,
Allan

from visualevent.

davermont avatar davermont commented on August 28, 2024

Glad to help, Allan. I have to say your architecture made the job really easy; the parsers don't need to be elaborate or complicated.Thanks for creating VisualEvent! - Dave

On May 28, 2012, 4:26 am, Allan Jardine wrote:
Superb! Thanks very much for sharing that with us davermont. I've just committed your parser in, and it works well on the ExtJS 4.0 demos. I've made one small alteration which is to allow it to work with all 4.0.x versions rather than just 4.0.7 - 4.0.0 seems to work great, so I doubt there would be much of a problem with the minor versions in the middle. Regards, Allan --- Reply to this email directly or view it on GitHub: #2 (comment)


Sent using KiteDesk

from visualevent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.