Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:04
    greenkeeper[bot] commented #5392
  • 01:04

    greenkeeper[bot] on core-js-3.5.0

    chore(package): update core-js … (compare)

  • Dec 11 18:34
    greenkeeper[bot] labeled #5444
  • Dec 11 18:34
    greenkeeper[bot] opened #5444
  • Dec 11 18:34

    greenkeeper[bot] on can-observable-mixin-1.0.7

    fix(package): update can-observ… (compare)

  • Dec 11 18:30

    cherifGsoul on update-infrastructure-page

    (compare)

  • Dec 11 18:30

    cherifGsoul on master

    Update infrastructure page with… (compare)

  • Dec 11 18:30
    cherifGsoul closed #5441
  • Dec 11 18:30
    cherifGsoul closed #5417
  • Dec 10 17:40
    cherifGsoul review_requested #5443
  • Dec 10 16:47
    cherifGsoul review_requested #5441
  • Dec 10 16:35
    cherifGsoul synchronize #5441
  • Dec 10 16:35

    cherifGsoul on update-infrastructure-page

    Fix typos (compare)

  • Dec 10 10:01
    jkeruzec starred canjs/canjs
  • Dec 09 18:59
    cherifGsoul review_requested #5443
  • Dec 09 18:59
    cherifGsoul opened #5443
  • Dec 09 18:51

    cherifGsoul on document-inserted-removed-can6

    Add inserted/removed events to … (compare)

  • Dec 09 15:38
    greenkeeper[bot] labeled #5442
  • Dec 09 15:38
    greenkeeper[bot] opened #5442
  • Dec 09 15:38

    greenkeeper[bot] on can-view-live-5.0.1

    fix(package): update can-view-l… (compare)

Viktor Busko
@Lighttree

Hi :)

I'm trying to run compiled app on one of the pages of another app that knows nothing about can.js or steal or webpack, so just rendering app in some div.

And I have following issue when add bundle to the page:
"Uncaught TypeError: Cannot define property _instanceDefinitions, object is not extensible" at this line:
https://github.com/canjs/can-define/blob/master/define-helpers/define-helpers.js#L17

After short research I found out that my bundle contains these lines:
https://github.com/canjs/can-define/blob/master/can-define.js#L809

// only seal in dev mode for performance reasons.
//!steal-remove-start
    this._data;
    this._computed;
    if(sealed !== false) {
        Object.seal(this);
    }
//!steal-remove-end

And as I got this seals object, so later it can't be extended by define-helpers.

Since I'm building app by Webpack it leaves this sections because obviously !steal-remove-start something that only Steal understands.
I think I can add logic to remove these blocks, but is it safe ? Or is there any other ways to get version without these blocks.

Viktor Busko
@Lighttree
Something that I don't understand that everything is ok when I open this app on separate page. (Just index.html from server), but when I add this bundle to another page this issue appears.
Kevin Phillips
@phillipskevin
even with DefineMaps sealed, this error should not be happening
can you find out what object that error is being thrown for @Lighttree ?
Viktor Busko
@Lighttree
let me check
Viktor Busko
@Lighttree
for AppViewModel
const AppViewModel = DefineMap.extend('AppViewModel', {
    appName: {
        type: 'string',
        serialize: false
    },
    filter: 'string'
});

const appVM = new AppViewModel({
    appName: 'Name'
});

route.data = appVM;
route('{filter}');
route.ready();

document.body.appendChild(view(appVM));
Hmmm this works fine if I remove
route.data = appVM;
route('{filter}');
route.ready();
Kevin Phillips
@phillipskevin
are you calling route.attr(...) somewhere?
Viktor Busko
@Lighttree
No there is no code in this app. This is kinda empty app. But I think maybe the reason is that there is already URL on page where I "insert" this app ?
https://localhost/something/t/home?param1=value&param2=value
and can.route doing something that cause this issue
I just put this bundle to Apache and using this url everything works fine: https://localhost/something/
Kevin Phillips
@phillipskevin
ah, so it's trying to set param1 and param2 on your AppViewModel
Viktor Busko
@Lighttree
thats fine to me .. I think, but why it can't ?
I must list them in VM ?
just checked - didn't helped
Kevin Phillips
@phillipskevin
can you set a breakpoint in that defineExpando function?
Viktor Busko
@Lighttree
wait I described my params in a wrong place, maybe If I put them in route function correctly it will work.
Viktor Busko
@Lighttree
@phillipskevin Hmmm I think that the issue was due to can-route-pushstate. I used it during development...but If I wan't to open the same app in some popup it is better to use normal can-route by #! in this case application URL will work fine.
The goal is to be able open the same app as separate or in lightbox :)
and this lighbox can be opened in another application :)
sounds like case for iframe besides
Kevin Phillips
@phillipskevin
@Lighttree is this the issue in your app? canjs/can-route#98
I saw the same thing in another app, so want to make sure it's the same thing that is happening to you
Viktor Busko
@Lighttree
Yep looks the same.
Viktor Busko
@Lighttree

Guys I'm feeling bad myself because of amount of issues I'm asking about :), but one more:

http://jsbin.com/derayewanu/1/edit?html,js,console,output

This bin works fine in Chrome/Edge, but in IE11 SVG that I added in stache not rendered.
Is there workaround for this ? I remember in 2.2.9 stache had same issue, but for all the browsers.

Viktor Busko
@Lighttree
Maybe this is related: canjs/can-stache#95 not sure
Frank Lemanschik
@frank-dspeed
@Lighttree npm install --save can-stache@^3.3.0
and try it out
that patch is merged
so maybe it works after that when that is the issue
Viktor Busko
@Lighttree
already 3.3.0
Frank Lemanschik
@frank-dspeed
then this is not the error
sorry can't help with that
i am never microsoft compatible
they simply don't matter anymore
Viktor Busko
@Lighttree
You mean IE11 users ? :)
Kevin Phillips
@phillipskevin
@Lighttree can you submit an issue?
Viktor Busko
@Lighttree
Sure
Viktor Busko
@Lighttree
canjs/can-stache#242
Gregg Roemhildt
@roemhildtg
Hi guys, I've got some select dropdowns that get populated from an promise that resolves to a can-define list. In IOS, for some reason the options are showing up as empty. Anyone ever run into this?
image.png
Gregg Roemhildt
@roemhildtg
it looks like the generated html looks like this:
image.png
But in regular windows, chrome looks like this:
image.png
Kevin Phillips
@phillipskevin
ios safari you mean?
Gregg Roemhildt
@roemhildtg
Well, the same issue also appears in firefox, chrome, on iphone and ipad
Kevin Phillips
@phillipskevin
all browsers on ios use the same javascript engine
what does your template look like for the <option>s?
Gregg Roemhildt
@roemhildtg
<select {($value)}="value" class="form-select form-control" name="{{properties.name}}">
    {{#each properties.options}}
        <option value="{{value}}">{{label}}</option>
    {{/each}}
</select>