|
Rank: Advanced Member Groups: Member
Joined: 4/2/2014 Posts: 37
|
Dear support,
I have a project to create a mobile/tablet enumerator. The enumerator consists of two things. A background image is a picture of a phone/tablet. On top of it, I put your EO web browser. So when a mobile web page is loaded on this browser, users can see how the page should look like on mobile/tablet.
My question is about device-width on media queries. On a real iphone, the device-width on media queries is 320px. On a real iPad, it is 1024px. On the EO browser on the enumerator, it is 1920px. I know this is the real device-width of my 27 inches screen. Is it possible to tweak this number to match to real iphone or ipad?
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
I believe Chrome naively has this ability but that portion is not exposed through our API. The feature Chrome has can be accessed through development tools UI Device Simulation tab. That feature exists in our build as well (you can either call WebView.ShowDevTools or use the remote debug feature to access the development tools UI) however in the current build there is no way for you enable emulation programmatically. We will look into it and see if it is possible for us expose it in a simple yet useful way.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 4/6/2015 Posts: 33
|
Any success to your investigation? Would be nice to be able to do this. Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Unfortunately we still do not have any public API for you to do this yet. Sorry about it!
|
|
Rank: Advanced Member Groups: Member
Joined: 4/6/2015 Posts: 33
|
Any hope of a device emulation API?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
No. We have looked into this and decided against it. There are two reasons. The first is the DevTools device emulation UI is an UI and it does not have any built-in API to drive it. So we would have to introduce a new set of API first.
The second reason which is more important because ultimately device emulation comes down to customizing two things (there are a few other things such as screen DPI that are less important):
1. Screen size; 2. User agent;
Both can already be customized through our existing API. So there is no need to introduce another set of API to over complicate things.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 4/6/2015 Posts: 33
|
Does this mean that we set CustomUserAgent, that that is what will show up as navigator.userAgent?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Yes. That's what that property is for.
|
|