aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlimageelement.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-03-12 19:16:50 -0400
committerbors-servo <release+servo@mozilla.com>2014-03-12 19:16:50 -0400
commitf2e46bd8571fc0f289cfab2e534a9375d125335a (patch)
tree8aecb79889d592343f3998087a7dd68a137ec4b0 /src/components/script/dom/htmlimageelement.rs
parentb84bd4c894e0e0c381b4485fd25b3df873df321e (diff)
parenta15cac53bc4278e409ca850a79519f5d54e662b5 (diff)
downloadservo-f2e46bd8571fc0f289cfab2e534a9375d125335a.tar.gz
servo-f2e46bd8571fc0f289cfab2e534a9375d125335a.zip
auto merge of #1893 : Ms2ger/servo/extra-private, r=larsbergstrom
This pattern will become illegal with the next Rust upgrade.
Diffstat (limited to 'src/components/script/dom/htmlimageelement.rs')
-rw-r--r--src/components/script/dom/htmlimageelement.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/script/dom/htmlimageelement.rs b/src/components/script/dom/htmlimageelement.rs
index 5f2566ed089..147f195a2ce 100644
--- a/src/components/script/dom/htmlimageelement.rs
+++ b/src/components/script/dom/htmlimageelement.rs
@@ -24,7 +24,7 @@ use extra::serialize::{Encoder, Encodable};
#[deriving(Encodable)]
pub struct HTMLImageElement {
htmlelement: HTMLElement,
- extra: Untraceable,
+ priv extra: Untraceable,
}
struct Untraceable {
@@ -62,6 +62,10 @@ impl HTMLImageElement {
}
impl HTMLImageElement {
+ pub fn image<'a>(&'a self) -> &'a Option<Url> {
+ &self.extra.image
+ }
+
/// Makes the local `image` member match the status of the `src` attribute and starts
/// prefetching the image. This method must be called after `src` is changed.
fn update_image(&mut self, value: Option<DOMString>, url: Option<Url>) {