In short: I am trying to understand the meaning of this TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element' The error appears while lunching Mediawiki's VisualEditor, as can be seen here:
http://www.wiki.org.il/index.php?title=new-page&veaction=edit
The error doesn't enables creating new pages or editing the wiki anonymously. However, with the use of a different skin the error disappears:
http://www.wiki.org.il/index.php/Main_Page?useskin=vector
The wiki runs on 1.25alpha.
The error message is pretty straightforward: getComputedStyle expects an Element as its first argument, and something else was passed to it.
If what you are really asking for is help with debugging your skin, you should make more of an effort to isolate the error.
I had this same error showing. When I replaced jQuery selector with normal JavaScript, the error was fixed.
Replace:
With:
For those who got this error in AngularJS and not jQuery:
I got it in AngularJS v1.5.8 by trying to
ng-include
atype="text/ng-template"
that didn't exist.Make sure that when you use ng-include, the data for that directive points to an actual page/section. Otherwise, you probably wanted:
In my case I was using
ClassName
.It will also work without 2nd argument
" "
.Here is my complete running code :