There is such a code https://jsfiddle.net/25q0ex97/3/ . (works out only in new versions of Chrome)

It should work when you hover

document.getElementById('page').onmouseover = function(){ document.getElementById('paste').click(); }; 

The code works fine when loading the local version. But when loading "from the outside" (apparently due to the work of the iframe) for the code to work it is required to "touch" the window - just by clicking.

Ie the usual cursor on the iframe itself does not activate the code.

But at the same time, here is an example of https://jsfiddle.net/richardcwc/qdjkreo5/ where the code is triggered in the iframe, directly by an alert.

I read for promise, maybe this is the case, but with my base I did not find anything there :(

Tell me :( Thank you!

  • Console produces Uncaught (in promise) undefined - Promise.then (async) - paste.onclick - document.getElementById.onmouseover. - Lebedev
  • ru.stackoverflow.com/a/839712/33274 here is not quite that, and not even native js, but the functions are the same and the same - user33274
  • one
    Onhover event will help you. - NewView pm
  • how to fasten it? :( - Lebedev
  • one
    jquery .hover for example. In the “clean” [javascript] onmouseover , but the event is better known as hover , taking into account the css knowledge of the main questioners :) here is the code that should help the author: $("#ele").on("mouseenter", function() {...}).on('mouseleave', function() {...}); - NewView pm

0