Simple Signal Slot

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-11 20:28:33

软件介绍

This plugin is utility for convinience of communication between iframes in HTML page,
it is mimicking from Qt's signal/slot concept.

you can do with jquery.sigslot.js:

  • send signal to N-depth iframe page
  • async. or sync. communication
  • exclude or include particular iframe
  • allow multiple slot or just one

Usage

([ .. ] for opton , '|' for seperator)

    1. slot
  • $.slot.add( 'sig/slot id', function [,repeatable] )
  • repeatable = true | false
    false: allow only one slot function for signal-id (default)
    true: allow every slot function for signal-id, even it is identical. so, slot function is called as many as times you registered
    ex) $.slot.add( 'test', [a,b,c,d], true );
  • $.slot.remove( 'sig/slot id'[, function]);
  • * if function is omitted, remove all slot functions for signal-id
  • $.slot.countOf( 'sig/slot id');
  • * return number of registered slot function for signal-id

    2. signal
  • $.signal( 'sig/slot id',  args, [, options ] );
  • * args: arguments passing to slot function. wrap by [] if you want to pass more than one.
    * options : simple object, for ...

      direction = $.signal.SELF | $.signal.UPLINK | $.signal.FOLLOWLINK | $.signal.OTHER | $.signal.BROADCAST
       purpose: direct where to pass signal. default for all iframes include window.self
       - $.signal.SELF (send signal only to current page that the signal occur)
       - $.signal.UPLINK (send signal only to parents iframes EXCLUDE current page that the signal occur)
       - $.signal.FOLLOWLINK (send signal only to child iframes EXCLUDE current page that the signal occur)
       - $.signal.OTHER (send signal to all iframe pages EXCLUDE current page that the signal occur)
       - $.signal.BROADCAST (send signal to all iframes INCLUDE current page that the signal occur)

      sync = true | false
       purpose: select async or sync call. boolean type. default is sync.

    * $.signal will NOT cause error, if there's no slot function for signal-id. It will do nothing.

本文地址:https://codercto.com/soft/d/23174.html

匠心体验

匠心体验

[法] 艾米丽·布歇 / 吴 博 / 人民邮电出版社 / 2016-11 / 69.00元

本书针对在智能手机和平板电脑的网站及应用程序设计,详细剖析了移动终端服务的用户体验设计要点,阐述了营造舒适的感官体验、甄选内容及功能、提高用户效率、优化等待时间、合理实施教学、情感设计等方面的设计诀窍,并通过大量实例,呈现当今移动终端服务设计中的亮点与雷区。一起来看看 《匠心体验》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试