Commit 44395004 authored by Juan Corona's avatar Juan Corona

Rename FrameUtil.isReady to .isDocumentReady

Better differentiation from .isLoaded
parent e7d6d83b
......@@ -38,7 +38,7 @@ class FrameObserver {
_addFrame (frame) {
if (FrameUtil.isAccessible(frame)) {
FrameUtil.isReady(frame, () => {
FrameUtil.isDocumentReady(frame, () => {
frame.contentWindow.addEventListener('unload', () => {
this._removeFrame(frame);
});
......
......@@ -43,7 +43,7 @@ function isValid (iframe) {
return iframe.className !== 'h-sidebar-iframe';
}
function isReady (iframe, callback) {
function isDocumentReady (iframe, callback) {
if (iframe.contentDocument.readyState === 'loading') {
iframe.contentDocument.addEventListener('DOMContentLoaded', function () {
callback();
......@@ -70,5 +70,5 @@ module.exports = {
isAccessible: isAccessible,
isValid: isValid,
isLoaded: isLoaded,
isReady: isReady,
isDocumentReady: isDocumentReady,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment