Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 29 14:58
    ycjcl868 starred canjs/canjs
  • Nov 25 16:22
    AkramZerarka starred canjs/canjs
  • Nov 24 10:53
    rjgotten edited #5513
  • Nov 24 10:48
    rjgotten edited #5513
  • Nov 24 10:47
    rjgotten edited #5513
  • Nov 24 10:41
    rjgotten edited #5513
  • Nov 24 10:30
    rjgotten opened #5513
  • Nov 24 09:02
    Amine-Smahi starred canjs/canjs
  • Nov 20 08:05
    cduivis starred canjs/canjs
  • Nov 20 08:05
    cduivis starred canjs/canjs
  • Nov 16 08:54
    nullrooter starred canjs/canjs
  • Nov 12 18:48
    cherifGsoul synchronize #5509
  • Nov 12 18:48

    cherifGsoul on upgrade-can-ajax

    Upgrade ios version (compare)

  • Nov 06 17:32

    cherifGsoul on master

    Update dist for release (compare)

  • Nov 06 17:32

    cherifGsoul on v6.6.1

    Update dist for release 6.6.1 (compare)

  • Nov 06 17:26

    cherifGsoul on upgrade-can-param-can-deparam-661

    (compare)

  • Nov 06 17:25

    cherifGsoul on master

    Preapre v6.6.1 (#5512) (compare)

  • Nov 06 17:25
    cherifGsoul closed #5512
  • Nov 05 18:50
    cherifGsoul opened #5512
  • Nov 05 18:38

    cherifGsoul on upgrade-can-param-can-deparam-661

    Preapre v6.6.1 (compare)

Chasen Le Hara
@chasenlehara
@gKreator Can you reproduce the issue in a JS Bin?
Gira Minus
@gKreator
No, it works on jsbin. I think I'm using a wrong combination of packages or something. I have the same issue on 2 projects.
Mike 'mitch' Mitchel
@mikemitchel
Hello all. If I have a stache in CanJS 2.3 with an href, href="{{feedbackFormUrl}}, can I make it open in a new tab/window with a built in can-stache solution or would I need to make a custom helper to handle it?
Mike 'mitch' Mitchel
@mikemitchel
answered my own question - much simpler than I thought target=“_blank”
Gira Minus
@gKreator
Yup
Mike 'mitch' Mitchel
@mikemitchel
in the a tag
helps to refresh the cache :-) as well
Guido Smeets
@gsmeets
does anyone know if creating references in a tree structure from child to parent (i.e. creating circular references) can cause memleaks? Or is canjs ( or the browser gc) smart enough to clean that up?
Gira Minus
@gKreator
Im pretty sure every variable in js is a reference
Frank Lemanschik
@frank-dspeed
@gsmeets good question i like it the answer is more complex then you think :) it depends on your code if gc cleans up or not most efficent way is to never let gc happen!
so if you want to clean up a var let do it from hand.
Its one of my core principals to never let gc even run !
a realy good example for a never cleaned Var or Let in CanJS is when you create streams where you never listen too :)
Gira Minus
@gKreator
Anyone have experience with merging multiple api ajax calls into one?
Frank Lemanschik
@frank-dspeed
@gKreator in general yes but it depends a bit on your use case

Not possible in most cases

Each ajax call involves the browser sending information to a server at a particular URL.

If you reduced the browser code from two ajax calls to one ajax call, the server would receive less information, the browser would not receive some information it is getting now, and/or the server would perform fewer operations.

If you control the server code, you might be able to change the server code to be able to do both operations in one step. Only then could you change the browser code.

for example to combine database querys i am as couchbase user :) can do simply chain querys and fire one big query
that returns multible results so i can reduce my ajax requests always to 1
but if you talk about for example ajax requests to json endpoints you cant merge them you can only wait till both promises are done
Conclusion merging requests client side is not possible by the coder :)
but http2 is merging such requests on protocol network layer
i am so happy when http2 is full standart then all this bundling packaging caching brings nothing anymore and we have much better applications :)
DaveO
@DaveO-Home

