Horje
puppeteer event element change Code Example
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());
    });
  });
})();
Source: github.com




Javascript

Related
javascript string to variable Code Example javascript string to variable Code Example
Javascript replace  div content onclick a button Code Example Javascript replace div content onclick a button Code Example
convert curl response to json format and echo the data Code Example convert curl response to json format and echo the data Code Example
get all id from array of objects javascript Code Example get all id from array of objects javascript Code Example
selector for redux Code Example selector for redux Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7