// 다양한 querySelector
var textInput = Polymer.dom(this.root).querySelector("sc-text-field");
var textInput = Polymer.dom(this.root).querySelector("#text01");
var textInput = this.$$("sc-text-field");
var textInput = this.$$("#text01"); <- 동적으로 생성된 노드 검색시
var textInput = this.$.text01;
var _radioFields = Polymer.dom(this.root).querySelectorAll("[name='rdoPkcType']");
for (var _idx in _radioFields)
{
if (_radioFields[_idx] != event.target)
{
_radioFields[_idx].value = false;
}
var _tabs = Polymer.dom(me.$.tabNavi).children.filter(function(item, index, array)
{
return !item.hidden;
});
}
// 이벤트 테스트 (event.options은 안되더라)
var _me = Polymer.getDocument().querySelector("es-sc-stg-mgt-1");
var _me = document.querySelector("es-sc-stg-mgt-1");
_me.addEventListener("test-call", function(event)
{
_me.removeEventListener(event.type, arguments.callee);
console.log(event.type);
console.log(event.detail);
console.log(event.options);
});
_me.fire("test-call", {param:"1234"}, {editable:true});
// 일정시간후 비동기 호출 (Polymer.Base == this)
var _handle = Polymer.Base.async(function() {console.log("called async!");}, 3000);
// 호출한 비동기 호출 취소
Polymer.Base.cancelAsync(_handle);
// 연달아 3번 다 실행된다.
Polymer.Base.async(function() {console.log("called async!");}, 3000);
Polymer.Base.async(function() {console.log("called async!");}, 3000);
Polymer.Base.async(function() {console.log("called async!");}, 3000);
// debouncer
// 3초후 자동실행
var _handle = _me.debounce("myJob", function() {console.log("called debouncer!");}, 10000);
var _handle = _me.debounce("myJob", () => console.log("called debounce!"), 10000);
// debouncer 즉시실행 후 취소
_me.flushDebouncer("myJob");
// debouncer 활성확인
_me.isDebouncerActive("myJob");
// debouncer 취소
_me.cancelDebouncer("myJob");
// 3번호출해도 1번만 호출된다.
_me.debounce("myJob", function() {console.log("called debouncer!");}, 3000);
_me.debounce("myJob", function() {console.log("called debouncer!");}, 3000);
_me.debounce("myJob", function() {console.log("called debouncer!");}, 3000);
async, debounce
|
2019.07.01 21:49:44
|
2019.07.01 21:49:44
|
429
|
Aiden
Total of Attached file
0.00 Bytes of 0 files
2019.11.29
2019.11.15
2019.11.14
2019.07.30
2019.07.01
2019.03.07
2018.12.25
2018.12.12
2018.11.29
2018.11.02