2

I have a specific question about instantiating a QuickTime object in Internet Explorer.

QuickTime in IE uses an <object> as a 'behaviour' template in order to enable DOM events. The behaviour <object> is referenced from the QuickTime plugin instance with IE's behavior style: style="behavior: url(#id_of_behavior_object)".

This works great for all QuickTime <object> instances declared before window.onload, but QuickTime <object> instances inserted into the DOM after that do not pick up the DOM events behaviour.

I do not know exactly how behaviour styles work and what I've read so far hasn't made me any the wiser. Are behaviours called on elements that reference them, only on page load, and therefore can't be picked up later?

Are there any methods for enabling DOM events from QuickTime objects inserted after page load?


Just so you know - I've tried various methods of DOM insertion - innerHTML, createElement, and calling iframes with their own html page containing the necessary objects. None of these work for enabling DOM events on insertion after page load.

Cheers!


If you're targeting 10.5 or above, you can use Core Animation via the animator proxy added to NSView. Try

[[someView animator] setFrame: someNewFrame];
4

2 に答える 2

1

この質問はしばらくの間ここにありました。私はそれを機能させるためにかなり多くのハッキングを行いましたが、方法が見つからなかったので、答えは次のように結論付けなければなりません:

いいえ。

于 2010-10-05T22:36:31.140 に答える
0

必要なのは、要素をロードした後に発生するカスタム イベントです。window.onload/document.ready/dom:loaded 中に割り当てたイベント ハンドラー (名前は何でも - ライブラリ/フレームワークによって異なります) は、使用しようとしている要素がまだ存在しないため、明らかに機能しません。 .

ある種の ajax 呼び出しを使用する場合は、onSuccess ハンドラーに監視メソッドを追加するだけです。

于 2009-08-26T21:47:16.487 に答える