-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Comments
This comment was originally written by @seaneagan see also issue #2711 |
Issue #3200 has been merged into this issue. |
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. |
Removed the owner. |
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. |
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. |
Marked this as blocking #6679. |
Added html-api label. |
Need to come up with a plan first, but might be possible (might not as well!) Added Community-StarterBug label. |
Removed Area-HTML label. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Removed Type-Defect label. |
By design. The Location class has methods like |
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
The text was updated successfully, but these errors were encountered: