-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Closed
Description
Steps to reproduce
Tell us about your environment:
- Puppeteer version: 1.5.0
- Platform / OS version: Mac OS 10.13.3
- URLs (if applicable): https://www.bennish.net/mixed-content.html
- Node.js version: 10.1.0
What steps will reproduce the problem?
Please include code that reproduces the issue.
- Access to a mixed-content page.
- expose a function by
page.exposeFunction. - the execution is stuck indefinitely.
const puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://www.bennish.net/mixed-content.html');
await page.exposeFunction('compute', function(a, b) {
return Promise.resolve(a * b);
});
const result = await page.evaluate(async function() {
return await compute(3, 5);
});
console.log(result);
await browser.close();
})();What is the expected result?
Expose function successfully or at lease throws an error.
What happens instead?
The execution is is stuck indefinitely.