MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Peter wood (talk | contribs) No edit summary |
Peter wood (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
(function () { | (function () { | ||
document.getElementById('mw-Mycanvas'). | const canvas = document.createElement('canvas'); | ||
document.getElementById('mw-Mycanvas').appendChild(<canvas width="200" height="100" style="border:1px solid red;"></canvas>); | |||
}()); | }()); | ||
Line 17: | Line 18: | ||
/* var myElement = document.getElementById('mw-Mycanvas');*/ | /* var myElement = document.getElementById('mw-Mycanvas');*/ | ||
/*myElement.innerHTML = '<html><canvas width="200" height="100" style="border:1px solid red;"></canvas></html>';*/ | /*myElement.innerHTML = '<html><canvas width="200" height="100" style="border:1px solid red;"></canvas></html>';*/ | ||
/*document.getElementById('mw-Mycanvas').innerHTML = '<canvas width="100" height="100" style="border:1px solid red;"></canvas>';*/ |
Revision as of 11:14, 18 March 2023
/* Any JavaScript here will be loaded for all users on every page load. */ (function () { var myElement = document.getElementById('mw-hello-world'); myElement.innerHTML = '<html>Hello World!!!</html>'; }()); (function () { const canvas = document.createElement('canvas'); document.getElementById('mw-Mycanvas').appendChild(<canvas width="200" height="100" style="border:1px solid red;"></canvas>); }()); /* var myElement = document.getElementById('mw-Mycanvas');*/ /*myElement.innerHTML = '<html><canvas width="200" height="100" style="border:1px solid red;"></canvas></html>';*/ /*document.getElementById('mw-Mycanvas').innerHTML = '<canvas width="100" height="100" style="border:1px solid red;"></canvas>';*/