FLUID-5702: Correct DOM binder behaviour of returning container on missing selector to reflect change in jQuery API

Metadata

Source
FLUID-5702
Type
Bug
Priority
Major
Status
Closed
Resolution
Duplicate
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2015-06-29T14:46:53.700-0400
Updated
2021-05-05T08:29:44.538-0400
Versions
  1. 1.5
Fixed Versions
  1. 2.0
Component
  1. Framework

Description

Long in the past, when we wrote the DOM binder, jQuery had a very silly API contract which would return the context of a scoped selector if the selector itself was missing. jQuery fixed this in their own API in jQuery 1.4, but our conformance to this old contract has continued to annoy integrators. We should fix up our implementation to return a 0-length jQuery in this case:

http://api.jquery.com/jQuery/#returning-empty-set

Comments

  • Antranig Basman commented 2016-02-12T11:12:26.485-0500

    Duplicate of FLUID-5821

  • Antranig Basman commented 2021-05-05T08:29:44.538-0400

    Actually it is rather more helpful to produce an error if the selector is missing. In fact implementing this in the FLUID-6580 branch revealed an extremely long-standing framework bug which attempted to resolve "{that}.dom.locate" into the DOM binder's selectors in the first instance.