|
@@ -32,8 +32,12 @@
|
|
|
HORIZONTAL_SLIDES_SELECTOR = '.slides>section',
|
|
|
VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section',
|
|
|
HOME_SLIDE_SELECTOR = '.slides>section:first-of-type',
|
|
|
+
|
|
|
UA = navigator.userAgent,
|
|
|
|
|
|
+
|
|
|
+ POST_MESSAGE_METHOD_BLACKLIST = /registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/,
|
|
|
+
|
|
|
|
|
|
config = {
|
|
|
|
|
@@ -1274,11 +1278,20 @@
|
|
|
|
|
|
|
|
|
if( data.method && typeof Reveal[data.method] === 'function' ) {
|
|
|
- var result = Reveal[data.method].apply( Reveal, data.args );
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- dispatchPostMessage( 'callback', { method: data.method, result: result } );
|
|
|
+ if( POST_MESSAGE_METHOD_BLACKLIST.test( data.method ) === false ) {
|
|
|
+
|
|
|
+ var result = Reveal[data.method].apply( Reveal, data.args );
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ dispatchPostMessage( 'callback', { method: data.method, result: result } );
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ console.warn( 'reveal.js: "'+ data.method +'" is is blacklisted from the postMessage API' );
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}, false );
|