* [Edbrowse-dev] our canvas.getContext stub
@ 2017-10-08 0:56 Kevin Carhart
0 siblings, 0 replies; only message in thread
From: Kevin Carhart @ 2017-10-08 0:56 UTC (permalink / raw)
To: edbrowse-dev
There's a fairly common utility library called modernizr, (with the trendy
spelling affectation.)
It currently breaks when they try to call canvas.getContext('2d'):
tests['canvas'] = function() {
var elem = document.createElement('canvas');
return !!(elem.getContext && elem.getContext('2d'));
};
So they expect getContext to be a function. When the code encounters the
canvas.getContext of type object, it raises "object not callable".
Could we turn our getContext stub into something like..
this.getContext = function (x) { return {beginPath: eb$nullfunction,
moveTo: eb$nullfunction, lineTo: eb$nullfunction, stroke:eb$nullfunction}
}
Doing exactly what it does now, except it is rigged up to accept an
incoming string?
thanks
Kevin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-11 17:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 0:56 [Edbrowse-dev] our canvas.getContext stub Kevin Carhart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).