Page load or document complete event?

hello exists a method for event page load or document complete when browser have finished load a page?

i have found this it’s acceptable?

public void waitForLoad(WebDriver ddriver) {

ExpectedCondition<Boolean> pageLoadCondition = new
		ExpectedCondition<Boolean>() {
			public Boolean apply(WebDriver driver) {
				return ((JavascriptExecutor)driver).executeScript("return document.readyState").equals("complete");
WebDriverWait wait = new WebDriverWait(ddriver, 30);