mirror of
https://github.com/ariya/phantomjs.git
synced 2024-09-11 04:46:09 +03:00
Update selector in useragent example to prevent TypeError
The DOM structure of the page that is retrieved by useragent.js has changed since the example was last updated, and the selector for the user agent value no longer exists. This causes a TypeError to be output to the user when running the example. This updates the example to use a selector that exists on the page. https://github.com/ariya/phantomjs/issues/15392
This commit is contained in:
parent
c0944903c3
commit
9bbd1ab0a3
@ -7,7 +7,7 @@ page.open('http://www.httpuseragent.org', function (status) {
|
||||
console.log('Unable to access network');
|
||||
} else {
|
||||
var ua = page.evaluate(function () {
|
||||
return document.getElementById('myagent').innerText;
|
||||
return document.getElementById('qua').value;
|
||||
});
|
||||
console.log(ua);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user