What is plugins.js




















The analytics. Once the plugin is loaded, queue execution continues as normal. As a result, it's extremely important that you test the plugins you're using to ensure they load and run correctly. If a plugin fails to load or has an error, it will prevent all subsequent analytics. After requiring a plugin, it's methods become available for use with the ga command queue. Here is the command signature for calling plugin methods:. For example, the Enhanced Ecommerce plugin's addProduct method can be called like this:.

If you've read all the guides in this section, you should be familiar with most of the features of analytics. The next guide explains how to debug your analytics. The next section, Understanding the Runtime Model , describes these stages in more detail. Plug-ins are dynamic code modules that are associated with one or more MIME types.

When the browser starts, it enumerates the available plug-ins this step varies according to platform , reads resources from each plug-in file to determine the MIME types for that plug-in, and registers each plug-in library for its MIME types. By convention, all of the plug-in specific functions have the prefix "NPP", and all of the browser-specific functions have the prefix "NPN". The browser calls them when the plug-in software is loaded and unloaded. These functions are exported from the plug-in DLL and accessed with a system table lookup, which means that they are not related to any particular plug-in instance.

Again, see Initialization and Destruction for more information about initializing and destructing. In general, if you want a plug-in to generate additional threads to handle processing at any stage in its lifespan, you should be careful to isolate these from Plug-in API calls. See Initialization and Destruction for more information about using these methods.

Gecko looks for plug-ins in various places and in a particular order. Note: Firefox Nightly checks a subset of these locations. Also some Linux distributions provide a system browser configured differently. Advanced: You can determine which directories a Gecko program checks with the Linux strace command, for example:.

But with version firefox I found other way how check which paths support Firefox :. This output I have after close Firefox. I checked also this command with above script with environment variable on my system and also working. To find out which plug-ins are currently installed visit about:plugins.

Gecko displays a page listing all installed plug-ins and the MIME types they handle, as well as optional descriptive information supplied by the plug-in. On Windows, installed plug-ins are automatically configured to handle the MIME types that they support. The enabledPlugin property is a reference to a Plugin object that represents the plug-in that is configured for the specified MIME type.

You might need to know which plug-in is configured for a MIME type, for example, to dynamically create an object element on the page if the user has a plug-in configured for the MIME type.

The following example uses JavaScript to determine whether the Adobe Flash plug-in is installed. If it is, a movie is displayed. A plug-in is a native code library whose source conforms to standard C syntax. In general, the operation of all API functions is the same on all platforms.

Where this varies, the reference entry for the function in the reference section describes the difference. A plug-in is a dynamic code module that is native to the specific platform on which the browser is running. It is a code library, rather than an application or an applet, and runs only from the browser.

Although plug-ins are platform-specific, the Plug-in API is designed to provide the maximum degree of flexibility and to be functionally consistent across all platforms. You can use the Plug-in API to write plug-ins that are media type driven and provide high performance by taking advantage of native code. Plug-ins give you an opportunity to seamlessly integrate platform-dependent code and enhance the Gecko core functionality by providing support for new data types.

You can write plug-ins that are drawn in their own native windows or frames on a web page. Alternatively, you can write plug-ins that do not require a window to draw into.

Using windowless plug-ins extends the possibilities for web page design and functionality. Note, however, that plug-ins are windowed by default, because windowed plug-ins are in general easier to develop and more stable to use.

The way plug-ins are displayed on the web page is determined by the HTML element that invokes them. This is up to the content developer or web page author. Depending on the element and its attributes, a plug-in can be visible or hidden, or can appear as part of a page or as a full page in its own window. A web page can display a windowed or windowless plug-in in any HTML display mode; however, the plug-in must be visible for its window type to be meaningful.

When a user browses to a web page that invokes a plug-in, how the plug-in appears or does not appear depends on two factors:. This section discusses using HTML elements and display modes. For information about windowed and windowless operation, see Windowed and Windowless Plug-ins. For details about the HTML elements and their attributes, go on to:.

Whether you are writing an HTML page to display a plug-in or developing a plug-in for an HTML author to include in a page, you need to understand how the display mode affects the way plug-ins appear. An embedded plug-in is part of a larger HTML document and is loaded at the time the document is displayed. The plug-in is visible as a rectangular subpart of the page unless it is hidden.

Embedded plug-ins are commonly used for multimedia images relating to text in the page, such as the Adobe Flash plug-in. When Gecko encounters the object or embed element in a document, it attempts to find and display the file represented by the data and src attributes, respectively. The height and width attributes of the object element determine the size of the embedded plug-in in the HTML page.

For example, this object element calls a plug-in that displays video:. A hidden plug-in is a type of embedded plug-in that is not drawn on the screen when it is invoked. In this section of the document, you will use a very simple CSS to ensure the overlay is visible.

It will often be the case that you want to change the behavior of your plugin at initialization time. This is possible by passing data into the plugin using the options property. In this example you will pass in the text to be displayed in the overlay.



0コメント

  • 1000 / 1000