forked from statamic/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Headless Live Preview (statamic#5109)
Co-authored-by: StyleCI Bot <[email protected]>
- Loading branch information
1 parent
6e0ab40
commit 1b51f28
Showing
57 changed files
with
1,801 additions
and
142 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 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 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 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 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,21 @@ | ||
export default { | ||
methods: { | ||
updateIframeContents(url) { | ||
const iframe = document.createElement('iframe'); | ||
iframe.setAttribute('frameborder', '0'); | ||
iframe.setAttribute('src', url); | ||
this.setIframeAttributes(iframe); | ||
|
||
const container = this.$refs.contents; | ||
container.firstChild | ||
? container.replaceChild(iframe, container.firstChild) | ||
: container.appendChild(iframe); | ||
|
||
// todo: maintain scroll position | ||
}, | ||
|
||
setIframeAttributes(iframe) { | ||
// | ||
} | ||
} | ||
} |
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 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
Oops, something went wrong.