Skip to content
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

JS Error Event Interface (NCSU Team: ronak, shreya, sayali) #3821

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

JSVal issue

  • Loading branch information
RonakNisher committed Oct 25, 2014
commit bdab69f33636fe7c82ce1b50ae90230b2572a1e6
@@ -14,7 +14,7 @@ use servo_util::str::DOMString;

use std::cell::Cell;
use std::default::Default;
use std::any::{Any, AnyRefExt};
use js::jsval::JSVal;

#[dom_struct]
pub struct ErrorEvent {
@@ -23,7 +23,7 @@ pub struct ErrorEvent {
filename: Cell<DOMString>,
lineno: Cell<u64>,
colno: Cell<u64>,
any: Cell<Any>
error: Cell<JSVal>
}

impl ErrorEventDerived for Event {
@@ -40,7 +40,7 @@ impl ErrorEvent {
filename: Cell::new("".to_string()),
lineno: Cell::new(0),
colno: Cell::new(0),
error: Cell::new()
error: Cell::new(JSVal)
}
}

@@ -58,7 +58,7 @@ impl ErrorEvent {
filename: DOMString,
lineno: u64,
colno: u64,
error: Any) -> Temporary<ErrorEvent> {
error: JSVal) -> Temporary<ErrorEvent> {
let ev = ErrorEvent::new_uninitialized(window).root();
ev.InitErrorEvent(type_, can_bubble, cancelable, message, filename, lineno, colno, error);
Temporary::from_rooted(*ev)
@@ -89,7 +89,7 @@ impl<'a> ErrorEventMethods for JSRef<'a, ErrorEvent> {
filename: DOMString,
lineno: u64,
colno: u64,
error: Any) {
error: JSVal) {
let event: JSRef<Event> = EventCast::from_ref(self);
event.InitEvent(type_, can_bubble, cancelable);
self.message.set(message);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.