1
0
Fork 0
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:
Fred Chasen 2014-01-17 18:39:38 -08:00
parent a5d970bca2
commit 0398b5eedf
22 changed files with 1149 additions and 840 deletions

View file

@ -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"),