<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <link rel="shortcut icon" type="image/x-icon" href="../../favicon.ico" /> <link rel="alternate" href="http://developer.android.com/guide/webapps/debugging.html" hreflang="en" /> <link rel="alternate" href="http://developer.android.com/intl/es/guide/webapps/debugging.html" hreflang="es" /> <link rel="alternate" href="http://developer.android.com/intl/id/guide/webapps/debugging.html" hreflang="id" /> <link rel="alternate" href="http://developer.android.com/intl/ja/guide/webapps/debugging.html" hreflang="ja" /> <link rel="alternate" href="http://developer.android.com/intl/ko/guide/webapps/debugging.html" hreflang="ko" /> <link rel="alternate" href="http://developer.android.com/intl/pt-br/guide/webapps/debugging.html" hreflang="pt-br" /> <link rel="alternate" href="http://developer.android.com/intl/ru/guide/webapps/debugging.html" hreflang="ru" /> <link rel="alternate" href="http://developer.android.com/intl/vi/guide/webapps/debugging.html" hreflang="vi" /> <link rel="alternate" href="http://developer.android.com/intl/zh-cn/guide/webapps/debugging.html" hreflang="zh-cn" /> <link rel="alternate" href="http://developer.android.com/intl/zh-tw/guide/webapps/debugging.html" hreflang="zh-tw" /> <title>Debugging Web Apps | Android Developers </title> <meta name="description" content="If you are testing your web app with a device running Android 4.4 or higher, you can remotely debug your web pages in WebView with Chrome Developer Tools, while continuing to support older versions of Android. For more information, see Remote Debugging…"> <!-- STYLESHEETS --> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto+Condensed"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto"> <link href="../../assets/css/default.css?v=16" rel="stylesheet" type="text/css"> <!-- JAVASCRIPT --> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="../../assets/js/android_3p-bundle.js" type="text/javascript"></script> <script type="text/javascript"> var toRoot = "../../"; var metaTags = []; var devsite = false; var useUpdatedTemplates = false; </script> <script src="../../assets/js/docs.js?v=17" type="text/javascript"></script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-5831155-1', 'android.com'); ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); ga('send', 'pageview'); ga('universal.send', 'pageview'); // Send page view for new tracker. </script> </head> <body class="gc-documentation develop guide" itemscope itemtype="http://schema.org/Article"> <a name="top"></a> <!-- Header --> <div id="header-wrapper"> <div class="dac-header " id="header"> <div class="dac-header-inner"> <a class="dac-nav-toggle" data-dac-toggle-nav href="javascript:;" title="Open navigation"> <span class="dac-nav-hamburger"> <span class="dac-nav-hamburger-top"></span> <span class="dac-nav-hamburger-mid"></span> <span class="dac-nav-hamburger-bot"></span> </span> </a> <a class="dac-header-logo" href="../../index.html"> <img class="dac-header-logo-image" src="../../assets/images/android_logo.png" srcset="../../assets/images/android_logo@2x.png 2x" width="32" height="36" alt="Android" /> Developers </a> <ul class="dac-header-tabs"> <li> <a class="dac-header-tab" href="../../design/index.html" zh-tw-lang="設計" zh-cn-lang="设计" ru-lang="Проектирование" ko-lang="디자인" ja-lang="設計" es-lang="Diseñar">Design</a> </li> <li> <a class="dac-header-tab" href="../../develop/index.html" zh-tw-lang="開發" zh-cn-lang="开发" ru-lang="Разработка" ko-lang="개발" ja-lang="開発" es-lang="Desarrollar">Develop</a> </li> <li> <a class="dac-header-tab" href="../../distribute/index.html" zh-tw-lang="發佈" zh-cn-lang="分发" ru-lang="Распространение" ko-lang="배포" ja-lang="配布" es-lang="Distribuir">Distribute</a> </li> </ul> <a class="dac-header-console-btn" href="https://play.google.com/apps/publish/"> <span class="dac-sprite dac-google-play"></span> <span class="dac-visible-desktop-inline">Developer</span> Console </a> <form data-search class="dac-header-search"> <button class="dac-header-search-close" data-search-close> <i class="dac-sprite dac-back-arrow"></i> </button> <div class="dac-header-search-inner"> <i class="dac-sprite dac-search-white dac-header-search-icon"></i> <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" class="dac-header-search-input" placeholder="Search" /> <button class="dac-header-search-clear dac-hidden" data-search-clear> <i class="dac-sprite dac-close-black"></i> </button> </div> </form> </div><!-- end header-wrap.wrap --> </div><!-- end header --> </div> <!--end header-wrapper --> <!-- Navigation--> <nav class="dac-nav"> <div class="dac-nav-dimmer" data-dac-toggle-nav></div> <div class="dac-nav-sidebar" data-swap data-dynamic="false" data-transition-speed="300" data-dac-nav> <div data-swap-container> <a class="dac-nav-back-button dac-swap-section dac-up dac-no-anim" data-swap-button href="javascript:;"> <i class="dac-sprite dac-nav-back"></i> <span class="dac-nav-back-title">Back</span> </a> <div class="dac-nav-sub dac-swap-section dac-right dac-active" itemscope itemtype="http://schema.org/SiteNavigationElement"> <ul id="nav"> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/index.html"> <span class="en">Introduction</span> </a></div> <ul> <li><a href="../../guide/components/fundamentals.html"> <span class="en">App Fundamentals</span></a> </li> <li><a href="../../guide/practices/compatibility.html"> <span class="en">Device Compatibility</span> </a></li> <li><a href="../../guide/topics/security/permissions.html"> <span class="en">System Permissions</span> </a> </li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/components/index.html"> <span class="en">App Components</span> </a></div> <ul> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/components/intents-filters.html"> <span class="en">Intents and Intent Filters</span> </a></div> <ul> <li><a href="../../guide/components/intents-common.html"> <span class="en">Common Intents</span> </a></li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/components/activities.html"> <span class="en">Activities</span> </a></div> <ul> <li><a href="../../guide/components/fragments.html"> <span class="en">Fragments</span> </a></li> <li><a href="../../guide/components/loaders.html"> <span class="en">Loaders</span> </a></li> <li><a href="../../guide/components/tasks-and-back-stack.html"> <span class="en">Tasks and Back Stack</span> </a></li> <li><a href="../../guide/components/recents.html"> <span class="en">Overview Screen</span> </a></li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/components/services.html"> <span class="en">Services</span> </a></div> <ul> <li><a href="../../guide/components/bound-services.html"> <span class="en">Bound Services</span> </a></li> <li><a href="../../guide/components/aidl.html"> <span class="en">AIDL</span> </a></li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/providers/content-providers.html"> <span class="en">Content Providers</span> </a></div> <ul> <li><a href="../../guide/topics/providers/content-provider-basics.html"> <span class="en">Content Provider Basics</span> </a></li> <li><a href="../../guide/topics/providers/content-provider-creating.html"> <span class="en">Creating a Content Provider</span> </a></li> <li><a href="../../guide/topics/providers/calendar-provider.html"> <span class="en">Calendar Provider</span> </a></li> <li><a href="../../guide/topics/providers/contacts-provider.html"> <span class="en">Contacts Provider</span> </a></li> <li><a href="../../guide/topics/providers/document-provider.html"> <span class="en">Storage Access Framework</span> </a></li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/appwidgets/index.html"> <span class="en">App Widgets</span> </a></div> <ul> <li><a href="../../guide/topics/appwidgets/host.html"> <span class="en">App Widget Host</span> </a></li> </ul> </li> <li><a href="../../guide/components/processes-and-threads.html"> <span class="en">Processes and Threads</span> </a> </li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/resources/index.html"> <span class="en">App Resources</span> </a></div> <ul> <li><a href="../../guide/topics/resources/overview.html"> <span class="en">Overview</span> </a></li> <li><a href="../../guide/topics/resources/providing-resources.html"> <span class="en">Providing Resources</span> </a></li> <li><a href="../../guide/topics/resources/accessing-resources.html"> <span class="en">Accessing Resources</span> </a></li> <li><a href="../../guide/topics/resources/runtime-changes.html"> <span class="en">Handling Runtime Changes</span> </a></li> <li><a href="../../guide/topics/resources/localization.html"> <span class="en">Localization</span> </a></li> <li><a href="../../guide/topics/resources/complex-xml-resources.html"> <span class="en">Complex XML Resources</span> </a></li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/resources/available-resources.html"> <span class="en">Resource Types</span> </a></div> <ul> <li><a href="../../guide/topics/resources/animation-resource.html">Animation</a></li> <li><a href="../../guide/topics/resources/color-list-resource.html">Color State List</a></li> <li><a href="../../guide/topics/resources/drawable-resource.html">Drawable</a></li> <li><a href="../../guide/topics/resources/layout-resource.html">Layout</a></li> <li><a href="../../guide/topics/resources/menu-resource.html">Menu</a></li> <li><a href="../../guide/topics/resources/string-resource.html">String</a></li> <li><a href="../../guide/topics/resources/style-resource.html">Style</a></li> <li><a href="../../guide/topics/resources/more-resources.html">More Types</a></li> </ul> </li><!-- end of resource types --> </ul> </li><!-- end of app resources --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/manifest/manifest-intro.html"> <span class="en">App Manifest</span> </a></div> <ul> <li><a href="../../guide/topics/manifest/action-element.html"><action></a></li> <li><a href="../../guide/topics/manifest/activity-element.html"><activity></a></li> <li><a href="../../guide/topics/manifest/activity-alias-element.html"><activity-alias></a></li> <li><a href="../../guide/topics/manifest/application-element.html"><application></a></li> <li><a href="../../guide/topics/manifest/category-element.html"><category></a></li> <li><a href="../../guide/topics/manifest/compatible-screens-element.html"><compatible-screens></a></li> <li><a href="../../guide/topics/manifest/data-element.html"><data></a></li> <li><a href="../../guide/topics/manifest/grant-uri-permission-element.html"><grant-uri-permission></a></li> <li><a href="../../guide/topics/manifest/instrumentation-element.html"><instrumentation></a></li> <li><a href="../../guide/topics/manifest/intent-filter-element.html"><intent-filter></a></li> <li><a href="../../guide/topics/manifest/manifest-element.html"><manifest></a></li> <li><a href="../../guide/topics/manifest/meta-data-element.html"><meta-data></a></li> <li><a href="../../guide/topics/manifest/path-permission-element.html"><path-permission></a></li> <li><a href="../../guide/topics/manifest/permission-element.html"><permission></a></li> <li><a href="../../guide/topics/manifest/permission-group-element.html"><permission-group></a></li> <li><a href="../../guide/topics/manifest/permission-tree-element.html"><permission-tree></a></li> <li><a href="../../guide/topics/manifest/provider-element.html"><provider></a></li> <li><a href="../../guide/topics/manifest/receiver-element.html"><receiver></a></li> <li><a href="../../guide/topics/manifest/service-element.html"><service></a></li> <li><a href="../../guide/topics/manifest/supports-gl-texture-element.html"><supports-gl-texture></a></li> <li><a href="../../guide/topics/manifest/supports-screens-element.html"><supports-screens></a></li><!-- ##api level 4## --> <li><a href="../../guide/topics/manifest/uses-configuration-element.html"><uses-configuration></a></li> <li><a href="../../guide/topics/manifest/uses-feature-element.html"><uses-feature></a></li> <!-- ##api level 4## --> <li><a href="../../guide/topics/manifest/uses-library-element.html"><uses-library></a></li> <li><a href="../../guide/topics/manifest/uses-permission-element.html"><uses-permission></a></li> <li><a href="../../guide/topics/manifest/uses-permission-sdk-23-element.html"><uses-permission-sdk-23></a></li> <li><a href="../../guide/topics/manifest/uses-sdk-element.html"><uses-sdk></a></li> </ul> </li><!-- end of the manifest file --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/ui/index.html"> <span class="en">User Interface</span> </a></div> <ul> <li><a href="../../guide/topics/ui/overview.html"> <span class="en">Overview</span> </a></li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/ui/declaring-layout.html"> <span class="en">Layouts</span> </a></div> <ul> <li><a href="../../guide/topics/ui/layout/linear.html"> <span class="en">Linear Layout</span> </a></li> <li><a href="../../guide/topics/ui/layout/relative.html"> <span class="en">Relative Layout</span> </a></li> <!-- <li><a href="../../guide/topics/ui/layout/grid.html"> <span class="en">Grid Layout</span> </a></li> --> <li><a href="../../guide/topics/ui/layout/listview.html"> <span class="en">List View</span> </a></li> <li><a href="../../guide/topics/ui/layout/gridview.html"> <span class="en">Grid View</span> </a></li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/ui/controls.html"> <span class="en">Input Controls</span> </a></div> <ul> <li><a href="../../guide/topics/ui/controls/button.html"> <span class="en">Buttons</span> </a></li> <li><a href="../../guide/topics/ui/controls/text.html"> <span class="en">Text Fields</span> </a></li> <li><a href="../../guide/topics/ui/controls/checkbox.html"> <span class="en">Checkboxes</span> </a></li> <li><a href="../../guide/topics/ui/controls/radiobutton.html"> <span class="en">Radio Buttons</span> </a></li> <li><a href="../../guide/topics/ui/controls/togglebutton.html"> <span class="en">Toggle Buttons</span> </a></li> <li><a href="../../guide/topics/ui/controls/spinner.html"> <span class="en">Spinners</span> </a></li> <li><a href="../../guide/topics/ui/controls/pickers.html"> <span class="en">Pickers</span> </a></li> <!-- <li><a href="../../guide/topics/ui/controls/progress.html"> <span class="en">Seek and Progress Bars</span> </a></li> --> </ul> </li> <li><a href="../../guide/topics/ui/ui-events.html"> <span class="en">Input Events</span> </a></li> <li><a href="../../guide/topics/ui/menus.html"> <span class="en">Menus</span></span> </a></li> <li><a href="../../guide/topics/ui/settings.html"> <span class="en">Settings</span> </a></li> <li><a href="../../guide/topics/ui/dialogs.html"> <span class="en">Dialogs</span> </a></li> <li><a href="../../guide/topics/ui/notifiers/notifications.html"> <span class="en">Notifications</span> </a></li> <li><a href="../../guide/topics/ui/notifiers/toasts.html"> <span class="en">Toasts</span> </a></li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/search/index.html"> <span class="en">Search</span> </a></div> <ul> <li><a href="../../guide/topics/search/search-dialog.html">Creating a Search Interface</a></li> <li><a href="../../guide/topics/search/adding-recent-query-suggestions.html">Adding Recent Query Suggestions</a></li> <li><a href="../../guide/topics/search/adding-custom-suggestions.html">Adding Custom Suggestions</a></li> <li><a href="../../guide/topics/search/searchable-config.html">Searchable Configuration</a></li> </ul> </li> <li><a href="../../guide/topics/ui/drag-drop.html"> <span class="en">Drag and Drop</span> </a></li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/ui/accessibility/index.html"> <span class="en">Accessibility</span> </a></div> <ul> <li><a href="../../guide/topics/ui/accessibility/apps.html"> <span class="en">Making Applications Accessible</span> </a></li> <li><a href="../../guide/topics/ui/accessibility/checklist.html"> <span class="en">Accessibility Developer Checklist</span> </a></li> <li><a href="../../guide/topics/ui/accessibility/services.html"> <span class="en">Building Accessibility Services</span> </a></li> </ul> </li> <li><a href="../../guide/topics/ui/themes.html"> <span class="en">Styles and Themes</span> </a></li> <li><a href="../../guide/topics/ui/custom-components.html"> <span class="en">Custom Components</span> </a></li> </ul> </li><!-- end of User Interface --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/graphics/index.html"> <span class="en">Animation and Graphics</span> </a></div> <ul> <li class="nav-section"> <li><a href="../../guide/topics/graphics/overview.html"> <span class="en">Overview</span> </a></li> <li><a href="../../guide/topics/graphics/prop-animation.html"> <span class="en">Property Animation</span> </a></li> <li><a href="../../guide/topics/graphics/view-animation.html"> <span class="en">View Animation</span> </a></li> <li><a href="../../guide/topics/graphics/drawable-animation.html"> <span class="en">Drawable Animation</span> </a></li> <li><a href="../../guide/topics/graphics/2d-graphics.html"> <span class="en">Canvas and Drawables</span> </a></li> <li><a href="../../guide/topics/graphics/opengl.html"> <span class="en">OpenGL ES</span> </a></li> <li><a href="../../guide/topics/graphics/hardware-accel.html"> <span class="en">Hardware Acceleration</span> </a></li> </ul> </li><!-- end of graphics and animation--> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/renderscript/index.html"> <span class="en">Computation</span> </a></div> <ul> <li><a href="../../guide/topics/renderscript/compute.html"> <span class="en">RenderScript</span></a> </li> <li><a href="../../guide/topics/renderscript/advanced.html"> <span class="en">Advanced RenderScript</span></a> </li> <li class="nav-section"> <div class="nav-section-header"> <a href="../../guide/topics/renderscript/reference/overview.html"> <span class="en">Runtime API Reference</span> </a></div> <ul> <li><a href="../../guide/topics/renderscript/reference/rs_value_types.html"> <span class="en">Numerical Types</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_object_types.html"> <span class="en">Object Types</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_convert.html"> <span class="en">Conversion Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_math.html"> <span class="en">Mathematical Constants and Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_vector_math.html"> <span class="en">Vector Math Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_matrix.html"> <span class="en">Matrix Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_quaternion.html"> <span class="en">Quaternion Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_atomic.html"> <span class="en">Atomic Update Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_time.html"> <span class="en">Time Functions and Types</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_allocation_data.html"> <span class="en">Allocation Data Access Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_object_info.html"> <span class="en">Object Characteristics Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_for_each.html"> <span class="en">Kernel Invocation Functions and Types</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_io.html"> <span class="en">Input/Output Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_debug.html"> <span class="en">Debugging Functions</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/rs_graphics.html"> <span class="en">Graphics Functions and Types</span> </a></li> <li><a href="../../guide/topics/renderscript/reference/index.html"> <span class="en">Index</span> </a></li> </ul> </li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/media/index.html"> <span class="en">Media and Camera</span> </a></div> <ul> <li><a href="../../guide/topics/media/mediaplayer.html"> <span class="en">Media Playback</span></a> </li> <li><a href="../../guide/topics/media/mediarouter.html"> <span class="en">Media Router</span></a> </li> <li><a href="../../guide/topics/media/mediarouteprovider.html"> <span class="en">Media Route Provider</span></a> </li> <li><a href="../../guide/topics/media/exoplayer.html"> <span class="en">ExoPlayer</span></a> </li> <li><a href="../../guide/appendix/media-formats.html"> <span class="en">Supported Media Formats</span></a> </li> <li><a href="../../guide/topics/media/audio-capture.html"> <span class="en">Audio Capture</span></a> </li> <li><a href="../../guide/topics/media/jetplayer.html"> <span class="en">JetPlayer</span></a> </li> <li><a href="../../guide/topics/media/camera.html"> <span class="en">Camera</span></a> </li> </ul> </li><!-- end of media and camera --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/sensors/index.html"> <span class="en">Location and Sensors</span> </a></div> <ul> <li><a href="../../guide/topics/location/index.html"> <span class="en">Location and Maps</span> </a> <li><a href="../../guide/topics/location/strategies.html"> <span class="en">Location Strategies</span> </a></li> <li><a href="../../guide/topics/sensors/sensors_overview.html"> <span class="en">Sensors Overview</span> </a></li> <li><a href="../../guide/topics/sensors/sensors_motion.html"> <span class="en">Motion Sensors</span> </a></li> <li><a href="../../guide/topics/sensors/sensors_position.html"> <span class="en">Position Sensors</span> </a></li> <li><a href="../../guide/topics/sensors/sensors_environment.html"> <span class="en">Environment Sensors</span> </a></li> </ul> </li><!-- end of location and sensors --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/connectivity/index.html"> <span class="en">Connectivity</span> </a></div> <ul> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/connectivity/bluetooth.html"> <span class="en">Bluetooth</span></a> </div> <ul> <li><a href="../../guide/topics/connectivity/bluetooth-le.html">Bluetooth Low Energy</a></li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/connectivity/nfc/index.html"> <span class="en">NFC</span></a> </div> <ul> <li><a href="../../guide/topics/connectivity/nfc/nfc.html">NFC Basics</a></li> <li><a href="../../guide/topics/connectivity/nfc/advanced-nfc.html">Advanced NFC</a></li> <li><a href="../../guide/topics/connectivity/nfc/hce.html">Host-based Card Emulation</a></li> </ul> </li> <li><a href="../../guide/topics/connectivity/wifip2p.html"> <span class="en">Wi-Fi P2P</span></a> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/connectivity/usb/index.html"> <span class="en">USB</span></a> </div> <ul> <li><a href="../../guide/topics/connectivity/usb/accessory.html">Accessory</a></li> <li><a href="../../guide/topics/connectivity/usb/host.html">Host</a></li> </ul> </li> <li><a href="../../guide/topics/connectivity/sip.html"> <span class="en">SIP</span> </a> </li> </ul> </li><!-- end of connectivity --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/text/index.html"> <span class="en">Text and Input</span> </a></div> <ul> <li><a href="../../guide/topics/text/copy-paste.html"> <span class="en">Copy and Paste</span> </a></li> <li><a href="../../guide/topics/text/creating-input-method.html"> <span class="en">Creating an IME</span> </a></li> <li><a href="../../guide/topics/text/spell-checker-framework.html"> <span class="en">Spelling Checker</span> </a></li> </ul> </li><!-- end of text and input --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/data/index.html"> <span class="en">Data Storage</span> </a></div> <ul> <li><a href="../../guide/topics/data/data-storage.html"> <span class="en">Storage Options</span> </a></li> <li><a href="../../guide/topics/data/backup.html"> <span class="en">Data Backup</span> </a></li> <li><a href="../../guide/topics/data/install-location.html"> <span class="en">App Install Location</span> </a></li> </ul> </li><!-- end of data storage --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/admin/index.html"> <span class="en">Administration</span> </a></div> <ul> <li> <a href="../../guide/topics/admin/device-admin.html"> <span class="en">Device Policies</span></a> </li> <!-- <li> <a href="../../guide/topics/admin/keychain.html"> <span class="en">Certificate Store</span></a> </li> --> </ul> </li><!-- end of administration --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/webapps/index.html"> <span class="en">Web Apps</span> </a></div> <ul> <li><a href="../../guide/webapps/targeting.html"> <span class="en">Supporting Different Screens in Web Apps</span> </a></li> <li><a href="../../guide/webapps/webview.html"> <span class="en">Building Web Apps in WebView</span> </a></li> <li><a href="../../guide/webapps/migrating.html"> <span class="en">Migrating to WebView in Android 4.4</span> </a></li> <li><a href="../../guide/webapps/debugging.html"> <span class="en">Debugging Web Apps</span> </a></li> <li><a href="../../guide/webapps/best-practices.html"> <span class="en">Best Practices for Web Apps</span> </a></li> </ul> </li><!-- end of web apps --> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/practices/index.html"> <span class="en">Best Practices</span> <span class="de" style="display:none">Bewährte Verfahren</span> <span class="es" style="display:none">Prácticas recomendadas</span> <span class="fr" style="display:none">Meilleures pratiques</span> <span class="it" style="display:none">Best practice</span> <span class="ja" style="display:none">ベスト プラクティス</span> <span class="zh-cn" style="display:none">最佳实践</span> <span class="zh-tw" style="display:none">最佳實務</span> </div></a> <ul> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/practices/screens_support.html"> <span class="en">Supporting Multiple Screens</span> </a></div> <ul> <li><a href="../../guide/practices/screens-distribution.html"> <span class="en">Distributing to Specific Screens</span> </a></li> <li><a href="../../guide/practices/screen-compat-mode.html"> <span class="en">Screen Compatibility Mode</span> </a></li> </ul> </li> <li><a href="../../guide/practices/tablets-and-handsets.html"> <span class="en">Supporting Tablets and Handsets</span> </a></li> <li> <a href="../../guide/practices/verifying-apps-art.html"> <span class="en">Verifying App Behavior on ART</span> </a> </li> </ul> </li> <li class="nav-section"> <div class="nav-section-header"><a href="../../guide/topics/security/index.html"> <span class="en">Security</span> </a></div> <ul> <li><a href="../../guide/topics/security/security-config.html"> <span class="en">Network Security Config</span> </a></li> </ul> </li> </ul> <script type="text/javascript"> <!-- buildToggleLists(); changeNavLang(getLangPref()); //--> </script> </div> <ul id="dac-main-navigation" class="dac-nav-list dac-swap-section dac-left dac-no-anim"> <li class="dac-nav-item home"> <a class="dac-nav-link" href="../../index.html">Home</a> <i class="dac-sprite dac-expand-more-black dac-nav-sub-slider"></i> <ul class="dac-nav-secondary about"> <li class="dac-nav-item versions"> <a class="dac-nav-link" href="../../about/versions/marshmallow/index.html">Android</a> </li> <li class="dac-nav-item wear"> <a class="dac-nav-link" href="../../wear/index.html">Wear</a> </li> <li class="dac-nav-item tv"> <a class="dac-nav-link" href="../../tv/index.html">TV</a> </li> <li class="dac-nav-item auto"> <a class="dac-nav-link" href="../../auto/index.html">Auto</a> </li> </ul> </li> <li class="dac-nav-item design"> <a class="dac-nav-link" href="../../design/index.html" zh-tw-lang="設計" zh-cn-lang="设计" ru-lang="Проектирование" ko-lang="디자인" ja-lang="設計" es-lang="Diseñar">Design</a> </li> <li class="dac-nav-item develop"> <a class="dac-nav-link" href="../../develop/index.html" zh-tw-lang="開發" zh-cn-lang="开发" ru-lang="Разработка" ko-lang="개발" ja-lang="開発" es-lang="Desarrollar">Develop</a> <i class="dac-sprite dac-expand-more-black dac-nav-sub-slider"></i> <ul class="dac-nav-secondary develop"> <li class="dac-nav-item training"> <a class="dac-nav-link" href="../../training/index.html" zh-tw-lang="訓練課程" zh-cn-lang="培训" ru-lang="Курсы" ko-lang="교육" ja-lang="トレーニング" es-lang="Capacitación">Training</a> </li> <li class="dac-nav-item guide"> <a class="dac-nav-link" href="../../guide/index.html" zh-tw-lang="API 指南" zh-cn-lang="API 指南" ru-lang="Руководства по API" ko-lang="API 가이드" ja-lang="API ガイド" es-lang="Guías de la API">API Guides</a> </li> <li class="dac-nav-item reference"> <a class="dac-nav-link" href="../../reference/packages.html" zh-tw-lang="參考資源" zh-cn-lang="参考" ru-lang="Справочник" ko-lang="참조문서" ja-lang="リファレンス" es-lang="Referencia">Reference</a> </li> <li class="dac-nav-item tools"> <a class="dac-nav-link" href="../../sdk/index.html" zh-tw-lang="相關工具" zh-cn-lang="工具" ru-lang="Инструменты" ko-lang="도구" ja-lang="ツール" es-lang="Herramientas">Tools</a></li> <li class="dac-nav-item google"> <a class="dac-nav-link" href="../../google/index.html">Google Services</a> </li> </ul> </li> <li class="dac-nav-item distribute"> <a class="dac-nav-link" href="../../distribute/googleplay/index.html" zh-tw-lang="發佈" zh-cn-lang="分发" ru-lang="Распространение" ko-lang="배포" ja-lang="配布" es-lang="Distribuir">Distribute</a> <i class="dac-sprite dac-expand-more-black dac-nav-sub-slider"></i> <ul class="dac-nav-secondary distribute"> <li class="dac-nav-item googleplay"> <a class="dac-nav-link" href="../../distribute/googleplay/index.html">Google Play</a></li> <li class="dac-nav-item essentials"> <a class="dac-nav-link" href="../../distribute/essentials/index.html">Essentials</a></li> <li class="dac-nav-item users"> <a class="dac-nav-link" href="../../distribute/users/index.html">Get Users</a></li> <li class="dac-nav-item engage"> <a class="dac-nav-link" href="../../distribute/engage/index.html">Engage & Retain</a></li> <li class="dac-nav-item monetize"> <a class="dac-nav-link" href="../../distribute/monetize/index.html">Earn</a> </li> <li class="dac-nav-item analyze"> <a class="dac-nav-link" href="../../distribute/analyze/index.html">Analyze</a> </li> <li class="dac-nav-item stories"> <a class="dac-nav-link" href="../../distribute/stories/index.html">Stories</a> </li> </ul> </li> <li class="dac-nav-item preview"> <a class="dac-nav-link" href="../../preview/index.html">Preview</a> </li> </ul> </div> </div> </nav> <!-- end navigation--> <!-- Nav Setup --> <script>$('[data-dac-nav]').dacNav();</script> <div class="wrap clearfix" id="body-content"> <div id="search-results" class="dac-search-results"> <div id="dac-search-results-history" class="dac-search-results-history"> <div class="wrap dac-search-results-history-wrap"> <div class="cols"> <div class="col-1of2 col-tablet-1of2 col-mobile-1of1"> <h2>Most visited</h2> <div class="resource-flow-layout" data-history-query="history:most/visited" data-maxresults="3" data-cardsizes="18x2"></div> </div> <div class="col-1of2 col-tablet-1of2 col-mobile-1of1"> <h2>Recently visited</h2> <div class="resource-flow-layout cols" data-history-query="history:recent" data-allow-duplicates="true" data-maxresults="3" data-cardsizes="18x2"></div> </div> </div> </div> </div> <div id="dac-search-results-content" class="dac-search-results-content"> <div class="dac-search-results-metadata wrap"> <div class="dac-search-results-for"> <h2>Results for <span id="search-results-for"></span></h2> </div> <div id="dac-search-results-hero"></div> <div class="dac-search-results-hero cols"> <div id="dac-search-results-reference" class="col-3of6 col-tablet-1of2 col-mobile-1of1"> <div class="suggest-card reference no-display"> <ul class="dac-search-results-reference"> </ul> </div> </div> <div id="dac-custom-search-results"></div> </div> </div> </div> </div> <ul class="dac-header-crumbs"> </ul> <!-- Breadcrumb Setup --> <p><script>$('.dac-nav-list').dacCurrentPage().dacCrumbs();</script></p> <h1 itemprop="name" >Debugging Web Apps</h1> <div id="jd-content"> <div class="jd-descr" itemprop="articleBody"> <div id="qv-wrapper"> <div id="qv"> <h2>Quickview</h2> <ul> <li>You can debug your web app using console methods in JavaScript</li> <li>If debugging in a custom WebView, you need to implement a callback method to handle debug messages</li> </ul> <h2>In this document</h2> <ol> <li><a href="#Browser">Using Console APIs in the Android Browser</a></li> <li><a href="#WebView">Using Console APIs in WebView</a></li> </ol> <h2>See also</h2> <ol> <li><a class="external-link" href="https://developers.google.com/chrome-developer-tools/docs/remote-debugging">Remote Debugging on Android</a></li> <li><a href="../../tools/debugging/index.html">Debugging</a></li> </ol> </div> </div> <p>If you are testing your web app with a device running Android 4.4 or higher, you can remotely debug your web pages in <code><a href="../../reference/android/webkit/WebView.html">WebView</a></code> with Chrome Developer Tools, while continuing to support older versions of Android. For more information, see <a class="external-link" href="https://developers.google.com/chrome-developer-tools/docs/remote-debugging">Remote Debugging on Android</a>.</p> <p>If you don't have a device running Android 4.4 or higher, you can debug your JavaScript using the <code>console</code> JavaScript APIs and view the output messages to logcat. If you're familiar with debugging web pages with Firebug or Web Inspector, then you're probably familiar with using <code>console</code> (such as <code>console.log()</code>). Android's WebKit framework supports most of the same APIs, so you can receive logs from your web page when debugging in Android's Browser or in your own <code><a href="../../reference/android/webkit/WebView.html">WebView</a></code>. This document describes how to use the console APIs for debugging.</p> <h2 id="Browser">Using Console APIs in the Android Browser</h2> <div class="sidebox-wrapper"> <div class="sidebox"> <h2>Logcat</h2> <p>Logcat is a tool that dumps a log of system messages. The messages include a stack trace when the device throws an error, as well as log messages written from your application and those written using JavaScript <code>console</code> APIs.</p> <p>To run logcat and view messages, execute <code>adb logcat</code> from your Android SDK <code>tools/</code> directory, or, from DDMS, select <strong>Device > Run logcat</strong>.</p> <p>See <a href="../../tools/debugging/debugging-log.html">Debugging</a> for more information about <codelogcat</code>.</p> </div> </div> <p>When you call a <code>console</code> function (in the DOM's <code>window.console</code> object), the output appears in logcat. For example, if your web page executes the following JavaScript:</p> <pre> console.log("Hello World"); </pre> <p>Then the logcat message looks something like this:</p> <pre class="no-pretty-print"> Console: Hello World http://www.example.com/hello.html :82 </pre> <p>The format of the message might appear different depending on which version of Android you're using. On Android 2.1 and higher, console messages from the Android Browser are tagged with the name "browser". On Android 1.6 and lower, Android Browser messages are tagged with the name "WebCore".</p> <p>Android's WebKit does not implement all of the console APIs available in other desktop browsers. You can, however, use the basic text logging functions:</p> <ul> <li><code>console.log(String)</code></li> <li><code>console.info(String)</code></li> <li><code>console.warn(String)</code></li> <li><code>console.error(String)</code></li> </ul> <p>Other console functions don't raise errors, but might not behave the same as what you expect from other web browsers.</p> <h2 id="WebView">Using Console APIs in WebView</h2> <p>All the console APIs shown above are also supported when debugging in <code><a href="../../reference/android/webkit/WebView.html">WebView</a></code>. If you're targeting Android 2.1 (API level 7) and higher, you must provide a <code><a href="../../reference/android/webkit/WebChromeClient.html">WebChromeClient</a></code> that implements the <code><a href="../../reference/android/webkit/WebChromeClient.html#onConsoleMessage(java.lang.String, int, java.lang.String)">onConsoleMessage()</a></code> method in order for console messages to appear in logcat. Then, apply the <code><a href="../../reference/android/webkit/WebChromeClient.html">WebChromeClient</a></code> to your <code><a href="../../reference/android/webkit/WebView.html">WebView</a></code> with <code><a href="../../reference/android/webkit/WebView.html#setWebChromeClient(android.webkit.WebChromeClient)">setWebChromeClient()</a></code>. <p>For example, to support API level 7, this is how your code for <code><a href="../../reference/android/webkit/WebChromeClient.html#onConsoleMessage(java.lang.String, int, java.lang.String)">onConsoleMessage(String, int, String)</a></code> might look:</p> <pre> WebView myWebView = (WebView) findViewById(R.id.webview); myWebView.setWebChromeClient(new WebChromeClient() { public void onConsoleMessage(String message, int lineNumber, String sourceID) { Log.d("MyApplication", message + " -- From line " + lineNumber + " of " + sourceID); } }); </pre> <p>However, if your lowest supported version is API level 8 or higher, you should instead implement <code><a href="../../reference/android/webkit/WebChromeClient.html#onConsoleMessage(android.webkit.ConsoleMessage)">onConsoleMessage(ConsoleMessage)</a></code>. For example:</p> <pre> WebView myWebView = (WebView) findViewById(R.id.webview); myWebView.setWebChromeClient(new WebChromeClient() { public boolean onConsoleMessage(ConsoleMessage cm) { Log.d("MyApplication", cm.<code><a href="../../reference/android/webkit/ConsoleMessage.html#message()">message()</a></code> + " -- From line " + cm.<code><a href="../../reference/android/webkit/ConsoleMessage.html#lineNumber()">lineNumber()</a></code> + " of " + cm.<code><a href="../../reference/android/webkit/ConsoleMessage.html#sourceId()">sourceId()</a></code> ); return true; } }); </pre> <p>The <code><a href="../../reference/android/webkit/ConsoleMessage.html">ConsoleMessage</a></code> also includes a <code><a href="../../reference/android/webkit/ConsoleMessage.MessageLevel.html">MessageLevel</a></code> object to indicate the type of console message being delivered. You can query the message level with <code><a href="../../reference/android/webkit/ConsoleMessage.html#messageLevel()">messageLevel()</a></code> to determine the severity of the message, then use the appropriate <code><a href="../../reference/android/util/Log.html">Log</a></code> method or take other appropriate actions.</p> <p>Whether you're using <code><a href="../../reference/android/webkit/WebChromeClient.html#onConsoleMessage(java.lang.String, int, java.lang.String)">onConsoleMessage(String, int, String)</a></code> or <code><a href="../../reference/android/webkit/WebChromeClient.html#onConsoleMessage(android.webkit.ConsoleMessage)">onConsoleMessage(ConsoleMessage)</a></code>, when you execute a console method in your web page, Android calls the appropriate <code><a href="../../reference/android/webkit/WebChromeClient.html#onConsoleMessage(java.lang.String, int, java.lang.String)">onConsoleMessage()</a></code> method so you can report the error. For example, with the example code above, a logcat message is printed that looks like this:</p> <pre class="no-pretty-print"> Hello World -- From line 82 of http://www.example.com/hello.html </pre> </div> </div> <!-- end jd-content --> <div class="wrap"> <div class="dac-footer"> <div class="cols dac-footer-main"> <div class="col-1of2"> <a class="dac-footer-getnews" id="newsletter" data-modal-toggle="newsletter" href="javascript:;">Get news & tips <span class="dac-fab dac-primary"><i class="dac-sprite dac-mail"></i></span></a> </div> <div class="col-1of2 dac-footer-reachout"> <div class="dac-footer-contact"> <a class="dac-footer-contact-link" href="http://android-developers.blogspot.com/">Blog</a> <a class="dac-footer-contact-link" href="/support.html">Support</a> </div> <div class="dac-footer-social"> <a class="dac-button-social dac-youtube dac-footer-social-link" href="https://www.youtube.com/user/androiddevelopers"><i class="dac-sprite dac-youtube"></i></a> <a class="dac-button-social dac-gplus dac-footer-social-link" href="https://plus.google.com/+AndroidDevelopers"><i class="dac-sprite dac-gplus"></i></a> <a class="dac-button-social dac-twitter dac-footer-social-link" href="https://twitter.com/AndroidDev"><i class="dac-sprite dac-twitter"></i></a> </div> </div> </div> <hr class="dac-footer-separator"/> <p class="dac-footer-copyright"> Except as noted, this content is licensed under <a href="http://creativecommons.org/licenses/by/2.5/"> Creative Commons Attribution 2.5</a>. For details and restrictions, see the <a href="../../license.html">Content License</a>. </p> <p class="dac-footer-links"> <a href="/about/android.html">About Android</a> <a href="/auto/index.html">Auto</a> <a href="/tv/index.html">TV</a> <a href="/wear/index.html">Wear</a> <a href="/legal.html">Legal</a> <span id="language" class="locales"> <select name="language" onchange="changeLangPref(this.value, true)"> <option value="en" selected="selected">English</option> <option value="es">Español</option> <option value="in">Bahasa Indonesia</option> <option value="ja">日本語</option> <option value="ko">한국어</option> <option value="pt-br">Português Brasileiro</option> <option value="ru">Русский</option> <option value="vi">tiếng Việt</option> <option value="zh-cn">中文(简体)</option> <option value="zh-tw">中文(繁體)</option> </select> </span> </p> </div> </div> <!-- end footer --> <div data-modal="newsletter" data-newsletter data-swap class="dac-modal newsletter"> <div class="dac-modal-container"> <div class="dac-modal-window"> <header class="dac-modal-header"> <div class="dac-modal-header-actions"> <button class="dac-modal-header-close" data-modal-toggle></button> </div> <div class="dac-swap" data-swap-container> <section class="dac-swap-section dac-active dac-down"> <h2 class="norule dac-modal-header-title" data-t="newsletter.title"></h2> <p class="dac-modal-header-subtitle" data-t="newsletter.requiredHint"></p> </section> <section class="dac-swap-section dac-up"> <h2 class="norule dac-modal-header-title" data-t="newsletter.successTitle">Hooray!</h2> </section> </div> </header> <div class="dac-swap" data-swap-container> <section class="dac-swap-section dac-active dac-left"> <form action="https://docs.google.com/forms/d/1QgnkzbEJIDu9lMEea0mxqWrXUJu0oBCLD7ar23V0Yys/formResponse" class="dac-form" method="post" target="dac-newsletter-iframe"> <input type="hidden" name="entry.935454734" data-newsletter-language> <section class="dac-modal-content"> <fieldset class="dac-form-fieldset"> <div class="cols"> <div class="col-1of2 newsletter-leftCol"> <div class="dac-form-input-group"> <label for="newsletter-full-name" class="dac-form-floatlabel" data-t="newsletter.name">Full name</label> <input type="text" class="dac-form-input" name="entry.1357890476" id="newsletter-full-name" required> <span class="dac-form-required">*</span> </div> <div class="dac-form-input-group"> <label for="newsletter-email" class="dac-form-floatlabel" data-t="newsletter.email">Email address</label> <input type="email" class="dac-form-input" name="entry.472100832" id="newsletter-email" required> <span class="dac-form-required">*</span> </div> </div> <div class="col-1of2 newsletter-rightCol"> <div class="dac-form-input-group"> <label for="newsletter-company" class="dac-form-floatlabel" data-t="newsletter.company">Company / developer name</label> <input type="text" class="dac-form-input" name="entry.1664780309" id="newsletter-company"> </div> <div class="dac-form-input-group"> <label for="newsletter-play-store" class="dac-form-floatlabel" data-t="newsletter.appUrl">One of your Play Store app URLs</label> <input type="url" class="dac-form-input" name="entry.47013838" id="newsletter-play-store" required> <span class="dac-form-required">*</span> </div> </div> </div> </fieldset> <fieldset class="dac-form-fieldset"> <div class="cols"> <div class="col-1of2 newsletter-leftCol"> <legend class="dac-form-legend"><span data-t="newsletter.business.label">Which best describes your business:</span><span class="dac-form-required">*</span> </legend> <div class="dac-form-radio-group"> <input type="radio" value="Apps" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-app" required> <label for="newsletter-business-type-app" class="dac-form-radio-button"></label> <label for="newsletter-business-type-app" class="dac-form-label" data-t="newsletter.business.apps">Apps</label> </div> <div class="dac-form-radio-group"> <input type="radio" value="Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-games" required> <label for="newsletter-business-type-games" class="dac-form-radio-button"></label> <label for="newsletter-business-type-games" class="dac-form-label" data-t="newsletter.business.games">Games</label> </div> <div class="dac-form-radio-group"> <input type="radio" value="Apps and Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-appsgames" required> <label for="newsletter-business-type-appsgames" class="dac-form-radio-button"></label> <label for="newsletter-business-type-appsgames" class="dac-form-label" data-t="newsletter.business.both">Apps & Games</label> </div> </div> <div class="col-1of2 newsletter-rightCol newsletter-checkboxes"> <div class="dac-form-radio-group"> <div class="dac-media"> <div class="dac-media-figure"> <input type="checkbox" class="dac-form-checkbox" name="entry.732309842" id="newsletter-add" required value="Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities."> <label for="newsletter-add" class="dac-form-checkbox-button"></label> </div> <div class="dac-media-body"> <label for="newsletter-add" class="dac-form-label dac-form-aside"><span data-t="newsletter.confirmMailingList"></span><span class="dac-form-required">*</span></label> </div> </div> </div> <div class="dac-form-radio-group"> <div class="dac-media"> <div class="dac-media-figure"> <input type="checkbox" class="dac-form-checkbox" name="entry.2045036090" id="newsletter-terms" required value="I acknowledge that the information provided in this form will be subject to Google's privacy policy (https://www.google.com/policies/privacy/)."> <label for="newsletter-terms" class="dac-form-checkbox-button"></label> </div> <div class="dac-media-body"> <label for="newsletter-terms" class="dac-form-label dac-form-aside"><span data-t="newsletter.privacyPolicy" data-t-html></span><span class="dac-form-required">*</span></label> </div> </div> </div> </div> </div> </fieldset> </section> <footer class="dac-modal-footer"> <div class="cols"> <div class="col-2of5"> </div> </div> <button type="submit" value="Submit" class="dac-fab dac-primary dac-large dac-modal-action"><i class="dac-sprite dac-arrow-right"></i></button> </footer> </form> </section> <section class="dac-swap-section dac-right"> <div class="dac-modal-content"> <p class="newsletter-success-message" data-t="newsletter.successDetails"></p> </div> </section> </div> </div> </div> </div> <!-- end newsletter modal --> <!-- start reset language header modal --> <div data-modal="langform" class="dac-modal" id="langform"> <div class="dac-modal-container"> <div class="dac-modal-window"> <header class="dac-modal-header"> <div class="dac-modal-header-actions"> <button class="dac-modal-header-close" data-modal-toggle></button> </div> <section class="dac-swap-section dac-active dac-down"> <h2 class="norule dac-modal-header-title"></h2> </section> </header> <section class="dac-swap-section dac-active dac-left"> <section class="dac-modal-content"> <fieldset class="dac-form-fieldset"> <div class="cols"> <div class="col-2of2 langform-leftCol"> <p id="resetLangText"></p> <p id="resetLangCta"></p> </div> </div> </fieldset> </section> <footer class="dac-modal-footer" id="langfooter"> <div class="cols"> <div class="col-2of5"> </div> </div> <button class="button dac-primary dac-modal-action lang yes" data-t="newsletter.resetLangButtonYes" data-modal-toggle></button> <button class="button dac-primary dac-modal-action lang no" data-t="newsletter.resetLangButtonNo" data-modal-toggle></button> </a> </footer> </form> </section> </div> </div> </div> <!-- end langreset modal --> </div> <!-- end body-content --> <script src="https://developer.android.com/ytblogger_lists_unified.js" defer></script> <script src="/jd_lists_unified_en.js?v=17" defer></script> <script src="/reference/lists.js?v=17" defer></script> <script src="/reference/gcm_lists.js?v=17" defer></script> <script src="/reference/gms_lists.js?v=17" defer></script> <script> // Load localized metadata. (function(lang) { if (lang === 'en') { return; } // Write it to the document so it gets evaluated before DOMContentReady. document.write('<script src="/jd_lists_unified_' + lang + '.js?v=14" defer></' + 'script>'); })(getLangPref()) </script> </body> </html>