Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

puppeteer event element change

const puppeteer = require('puppeteer');

(async() => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.exposeFunction('onCustomEvent', text => console.log(text));
  await page.goto('https://www.time.ir', {waitUntil: 'networkidle0'});
  await page.evaluate(() => {
    $('#digitalClock').bind("DOMSubtreeModified", function(e) {
      window.onCustomEvent(e.currentTarget.textContent.trim());
    });
  });
})();
Comment

PREVIOUS NEXT
Code Example
Javascript :: electron load index.html 
Javascript :: add button dynamically in javascript 
Javascript :: change terminal shortcut vscode 
Javascript :: form-data upload file 
Javascript :: swap numbers in javascript 
Javascript :: to do list in javascript append appendchild input value 
Javascript :: Self Invoking Function Simpler Syntax 
Javascript :: how to use if else inside jsx in react 
Javascript :: check browser 
Javascript :: react image source showing object module 
Javascript :: arrow functions 
Javascript :: javascript create json object from array 
Javascript :: es6 array to object keys 
Javascript :: delete file with deno 
Javascript :: mongoose connection increase timeout in node js 
Javascript :: sweetalert example 
Javascript :: annotation 
Javascript :: import error in react 
Javascript :: text background fabricjs 
Javascript :: add countdown timer to javascript quiz 
Javascript :: js group by 
Javascript :: react router history not defined 
Javascript :: how to make button in react js 
Javascript :: jquery date format 
Javascript :: jquery if is visible 
Javascript :: How to pass variables from js to html node 
Javascript :: jquery create array 
Javascript :: how to add multiple styles in javascript 
Javascript :: or operator js 
Javascript :: discord.js dm all members 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =