content Chrome (PC) Chrome (Android) Safari (iOS) Safari (PC) WebView WebView WebView WebView Making WebViews Work for the Web Dominique Hazael-Massieux, TPAC2021 https://www.w3.org/2021/Talks/dhm-tpac-webviews/#5
debug WebView-based applications? WebView Your website is broken when I view it in Twitter’s in-app browser! < > Oops, let me check. > Wait, how can I debug in-app browser? I can’t inspect it with DevTools...
debug WebView-based applications? WebView Your website is broken when I view it in Twitter’s in-app browser! < > Oops, let me check. > Wait, how can I debug in-app browser? I can’t inspect it with DevTools... Simulator? Remote debug?
WebView on your simulator, you can debug without any problem. Good! But you can’t run Facebook, LINE, Twitter on your simulator. (unless you are working there) Simulator
• get friends list • ... https://liff.line.me/{liff_id} Your web app can use a variety of LINE-specific APIs Introduction to LIFF/LINE Mini App - Characteristics and Practical Development https://linedevday.linecorp.com/2021/en/sessions/151/ Example: LIFF
• get friends list • ... https://liff.line.me/{liff_id} Your web app can use a variety of LINE-specific APIs You can’t debug your web app running on LIFF Browser 😢 Android: setWebContentsDebuggingEnabled(false) iOS: Production build (downloaded from App Store) Example: LIFF For Improvement of Developer Experience of All LIFF App Developers https://linedevday.linecorp.com/2021/en/sessions/142/
disabled? - Production build - setWebContentsDebuggingEnabled(false) Well, then, Let’s send debug information using only JavaScript API! DevTools can’t get information from JS engine. console, network logs, DOM tree, memory,... WebView
JavaScript fetch API is called! console API is called! DOM tree is changed! OK, let’s use JavaScript! index.js doesn’t have access to JS engine’s information
content is rendered on WebViews WebView But you cannot debug WebView 😢 All web applications can be debugged using any DevTools (Chrome DevTools, Safari Web Inspector, etc.) without any side effects 😄 Universal DevTools https://github.com/cola119/universal-devtools-poc
Analyze runtime performance There are some limitations because Universal DevTools is implemented in JavaScript. But at the same time, there are many challenges - Edit source files - Memory Usage - Record - Extension etc...