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

Extending/embedding Aja #26

Open
IngwiePhoenix opened this issue Jan 13, 2016 · 2 comments
Open

Extending/embedding Aja #26

IngwiePhoenix opened this issue Jan 13, 2016 · 2 comments
Assignees
Milestone

Comments

@IngwiePhoenix
Copy link

IngwiePhoenix commented Jan 13, 2016

I am working on a tiny meta-framework that I use throughout my application. One of it's features i want to improve is AJAX.

Aja seems a great choice, however:

https://github.com/krampstudio/aja.js/blob/master/src/aja.js#L254-L263

I can't extend this. My framework uses the qwery selector engine, so I would like to change this method in order to use my own engine instead.

So, how could I best extend Aja?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29824283-extending-embedding-aja?utm_campaign=plugin&utm_content=tracker%2F6332594&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F6332594&utm_medium=issues&utm_source=github).
@krampstudio
Copy link
Owner

The best would be that we could configure aja in order to define the way the selection is made, something like :

aja.querySelectorAll = (selector) => $(selector);

and inside the into method :

          into : function(selector){
                return _chain.call(this, 'into', selector, validators.selector, function(selector){
                    if(typeof selector === 'string'){
                        if(typeof aja.querySelectorAll === 'function'){
                                return aja.querySelectorAll(selector);
                        } 
                       return document.querySelectorAll(selector);
                    }
                    if(selector instanceof HTMLElement){
                        return [selector];
                    }
                });
            }

But I don't have the time to make the implementation right now, it could be achieved for the next release.

@krampstudio krampstudio added this to the 1.0.0 milestone Feb 28, 2016
@krampstudio krampstudio self-assigned this Feb 28, 2016
@krampstudio
Copy link
Owner

In progress

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

No branches or pull requests

2 participants