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

pdf_editor_aleon35_react_plugin

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf_editor_aleon35_react_plugin - npm Package Compare versions

Comparing version 1.0.20 to 1.0.22

public/dist/0d18d81ca415c6007655b836f84e4219.svg

9

dist/index.js

@@ -11,3 +11,3 @@ "use strict";

var useCreateIframeAndLoadViewer = function useCreateIframeAndLoadViewer(_ref) {
var domWindow = _ref.domWindow,
var domWindow = _ref.window,
file = _ref.file,

@@ -60,3 +60,3 @@ fileName = _ref.fileName,

// Set up an event listener to listen for a response from the iframe
window.addEventListener('message', function (event) {
window.parent.addEventListener('message', function (event) {
if (event.data.type === 'file-received' && event.data.success) {

@@ -81,9 +81,8 @@ // If the message was received successfully, clear the interval

(0, _react.useEffect)(function () {
domWindow.addEventListener('message', handleIframeLoaded);
window.parent.addEventListener('message', handleIframeLoaded);
return function () {
return domWindow.removeEventListener('message', handleIframeLoaded);
return window.parent.removeEventListener('message', handleIframeLoaded);
};
}, []);
var handleVisibilityChange = function handleVisibilityChange() {
console.log(iframeLoadedSuccessfully.current, 'iframeLoadedSuccessfully.current');
if (!document.hidden && !iframeLoadedSuccessfully.current) {

@@ -90,0 +89,0 @@ var iframe = document.getElementById('webviewer-1');

{
"name": "pdf_editor_aleon35_react_plugin",
"version": "1.0.20",
"version": "1.0.22",
"description": "",

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

@@ -5,3 +5,3 @@ import { useEffect, useRef } from 'react';

export const useCreateIframeAndLoadViewer = ({
domWindow,
window: domWindow,
file,

@@ -54,3 +54,3 @@ fileName,

// Set up an event listener to listen for a response from the iframe
window.addEventListener('message', function(event) {
window.parent.addEventListener('message', function(event) {
if (event.data.type === 'file-received' && event.data.success) {

@@ -78,8 +78,7 @@ // If the message was received successfully, clear the interval

useEffect(() => {
domWindow.addEventListener('message', handleIframeLoaded);
return () => domWindow.removeEventListener('message', handleIframeLoaded);
window.parent.addEventListener('message', handleIframeLoaded);
return () => window.parent.removeEventListener('message', handleIframeLoaded);
}, []);
const handleVisibilityChange = () => {
console.log(iframeLoadedSuccessfully.current, 'iframeLoadedSuccessfully.current')
if (!document.hidden && !iframeLoadedSuccessfully.current) {

@@ -86,0 +85,0 @@ const iframe = document.getElementById('webviewer-1');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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