Skip to content

Commit ab3cc6e

Browse files
committed
Add html element constructors
1 parent e15a4e3 commit ab3cc6e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

urijs/URI-tests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ URI({
1212
query: 'foo=bar&bar=baz',
1313
fragment: 'frag'
1414
});
15+
URI(document.createElement('a'));
1516

1617
new URI();
1718
new URI('http://user:[email protected]:80/foo/bar.html?foo=bar&bar=baz#frag');
@@ -25,6 +26,7 @@ new URI({
2526
query: 'foo=bar&bar=baz',
2627
fragment: 'frag'
2728
});
29+
new URI(document.createElement('a'));
2830

2931
URI('').setQuery('foo', 'bar');
3032
URI('').setQuery({ foo: 'bar' });

urijs/URI.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ declare module uri {
133133

134134
interface URIStatic {
135135
(): URI;
136-
(value: string | URIOptions): URI;
136+
(value: string | URIOptions | HTMLElement): URI;
137137

138138
new (): URI;
139-
new (value: string | URIOptions): URI;
139+
new (value: string | URIOptions | HTMLElement): URI;
140140

141141
addQuery(data: Object, prop: string, value: string): Object;
142142
addQuery(data: Object, qryObj: Object): Object;

0 commit comments

Comments
 (0)