Add polyfill for canvas context.isPointInStroke (fix openfl/openfl#973)

This commit is contained in:
Joshua Granick
2016-02-04 14:23:15 -08:00
parent 4b5ea217ba
commit 8cb537ccd6

View File

@@ -136,6 +136,12 @@ class HTML5Application {
#end
untyped __js__ ("
if (!CanvasRenderingContext2D.prototype.isPointInStroke) {
CanvasRenderingContext2D.prototype.isPointInStroke = function (path, x, y) {
return false;
};
}
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {