Back to "Цікавий допис про те, як Mozilla XUL працює в Internet Explorer by Jean-Yves Cronier"

This is a viewer only at the moment see the article on how this works.

To update the preview hit Ctrl-Alt-R (or ⌘-Alt-R on Mac) or Enter to refresh. The Save icon lets you save the markdown file to disk

This is a preview from the server running through my markdig pipeline

Imported mostlylucidcouk

Цікавий допис про те, як Mozilla XUL працює в Internet Explorer by Jean-Yves Cronier

Sunday, 30 October 2005

Цікавий допис про те, як Mozilla XUL працює в Internet Explorer by Jean-Yves Cronier

в неділю, 12 вересня 2004 року, 11:46.

Нехай перехрещується далі! Jean-Yves Cronier left коментар на моєму старий допис про HTC всередині Mozilla, він вказує на пост, який він залишив у форум XULPlanet показуючи техніку, щоб отримати Поведінка XUL запущено всередині Інтернет Explorer використовує просту поведінку HTC як шар інтерфейсу. Знову ж таки, це дуже круто - і, якщо ви зможете розширити її так, щоб забезпечити повний переклад між усіма поведінками IE HTC і їх еквівалентом XUL! У будь- якому разі, оскільки цю дію було розміщено на форумі, я не знаю ні про що не знаю, я повторю такий допис:

Я думав про можливості, запропоновані відомою поведінкою HTC до IE. Я думаю, що було б можливо інтерпретувати незначну частину специфікацій XUL.

Невеличкий зразок:

index.xul:

Код:
<? xml версії=" 1. 0 "encoding=" iso- 8859- 1"?>
<? xml- stylesheet type=" text/cs" href=" xul. css "media=" all"?>
<window id=" example- window " title=" Example" xmlns=" http: // www.mozilla. org/ keymaster/ gpageper/ therere.is. only. xul ">
<label control=" some- text " значення=" Виявіть якийсь текст" />
<textbox id=" some- text " значення=" to " />
<label control=" some- password " значення=" Виконайте пароль " />
<textbox id=" some- password " type=" password" maxle=" 8 " />
<menulist label=" Bus ">
  <menupopup>
    <menuitem label=" Car " />
    <menuitem label=" Taxi " />
    <menuitem label=" Bus " selected=" true " />
    <menuitem label=" Train " />
  </ menupompup>
</ menulist>
</ window>

xul. css:

| | | --- | | Код: | } {послідовність: адреса. htc)}
menuitem} {menuitem. htc)}
menulist} {\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ >\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ >
menupopup{ behavior: purlmenupup.htc)}
textbox{ behavior: адреса_ textbox.htc)}
window}

label. htc:

Код:
<публічне: htc urn=" window ">
<public: attach подія=" on document prepared "proctor=" build" />
<публічне: Неправильне ім' я=" значення " />
<скрипт type=" text/ javascript ">
function build} { this. WinnerHTML= this. value;}
</ script>
</ public: htc>

menuitem. htc:

Код:
<публічне: htc urn=" window ">
<public: attach подія=" on document prepared "proctor=" build" />
<публічне: Неправильне ім' я=" id " />
<публічне: Неправильне ім' я=" label " />
<публічне: Неправильне ім' я=" значення " />
<скрипт type=" text/ javascript ">
function build} {
 var параметр = document. create Eloction} "кнопка ");
 var style= this. currentStyle;
 option. setAttribute} "id",id);
 if} this. id!=null) "id", this.id);}
 if} this. value!=null) " value," this. value);}
 if} quot!=null)
 у стилі ttyvar position) {option. style[probect]=style[probect];}
 this. outerHTML=option. outerHTML;
}
</ script>
</ public: htc>

menulist. htc:

Код:
<публічне: htc urn=" window ">
<public: attach подія=" on document prepared "proctor=" build" />
<публічне: Неправильне ім' я=" id " />
<скрипт type=" text/ javascript ">
function build} {
 var chooser = document. create Eloction} "select";
 var style= this. currentStyle;
 select. setAttribute} "id ");
 if}id!=null) {
 select. setAttribute} "id ," this. id);
 select. setAttribute} "name", this. id);
   }
 chooser. WinnerHTML= this. WinnerHTML;
 for}var position в стилі) {
 select.style[probect]=style[progress];
   }
 select. style. width=" 100% ";
 this. outerHTML=select. outerHTML;
}
</ script>
</ public: htc>

menupopup. htc:

Код:
<публічне: htc urn=" window ">
<public: attach подія=" on document prepared "proctor=" build" />
<публічне: Неправильне ім' я=" id " />
<публічне: Неправильне ім' я=" label " />
<публічне: Неправильне ім' я=" значення " />
<скрипт type=" text/ javascript ">
function build} {
 var optgroup = document. createElComment} "opt group";
 var style= this. currentStyle;
 if} this. id!=null) "id", this.id);}
 if} this. label!=null) {optgroup. WinnerHTML= this. label;}
 opt group. WinnerHTML= this. WinnerHTML;
 у стилі }var application) {optgroup. style[probect]=style[probect];}
 this. outerHTML=optgroup. outerHTML;
}
</ script>
</ public: htc>

textbox. htc:

Код:
<публічне: htc urn=" window ">
<public: attach подія=" on document prepared "proctor=" build" />
<публічне: Неправильне ім' я=" id " />
<публічне: Неправильне ім' я=" значення " />
<public: Неправильна назва=" type " />
<публічне: Неправильне ім' я=" maxtension " />
<скрипт type=" text/ javascript ">
function build} {
 var input = document. create Eloction} "input");
 var style= this. currentStyle;
 input. setAttribute} "id");
 if}значення!=null) "значення", значення);}
 if}type!=null) type", type);}
 if} maxmaxlength!=null) "maxlength", maxmaxlength);}
 у стилі ttyvar application) {input. style[probect]=style[probect];}
 input. style. width=" 100% ";
 input. style. cursor=" text ";
 input. style. borderStyle=" inset ";
 input. style. borderColor=" ActiveBorder ";
 input. style. borderWidth=" 2px ";
 input. style. backgroundColor="# FFFFFF ";
 input. style. padingLeft=" 2px ";
 this. outerHTML=input. outerHTML;
}
</ script>
</ public: htc>

window. htc:

Код:
<публічне: htc urn=" window ">
<public: attach подія=" on document prepared "proctor=" build" />
<публічне: Неправильне ім' я=" title " />
<скрипт type=" text/ javascript ">
function build} { window. status= this. title;}
</ script>
</ public: htc>

Забавно, да? Дуже щасливий

Метою такого проекту не є підвищення якості Explorer Internet, але просто показати короткий огляд інших (які не мають Mozilla Web Brooker) технологій, доступних за допомогою Mozilla Framework

logo

© 2026 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.