aboutsummaryrefslogtreecommitdiffstats
path: root/option-selector.js
diff options
context:
space:
mode:
authoranekos2009-11-26 21:07:54 +0000
committeranekos2009-11-26 21:07:54 +0000
commit5214682def684b3b9153ca161b4671aa2edd0583 (patch)
tree23e3cb92bc32b5893b93e959452945f901f31d7f /option-selector.js
parent989862dd3bddb000309cf933985a24c2a8618a60 (diff)
downloadvimperator-plugins-5214682def684b3b9153ca161b4671aa2edd0583.tar.bz2
onChange イベントを発行するように修正
フォーカスを戻すように修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36007 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'option-selector.js')
-rwxr-xr-xoption-selector.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/option-selector.js b/option-selector.js
index 89c4b28..ab90ead 100755
--- a/option-selector.js
+++ b/option-selector.js
@@ -38,13 +38,13 @@ let PLUGIN_INFO =
<name>Option Selector</name>
<description>Select a option of the select element.</description>
<description lang="ja">select 要素の option を選択する。</description>
- <version>1.0.0</version>
+ <version>1.0.1</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<license>new BSD License (Please read the source code comments of this plugin)</license>
<license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license>
<updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/option-selector.js</updateURL>
<minVersion>2.2pre</minVersion>
- <maxVersion>2.2pre</maxVersion>
+ <maxVersion>2.3</maxVersion>
<detail><![CDATA[
Type <C-i> on "select" element.
]]></detail>
@@ -64,6 +64,10 @@ let PLUGIN_INFO =
'Select a option of the select element',
function (args) {
targetElement.value = args.string;
+ let event = content.document.createEvent('Event');
+ event.initEvent('change', true, true);
+ targetElement.dispatchEvent(event);
+ targetElement.focus();
},
{
literal: 0,