diff options
author | Abelardo E. Mendoza <abelardo22.9@gmail.com> | 2016-05-26 11:38:53 -0600 |
---|---|---|
committer | Abelardo E. Mendoza <abelardo22.9@gmail.com> | 2016-05-26 11:38:53 -0600 |
commit | d72dbb619893df2ec8059558e47e32f0847cc3c8 (patch) | |
tree | 3f91e7bad289b137f3662064fa1132fbcadc1d08 /components/script/dom | |
parent | 116faa7617aa2cb648d57307505b23504900bc9f (diff) | |
download | servo-d72dbb619893df2ec8059558e47e32f0847cc3c8.tar.gz servo-d72dbb619893df2ec8059558e47e32f0847cc3c8.zip |
implement window alert with no params
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/webidls/Window.webidl | 2 | ||||
-rw-r--r-- | components/script/dom/window.rs | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index 8f3cbedcc8e..608f066ff11 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -48,8 +48,8 @@ //readonly attribute ApplicationCache applicationCache; // user prompts - //void alert(); void alert(DOMString message); + void alert(); //boolean confirm(optional DOMString message = ""); //DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); //void print(); diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 63a0ca2a36e..540266b6491 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -431,6 +431,11 @@ pub fn base64_atob(input: DOMString) -> Fallible<DOMString> { impl WindowMethods for Window { // https://html.spec.whatwg.org/multipage/#dom-alert + fn Alert_(&self) { + self.Alert(DOMString::new()); + } + + // https://html.spec.whatwg.org/multipage/#dom-alert fn Alert(&self, s: DOMString) { // Right now, just print to the console // Ensure that stderr doesn't trample through the alert() we use to |