Плагины
Материал из MDC.
Плагины (plugin или plug-in) в контексте приложений основанных на Mozilla — это двоичные компоненты, которые, после регистрации в приложении, могут отображать содержимое, которое само приложение отобразить не в состоянии. Так, например, плагин Adobe Reader позволяет пользователю открывать PDF-файлы непосредственно в браузере, а плагины Quicktime и Windows Media Player используются для воспроизведения видео на веб-страницах.
Плагины могут быть полезны при создании приложения, использующего фреймворк Mozilla. Например, в ActiveState Komodo плагины используются для того, чтобы встроить редактор Scintilla в пользовательский интерфейс на основе XUL.
Плагины должны быть написаны с использоанием NPAPI — кросс-браузерного API для плагинов. Основным источником документации по NPAPI является «Справочник по Gecko Plugin API». To make your plugin scriptable from web pages, use npruntime. The older XPCOM- and LiveConnect-based APIs for plugins should not be used. The technologies themselves continue to be used, just not for plugins.
You can use SVG or canvas for simpler tasks of script-driven graphics and animation.
Плагины отличаются от расширений, которые изменяют или расширяют функции выполняемые самим браузером.
- Справочник по Gecko Plugin API (NPAPI)
- This reference describes the application programming interfaces for NPAPI plugins and provides information about how to use these interfaces.
- Scripting plugins (npruntime)
- This reference describes the new cross-browser NPAPI extensions that let plugins be scriptable and also let them access the script objects in the browser.
- Mozilla Plugin SDK
- The plugin SDK contains all of the tools and headers needed for making scriptable plugins for Gecko, including the xpidl compiler/linker and the latest
npapi.h.
- Использование XPInstall для установки плагинов
- XPInstall is a way to ensure a smooth user-experience when obtaining plugins without making the user exit the browsing environment to launch a separate installer.
- Detecting Plugins
- "Since there are clearly times when it makes sense to use a plug-in, the question arises of how to deal with those who don’t have the required plug-in installed."
- Scripting Plugins: Macromedia Flash
- This article explains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation.
- Plugins: The First Install Problem
- The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser.
- ActiveX Control for Hosting Netscape Plug-ins in IE
- Microsoft has removed support for Netscape plug-ins from IE 5.5 SP 2 and beyond. If you are a plug-in author, you may find this project saves you a lot of work!
- Plugins: Samples and Test Cases
- NPAPI plugin samples and test cases.
- XEmbed Extension for Mozilla Plugins
- Recent versions of Mozilla include an extension for writing plugins that use XEmbed instead of using the old Xt-based mainloop that most plugins have been using since the Netscape 3.x days.
View All...
|
Сообщество
См. также
- Расширения, SVG, Canvas
|