cross-browser

“google is not defined” when using Google Maps V3 in Firefox remotely

你离开我真会死。 提交于 2019-12-17 09:45:06
问题 Here's my conundrum: I have a page that uses Google Maps V3 and jQuery. It all worked well locally in FF5, Chrome and Safari. Once I uploaded to a web site, I get a "google is not defined" error on the first line that I try to use a google object var defaultLocation = new google.maps.LatLng(lat, lng); It only occurs in FF and only occurs remotely (i.e., if I load the file into FF locally, it works well). Chrome and Safari seem to be working great regardless, as is my Android and iPod browsers

Force IE 11 “User agent string” using tags

北慕城南 提交于 2019-12-17 09:34:18
问题 My website is broken in IE11. We all know that HTML tags allow developer to force IE compatibility mode; in example <meta http-equiv="X-UA-Compatible" content="IE=8, IE=9" /> worked great and solved the visualization problems for IE10. But actually on IE11, even if Compatibility mode is set to IE9 , User agent string is set to default and javascript doesn't work. Changing manually User agent string to IE10 solved my problems. For shure I'm going to solve the real problems that cause website

Which browsers support data URIs and since which version?

主宰稳场 提交于 2019-12-17 09:29:06
问题 Which browsers support data URIs (RFC 2397) and since which version? 回答1: Data URI support status for the five major browsers: Chrome, supported in all versions Firefox, supported in all versions Internet Explorer, supported since 8.0 (however, some restrictions apply) Opera, supported since 7.2 Safari, supported in all versions Additionally this trick can be used to detect data URI support. 回答2: It also appears to work on many mobile browsers now. This is the best list I've found. 回答3: Every

postMessage still broken on IE11?

偶尔善良 提交于 2019-12-17 08:59:09
问题 It seems that window.postMessage is still broken on IE 11 when the message is between a window and a child popup/tab with window.open when it's sent from different domains [or same domain in some case, c.f. update 16/01] There was similar issues with IE 8/9/10 but this feature was flagged as 'supported' in IE 11 from 'partially supported' in IE 10 There is an example of the code that works on chrome/ff but not IE: The opener (jsfiddle): $(document).ready(function() { $('#log').append(

IE Compatibility Mode: 'X-UA-Compatible' tag 'Edge'

纵然是瞬间 提交于 2019-12-17 08:54:50
问题 I have this in the <head> : <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> It will force the latest rendering mode for IE, but is Compatibility Mode considered the last one? I mean, for example: using this code with IE8, it will force it to use IE8 or IE8 Compatibility Mode? 回答1: That tag will try to force the browser to use the latest rendering mode the browser supports. It will not trigger Compatibility mode. Note that the tag has to be the first tag in the head or it will not work

header/footer/nav tags - what happens to these in IE7, IE8 and browsers than don't support HTML5?

▼魔方 西西 提交于 2019-12-17 08:05:36
问题 I am eager to start using Html5 in particular the <header>/<footer>/<article>/<nav> tags. What happens if the browser doesn't support these? Also I need to style these so: For Example: The nav has borders and margins etc. You know standard CSS stuff. So if I style them using the nav tag then IE7 & IE8 etc are going to ignore this? 回答1: Place this is the <head> section of your page, before any CSS files are loaded. <!--[if lte IE 8]> <script src="https://cdnjs.cloudflare.com/ajax/libs

Javascript maximum size for types?

给你一囗甜甜゛ 提交于 2019-12-17 07:48:09
问题 Looking into javascript types I'm trying to find out what the maximum storage size for some data types are. For instance, I set up a quick recursive algo to increase var size till the browser crashes, which ends up being somewhere close to 128mb (or maybe it's 256) for strings on my existing version of chrome. I've been doing it the painful way because I couldn't find any specs on this, but constant browser crashes make this a painful trial (try catch seems useless for some reason with this

Get the offset position of the caret in a textarea in pixels [duplicate]

一曲冷凌霜 提交于 2019-12-17 06:39:32
问题 This question already has answers here : How do I get the (x, y) pixel coordinates of the caret in text boxes? (3 answers) Closed 5 years ago . In my project I'm trying to get the offset position of the caret in a textarea in pixels. Can this be done? Before asking here, I have gone through many links, especially Tim Down's, but I couldn't find a solution which works in IE8+, Chrome and Firefox. It seems Tim Down is working on this. Some other links which I have found have many issues like

Uncaught TypeError: Object.values is not a function JavaScript

爱⌒轻易说出口 提交于 2019-12-17 06:33:52
问题 I have a simple object like the one below: var countries = { "Argentina":1, "Canada":2, "Egypt":1, }; I need to create two arrays. The first array is an array of all the keys from the object. I created this array by: var labels = Object.keys(countries); This works well. I obtain an array of countries. Now when I try to create an array from the values... var labels = Object.values(countries); I get this error: Uncaught TypeError: Object.values is not a function JavaScript I don't know what I

Uncaught TypeError: Object.values is not a function JavaScript

你。 提交于 2019-12-17 06:33:08
问题 I have a simple object like the one below: var countries = { "Argentina":1, "Canada":2, "Egypt":1, }; I need to create two arrays. The first array is an array of all the keys from the object. I created this array by: var labels = Object.keys(countries); This works well. I obtain an array of countries. Now when I try to create an array from the values... var labels = Object.values(countries); I get this error: Uncaught TypeError: Object.values is not a function JavaScript I don't know what I