User Tools

Site Tools


blog:2025-04-18-001

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
blog:2025-04-18-001 [2025/04/18 11:52]
jethro
blog:2025-04-18-001 [2025/04/18 11:54] (current)
jethro [最終程式]
Line 106: Line 106:
 private async void Test2() private async void Test2()
 { {
- // 由 chrome page body 獲取頁面高度+ // 由 chrome page body 獲取頁面Size
  var pageHeight = await chrome.EvaluateScriptAsync("​document.body.scrollHeight"​);​  var pageHeight = await chrome.EvaluateScriptAsync("​document.body.scrollHeight"​);​
  var pageWidth = await chrome.EvaluateScriptAsync("​document.body.scrollWidth"​);​  var pageWidth = await chrome.EvaluateScriptAsync("​document.body.scrollWidth"​);​
- int height = (int)pageHeight.Result; // 820; // 設置頁面高度 + int height = (int)pageHeight.Result;​ // 設置頁面高度 
- int width = (int)pageWidth.Result; // 820; // 設置頁面+ int width = (int)pageWidth.Result;​ // 設置頁面
  long deviceScaleFactor = 1; // 設置縮放比例  long deviceScaleFactor = 1; // 設置縮放比例
  bool mobile = false; // 設置為非移動設備  bool mobile = false; // 設置為非移動設備
blog/2025-04-18-001.txt · Last modified: 2025/04/18 11:54 by jethro