aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index aa278960368..03bdf4b12b5 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -404,8 +404,13 @@ pub enum MozBrowserEvent {
LoadStart,
/// Sent when a browser `<iframe>`'s location changes.
LocationChange(String, bool, bool),
- /// Sent when window.open() is called within a browser `<iframe>`.
- OpenWindow,
+ /// Sent when a new tab is opened within a browser `<iframe>` as a result of the user
+ /// issuing a command to open a link target in a new tab (for example ctrl/cmd + click.)
+ /// Includes the URL.
+ OpenTab(String),
+ /// Sent when a new window is opened within a browser `<iframe>`.
+ /// Includes the URL, target browsing context name, and features.
+ OpenWindow(String, Option<String>, Option<String>),
/// Sent when the SSL state changes within a browser `<iframe>`.
SecurityChange(HttpsState),
/// Sent when alert(), confirm(), or prompt() is called within a browser `<iframe>`.
@@ -431,7 +436,8 @@ impl MozBrowserEvent {
MozBrowserEvent::LoadEnd => "mozbrowserloadend",
MozBrowserEvent::LoadStart => "mozbrowserloadstart",
MozBrowserEvent::LocationChange(_, _, _) => "mozbrowserlocationchange",
- MozBrowserEvent::OpenWindow => "mozbrowseropenwindow",
+ MozBrowserEvent::OpenTab(_) => "mozbrowseropentab",
+ MozBrowserEvent::OpenWindow(_, _, _) => "mozbrowseropenwindow",
MozBrowserEvent::SecurityChange(_) => "mozbrowsersecuritychange",
MozBrowserEvent::ShowModalPrompt(_, _, _, _) => "mozbrowsershowmodalprompt",
MozBrowserEvent::TitleChange(_) => "mozbrowsertitlechange",