Jump to content

<html> Event Tag, Bubbling, and DOM2


iwato

Recommended Posts

BACKGROUND:  I have an HTML document whose <html> element is tagged with an event icon (EV) when viewed in Firefox's Inspector panel.  The <html> has no properties of its own.  When one clicks on the  event tag one can read the following:

Quote

beforeunload https://...matomo/piwik.js:24

The above code appears to refer to a Matomo script placed inside the documents <html> tag at the bottom of the page. The phrase itself is followed by two buttons called Bubbling and Dom2.  When one clicks on either a drop-down panel appears with the following code

function af() {
  var al;
  m = true;
  aa("unload");
  if (r) {
    do {
      al = new Date()
    } while (al.getTimeAlias() < r)
  }
}

QUESTION:  Can you explain this phenomenon?  What is going on?

Roddy

 

Link to comment
Share on other sites

Firefox shows all of the event handlers that have been assigned to elements in the document. "Bubbling" indicates that the event fires during the bubbling phase, meaning that events from child elements fire before it. DOM2 just indicates which DOM standard is being used.

As for what the Matomo code does when the page unloads, I don't know, there are too many external elements that determine that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...