OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 window.runServiceWorker = function() { |
| 6 navigator.serviceWorker.register('sw.js').then(function() { |
| 7 return navigator.serviceWorker.ready; |
| 8 }).then(function(registration) { |
| 9 return registration.paymentManager; |
| 10 }).then(function(paymentManager) { |
| 11 window.domAutomationController.send(paymentManager); |
| 12 }).catch(function(error) { |
| 13 window.domAutomationController.send(error.name); |
| 14 }); |
| 15 }; |
OLD | NEW |