pkdevbox / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

Filtering iui click listener #274

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Sometimes, we don't want iui's listener check the clicked link. for example, if 
we insert some riche elements (from a database ..) where we can't control the 
links (with the right target ...), these will be analyzed by iui and we will 
have some errors or the click action will be prevented.

Maybe we can create an option which can help to filtering the links. Example:

window.iui =
{
    isAnalyzeLink: undefined,
    ...
}

addEventListener("click", function(event)
{
    var link = findParent(event.target, "a");
    if (link && (window.iui.isAnalyzeLink == undefined || window.iui.isAnalyzeLink(link, event))){
...
}

Cheers

Julien Roche

Original issue reported on code.google.com by roche....@gmail.com on 19 Oct 2010 at 2:20