{"id":5733,"date":"2012-12-28T10:07:23","date_gmt":"2012-12-28T18:07:23","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=5733"},"modified":"2012-12-31T07:23:42","modified_gmt":"2012-12-31T15:23:42","slug":"compatibility-for-firefox-18","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/","title":{"rendered":"Add-on Compatibility for Firefox 18"},"content":{"rendered":"<p>Firefox 18 will be released on the second week of January. Here&#8217;s the list of changes that went into Firefox 18 that can affect add-on compatibility. There is more information available in <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Firefox_18_for_developers\">Firefox 18 for Developers<\/a>, so you should read that too.<\/p>\n<h3>General<\/h3>\n<ul>\n<li><strong><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=804395\">app:\/\/ protocol and XHR<\/a><\/strong>. If you load local resources using XHR and you check for\u00a0status == 0, this will no longer work. You must check for status == 200, like with a regular request.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=687332\">Move various onfoo event listeners off of DOM objects<\/a>. addEventListener should always be favored. If you need to set an on* property to add an event listener, you should set it to a function instead of an object containing the handleEvent function. <strong>Updated:<\/strong> There&#8217;s more information on <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Site_Compatibility_for_Firefox_18#Event_listener_objects_are_no_longer_accepted_as_values_of_on*_properties_on_XMLHttpRequest.2C_FileReader.2C_WebSocket.2C_and_EventSource_objects_%28Added_on_Dec_29%29\">this MDN page<\/a>.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=769764\">Remove synchronous proxy API and synchronous DNS resolution<\/a>. This changes\u00a0nsIProtocolProxyService and nsIProxyAutoConfig, as well as the\u00a0newProxiedChannel function, in order to make them asynchronous.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=695399\">Remove calls to nsICacheSession::openCacheEntry on the main thread<\/a>. asyncOpenCacheEntry should be used instead.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=744907\">Remove BlobBuilder<\/a>. The <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/DOM\/Blob\">Blob<\/a> constructor should be used instead.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=817669\">WebSocket constructor fails from the scope of an add-on<\/a>. This bug is no longer present in Firefox 18, but it was during a big part of the 18 beta cycle. It was particularly easy to reproduce in add-ons using the Add-ons SDK. If this bug affected you, make sure you test again on the latest beta.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=775368\">Porting Websockets to WebIDL<\/a>. This should only affect add-ons who are creating WebSockets using XPCOM instead of the global constructor. This will no longer be possible.<\/li>\n<\/ul>\n<h3>Private Browsing<\/h3>\n<p>Private Browsing Mode is changing to support private and non-private windows opened at the same time. This means that many XPCOM interfaces and other functions are changing to support it. The changes are mostly new parameters that tell the function which context it is being called from, so that it can work accordingly.<\/p>\n<ul>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=774963\">Move the removeDataFromDomain API into its own service<\/a>. The function was moved to a JS module:\u00a0ClearRecentHistory.jsm.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=741059\">Make network favicon requests inherit private browsing context<\/a>. This adds a new argument to\u00a0setAndLoadFaviconForPage.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=722861\">imgLoader uses global PB notifications<\/a>. Using\u00a0imgICache or imgILoader is now deprecated.\u00a0imgITools should be used instead. See the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/XPCOM_Interface_Reference\/imgICache\">imgICache docs<\/a> for more information.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=794602\">nsWebBrowserPersist::SaveURIInternal creates a channel out of thin air<\/a>.\u00a0saveURI has a new argument, and there&#8217;s a new\u00a0savePrivacyAwareURI function.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=795065\">Add privacy status to nsDownload<\/a>. This adds new arguments to nsIDownloadManager.addDownload, nsITransfer.init, and saveURL from contentAreaUtils.<\/li>\n<\/ul>\n<p>There&#8217;s more information about the new private browsing in these docs: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Supporting_per-window_private_browsing\">Supporting PBM<\/a>, and <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Updating_addons_broken_by_private_browsing_changes\">Updating add-ons broken by PB changes<\/a>.<\/p>\n<h3>New!<\/h3>\n<ul>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=795505\">Support feeding TypedArray to js-ctypes<\/a>.<\/li>\n<\/ul>\n<p>Please let me know in the comments if there&#8217;s anything missing or incorrect on these lists. If your add-on breaks on Firefox 18, I&#8217;d like to know.<\/p>\n<p>The automatic compatibility validation and upgrade for add-ons on AMO will happen next week, so check your email.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firefox 18 will be released on the second week of January. Here&#8217;s the list of changes that went into Firefox 18 that can affect add-on compatibility. There is more information &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/\">Read more<\/a><\/p>\n","protected":false},"author":173,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[388,44,295],"tags":[278877,278873,278876,28079,21031],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add-on Compatibility for Firefox 18 - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jorge Villalobos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/\",\"name\":\"Add-on Compatibility for Firefox 18 - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"datePublished\":\"2012-12-28T18:07:23+00:00\",\"dateModified\":\"2012-12-31T15:23:42+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add-on Compatibility for Firefox 18\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925\",\"name\":\"Jorge Villalobos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g\",\"caption\":\"Jorge Villalobos\"},\"description\":\"Jorge is the Product Manager for addons.mozilla.org\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/jvillalobosmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add-on Compatibility for Firefox 18 - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/","twitter_misc":{"Written by":"Jorge Villalobos","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/","url":"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/","name":"Add-on Compatibility for Firefox 18 - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"datePublished":"2012-12-28T18:07:23+00:00","dateModified":"2012-12-31T15:23:42+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2012\/12\/28\/compatibility-for-firefox-18\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"Add-on Compatibility for Firefox 18"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925","name":"Jorge Villalobos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g","caption":"Jorge Villalobos"},"description":"Jorge is the Product Manager for addons.mozilla.org","url":"https:\/\/blog.mozilla.org\/addons\/author\/jvillalobosmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/5733"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/173"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=5733"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/5733\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=5733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=5733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=5733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}