Added release notes for 'ContentHandler::runLegacyHooks' removal
[mediawiki.git] / maintenance / jsduck / eg-iframe.html
blob2b597356ca9e0c99a312883eb4481978cff47eeb
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>MediaWiki Code Example</title>
6 <script>
7 /**
8 * Basic log console for the example iframe in documentation pages.
9 */
10 var log = ( function () {
11 var pre;
12 return function () {
13 var str, i, len, line;
14 if ( !pre ) {
15 pre = document.createElement( 'pre' );
16 pre.className = 'mw-jsduck-log';
17 ( document.body || document.documentElement ).appendChild( pre );
19 str = [];
20 for ( i = 0, len = arguments.length; i < len; i++ ) {
21 str.push( String( arguments[ i ] ) );
23 line = document.createElement( 'div' );
24 line.className = 'mw-jsduck-log-line';
25 line.appendChild(
26 document.createTextNode( str.join( ' , ' ) + '\n' )
28 pre.appendChild( line );
30 }() );
32 window.onerror = function ( error, filePath, linerNr ) {
33 log( error + '\n' + filePath + ':' + linerNr );
35 </script>
36 <script>
37 // Emulate startup.js
38 var mwPerformance = { mark: function () {} };
40 function startUp() {
41 mw.config = new mw.Map();
43 </script>
44 <script src="modules/lib/jquery/jquery.js"></script>
45 <script src="modules/lib/phpjs-sha1/sha1.js"></script>
46 <script src="modules/src/mediawiki/mediawiki.js"></script>
47 <script src="modules/src/mediawiki/mediawiki.errorLogger.js"></script>
48 <script src="modules/src/mediawiki/mediawiki.startUp.js"></script>
49 <script src="modules/lib/oojs/oojs.jquery.js"></script>
50 <script src="modules/lib/oojs-ui/oojs-ui-core.js"></script>
51 <script src="modules/lib/oojs-ui/oojs-ui-widgets.js"></script>
52 <script src="modules/lib/oojs-ui/oojs-ui-toolbars.js"></script>
53 <script src="modules/lib/oojs-ui/oojs-ui-windows.js"></script>
54 <script src="modules/lib/oojs-ui/oojs-ui-mediawiki.js"></script>
55 <style>
56 body {
57 font-size: 0.8em;
58 font-family: sans-serif;
61 .mw-jsduck-log {
62 position: relative;
63 min-height: 3em;
64 margin-top: 2em;
65 background: #f7f7f7;
66 border: 1px solid #e4e4e4;
69 .mw-jsduck-log::after {
70 position: absolute;
71 bottom: 100%;
72 right: -1px;
73 padding: 0.5em;
74 background: #fff;
75 border: 1px solid #e4e4e4;
76 border-bottom: 0;
77 border-radius: 0.5em 0.5em 0 0;
78 font: normal 0.5em sans-serif;
79 content: 'console';
82 .mw-jsduck-log-line {
83 padding: 0.2em 0.5em;
84 white-space: pre-wrap;
87 .mw-jsduck-log-line:nth-child(odd) {
88 background: #fff;
90 </style>
91 <link rel="stylesheet" href="modules/src/oojs-ui/oojs-ui-local.css">
92 <link rel="stylesheet" href="modules/lib/oojs-ui/oojs-ui-core-mediawiki.css">
93 <link rel="stylesheet" href="modules/lib/oojs-ui/oojs-ui-widgets-mediawiki.css">
94 <link rel="stylesheet" href="modules/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css">
95 <link rel="stylesheet" href="modules/lib/oojs-ui/oojs-ui-windows-mediawiki.css">
96 </head>
97 <body>
98 <script>
99 if ( window.mw ) {
100 mw.log = log;
104 * Method called by jsduck to execute the example code.
106 function loadInlineExample( code, options, callback ) {
107 try {
108 eval( code );
109 callback && callback( true );
110 } catch ( e ) {
111 log( 'Uncaught ' + e );
112 callback && callback( false, e );
113 throw e;
116 </script>
117 </body>
118 </html>