From 987e0003329cfd0c7723c4621d4c42d850b74d25 Mon Sep 17 00:00:00 2001 From: Sean Hill Date: Fri, 15 Feb 2013 13:09:07 -0600 Subject: [PATCH] Add definition for selector property. --- jquery/jquery-tests.ts | 7 +++++++ jquery/jquery.d.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts index 65235e105..29da1c542 100644 --- a/jquery/jquery-tests.ts +++ b/jquery/jquery-tests.ts @@ -2220,6 +2220,13 @@ function test_prop() { var title: string = $('option:selected', this).prop('title'); } + +function test_selector() { + var $main = $('#main'); + var $mainDivs = $('div', $main); + return $mainDivs.selector == '#main div'; +} + function test_text() { var str = $("p:first").text(); $("p:last").html(str); diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index cdae1d8ec..4d650c98f 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -700,6 +700,7 @@ interface JQuery { PROPERTIES ***********/ length: number; + selector: string; [x: string]: HTMLElement; [x: number]: HTMLElement;