From: Kevin Carhart <kevin@carhart.net>
To: edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] our canvas.getContext stub
Date: Sat, 7 Oct 2017 17:56:32 -0700 (PDT) [thread overview]
Message-ID: <alpine.LRH.2.03.1710071747320.7496@carhart.net> (raw)
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
reply other threads:[~2017-10-11 17:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.03.1710071747320.7496@carhart.net \
--to=kevin@carhart.net \
--cc=edbrowse-dev@lists.the-brannons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).