forked from joseph/Monocle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Every script calls Monocle.pieceLoaded.
You can use this to detect when parts of Monocle have loaded, in a similar way to how JSON-P works. If you define the global function onMonoclePiece, it will be passed the piece name. As a result of this, the framer functionality now works in IE8 (which bizarrely evaluates script tags in dynamic iframes when earlier script tags have not been loaded).
- Loading branch information
Showing
17 changed files
with
67 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,3 +272,5 @@ Monocle.Book.fromHTML = function (html) { | |
|
||
return new Monocle.Book(bookData); | ||
} | ||
|
||
Monocle.pieceLoaded('book'); |
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 |
---|---|---|
|
@@ -57,3 +57,5 @@ if (typeof(MONOCLE_NO_COMPAT) == 'undefined') { | |
} | ||
|
||
} | ||
|
||
Monocle.pieceLoaded('compat'); |
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 |
---|---|---|
|
@@ -115,3 +115,5 @@ Monocle.Styles.Controls.Contents = { | |
"cursor": "pointer" | ||
} | ||
} | ||
|
||
Monocle.pieceLoaded('controls/contents'); |
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 |
---|---|---|
|
@@ -104,3 +104,5 @@ Monocle.Styles.Controls.Magnifier = { | |
"font-size": "11px" | ||
} | ||
} | ||
|
||
Monocle.pieceLoaded('controls/magnifier'); |
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 |
---|---|---|
|
@@ -109,3 +109,6 @@ Monocle.Controls.PlaceSaver = function (reader) { | |
|
||
return API; | ||
} | ||
|
||
|
||
Monocle.pieceLoaded('controls/placesaver'); |
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 |
---|---|---|
|
@@ -242,3 +242,5 @@ Monocle.Styles.Controls.Scrubber = { | |
} | ||
} | ||
|
||
|
||
Monocle.pieceLoaded('controls/scrubber'); |
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 |
---|---|---|
|
@@ -164,3 +164,6 @@ Monocle.Styles.Flippers.Legacy = { | |
"margin-top": "3px" | ||
} | ||
} | ||
|
||
|
||
Monocle.pieceLoaded('flippers/legacy'); |
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 |
---|---|---|
|
@@ -619,3 +619,5 @@ Monocle.Reader = function (node, bookData, options) { | |
|
||
return API; | ||
} | ||
|
||
Monocle.pieceLoaded('reader'); |
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