Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Not accepting standard function definition #14840

Closed
jesobreira opened this issue Feb 20, 2017 · 0 comments
Closed

Not accepting standard function definition #14840

jesobreira opened this issue Feb 20, 2017 · 0 comments

Comments

@jesobreira
Copy link

jesobreira commented Feb 20, 2017

Running Phantom 2.1.1, this works:

page = require('webpage').create();

var testing = function(url) {
	page.open('http://google.com', function (status) {
		console.log('Page loaded.');
		page.render('test.bmp');
	});
};

testing('http://google.com');

But this doesn't:

page = require('webpage').create();

function testing(url) {
	page.open('http://google.com', function (status) {
		console.log('Page loaded.');
		page.render('test.bmp');
	});
};

testing('http://google.com');

It gets stuck and nothing shows up on the console.

Edit: The same code runs well on Mac OS but does not run on Win7.

@ariya ariya closed this as completed Dec 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants