找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 45|回复: 4

这个加载不出来的是个啥

[复制链接]

111

主题

168

回帖

681

积分

高级会员

积分
681
发表于 2019-4-8 16:47:39 | 显示全部楼层 |阅读模式
网址发出来,网址发来
回复

使用道具 举报

111

主题

168

回帖

681

积分

高级会员

积分
681
 楼主| 发表于 2019-4-8 16:49:10 | 显示全部楼层

xiaohared 发表于 2019-4-8 16:52

网址是http://bj.cywl.xin

正常加载,没任何错误,可能你有缓存问题
回复

使用道具 举报

3

主题

388

回帖

793

积分

高级会员

积分
793
发表于 2019-4-8 16:49:45 | 显示全部楼层

xiaohared 发表于 2019-4-8 16:56

有个东西一直转圈,根据大佬们说的,f12看了下,是有个文件加载失败,那个cdn.rawgit.com访问不了了 ...

发现了,把代理关掉,打不开

https://cdn.rawgit.com/SVG-Edit/svgedit/stable/editor/embedapi.js

我一直开着代理的...
回复

使用道具 举报

111

主题

168

回帖

681

积分

高级会员

积分
681
 楼主| 发表于 2019-4-8 16:52:27 | 显示全部楼层
[ol][*]/*
[*]Embedded SVG-edit API
[*]
[*]General usage:
[*]- Have an iframe somewhere pointing to a version of svg-edit > r1000
[*]- Initialize the magic with:
[*]var svgCanvas = new EmbeddedSVGEdit(window.frames.svgedit);
[*]- Pass functions in this format:
[*]svgCanvas.setSvgString('string')
[*]- Or if a callback is needed:
[*]svgCanvas.setSvgString('string')(function(data, error){
[*]  if (error){
[*]    // There was an error
[*]  } else{
[*]    // Handle data
[*]  }
[*]})
[*]
[*]Everything is done with the same API as the real svg-edit,
[*]and all documentation is unchanged.
[*]
[*]However, this file depends on the postMessage API which
[*]can only support JSON-serializable arguments and
[*]return values, so, for example, arguments whose value is
[*]'undefined', a function, a non-finite number, or a built-in
[*]object like Date(), RegExp(), etc. will most likely not behave
[*]as expected. In such a case one may need to host
[*]the SVG editor on the same domain and reference the
[*]JavaScript methods on the frame itself.
[*]
[*]The only other difference is
[*]when handling returns: the callback notation is used instead.
[*]
[*]var blah = new EmbeddedSVGEdit(window.frames.svgedit);
[*]blah.clearSelection('woot', 'blah', 1337, [1, 2, 3, 4, 5, 'moo'], -42, {a: 'tree',b:6, c: 9})(function(){console.log('GET DATA',arguments)})
[*]*/
[*]
[*](function () {'use strict';
[*]
[*]var cbid = 0;
[*]
[*]function getCallbackSetter (d) {
[*]  return function () {
[*]    var t = this, // New callback
[*]      args = [].slice.call(arguments),
[*]      cbid = t.send(d, args, function(){});  // The callback (currently it's nothing, but will be set later)
[*]
[*]    return function(newcallback){
[*]      t.callbacks[cbid] = newcallback; // Set callback
[*]    };
[*]  };
[*]}
[*]
[*]/*
[*]* Having this separate from messageListener allows us to
[*]* avoid using JSON parsing (and its limitations) in the case
[*]* of same domain control
[*]*/
[*]function addCallback (t, data) {
[*]  var result = data.result || data.error,
[*]        cbid = data.id;
[*]  if (t.callbacks[cbid]) {
[*]    if (data.result) {
[*]      t.callbacks[cbid](result);
[*]    } else {
[*]      t.callbacks[cbid](result, 'error');
[*]    }
[*]  }
[*]}
[*]
[*]function messageListener (e) {
[*]  // We accept and post strings as opposed to objects for the sake of IE9 support; this
[*]  //   will most likely be changed in the future
[*]  if (typeof e.data !== 'string') {
[*]    return;
[*]  }
[*]  var allowedOrigins = this.allowedOrigins,
[*]    data = e.data && JSON.parse(e.data);
[*]  if (!data || typeof data !== 'object' || data.namespace !== 'svg-edit' ||
[*]      e.source !== this.frame.contentWindow ||
[*]      (allowedOrigins.indexOf('*') === -1 && allowedOrigins.indexOf(e.origin) === -1)
[*]  ) {
[*]    return;
[*]  }
[*]  addCallback(this, data);
[*]}
[*]
[*]function getMessageListener (t) {
[*]        return function (e) {
[*]                messageListener.call(t, e);
[*]        };
[*]}
[*]
[*]/**
[*]* @param {HTMLIFrameElement} frame
[*]* @param {array} [allowedOrigins=[]] Array of origins from which incoming
[*]*     messages will be allowed when same origin is not used; defaults to none.
[*]*     If supplied, it should probably be the same as svgEditor's allowedOrigins
[*]*/
[*]function EmbeddedSVGEdit (frame, allowedOrigins) {
[*]  if (!(this instanceof EmbeddedSVGEdit)) { // Allow invocation without 'new' keyword
[*]    return new EmbeddedSVGEdit(frame);
[*]  }
[*]  this.allowedOrigins = allowedOrigins || [];
[*]  // Initialize communication
[*]  this.frame = frame;
[*]  this.callbacks = {};
[*]  // List of functions extracted with this:
[*]  // Run in firebug on http://svg-edit.googlecode.com/svn/trunk/docs/files/svgcanvas-js.html
[*]
[*]  // for (var i=0,q=[],f = document.querySelectorAll('div.CFunction h3.CTitle a'); i 复制代码
回复

使用道具 举报

3

主题

388

回帖

793

积分

高级会员

积分
793
发表于 2019-4-8 16:55:19 | 显示全部楼层
http://bj.cywl.xin/lib/exe/js.php?t=dokuwiki&tseed=e8a51745f2a59bdcc1a6553af7bd95ea

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2025-4-21 10:03 , Processed in 0.016703 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表