OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 23 matching lines...) Expand all Loading... |
34 ] interface Location { | 34 ] interface Location { |
35 // |assign|, |replace|, and *writing* |href| do not require a security | 35 // |assign|, |replace|, and *writing* |href| do not require a security |
36 // check, as they *change* the page, and thus these do not change any | 36 // check, as they *change* the page, and thus these do not change any |
37 // property of an *existing* document at a different origin. | 37 // property of an *existing* document at a different origin. |
38 // However, *reading* |href|, or accessing any component, is a security | 38 // However, *reading* |href|, or accessing any component, is a security |
39 // problem, since that allows tracking navigation. | 39 // problem, since that allows tracking navigation. |
40 [CallWith=(CurrentWindow,EnteredWindow), DoNotCheckSecurity, RaisesException
] void assign(DOMString url); | 40 [CallWith=(CurrentWindow,EnteredWindow), DoNotCheckSecurity, RaisesException
] void assign(DOMString url); |
41 [CallWith=(CurrentWindow,EnteredWindow), DoNotCheckSecurity, RaisesException
] void replace(DOMString url); | 41 [CallWith=(CurrentWindow,EnteredWindow), DoNotCheckSecurity, RaisesException
] void replace(DOMString url); |
42 [CallWith=CurrentWindow] void reload(); | 42 [CallWith=CurrentWindow] void reload(); |
43 | 43 |
44 // TODO(philipj): ancestorOrigins should have [SameObject] and be of type | 44 // TODO(foolip): ancestorOrigins should have [SameObject] and be of type |
45 // DOMString[], i.e. it should return the same array every time. | 45 // DOMString[], i.e. it should return the same array every time. |
46 [Measure] readonly attribute DOMStringList ancestorOrigins; | 46 [Measure] readonly attribute DOMStringList ancestorOrigins; |
47 | 47 |
48 // TODO(philipj): Per spec, Location implements URLUtils. The below is | 48 // TODO(foolip): Per spec, Location implements URLUtils. The below is |
49 // mostly like the URLUtils interface, but with some members missing and | 49 // mostly like the URLUtils interface, but with some members missing and |
50 // using DOMString instead of USVString. | 50 // using DOMString instead of USVString. |
51 [SetterCallWith=(CurrentWindow,EnteredWindow), DoNotCheckSecurity=Setter] at
tribute DOMString href; | 51 [SetterCallWith=(CurrentWindow,EnteredWindow), DoNotCheckSecurity=Setter] at
tribute DOMString href; |
52 [NotEnumerable, ImplementedAs=href] DOMString toString(); | 52 [NotEnumerable, ImplementedAs=href] DOMString toString(); |
53 readonly attribute DOMString origin; | 53 readonly attribute DOMString origin; |
54 | 54 |
55 [SetterCallWith=(CurrentWindow,EnteredWindow), RaisesException=Setter] attri
bute DOMString protocol; | 55 [SetterCallWith=(CurrentWindow,EnteredWindow), RaisesException=Setter] attri
bute DOMString protocol; |
56 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString host; | 56 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString host; |
57 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString hostname; | 57 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString hostname; |
58 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString port; | 58 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString port; |
59 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString pathname; | 59 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString pathname; |
60 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString search; | 60 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString search; |
61 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString hash; | 61 [SetterCallWith=(CurrentWindow,EnteredWindow)] attribute DOMString hash; |
62 | 62 |
63 // TODO(philipj): Location does not have a valueOf() override in the spec. | 63 // TODO(foolip): Location does not have a valueOf() override in the spec. |
64 // See the comment in Location.h for the purpose of this. | 64 // See the comment in Location.h for the purpose of this. |
65 [NotEnumerable, CallWith=ThisValue] any valueOf(); | 65 [NotEnumerable, CallWith=ThisValue] any valueOf(); |
66 }; | 66 }; |
OLD | NEW |