opera-presto

Detecting canvas text API support (Opera Mini)

孤人 提交于 2019-12-10 17:37:42
问题 Although Opera Mini does not display canvas text, a typical test indicates that it has an implementation of the text API functions. Is there an alternative technique to check for support? Current method: var context = document.createElement("canvas").getContext("2d"); var canvasTextSupport = typeof context.fillText == "function"; // true in Opera Mini An example you can use to see if text shown: tutorialspoint 回答1: You can use a custom build of the Modernizr library to do that! http:/