-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Changing webpage settings should get immediate result #13660
Conversation
Thanks for tackling this problem! Unfortunately, we can't take your patch as is, because it changes a documented API and would break existing controller scripts. The third argument to Also, please consider writing some test cases. |
Original |
I got infinite recursion with this PR on creating a web page :( |
Can you elaborate ? var page = require('webpage').create();
console.log( page.evaluate(function() { return navigator.userAgent; }) );
page.settings.userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36";
console.log( page.evaluate(function() { return navigator.userAgent; }) );
page.open("http://google.com", function(status) {
console.log(status);
phantom.exit();
})
|
1842ba8
to
842715b
Compare
e024f31
to
5d99f2a
Compare
We're running into the same issue (we need to be able to disable JavaScript for security reasons, and we use setContent). Is there anything I can do to help out with this to get this merged and into a PhantomJS release? :) |
This will fix #13659
It will make sure that when
page.settings
property is changed it will take effect immediately.