當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript dom-globals.console類代碼示例

本文整理匯總了TypeScript中@ephox/dom-globals.console的典型用法代碼示例。如果您正苦於以下問題:TypeScript console類的具體用法?TypeScript console怎麽用?TypeScript console使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了console類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: function

 const notifyTimeout = function (time) {
   const notification = tinymce.activeEditor.notificationManager.open({
     text: 'Timeout: ' + time,
     timeout: time
   });
   console.log(notification);
 };
開發者ID:tinymce,項目名稱:tinymce,代碼行數:7,代碼來源:NotificationDemo.ts

示例2: return

 onSetup: (api) => {
   console.log('onSetup ' + name);
   const box = Element.fromHtml('<div style="width: ' + width + 'px; background: ' + background + ';"></div>');
   api.element().appendChild(box.dom());
   return () => {
     api.element().removeChild(box.dom());
   };
 },
開發者ID:tinymce,項目名稱:tinymce,代碼行數:8,代碼來源:FullDemo.ts

示例3:

 selector_converter: (selector, group) => {
   console.log('selector', selector, 'group', group);
   return {
     title: selector + '.AdvGroup',
     // NOTE: This is required so that it isn't disabled.
     selector: 'p',
     classes: selector.split('.')[1]
   };
 }
開發者ID:tinymce,項目名稱:tinymce,代碼行數:9,代碼來源:ImportCssGroupsPluginTest.ts

示例4: return

 onSetup: (comp) => {
   // debugger;
   // TODO: TS narrowing, when config toggling = true
   // then the comp interface should include comp.toggleOn otherwise it should complain
   const state = DemoState2.get();
   console.log(state);
   comp.setActive(state);
   return () => { };
 },
開發者ID:tinymce,項目名稱:tinymce,代碼行數:9,代碼來源:ToolbarButtonDemo.ts

示例5:

  onSubmit: (api) => {
    const data = api.getData();

    // tslint:disable-next-line:no-console
    console.log({
      id: data.id
    });

    api.close();
  }
開發者ID:tinymce,項目名稱:tinymce,代碼行數:10,代碼來源:AnchorDialogSpec.ts

示例6: function

 const getCursorY = function (target) {
   /* The y position on the cursor for the viewer is a combination of y position of the editor frame and the y
    * y position of the target
    */
   const editorY = iframe.dom().contentWindow.document.querySelector('iframe').getBoundingClientRect().top;
   const targetY = target.dom().getBoundingClientRect().top;
   // tslint:disable-next-line:no-console
   console.log('editorY', editorY, 'targetY', targetY);
   return editorY + targetY;
 };
開發者ID:tinymce,項目名稱:tinymce,代碼行數:10,代碼來源:IosRealmTest.ts

示例7:

  onSubmit: (api) => {
    const data = api.getData();

    // Submit is only exectuted when the form has valid data
    console.log({
      code: data.color
    });

    api.close();
  }
開發者ID:tinymce,項目名稱:tinymce,代碼行數:10,代碼來源:ColorPickerDialogSpec.ts

示例8:

  onAction: (api, details) => {
    if (details.name === 'char') {
      // Would log '@' if the At sign is clicked these values doesn't have to be part of the state model
      // tslint:disable-next-line:no-console
      console.log({
        char: details.value
      });

      api.close();
    }
  }
開發者ID:tinymce,項目名稱:tinymce,代碼行數:11,代碼來源:CharmapDialogSpec.ts

示例9:

  onSubmit: (api) => {
    const data = api.getData();

    // tslint:disable-next-line:no-console
    console.log({
      language: data.language,
      code: data.code
    });

    api.close();
  }
開發者ID:tinymce,項目名稱:tinymce,代碼行數:11,代碼來源:CodeSampleDialogSpec.ts


注:本文中的@ephox/dom-globals.console類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。