Closed Bug 864658 Opened 11 years ago Closed 11 years ago

URL instances should inherit api signature of window.location

Categories

(Add-on SDK Graveyard :: General, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: evold, Assigned: jsantell)

References

Details

(Whiteboard: [good first bug])

Attachments

(1 file)

Summary: URL instances should inherit structure of window.location → URL instances should inherit api signature of window.location
Whiteboard: [good first bug]
Just a note, `Location`'s implementation for `host` is hostname + por, whereas our currently implementation of `host` is `Location`'s `hostname`
Assignee: nobody → jsantell
Erik, is this what you had in mind? Also this would complete #861084 as well
https://github.com/jsantell/addon-sdk/commit/31fb98f10cee787118b39e93c31853384e3906ce
Flags: needinfo?(evold)
Attached file GH Pull Request 991
Attachment #747125 - Flags: review?(evold)
Comment on attachment 747125 [details]
GH Pull Request 991

Looks great to me, we should get Irakli's approval tho
Attachment #747125 - Flags: review?(evold)
Attachment #747125 - Flags: review+
Attachment #747125 - Flags: feedback?(rFobic)
Flags: needinfo?(evold)
window.location does not implements `tld` property and I don't think we should add it. Instead we should define `getTDL(urlString)` function to the module.
Attachment #747125 - Flags: feedback?(rFobic) → feedback-
Other than that it looks fine by me.
As a side note [nsIURLParser](https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIURLParser) maybe a better way to parse URLs than regexp replace.
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/c32dcc5617073d75c31b552cb5292016cab31952
Bug 864658, URL API should have same properties as window.location, also
fixes bug 861084

https://github.com/mozilla/addon-sdk/commit/86fb910bdcf8d5dcc9f5dd3bb6db80030c640b10
Merge pull request #991 from jsantell/url-matches-window-location

Fix Bug 864658, URL API should have same properties as window.location, also fixes bug 861084 (getTLD method) r+=@erikvold
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Commits pushed to integration at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/c32dcc5617073d75c31b552cb5292016cab31952
Bug 864658, URL API should have same properties as window.location, also

https://github.com/mozilla/addon-sdk/commit/86fb910bdcf8d5dcc9f5dd3bb6db80030c640b10
Merge pull request #991 from jsantell/url-matches-window-location
Depends on: 875812
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: