-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed body to getBody and made it a method, #877.
- Loading branch information
1 parent
de7fba8
commit 804037a
Showing
4 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
define(['createElement'], function( createElement ) { | ||
function getBody() { | ||
// After page load injecting a fake body doesn't work so check if body exists | ||
var body = document.body; | ||
|
||
if(!body) { | ||
// Can't use the real body create a fake one. | ||
body = createElement('body'); | ||
body.fake = true; | ||
} | ||
|
||
return body; | ||
} | ||
|
||
return getBody; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters