Đang chuẩn bị liên kết để tải về tài liệu:
Creating Applications with Mozilla-Chapter 5. Scripting Mozilla- P4

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo tài liệu 'creating applications with mozilla-chapter 5. scripting mozilla- p4', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 5. Scripting Mozilla- P4 Figure 5-4. How XPConnect fits into the application model In Mozilla XPConnect is the bridge between JavaScript and XPCOM components. The XPConnect technology wraps natively compiled components with JavaScript objects. XPCOM Mozilla s own cross-platform component technology is the framework on top of which these scriptable components are built. Using JavaScript and XPConnect you can create instances of these components and use their methods and properties as you do any regular JavaScript object as described here. You can access any or all of the functionality in Mozilla in this way. Chapter 8 describes more about the XPConnect technology and how it connects components to the interface. It also describes the components themselves and their interfaces the XPCOM technology and how you can create your own XPCOM components. 5.4.1.1. Creating XPCOM objects in script Example 5-10 demonstrates the creation and use of an XPCOM component in JavaScript. In this example the script instantiates the filepicker object and then uses it to display a file picker dialog with all of the file filters selected. To run this example add the function to your xfly.js file and call it from an event handler on the New menu item you added in Example 3-5. Example 5-10. Scriptable component example chooseApp Open file picker and prompt user for application. chooseApp function var nsIFilePicker Components.interfaces.nsIFilePicker var fp Components.classes @mozilla.org filepicker 1 . createInstance nsIFilePicker fp.init this.mDialog this.getString chooseAppFilePickerTitle nsIFilePicker.modeOpen fp.appendFilters nsIFilePicker.filterAll if fp.show nsIFilePicker.returnOK fp.file this.choseApp true this.chosenApp fp.file Update dialog. this.updateApplicationName this.chosenApp.unicodePa th Note the first two lines in the function and the way they work together to create the fp filepicker object. The first line in the function assigns the name of the nsFilepicker .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.