Get Width/Height of DOM Element, Crosswalk

In my html I have an img tag. In my ts code I wanted to get its width and height. The code looks like this:

<img id="myPic" src={{file}}>


var pic = document.getElementById(‘myPic’);
console.log("CW ", pic.clientWidth);
console.log("CH ", pic.clientHeight);

It did not report the values properly (width was OK, height was not). For those having the same issue: It suddenly works when the plugin crosswalk is installed!

But installation had some side effects:
.toLocaleString() suddenly did not format the Date correctly. It used us-US instead of the currently installed locale. You need to explicitly specify the locale, e.g.


And another side effect:
The top statusbar of Android appeared. you can get rid of it using:

import { StatusBar } from ‘ionic-native’;

Last effect:
UI performance greatly enhances! Before crosswalk there was a huge lag between pressing a button and changing pages. BTW that was the reason I tried crosswalk in the first place.


(used environment: Ionic CLI 2.2.1, Ionic Framework 2.2.0, macOS Sierra, Node v6.9.2, Android 6.0.1)