Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/DOMExtension.js

Issue 2611843010: DevTools: move DOMExtension.js into ui module. (Closed)
Patch Set: Introduce progress monitor Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 return event.keyCode !== 229 && event.key === 'Enter'; 805 return event.keyCode !== 229 && event.key === 'Enter';
806 } 806 }
807 807
808 /** 808 /**
809 * @param {!Event} event 809 * @param {!Event} event
810 * @return {boolean} 810 * @return {boolean}
811 */ 811 */
812 function isEscKey(event) { 812 function isEscKey(event) {
813 return event.keyCode === 27; 813 return event.keyCode === 27;
814 } 814 }
815
816 /**
817 * @param {function()} callback
818 * @suppressGlobalPropertiesCheck
819 */
820 function runOnWindowLoad(callback) {
821 /**
822 * @suppressGlobalPropertiesCheck
823 */
824 function windowLoaded() {
825 window.removeEventListener('DOMContentLoaded', windowLoaded, false);
826 callback();
827 }
828
829 if (document.readyState === 'complete' || document.readyState === 'interactive ')
830 callback();
831 else
832 window.addEventListener('DOMContentLoaded', windowLoaded, false);
833 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698