Opened 11 years ago

Closed 10 years ago

#12965 closed defect (fixed)

NodeList.filter() doesn't work in webkitMobile builds

Reported by: Thomas Bachem Owned by: alex
Priority: high Milestone: 1.7
Component: Query Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

If built with the "webkitMobile" flag, the dojo._filterQueryResult() method will not be included and therefore breaks the filter() and orphan() methods of NodeLists.

Change History (2)

comment:1 Changed 11 years ago by Thomas Bachem

The missing dojo. _filterQueryResult() does actually break even more stuff, e.g. most of the dojo.NodeList?-traverse methods.

We patched it with the following lines so far:

if(typeof dojo._filterQueryResult != 'function') {
    dojo._filterQueryResult = function(nodeList, filter, root){
        var tmpNodeList = new dojo.NodeList();
        var filterFunc = function(node) {
            return dojo.query(filter, root).indexOf(node) != -1;
        for(var x = 0, te; te = nodeList[x]; x++){
            if(filterFunc(te)) tmpNodeList.push(te);
        return tmpNodeList;

comment:2 Changed 10 years ago by bill

Description: modified (diff)
Milestone: tbd1.7
Resolution: fixed
Status: newclosed

This was actually fixed with Kris' query refactor. At least, there's no webkitMobile flag used anymore around the definition of _filterQueryResult().

Note: See TracTickets for help on using tickets.