mozbrowsersecuritychange

This article is in need of a technical review.

Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

The mozbrowsersecuritychange event is fired when the content SSL state changes within a browser <iframe>.

General info

Specification
Non standard
Interface
CustomEvent
Bubbles
Yes
Cancelable
Yes
Target
<iframe>
Default Action
None

Properties

Property Type Description
target Read only EventTarget The browser iframe
type Read only DOMString The type of event.
bubbles Read only boolean Does the event normally bubble?
cancelable Read only boolean Is it possible to cancel the event?
detail Read only object A custom object

Detail

The detail property is an anonymous JavaScript object with the following properties:

state
A string representing the current state of SSL security. Possible values are broken, secure, or insecure.
extendedValidation
A boolean indicating if the current SSL certificate is an Extended Validation certificate (true) or not (false).
msg_name
A string representing the type of message. For that event, it's always securitychange.

Example

var browser = document.querySelector("iframe[mozbrowser]");

browser.addEventListener("mozbrowsersecuritychange", function( event ) {
  console.log("The SSL state is:" + event.detail.state);
});

See also

Document Tags and Contributors

Contributors to this page: bbondy, teoli, kscarfone, Jeremie
Last updated by: bbondy,