Satu atau beberapa pemetaan dari jenis MIME ke modul Native Client yang menangani setiap jenis. Misalnya, kode tebal dalam cuplikan berikut mendaftarkan modul Native Client sebagai pengendali konten untuk jenis MIME spreadsheet 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"
}]
}
Nilai "path" adalah lokasi manifes Native Client (file .nmf
) dalam direktori ekstensi. Untuk informasi selengkapnya tentang file Native Client dan .nmf
, lihat Ringkasan Teknis
Native Client.
Setiap jenis MIME hanya dapat dikaitkan dengan satu file .nmf
, tetapi satu file .nmf
dapat menangani beberapa jenis MIME. Contoh berikut menunjukkan ekstensi dengan dua file .nmf
yang menangani tiga jenis MIME.
{
"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"
}]
}