I want to make a HTML select
list, with which I can choose which type of globalCompositeOperation
will be applied when blending two canvas
elements, like this:
<select name="blending-modes" id="blending-modes">
<option value="source-over">source-over</option>
<option value="source-in">source-in</option>
<option value="source-out">source-out</option>
...
</select>
Is there a way to programatically get list of available globalCompositeOperation
types as a Javascript object or array, so it could be used to populate select
element with data, instead of filling it manually? Is this information stored in some native variable?
I do not want to just verify whether or not some blending mode is supported by user's browser, as discussed here. I want to get a full list of supported globalCompositeOperation
types in order to chose blending mode in a browser.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…