mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
split rendering up into renderer, render, layout
This commit is contained in:
parent
a5d970bca2
commit
0398b5eedf
22 changed files with 1149 additions and 840 deletions
|
@ -1,12 +1,12 @@
|
|||
EPUBJS.Hooks.register("beforeChapterDisplay").transculsions = function(callback, chapter){
|
||||
EPUBJS.Hooks.register("beforeChapterDisplay").transculsions = function(callback, renderer){
|
||||
/*
|
||||
<aside ref="http://www.youtube.com/embed/DUL6MBVKVLI?html5=1" transclusion="video" width="560" height="315">
|
||||
<a href="http://www.youtube.com/embed/DUL6MBVKVLI"> Watch the National Geographic: The Last Roll of Kodachrome</a>
|
||||
</aside>
|
||||
*/
|
||||
|
||||
var trans = chapter.doc.querySelectorAll('[transclusion]'),
|
||||
items = Array.prototype.slice.call(trans);
|
||||
var trans = renderer.contents.querySelectorAll('[transclusion]'),
|
||||
items = Array.prototype.slice.call(trans);
|
||||
|
||||
items.forEach(function(item){
|
||||
var src = item.getAttribute("ref"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue