Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mixpanel-js-utils

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixpanel-js-utils - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

37

build/index.es6.js

@@ -1,3 +0,3 @@

var elementHasOwnHandler = function elementHasOwnHandler(element) {
var tests = [function (node) {
var elementHasOwnHandler = function (element) {
const tests = [function (node) {
return ['form', 'input', 'select', 'textarea', 'submit', 'a'].indexOf(node.tagName.toLowerCase()) > -1;

@@ -14,4 +14,4 @@ }, function (node) {

// jquery 1.5.x
for (var i = 0; i < window.Event.observers.length; i++) {
var observer = window.Event.observers[i];
for (let i = 0; i < window.Event.observers.length; i++) {
const observer = window.Event.observers[i];
if ((observer || [])[0] === node) {

@@ -27,4 +27,4 @@ return true;

for (var i = 0; i < tests.length; i++) {
var test = tests[i];
for (let i = 0; i < tests.length; i++) {
const test = tests[i];
try {

@@ -39,3 +39,3 @@ if (test(element)) {

var nearestInteractiveElement = function nearestInteractiveElement(element, cache) {
var nearestInteractiveElement = function (element, cache) {
/*** Don't mess with this stuff without testing the changes on IE8 first, it's very brittle ***/

@@ -51,6 +51,5 @@ if (cache && cache[element] && cache[element].element === element) {

// next, try to find the closest element that seems interactive
var child = void 0,
closest = void 0;
var candidate = element;
var visited_candidates = [];
let child, closest;
let candidate = element;
let visited_candidates = [];

@@ -69,5 +68,5 @@ do {

if (child) {
var candidateStyles = window.getComputedStyle(candidate);
var childStyles = window.getComputedStyle(child);
var cursor = candidateStyles.cursor;
const candidateStyles = window.getComputedStyle(candidate);
const childStyles = window.getComputedStyle(child);
const cursor = candidateStyles.cursor;
if ((cursor === 'default' || cursor === 'auto') && cursor !== childStyles.cursor) {

@@ -80,4 +79,4 @@ closest = child;

// if there are data- attributes we assume that it's used for something interactive
var attrs = candidate.attributes;
for (var i = 0; i < attrs.length; i++) {
const attrs = candidate.attributes;
for (let i = 0; i < attrs.length; i++) {
if (/^data\-/.test(attrs[i].name)) {

@@ -100,5 +99,5 @@ closest = candidate;

if (cache && closest) {
for (var _i = 0; _i < visited_candidates.length; _i++) {
var _candidate = visited_candidates[_i];
cache[_candidate] = closest;
for (let i = 0; i < visited_candidates.length; i++) {
const candidate = visited_candidates[i];
cache[candidate] = closest;
}

@@ -105,0 +104,0 @@ cache[element] = {

{
"name": "mixpanel-js-utils",
"version": "0.0.9",
"version": "0.0.10",
"description": "Javascript utilities for use across Mixpanel products",

@@ -5,0 +5,0 @@ "main": "build/index.cjs.js",

import babel from 'rollup-plugin-babel';
import es2015Rollup from 'babel-preset-es2015-rollup';

@@ -9,2 +10,3 @@ export default {

babel({
presets: es2015Rollup,
exclude: 'node_modules/**'

@@ -11,0 +13,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc