Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work with extjs #2

Closed
dburmeister opened this issue Nov 28, 2011 · 4 comments
Closed

does not work with extjs #2

dburmeister opened this issue Nov 28, 2011 · 4 comments

Comments

@dburmeister
Copy link

example "http://dev.sencha.com/deploy/ext-4.0.0/examples/desktop/desktop.html"

Just thought you should know.

thank you for building it it works great of other sites.

@DataTables
Copy link
Collaborator

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 :-)

@davermont
Copy link

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;

}

@DataTables
Copy link
Collaborator

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

@davermont
Copy link

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

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

No branches or pull requests

2 participants