---
async :Whether to parse and render the element asynchronously
---
allowTaint :Whether to allow cross-origin images to taint the canvas
---
useCORS :Whether to attempt to load images from a server using CORS
---
canvas:Existing canvas element to use as a base for drawing on
---
foreignObjectRendering:Whether to use ForeignObject rendering if the browser supports it
---
imageTimeout:Timeout for loading an image (in milliseconds). Set to 0 to disable timeout
---
ignoreElements:Predicate function which removes the matching elements from the render
---
logging:Enable logging for debug purposes
---
onclone:Callback function which is called when the Document has been cloned for rendering, can be used to modify the contents that will be rendered without affecting the original source document
---
proxy:Url to the proxy which is to be used for loading cross-origin images. If left empty, cross-origin images won't be loaded
---
removeContainer:Whether to cleanup the cloned DOM elements html2canvas creates temporarily
---
scale:The scale to use for rendering. Defaults to the browsers device pixel ratio
---
width:The width of the canvas
---
x:Crop canvas x-coordinate
---
scrollX:The x-scroll position to used when rendering element, (for example if the Element uses position: fixed )
---
windowWidth:Window width to use when rendering Element , which may affect things like Media queries
---
async:是否异步解析和呈现的元素
allowTaint:是否允许跨源图像到画布上的污点
useCORS:尝试从服务器加载图像使用歌珥
canvas:现有的画布元素使用作为借鉴的基础
foreignObjectRendering:是否使用ForeignObject呈现如果浏览器支持它
imageTimeout:超时(以毫秒为单位)。设置为0以禁用超时
ignoreElements:谓词函数删除匹配元素的呈现
logging:启用日志用于调试目的
onclone:回调函数叫做文档时已经克隆了渲染,可以用来修改的内容呈现在不影响原来的源文档
proxy:Url的代理用于加载跨源图像。如果留空,则不会加载跨源图像
removeContainer:是否清理克隆的DOM元素暂时html2canvas创建
scale:用于规模呈现。默认为浏览器设备像素比
width:画布的宽度
x:作物画布坐标
scrollX:x-scroll位置时使用渲染元素(例如如果元素使用位置:固定)
windowWidth:窗口宽度渲染元素时使用,可能会影响诸如媒体查询
html2canvas: configuration--配置
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...