From ab3cc6e0e0c362472527c174c2e7c1f6e21968c1 Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 24 Apr 2015 23:30:16 -0400 Subject: [PATCH] Add html element constructors --- urijs/URI-tests.ts | 2 ++ urijs/URI.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/urijs/URI-tests.ts b/urijs/URI-tests.ts index 0c5efc8c7..2ccd29d9c 100644 --- a/urijs/URI-tests.ts +++ b/urijs/URI-tests.ts @@ -12,6 +12,7 @@ URI({ query: 'foo=bar&bar=baz', fragment: 'frag' }); +URI(document.createElement('a')); new URI(); new URI('http://user:pass@example.org:80/foo/bar.html?foo=bar&bar=baz#frag'); @@ -25,6 +26,7 @@ new URI({ query: 'foo=bar&bar=baz', fragment: 'frag' }); +new URI(document.createElement('a')); URI('').setQuery('foo', 'bar'); URI('').setQuery({ foo: 'bar' }); diff --git a/urijs/URI.d.ts b/urijs/URI.d.ts index f745c6164..b59dad6aa 100644 --- a/urijs/URI.d.ts +++ b/urijs/URI.d.ts @@ -133,10 +133,10 @@ declare module uri { interface URIStatic { (): URI; - (value: string | URIOptions): URI; + (value: string | URIOptions | HTMLElement): URI; new (): URI; - new (value: string | URIOptions): URI; + new (value: string | URIOptions | HTMLElement): URI; addQuery(data: Object, prop: string, value: string): Object; addQuery(data: Object, qryObj: Object): Object;