aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/file.rs
diff options
context:
space:
mode:
authorTim Taubert <tim@timtaubert.de>2014-10-12 13:27:00 +0200
committerTim Taubert <tim@timtaubert.de>2014-10-13 13:25:43 +0200
commitad6649d1022890eb3ecc295e01ebd23fd974eef2 (patch)
tree96b72203230ddb53e9a3180e178d8c474281fece /components/script/dom/file.rs
parentdf60f8b2c559cb4119b96174231fc4161bdcb4da (diff)
downloadservo-ad6649d1022890eb3ecc295e01ebd23fd974eef2.tar.gz
servo-ad6649d1022890eb3ecc295e01ebd23fd974eef2.zip
Privatize File
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r--components/script/dom/file.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs
index 69eaf491d1c..cb42537f63f 100644
--- a/components/script/dom/file.rs
+++ b/components/script/dom/file.rs
@@ -12,10 +12,11 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
+#[privatize]
pub struct File {
- pub blob: Blob,
- pub name: DOMString,
- pub type_: BlobType
+ blob: Blob,
+ name: DOMString,
+ type_: BlobType
}
impl File {
@@ -34,6 +35,10 @@ impl File {
global,
FileBinding::Wrap)
}
+
+ pub fn name<'a>(&'a self) -> &'a DOMString {
+ &self.name
+ }
}
impl<'a> FileMethods for JSRef<'a, File> {