File: Test_nsIMigemo.js

package info (click to toggle)
cmigemo 1:1.2+gh0.20150404-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,672 kB
  • sloc: ansic: 2,617; cs: 188; makefile: 174; sh: 107; cpp: 67; perl: 59; csh: 49
file content (22 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2005 MURAOKA Taro(KoRoN)/KaoriYa

function test_Migemo()
{
    var migemo, answer;
    try {
	netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
	const cid = "@kaoriya.net/migemo/nsMigemo;1"
	migemo = Components.classes[cid].createInstance();
	migemo = migemo.QueryInterface(Components.interfaces.nsIMigemo);
    } catch (err) {
	alert("ERROR:1: " + err);
	return;
    }
    try {
	answer = migemo.query(document.getElementById("MIGEMO_INPUT").value);
	document.getElementById("MIGEMO_OUTPUT").value = answer;
    } catch (err) {
	alert("ERROR:2: " + err);
	return;
    }
}