Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support manipulating the origin #210

Closed
jussi-kalliokoski opened this issue May 8, 2015 · 9 comments
Closed

Support manipulating the origin #210

jussi-kalliokoski opened this issue May 8, 2015 · 9 comments

Comments

@jussi-kalliokoski
Copy link

Matching the semantics of the origin in https://url.spec.whatwg.org/#concept-url-origin

e.g.

URI("http://www.cdn.com/foo/bar").origin() // "http://www.cdn.com"
URI("http://www.cdn.com/foo/bar").origin("https://site.inter.net").toString() // "https://site.inter.net/foo/bar"
@rodneyrehm
Copy link
Member

Please provide a proper description of what you want to achieve. It is important to show context, because terms usually have multiple meanings.

@jussi-kalliokoski
Copy link
Author

@rodneyrehm:

Please provide a proper description of what you want to achieve. It is important to show context, because terms usually have multiple meanings.

Sorry, messed up and the description got left out! Added it now.

@rodneyrehm
Copy link
Member

what's the expected difference of .origin() and .authority() besides the scheme/protocol?

@justinmchase
Copy link
Contributor

@rodneyrehm Probably nothing. What is the current way to get the authority and scheme from a url?

@rodneyrehm
Copy link
Member

Probably nothing. What is the current way to get the authority and scheme from a url?

There is no way to get scheme and authority in one go. Do you feel like adding .origin() is something you'd like to try and send a PR for?

@justinmchase
Copy link
Contributor

Ok :)

#261

I didn't see a contibutors.md so I probably missed some things. This is the barebones:

  • the addition of the origin function
  • unit tests

I ran the test via the index.html file and they passed. If I'm missing anyting required let me know and I'll fix it up.

@rodneyrehm
Copy link
Member

I didn't see a contibutors.md

yeah, a couple of things need to be done in this repository… I was hoping to do that with the 2.0 rewrite - whenever that may happen…

rodneyrehm added a commit that referenced this issue Nov 12, 2015
@rodneyrehm
Copy link
Member

fixed by @justinmchase in #263

@rodneyrehm
Copy link
Member

released in v1.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants