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://www.codercto.com/soft/d/23174.html

程序设计语言

程序设计语言

斯科特 / 裘宗燕 / 电子工业出版社 / 2005-1 / 88.00元

这是一本很有特色的教材,其核心是讨论程序设计语言的工作原理和技术。本书融合了传统的程序设计语言教科书和编译教科书的有关知识,并增加了一些有关汇编层体系结构的材料,以满足没学过计算机组织的学生们的需要。书中通过各种语言的例子,阐释了程序设计语言的重要基础概念,讨论了各种概念之间的关系,解释了语言中许多结构的形成和发展过程,以及它们演化为今天这种形式的根源。书中还详细讨论了编译器的工作方式和工作过程,......一起来看看 《程序设计语言》 这本书的介绍吧!

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

在线压缩/解压 JS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器