<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Browser on developwith — developer tips</title>
    <link>https://developwith.com/tags/browser/</link>
    <description>Recent content in Browser on developwith — developer tips</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://developwith.com/tags/browser/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Browser Compatibility and Workarounds</title>
      <link>https://developwith.com/references/css/browser-compatibility/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://developwith.com/references/css/browser-compatibility/</guid>
      <description>&lt;h2 id=&#34;ie8&#34;&gt;IE8&lt;/h2&gt;&#xA;&lt;p&gt;** Non-HTML5 tags and Rounded Corners **&#xA;IE8 doesn&amp;rsquo;t support round corners and box shadow. Fixing rounded corners and box shadows with non-html5 tags (article, aside, figure, footer, header, hgroup, menu, nav, section). Below are some of the issues and workarounds, without using polyfills:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Solution&lt;/em&gt;&lt;br&gt;&#xA;Use the &lt;code&gt;innerShiv&lt;/code&gt; plugin that wraps each html template to create a document fragment that will work in IE8.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Potential Bug&lt;/em&gt;&#xA;Because &lt;code&gt;innerShiv&lt;/code&gt; returns document fragment and not html string, an extra step is needed to convert the document fragment back to html string.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Browser Compatibility and Workarounds</title>
      <link>https://developwith.com/references/javascript/browser-compatibility/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://developwith.com/references/javascript/browser-compatibility/</guid>
      <description>&lt;h2 id=&#34;ie8&#34;&gt;IE8&lt;/h2&gt;&#xA;&lt;p&gt;** No array.map support **&#xA;&lt;em&gt;Solution&lt;/em&gt;&#xA;Use underscore&amp;rsquo;s &lt;code&gt;_.map&lt;/code&gt; instead (backbone objects are exception)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;No select event support&lt;/strong&gt;&lt;br&gt;&#xA;&lt;em&gt;Solution&lt;/em&gt;&lt;br&gt;&#xA;Use jQuery&amp;rsquo;s &lt;code&gt;select&lt;/code&gt; event for binding the view&amp;rsquo;s render method. Example:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;#myInput&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;on&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;select&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;myView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In modern browsers, use the native &lt;code&gt;select&lt;/code&gt; event directly:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementById&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;myInput&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;addEventListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;select&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;myView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;** Clicking on modal popup that triggers a hash change **&#xA;&lt;em&gt;Solution&lt;/em&gt;&#xA;Intercept click and prevent default&lt;/p&gt;&#xA;&lt;h2 id=&#34;non-webkit&#34;&gt;Non Webkit&lt;/h2&gt;&#xA;&lt;p&gt;** Can&amp;rsquo;t stretch textarea using position: absolute and left, right, top, bottom **&#xA;&lt;em&gt;Solution&lt;/em&gt;&#xA;Resorted to setting width and height&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
