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

赢在用户

赢在用户

[美]Steve Mulder、[美]Zivv Yarr / 范晓燕 / 机械工业出版社 / 2007-08-01 / 29.00

您如何保证您的网站确实给予用户他们所需要的,并对您产生商业成果?您需要了解谁是您的用户,您的用户的目标、行为和观点是什么,还要把他们的需求当成您的第一要务。人物角色将用户研究带入了一个更高的境界,成为实施真正以用户为中心的在线商业策略最高效的工具。本书将伴随您走过创建人物角色的每一个步骤,包括进行定性、定量的用户研究,生成人物角色分类,使人物角色真实可信等。您也将学会如何有效地通过这个工具,来完成......一起来看看 《赢在用户》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

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

UNIX 时间戳转换