cross-browser

Is document.referrer cross browser compatible?

穿精又带淫゛_ 提交于 2019-12-10 01:34:41
问题 I'd like to use document.referrer for an informal referrer check. Is this element cross browser compatible? Will any browser throw an error when trying to reference the document object? 回答1: The document.referrer property is described in the DOM spec: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-95229140 So it should be supported cross-browser. However, you can easily detect if the implementation does support this property like if( 'referrer' in document ) { console.log(document

The height of the code-mirror block are not the same in Chrome and Safari

ぐ巨炮叔叔 提交于 2019-12-10 00:58:30
问题 I want to make a layout that satisfies the following conditions: 1) it has a block on the top whose height is up to its content 2) below it has a code-mirror and a block side by side, which fill in exactly the rest of the page in terms of height . I have made a plunker here. The problem is it works well in Chrome 57.0.2987.133 , whereas it does NOT work well in Safari 10.1 : the height of the code-mirror is NOT enough; it shows only 76 lines of the code rather than the correct 80 lines. Does

Elastic layout - Ensuring layout always aligns

女生的网名这么多〃 提交于 2019-12-10 00:08:31
问题 I am designing an elastic layout which is used with a dynamic number of items. As you can see, the layout is fluid and the number of items per row changes with the resolution. I can put on any classes I want on the item when I generate them with PHP if this helps. Code http://jsfiddle.net/N3VRM/3 http://jsfiddle.net/N3VRM/3/embedded/result/ Problem I always want the left-most pink grids to align with the far left of the page and the same on the right side. Currently there is always an extra 1

Unexpected performace.navigation.type onbeforeunload

五迷三道 提交于 2019-12-09 22:20:01
问题 I'm trying to handle some logic on before unload and I don't want that logic to run if the user is reloading the page or going back. I've set up something like this. window.onbeforeunload = function(e) { if(window.event && window.event.clientX){ //IE //some logic } else if (e.currentTarget.performance.navigation.type === e.currentTarget.performance.navigation.TYPE_RELOAD) { // another logic } else if(e.currentTarget.performance.navigation.type === e.currentTarget.performance.navigation.TYPE

Will HTML 5 data attribute support in old browsers?

a 夏天 提交于 2019-12-09 14:51:03
问题 I'm storing some custom data in HTML5 data attribute for Jquery processing. will the custom data attribute available in Older browsers? 回答1: The HTML5 datalist property is not available in older browsers (it can be polyfilled easily enough though). You can always use the standard getAttribute method instead of course, and data-xxx attributes on HTML elements are accepted by all browsers (as long as you're in HTML mode and not xHTML where they're invalid) But your question seems to be more

Debugging javascript in Safari for Windows

时光毁灭记忆、已成空白 提交于 2019-12-09 14:02:22
问题 Is there a way to debug javascript using Safari 3.2 in Windows Vista? I found a link to a debugger named Drosera but I can't get it to work because the information seams to be outdated. 回答1: Well, apart from the Error Console that can be opened from the Develop menu (which in turn can be enabled in (Prefences / Advanced / Show Develop menu in menu bar) there aren't many javascript debugging options in Safari AFAIK. Still, the error console is quite useful as it shows javascript errors and

Does about:blank work in all browsers?

别说谁变了你拦得住时间么 提交于 2019-12-09 14:02:11
问题 I have an iframe and I want to clear it, so I set its src to about:blank Then I wondered, does this work in all browsers? 回答1: It's a requirement for HTML5 implementations to support about:blank. As for non-HTML5 web browsers, it depends. WorldWideWeb, Lynx, and some other browsers don't support about:blank – it wasn't a standard then. The about:blank itself initially appeared in Netscape Navigator 1. Internet Explorer copied that feature from Netscape, and other browsers copied it as well.

How can I achieve pixel-perfect positioning and spacing of textual elements across browsers?

末鹿安然 提交于 2019-12-09 13:53:04
问题 Right now, we are trying to achieve consistent formatting of textarea elements, across Safari/Chrome/Firefox/IE on Mac and Windows. I believe this may be a rabbit hole, since any combination thereof could produce formatting in a slightly different way -- maybe one combination adds a bit of padding to a div here differently than the others, another one breaks multi-line text there differently than the others, and so on. Instead of using textarea (or div ) elements, can we achieve pixel-perfect

Is it possible to stream video p2p (or other technology) between iOS, Android, Browser

淺唱寂寞╮ 提交于 2019-12-09 13:20:54
问题 I'm just learingn mobile web development and thinking about task: Is there a way to make a videostream betwen iOS, Android and Browser. What architecture and technology it should use. I already read this quetion on SO Peer-to-Peer video from iOS to Android? but there is nothing about browsers. If it can't be p2p and crossplatfom at the same time. I thought i shoud use Red5 server or etc. or Xmpp So I'm asking your advice and opinion here. Any information would be valuable 回答1: Yes, You can !!

Browser Compatibility testing [closed]

社会主义新天地 提交于 2019-12-09 11:02:33
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . How do i do browser compatibility testing? Is there any particular way or checklist through which i can confirm compatibility testing