ไฟล์ Manifest - โมดูล Nacl

การแมปจากประเภท MIME อย่างน้อย 1 รายการไปยังโมดูล Native Client ที่จัดการแต่ละประเภท ตัวอย่างเช่น โค้ดตัวหนาในข้อมูลโค้ดต่อไปนี้ลงทะเบียนโมดูล Native Client เป็นตัวแฮนเดิลเนื้อหาสำหรับประเภท MIME ของสเปรดชีต OpenOffice

{
  "name": "Native Client OpenOffice Spreadsheet Viewer",
  "version": "0.1",
  "description": "Open OpenOffice spreadsheets, right in your browser.",
  "nacl_modules": [{
    "path": "OpenOfficeViewer.nmf",
    "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
  }]
}

ค่าของ "เส้นทาง" คือตำแหน่งของไฟล์ Manifest Native Client (ไฟล์ .nmf) ภายในไดเรกทอรีส่วนขยาย ดูข้อมูลเพิ่มเติมเกี่ยวกับ Native Client และไฟล์ .nmf ได้ที่ภาพรวมทางเทคนิคของ Native Client

MIME แต่ละประเภทสามารถเชื่อมโยงกับไฟล์ .nmf ได้เพียงไฟล์เดียว แต่ไฟล์ .nmf 1 ไฟล์อาจรองรับ MIME หลายประเภท ตัวอย่างต่อไปนี้แสดงส่วนขยายที่มีไฟล์ .nmf 2 ไฟล์ที่รองรับ MIME 3 ประเภท

{
  "name": "Spreadsheet Viewer",
  "version": "0.1",
  "description": "Open OpenOffice and Excel spreadsheets, right in your browser.",
  "nacl_modules": [{
    "path": "OpenOfficeViewer.nmf",
    "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
  },
  {
    "path": "OpenOfficeViewer.nmf",
    "mime_type": "application/vnd.oasis.opendocument.spreadsheet-template"
  },
  {
    "path": "ExcelViewer.nmf",
    "mime_type": "application/excel"
  }]
}
หมายเหตุ: คุณสามารถใช้โมดูล Native Client ในส่วนขยายได้โดยไม่ต้องระบุ "nacl_modules" ใช้ "nacl_modules" ก็ต่อเมื่อคุณต้องการให้เบราว์เซอร์ใช้โมดูล Native Client เพื่อแสดงเนื้อหาบางประเภทเท่านั้น