So I got stuck on my project for almost 2 days now. I am doing a cross-browser datepicker (vanilla js) targeting Safari browsers. I am using this extension. I am using the Chrome browser and when I try to simulate a safari browser using the said extension, the datepicker seems to works fine. However, when I ask my friend to run the website online using the actual macbook, the styles seems to mess up. The question is:
Do you know any extension that would deliver almost exactly the same as the actual safari browsers?
Would be glad to hear your recommendations. Expect some credits.
P.S. I dont have a macbook right now, so that complicates my situation. I also mainly do web development on my PC.
Related
I've found some issues somehow related to mine here in SO but none of them helped me so far, so i'll try to explain the best i can.
When I open my website in Android Browser in the Android 4.0.4 version, it doesn't load any page of the website, it only appears a white page and do nothing.
I've tried with Google Chrome and Firefox and others browsers and it worked. I've tested in many devices with this version and it happens the same thing too, so it wasn't the device.
The website is this https://www.findhit.com
I've tried to open other websites similar that the website that i'm trying to open in this specific version of the browser, and it worked normally, so i have the conclusion that it's my website problem with this browser version.
I thought that maybe this Android Browser version doesn't have some compatibility with some native javascript functions that i'm using and because of that it doesn't load what it needs to start the app, because i've debugged it, and some variables wasn't like they have to be to start the app.
I've noticed that the events sometimes doesn't fire but i didn't really understand why, maybe it was because it didn't load some variables.
And i'm using phonegap inappbrowser to load my website in the mobile app and inappbrowser it's using the Android Browser, so i can't make it work there too because of that.
So if anyone have some clue what it can be or have some more information about compatibility of this browser with native javascript functions or events, i'll be really glad for any help.
Sorry if i'm being too ambiguous, but i don't know what more can i do about this, im in a long time trying to get a solution to this and i really have to make this work in this specific version of Android Browser.
Really thanks in advance.
I've finally found the solution for this. The problem it was that version of Android wasn't loading the window.document when the page was loaded. ( Still don't know why ) So the solution was, put the document in the window.prototype.document and the browser looks in the window.document if it doesn't find there looks in the prototype.
I don't know if it was the time of loading that the window doesn't had the document there yet and when it looks in the prototype had already loaded, im still trying to discover what was really going on there, but this solution fixed my problem though.
After loading, my site should show a list of items from various stores. It does so on my Macbook Pro running the latest version of Chrome and Firefox.
However, it hasn't shown up on a Windows computer running Chrome (although it did work on the same computer in Firefox).
Is there an obvious reason why this should be the case? What's the best way of testing cross-browser compatibility when developing?
EDIT
I should say that it is loading some jQuery, but it's failing to make a $.post.
I'm not a Windows Phone developer, and I want as little to do as possible with anything related to Microsoft. Nonetheless, I need to get my mobile web app running properly on Windows Phone 7. What debugging tools are available for the platform? Something like the Webkit developer tools or Firebug would be ideal, either from the phone itself or more likely, remotely debugging from my computer.
If such a thing doesn't exist, I'd settle for being able to read Javascript error messages, and view the contents of variables using alert() or similar. At this point, all I know is that my JS is failing: I don't know where or why, let alone how to fix it.
My dev computer is running OS X, and I'd really like to be able to use these tools from OS X if possible. Assuming that debugging tools exist (which I really hope they do) are they designed for Windows only? If so, does anyone know how well they would work with Wine or similar?
EDIT: I have a physical Windows Phone 7 device, so I can use that. However, alert() doesn't seem to be working, which is why I'm posting this question. Does alert() normally work on the WP7 browser?
You'll likely find the Mobile Perf Bookmarklet to be the easiest all-in-one tool for testing any mobile device.
Works well on the iPhone/iPad/Samsung Galaxy Tab in my testing so far.
Quote:
It displays a menu with links that load other bookmarklets including Firebug Lite, Page Resources, DOM Monster, SpriteMe, CSSess, and Zoompf.
Unless you have a Windows Phone 7 device, you will need to run Windows in BootCamp and install the Windows Phone Developer Tools in order to test in IE on the emulator. I don't know about Whine, but I ran into major problems trying to test in Parallels - so based on my experience, I suggest keeping it as simple as possible.
There is no console in IE on the phone, so you will need to use alert, like you suggested, or just write text to a div on your page as a custom console.
If you really want to code in OS X (which I definitely understand), using a separate machine for testing IE in the WP7 emulator is going to be your best bet.
EDIT: I just tested alert and it did work fine on my Windows Phone. My guess is that a syntax error is preventing it from calling.
The following may be interesting
Simple IE debug tool for Windows Phone
Supports
Html traversing
Html node styles, properties, metrics
Reading console output
Executing js on device side from console (including intellisense)
Dynamic script injection - ability to debug live sites
Not supported
js breakpoints
Just wanted to add a note to say that full JavaScript debugging is possible now with Windows Phone 8.1 and Visual Studio 2013 Update 2. Full details are available at:
http://blogs.msdn.com/b/visualstudioalm/archive/2014/04/04/diagnosing-mobile-website-issues-on-windows-phone-8-1-with-visual-studio.aspx
I realize that this doesn't help the versions referenced in the original question (WP7), but I'm hoping this will help people who may find this question and are running a more recent version.
Something that has worked for me, is to test my mobile pages through the Windows Vista built-in Internet Explorer browser.
It comes with a script debugger ( which you have to enable in Advanced Options tab through the Internet Options menu ), and it seems that it gets really close to the Internet Explorer Mobile implementation.
Another tip would be, that, instead of using window.alerts, you can also use document.write or set output to a div content.
I'm using this hack to have console.log send info back to the server (it uses window.fetch, which I'm polyfilling, but could use xhr instead) https://gist.github.com/wheresrhys/bf93057ee3a594454582
I asked a question yesterday that has gone unanswered. So I will just ask this:
What advice can you give me about Android 2.1 Web Browser and Javascript? How do you debug errors? What things do you avoid doing? What things do you make sure to do?
In a lot of ways, the Browser behaves like Mobile Safari on iOS devices. I need help with what makes it different from iOS devices.
The Android SDK is freely available, and includes an emulator that will allow you to run the browser that comes with the OS. So, you can test your site directly in an emulated device, if you don't have a device available.
There are some features for debugging via the SDK as well, see here:
http://developer.android.com/guide/webapps/debugging.html
Surely if it works in firefox etc and you have no errors via firebug then it should be fine. But you could try using firebug lite to debug any errors.
I know it this works even in IE6 so it should work in the Android browser.
I recently bought a Windows Mobile device and since I'm a developer I want to use it as a development platform. Yes, it's not supposed to be used like that but it's always with me and my laptop isn't. I know cke is a good editor for code but how can I run JavaScript/Ruby code without too much of a headache?
I probably could write a web application, send code to it and get the results back but maybe there's better solutions?
There is a possibility to run Ruby on Windows Mobile
Check this article for steps: Human vs Machine
Javascript is bit crippled on Windows Mobile.
Follow up the discussions here: Windows Mobile IE Team Blog
Hopefully the next version if Pocket Internet Explorer supports better!
I'm not sure if you're interested, but there's only a port of Python for CE.
http://pythonce.sourceforge.net/
You can also use etcl from Evolane (http://www.evolane.com/software/etcl).
It comes with console.
This is n old port of Ruby to WinCE, but from what I've read it doesn't work all that well - who knows, give it a try, YMMV
http://uema2.s8.xrea.com/ruby-mswince/
As for Javascript, WinMo devices have Pocket Internet Explorer - it isn't very good, but runs some Javascript. If you want something that is a bit closer to a desktop you could install Opera.
I've had a Windows Mobile phone for just over a month and would also like to run code on it. Unfortunately it's such a limited platform with hardly any community support. It seems to me that the only decent choices are Python, NSBASIC and PPL
For Javascript, you'll be better off using Opera, opposed to Pocket Internet Explorer.
As for cke, I found CEdit a more stable editor but you do have to pay for it. Though I don't think there is any editor that does syntax highlighting for Ruby on Window Mobile.
Rhomobile's open source framework Rhodes (www.rhomobile.com) works great on Windows Mobile.