Issues with upgrade from Canjs 3.4.0 to Canjs 3.4.1:

  1. can/control - I have node_modules/can installed ("can": "^3.4.0",).
    steal("can/control"..., function(Control...) {

     Control.extend(...  <=====failed with "not a function" error.

    }

    Added "can-control": "*", to package and changed steal to;
    steal("can-control"..., function(Control...) {

     Control.extend <==== worked

    }

    Question, does the proper configuration for canjs require the individual modules in package.json? I find it convenient to just configure "can".

  2. Steal-tools: application is using the Steal-CSS extension,
    steal.import("node_modules/font-awesome/css/font-awesome.min.css"); Note: the app will build properly.
    Building with steal-tools javascript;

    !/usr/bin/env node

    var stealTools = require("steal-tools");
    //
    var promise = stealTools.build({ .....

Stack trace repeated for each css file import....

Potentially unhandled rejection [58] Error: Error loading "components/font-awesome/css/font-awesome.min.css!steal-css@1.2.1#css" at file:/home/daveo/NetBeans/Resume/web/components/font-awesome/css/font-awesome.min.css
Unable to load CSS in an environment without a document.
at getDocument (file:/home/daveo/NetBeans/Resume/web/node_modules/steal-css/css.js:36:8)
at load.metadata.execute (file:/home/daveo/NetBeans/Resume/web/node_modules/steal-css/css.js:224:7)
at linkDynamicModule (/home/daveo/NetBeans/Resume/node_modules/steal-systemjs/dist/system.src.js:743:32)
at link (/home/daveo/NetBeans/Resume/node_modules/steal-systemjs/dist/system.src.js:602:11)
at Object.execute (/home/daveo/NetBeans/Resume/node_modules/steal-systemjs/dist/system.src.js:934:11)
at doDynamicExecute (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1969:25)
at link (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:2017:24)
at doLink (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1791:7)
at updateLinkSetOnLoad (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1839:18)
at /home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1645:11

Gira Minus
@gKreator
#1 its best to use them individually
DaveO
@DaveO-Home
Ok, but all of the other "can/" modules are working properly.
Gira Minus
@gKreator
Yeah it should all work
Its just kinda preferred to only load what is needed
Did u try to delete ur node_modules folder and reinstall?
DaveO
@DaveO-Home
steal-tools selects only what is used for production, I think?
Actually that is what I eventually did to get things working again, the the Control.extend issue remain.
Gira Minus
@gKreator
So #2 is working?
DaveO
@DaveO-Home
Not without my change to the individual module can-control.
Gira Minus
@gKreator
One sec let me get to my pc

did you try

steal("can/control/"

?
DaveO
@DaveO-Home
Will try...
Got this: TypeError: Error loading "resume@0.0.3#appl/js/index" at http://localhost:8080/resume/appl/js/index.js
Control.extend is not a function
Stack trace:
anonymous/<@http://localhost:8080/resume/appl/js/utils/basecontrol.js:11:20
steal/stealInstantiateResult.execute@http://localhost:8080/resume/node_modules/steal/steal.js:5707:24
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3659:18
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3653:11
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3653:11
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3653:11
link@http://localhost:8080/resume/node_modules/steal/steal.js:3518:11
register/loader.instantiate/</<.execute@http://localhost:8080/resume/node_modules/steal/steal.js:3850:11
doDynamicExecute@http://localhost:8080/resume/node_modules/steal/steal.js:1969:20
link@http://localhost:8080/resume/node_modules/steal/steal.js:2017:24
doLink@http://localhost:8080/resume/node_modules/steal/steal.js:1791:7
Gira Minus
@gKreator
can you do a console.log( Control );
before Control.extend
DaveO
@DaveO-Home
Sure...
DaveO
@DaveO-Home
Control=[object Object] basecontrol.js:10:1
Control.extend=undefined
Gira Minus
@gKreator
weird..
how do you require in component?
or route
DaveO
@DaveO-Home
I use require("package.json!npm");
Gira Minus
@gKreator
then you have can.Component?
DaveO
@DaveO-Home
Yes
Gira Minus
@gKreator
but can.Control does not work?
DaveO
@DaveO-Home
let me check on component
I don't explicitly use can.component