Skip to content

dart:html.Location duplicates dart:uri.Uri #2758

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

Closed
DartBot opened this issue Apr 26, 2012 · 18 comments
Closed

dart:html.Location duplicates dart:uri.Uri #2758

DartBot opened this issue Apr 26, 2012 · 18 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Apr 26, 2012

This issue was originally filed by @seaneagan


The dart:html Location interface duplicates the members of dart:Uri uri. It would be better to kill Location, and have something like:

interface Window {
  //...
  String get location();
  void set location(String location);
  void replaceLocation(String location);
  List<String> get ancestorOrigins();
  void reload();
}

Then to access a Location-like object just do:

final uri = new Uri.fromString(window.location);
print("path: ${uri.path}");
// etc.

Note: see also issue #2711

@dgrove
Copy link
Contributor

dgrove commented Apr 26, 2012

Set owner to @vsmenon.
Added Area-DOM, Triaged labels.

@DartBot
Copy link
Author

DartBot commented May 24, 2012

This comment was originally written by @seaneagan


see also issue #2711

@peter-ahe-google
Copy link
Contributor

Issue #3200 has been merged into this issue.

@vsmenon
Copy link
Member

vsmenon commented Jul 16, 2012

Revisit this after: https://code.google.com/p/dart/issues/detail?id=3836

Need to make sure cross-frame security checks are in place.


Added this to the Later milestone.
Marked this as being blocked by #3836.

@iposva-google
Copy link
Contributor

Removed Area-DOM label.
Added Area-HTML label.

@vsmenon
Copy link
Member

vsmenon commented Aug 17, 2012

Removed the owner.

@DartBot
Copy link
Author

DartBot commented Sep 25, 2012

This comment was originally written by @seaneagan


AreaElement, AnchorElement, and WorkerLocation also duplicate Uri properties.

Probably AreaElement, AnchorElement, and Window could have a "uri" property which returns a custom implementation of Uri which in dart2js forwards to the corresponding JavaScript properties (e.g. hostname, port, etc.). WorkerLocation could surely go away.

@blois
Copy link

blois commented Jan 30, 2013

I think I'd prefer that Location implements Uri rather than replacing it, I'm a bit wary of merging the rest of Location APIs into Window.

@justinfagnani
Copy link
Contributor

Marked this as blocking #6679.

@efortuna
Copy link
Contributor

efortuna commented Oct 3, 2013

Added html-api label.

@blois
Copy link

blois commented Oct 3, 2013

Removed this from the Later milestone.
Added this to the M8 milestone.
Removed html-api label.

@blois
Copy link

blois commented Oct 3, 2013

Need to come up with a plan first, but might be possible (might not as well!)


Added Community-StarterBug label.

@blois
Copy link

blois commented Oct 15, 2013

Moving to later as I think it will take some manipulation to get these two to work together properly.

Seems like a uri property might work best.


Removed this from the M8 milestone.
Added this to the Later milestone.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@alan-knight
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement label.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html labels Dec 17, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed Priority-Medium labels Mar 1, 2016
@kevmoo
Copy link
Member

kevmoo commented Mar 26, 2018

By design. The Location class has methods like reload and replace that don't align with the shared Uri class in dart:core

@kevmoo kevmoo closed this as completed Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests